From 8e319b9886e53489fe63790213b227e08f8dffe7 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 11 Jan 2022 08:16:44 +0200 Subject: [PATCH 01/19] remove jQuery and move terms-ordder to classic-editor only --- js/classic-editor.js | 1 + package.json | 3 +- php/media/class-global-transformations.php | 3 + src/js/blocks.js | 3 - .../terms-order.js => classic-editor.js} | 6 +- src/js/components/settings-page.js | 158 ------------------ src/js/components/terms-inspector.js | 6 + src/js/main.js | 7 - webpack.config.js | 1 + 9 files changed, 16 insertions(+), 172 deletions(-) create mode 100644 js/classic-editor.js rename src/js/{components/terms-order.js => classic-editor.js} (98%) delete mode 100644 src/js/components/settings-page.js diff --git a/js/classic-editor.js b/js/classic-editor.js new file mode 100644 index 000000000..a812322b6 --- /dev/null +++ b/js/classic-editor.js @@ -0,0 +1 @@ +!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=43)}({43:function(e,t,a){"use strict";a.r(t);const n={template:"",tags:jQuery("#cld-tax-items"),tagDelimiter:window.tagsSuggestL10n&&window.tagsSuggestL10n.tagDelimiter||",",startId:null,_init(){if(!this.tags.length)return;const e=this;this._sortable(),"undefined"!=typeof wpAjax&&(wpAjax.procesParseAjaxResponse=wpAjax.parseAjaxResponse,wpAjax.parseAjaxResponse=function(t,a,n){const r=wpAjax.procesParseAjaxResponse(t,a,n);if(!r.errors&&r.responses[0]&&jQuery('[data-taxonomy="'+r.responses[0].what+'"]').length){const t=jQuery(r.responses[0].data).find("label").last().text().trim();e._pushItem(r.responses[0].what,t)}return r}),void 0!==window.tagBox&&(window.tagBox.processflushTags=window.tagBox.flushTags,window.tagBox.flushTags=function(t,a,n){if(void 0===n){const n=t.prop("id"),r=jQuery("input.newtag",t),s=(a=a||!1)?jQuery(a).text():r.val(),o=window.tagBox.clean(s).split(e.tagDelimiter);for(const t in o){const a=n+":"+o[t];jQuery('[data-item="'+a+'"]').length||e._pushItem(a,o[t])}}return this.processflushTags(t,a,n)},window.tagBox.processTags=window.tagBox.parseTags,window.tagBox.parseTags=function(t){const a=t.id,n=a.split("-check-num-")[1],r=a.split("-check-num-")[0],s=jQuery(t).closest(".tagsdiv").find(".the-tags"),o=window.tagBox.clean(s.val()).split(e.tagDelimiter)[n];(new wp.api.collections.Tags).fetch({data:{slug:o}}).done((a=>{const n=!!a.length&&jQuery('[data-item="'+r+":"+a[0].id+'"]');n.length?n.remove():(jQuery(`.cld-tax-order-list-item:contains(${o})`).remove(),--e.startId),this.processTags(t)}))}),jQuery("body").on("change",".selectit input",(function(){const t=jQuery(this),a=t.val(),n=t.is(":checked"),r=t.parent().text().trim();!0===n?e.tags.find(`[data-item="category:${a}"]`).length||e._pushItem(`category:${a}`,r):e.tags.find(`[data-item="category:${a}"]`).remove()}))},_createItem(e,t){const a=jQuery("
  • "),n=jQuery(""),r=jQuery("");return a.addClass("cld-tax-order-list-item").attr("data-item",e),r.addClass("cld-tax-order-list-item-input").attr("type","hidden").attr("name","cld_tax_order[]").val(e),n.addClass("dashicons dashicons-menu cld-tax-order-list-item-handle"),a.append(n).append(t).append(r),a},_pushItem(e,t){const a=this._createItem(e,t);this.tags.append(a)},_sortable(){jQuery(".cld-tax-order-list").sortable({connectWith:".cld-tax-order",axis:"y",handle:".cld-tax-order-list-item-handle",placeholder:"cld-tax-order-list-item-placeholder",forcePlaceholderSize:!0,helper:"clone"})}};void 0!==window.CLDN&&(n._init(),jQuery("[data-wp-lists] .selectit input[checked]").each(((e,t)=>{jQuery(t).trigger("change")}))),t.default=n}}); \ No newline at end of file diff --git a/package.json b/package.json index e4276fd9d..39ddd0de4 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,8 @@ "typescript": "^4.0.5", "webpack": "^4.44.2", "webpack-cli": "^4.2.0", - "webpackbar": "^4.0.0" + "webpackbar": "^4.0.0", + "sortablejs": "^1.14.0" }, "version": "3.0.0" } diff --git a/php/media/class-global-transformations.php b/php/media/class-global-transformations.php index 48231ed9f..37c746e39 100644 --- a/php/media/class-global-transformations.php +++ b/php/media/class-global-transformations.php @@ -464,6 +464,9 @@ private function init_taxonomy_manager( $post ) { } $out[] = ''; + if ( ! function_exists( 'use_block_editor_for_post' ) || ! use_block_editor_for_post( $post ) ) { + wp_enqueue_script( 'term-ordering', $this->media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true ); + } return implode( $out ); } diff --git a/src/js/blocks.js b/src/js/blocks.js index ddff2ab9c..87fa03637 100644 --- a/src/js/blocks.js +++ b/src/js/blocks.js @@ -5,9 +5,6 @@ import Video from './components/video'; import Featured from './components/featured-image'; import Terms from './components/terms-inspector'; -// jQuery, because reasons. -window.$ = window.jQuery; - // Global Constants export const cloudinaryBlocks = { Video, diff --git a/src/js/components/terms-order.js b/src/js/classic-editor.js similarity index 98% rename from src/js/components/terms-order.js rename to src/js/classic-editor.js index 7b88f9064..4a7e1e5eb 100644 --- a/src/js/components/terms-order.js +++ b/src/js/classic-editor.js @@ -1,6 +1,6 @@ /* global wpAjax */ -const TermsOrder = { +const ClassicEditor = { template: '', tags: jQuery( '#cld-tax-items' ), tagDelimiter: @@ -167,7 +167,7 @@ const TermsOrder = { }; if ( typeof window.CLDN !== 'undefined' ) { - TermsOrder._init(); + ClassicEditor._init(); // Init checked categories. jQuery( '[data-wp-lists] .selectit input[checked]' ).each( ( ord, check ) => { @@ -176,4 +176,4 @@ if ( typeof window.CLDN !== 'undefined' ) { ); } -export default TermsOrder; +export default ClassicEditor; diff --git a/src/js/components/settings-page.js b/src/js/components/settings-page.js deleted file mode 100644 index 2c2760426..000000000 --- a/src/js/components/settings-page.js +++ /dev/null @@ -1,158 +0,0 @@ -( function () { - // Disable the "off" dropdown option for Autoplay if - // the player isn't set to Cloudinary or if Show Controls if unchecked. - const disableAutoplayOff = function () { - const player = jQuery( '#field-video_player' ).val(); - const showControls = jQuery( '#field-video_controls' ).prop( - 'checked' - ); - const offSelection = jQuery( - '#field-video_autoplay_mode option[value="off"]' - ); - - if ( player === 'cld' && ! showControls ) { - offSelection.prop( 'disabled', true ); - if ( offSelection.prop( 'selected' ) ) { - offSelection.next().prop( 'selected', true ); - } - } else { - offSelection.prop( 'disabled', false ); - } - }; - - disableAutoplayOff(); - jQuery( document ).on( - 'change', - '#field-video_player', - disableAutoplayOff - ); - jQuery( document ).on( - 'change', - '#field-video_controls', - disableAutoplayOff - ); - - jQuery( document ).ready( function ( $ ) { - if ( $.isFunction( $.fn.wpColorPicker ) ) { - $( '.regular-color' ).wpColorPicker(); - } - - // Initilize instance events - $( document ).on( 'tabs.init', function () { - const tabs = $( '.settings-tab-trigger' ), - sections = $( '.settings-tab-section' ); - - // Create instance bindings - $( this ).on( 'click', '.settings-tab-trigger', function ( e ) { - const clicked = $( this ), - target = $( clicked.attr( 'href' ) ); - - // Trigger an instance action. - e.preventDefault(); - - tabs.removeClass( 'active' ); - sections.removeClass( 'active' ); - - clicked.addClass( 'active' ); - target.addClass( 'active' ); - - // Trigger the tabbed event. - $( document ).trigger( 'settings.tabbed', clicked ); - } ); - - // Bind conditions. - $( '.cld-field' ) - .not( '[data-condition="false"]' ) - .each( function () { - const field = $( this ); - const condition = field.data( 'condition' ); - - for ( const f in condition ) { - let target = $( '#field-' + f ); - const value = condition[ f ]; - const wrapper = field.closest( 'tr' ); - - if ( ! target.length ) { - target = $( `[id^=field-${ f }-]` ); - } - - let fieldIsSet = false; - - target.on( 'change init', function ( - _, - isInit = false - ) { - if ( fieldIsSet && isInit ) { - return; - } - - let fieldCondition = - this.value === value || this.checked; - - if ( - Array.isArray( value ) && - value.length === 2 - ) { - switch ( value[ 1 ] ) { - case 'neq': - fieldCondition = - this.value !== value[ 0 ]; - break; - case 'gt': - fieldCondition = - this.value > value[ 0 ]; - break; - case 'lt': - fieldCondition = - this.value < value[ 0 ]; - } - } - - if ( fieldCondition ) { - wrapper.show(); - } else { - wrapper.hide(); - } - - fieldIsSet = true; - } ); - - target.trigger( 'init', true ); - } - } ); - - $( '#field-cloudinary_url' ) - .on( 'input change', function () { - const field = $( this ), - value = field.val(); - - const reg = new RegExp( - /^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g - ); - if ( reg.test( value ) ) { - field.addClass( 'settings-valid-field' ); - field.removeClass( 'settings-invalid-field' ); - } else { - field.removeClass( 'settings-valid-field' ); - field.addClass( 'settings-invalid-field' ); - } - } ) - .trigger( 'change' ); - - $( '[name="cloudinary_sync_media[auto_sync]"]' ).change( - function () { - if ( $( this ).val() === 'on' ) { - $( '#auto-sync-alert-btn' ).click(); - } - } - ); - } ); - - // On Ready, find all render trigger elements and fire their events. - $( '.render-trigger[data-event]' ).each( function () { - const trigger = $( this ), - event = trigger.data( 'event' ); - trigger.trigger( event, this ); - } ); - } ); -} )( window, jQuery ); diff --git a/src/js/components/terms-inspector.js b/src/js/components/terms-inspector.js index 1b46f9271..fed0c4bd3 100644 --- a/src/js/components/terms-inspector.js +++ b/src/js/components/terms-inspector.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { select, subscribe } from '@wordpress/data'; +import Sortable from 'sortablejs'; const Terms = { wrapper: null, @@ -25,6 +26,11 @@ const Terms = { setTimeout( () => { this._init_listeners(); }, 3000 ); + + new Sortable( this.wrapper, { + handle: '.dashicons-menu', // handle's class + animation: 150, + } ); }, _init_listeners() { const taxonomies = select( 'core' ).getTaxonomies(); diff --git a/src/js/main.js b/src/js/main.js index 63415545f..5ce8ba980 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -6,10 +6,8 @@ import './components/taxonomies'; /** * Internal dependencies */ -import Settings from './components/settings-page'; import Widget from './components/widget'; import GlobalTransformations from './components/global-transformations'; -import TermsOrder from './components/terms-order'; import MediaLibrary from './components/media-library'; import Notices from './components/notices'; import UI from './components/ui'; @@ -49,16 +47,11 @@ import '../css/images/circular-loader.svg'; import '../css/images/dam-icon.svg'; -// jQuery, because reasons. -window.$ = window.jQuery; - // Global Constants export const cloudinary = { UI, - Settings, Widget, GlobalTransformations, - TermsOrder, MediaLibrary, Notices, Wizard, diff --git a/webpack.config.js b/webpack.config.js index 7dafe0831..3471f7627 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -82,6 +82,7 @@ const cldCore = { 'asset-manager': './src/js/asset-manager.js', 'asset-edit': './src/js/asset-edit.js', 'syntax-highlight': './src/js/syntax-highlight.js', + 'classic-editor': './src/js/components/classic-editor.js', }, module: { rules: [ From 8f30d821e811f07b91f5cfbeeb19c4f4ed7ea429 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 11 Jan 2022 08:30:40 +0200 Subject: [PATCH 02/19] use correct path --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 3c18962ba..b4982881a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -83,7 +83,7 @@ const cldCore = { 'asset-edit': './src/js/asset-edit.js', 'syntax-highlight': './src/js/syntax-highlight.js', 'gallery-ui': './src/css/gallery-ui.scss', - 'classic-editor': './src/js/components/classic-editor.js', + 'classic-editor': './src/js/classic-editor.js', }, module: { rules: [ From adcb9c7dc514d62dd35d7723f87c279c15cbbda4 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 11 Jan 2022 08:31:02 +0200 Subject: [PATCH 03/19] rebuild assets --- js/asset-edit.js | 2 +- js/asset-manager.js | 2 +- js/block-editor.asset.php | 2 +- js/block-editor.js | 2 +- js/breakpoints-preview.js | 2 +- js/cloudinary.js | 2 +- js/deactivate.asset.php | 2 +- js/deactivate.js | 2 +- js/front-overlay.js | 2 +- js/gallery-block.asset.php | 2 +- js/gallery-block.js | 2 +- js/gallery-init.asset.php | 2 +- js/gallery-init.js | 2 +- js/gallery-ui.js | 2 +- js/gallery.asset.php | 2 +- js/gallery.js | 2 +- js/inline-loader.asset.php | 2 +- js/inline-loader.js | 2 +- js/lazy-load.asset.php | 2 +- js/lazy-load.js | 2 +- js/lazyload-preview.js | 2 +- js/syntax-highlight.js | 2 +- js/video-init.asset.php | 2 +- js/video-init.js | 2 +- js/video.js | 2 +- js/wp-color-picker-alpha.js | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/js/asset-edit.js b/js/asset-edit.js index 51bb33f5a..fb01c7410 100644 --- a/js/asset-edit.js +++ b/js/asset-edit.js @@ -1 +1 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=45)}({0:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))},1:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(4),i=r.n(n);r(2),i()(console.error);var o=r(0),a=r(5);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";f.data[e]=c(c(c({},v),f.data[e]),t),f.data[e][""]=c(c({},v[""]),f.data[e][""])},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[t]||p(void 0,t),f.dcnpgettext(t,e,r,n,i)},d=function(t,e,r){return h(r,e,t)},u&&p(u,l),{setLocaleData:p,__:function(t,e){return h(e,void 0,t)},_x:d,_n:function(t,e,r,n){return h(n,void 0,t,e,r)},_nx:function(t,e,r,n,i){return h(i,n,t,e,r)},isRTL:function(){return"rtl"===d("ltr","text direction")}}),b=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},12:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return D()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=P(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",v={};function y(){}function b(){}function g(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,O=w&&w(w(A([])));O&&O!==r&&n.call(O,o)&&(m=O);var j=g.prototype=y.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},2:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return s(u(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}function s(t,e){var r,n,a,s,c,u,l,f,p,h=1,d=t.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?p="":(p=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(p+r).length,c=s.width&&l>0?u.repeat(l):"",v+=s.align?p+r+c:"0"===u?p+c+r:c+p+r)}return v}var c=Object.create(null);function u(t){if(c[t])return c[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],s=e[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return c[t]=n}e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3:function(t,e,r){"use strict";var n=r(0);function i(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var o=r(4),a=r.n(o);r(2),a()(console.error);var s=r(5);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,a=t[e];if(h(r)&&p(n))if("function"==typeof i)if("number"==typeof o){var s={callback:i,priority:o,namespace:n};if(a[r]){var c,u=a[r].handlers;for(c=u.length;c>0&&!(o>=u[c-1].priority);c--);c===u.length?u[c]=s:u.splice(c,0,s),a.__current.forEach((function(t){t.name===r&&t.currentIndex>=c&&t.currentIndex++}))}else a[r]={handlers:[s],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,n,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var v=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,i){var o=t[e];if(h(n)&&(r||p(i))){if(!o[n])return 0;var a=0;if(r)a=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var s=o[n].handlers,c=function(t){s[t].namespace===i&&(s.splice(t,1),a++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},u=s.length-1;u>=0;u--)c(u);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,i),a}}};var y=function(t,e){return function(r,n){var i=t[e];return void 0!==n?r in i&&i[r].handlers.some((function(t){return t.namespace===n})):r in i}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=t[e];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var o=i[n].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=u(u(u({},l),n.data[e]),t),n.data[e][""]=u(u({},l[""]),n.data[e][""])},c=function(t,e){a(t,e),o()},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||a(void 0,t),n.dcnpgettext(t,e,r,i,o)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},d=function(t,e,n){var i=p(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+h(n),i,t,e,n)):i};if(t&&c(t,e),r){var v=function(t){f.test(t)&&o()};r.addAction("hookAdded","core/i18n",v),r.addAction("hookRemoved","core/i18n",v)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:c,resetLocaleData:function(t,e){n.data={},n.pluralForms={},c(t,e)},subscribe:function(t){return i.add(t),function(){return i.delete(t)}},__:function(t,e){var n=p(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+h(e),n,t,e)):n},_x:d,_n:function(t,e,n,i){var o=p(i,void 0,t,e,n);return r?(o=r.applyFilters("i18n.ngettext",o,t,e,n,i),r.applyFilters("i18n.ngettext_"+h(i),o,t,e,n,i)):o},_nx:function(t,e,n,i,o){var a=p(o,i,t,e,n);return r?(a=r.applyFilters("i18n.ngettext_with_context",a,t,e,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+h(o),a,t,e,n,i,o)):a},isRTL:function(){return"rtl"===d("ltr","text direction")},hasTranslation:function(t,e,i){var o,a,s=e?e+""+t:t,c=!(null===(o=n.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return r&&(c=r.applyFilters("i18n.has_translation",c,t,e,i),c=r.applyFilters("i18n.has_translation_"+h(i),c,t,e,i)),c}}}(void 0,void 0,_)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var r=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(H(t),e),r=r.substr(0,n)),r+"?"+X(e)}function Z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},V=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),r=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||r},tt=function(){var t,e=(t=U.a.mark((function t(e,r){var n,o,a,s,c,u;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",r(e));case 2:if(V(e)){t.next=4;break}return t.abrupt("return",r(e));case 4:return t.next=6,wt(Y(Y({},(f={per_page:100},p=void 0,h=void 0,p=(l=e).path,h=l.url,Y(Y({},i(l,["path","url"])),{},{url:h&&K(h,f),path:p&&K(p,f)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,q(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(a=Q(n)){t.next=15;break}return t.abrupt("return",o);case 15:s=[].concat(o);case 16:if(!a){t.next=27;break}return t.next=19,wt(Y(Y({},e),{},{path:void 0,url:a,parse:!1}));case 19:return c=t.sent,t.next=22,q(c);case 22:u=t.sent,s=s.concat(u),a=Q(c),t.next=16;break;case 27:return t.abrupt("return",s);case 28:case"end":return t.stop()}var l,f,p,h}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){M(o,n,i,a,s,"next",t)}function s(t){M(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}();function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rt(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},at=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},st=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return ct(t,e)}))};function ct(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return at(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e=500&&e.status<600&&r?n(r).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):ct(e,t.parse)})).then((function(e){return st(e,t.parse)}))};function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e=200&&t.status<300)return t;throw t},gt=function(t){var e=t.url,r=t.path,n=t.data,o=t.parse,a=void 0===o||o,s=i(t,["url","path","data","parse"]),c=t.body,u=t.headers;return u=ht(ht({},dt),u),n&&(c=JSON.stringify(n),u["Content-Type"]="application/json"),window.fetch(e||r||window.location.href,ht(ht(ht({},vt),s),{},{body:c,headers:u})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return ct(t,a)})).then((function(t){return st(t,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function mt(t){return yt.reduceRight((function(t,e){return function(r){return e(r,t)}}),gt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(mt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return mt.nonceMiddleware.nonce=e,mt(t)}))}))}mt.use=function(t){yt.unshift(t)},mt.setFetchHandler=function(t){gt=t},mt.createNonceMiddleware=A,mt.createPreloadingMiddleware=R,mt.createRootURLMiddleware=C,mt.fetchAllMiddleware=tt,mt.mediaUploadMiddleware=ft;var wt=e.a=mt},4:function(t,e,r){t.exports=function(t,e){var r,n,i=0;function o(){var o,a,s=r,c=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(a=0;ae?t:e,this.defaultWidth=t,this.defaultHeight=e,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=Object(n.a)("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",(t=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"})),this.preview.addEventListener("error",(t=>{this.preview.src=this.getNoURL("⚠")})),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url})),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(t,e=!1){this.preview.style.opacity=.6,e?(this.apply.style.display="none",this.preview.src=t):(this.apply.style.display="block",this.url=t)},getNoURL(t="︎"){const e=this.defaultWidth/2-23,r=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,${t}`}},o=r(3);var a={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(t){if(void 0!==cldData.editor)return o.a.use(o.a.createNonceMiddleware(cldData.editor.nonce)),this.callback=t,this},save(t){this.doBefore(t),Object(o.a)({path:cldData.editor.save_url,data:t,method:"POST"}).then((t=>{this.doComplete(t,this)}))},doBefore(t){this.beforeCallbacks.forEach((e=>e(t,this)))},doComplete(t){this.completeCallbacks.forEach((e=>e(t,this)))},onBefore(t){this.beforeCallbacks.push(t)},onComplete(t){this.completeCallbacks.push(t)}};const s={wrap:document.getElementById("cld-asset-edit"),preview:null,id:null,editor:null,base:null,publicId:null,size:null,transformationsInput:document.getElementById("cld-asset-edit-transformations"),saveButton:document.getElementById("cld-asset-edit-save"),currentURL:null,init(){const t=JSON.parse(this.wrap.dataset.item);this.id=t.ID,this.base=t.base+t.size+"/",this.publicId=t.file,this.transformationsInput.value=t.transformations?t.transformations:"",this.initPreview(),this.initEditor()},initPreview(){this.preview=i.init(),this.wrap.appendChild(this.preview.createPreview(900,675)),this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId,!0),this.transformationsInput.addEventListener("input",(t=>{this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId)})),this.transformationsInput.addEventListener("keydown",(t=>{"Enter"===t.code&&(t.preventDefault(),this.saveButton.dispatchEvent(new Event("click")))}))},initEditor(){this.editor=a.init(),this.editor.onBefore((()=>this.preview.reset())),this.editor.onComplete((t=>{this.transformationsInput.value=t.transformations,this.preview.setSrc(this.base+t.transformations+this.publicId,!0),t.note&&alert(t.note)})),this.saveButton.addEventListener("click",(()=>{this.editor.save({ID:this.id,transformations:this.transformationsInput.value})}))}};window.addEventListener("load",(()=>s.init()));e.default=s},5:function(t,e,r){"use strict";var n,i,o,a;r.d(e,"a",(function(){return l})),n={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function c(t){var e=function(t){for(var e,r,s,c,u=[],l=[];e=t.match(a);){for(r=e[0],(s=t.substr(0,e.index).trim())&&u.push(s);c=l.pop();){if(o[r]){if(o[r][0]===c){r=o[r][1]||r;break}}else if(i.indexOf(c)>=0||n[c]1&&void 0!==arguments[1]?arguments[1]:"default";f.data[e]=c(c(c({},v),f.data[e]),t),f.data[e][""]=c(c({},v[""]),f.data[e][""])},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[t]||p(void 0,t),f.dcnpgettext(t,e,r,n,i)},d=function(t,e,r){return h(r,e,t)},u&&p(u,l),{setLocaleData:p,__:function(t,e){return h(e,void 0,t)},_x:d,_n:function(t,e,r,n){return h(n,void 0,t,e,r)},_nx:function(t,e,r,n,i){return h(i,n,t,e,r)},isRTL:function(){return"rtl"===d("ltr","text direction")}}),b=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},12:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return D()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=P(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",v={};function y(){}function b(){}function g(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,O=w&&w(w(A([])));O&&O!==r&&n.call(O,o)&&(m=O);var j=g.prototype=y.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},2:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return s(u(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}function s(t,e){var r,n,a,s,c,u,l,f,p,h=1,d=t.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?p="":(p=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(p+r).length,c=s.width&&l>0?u.repeat(l):"",v+=s.align?p+r+c:"0"===u?p+c+r:c+p+r)}return v}var c=Object.create(null);function u(t){if(c[t])return c[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],s=e[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return c[t]=n}e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3:function(t,e,r){"use strict";var n=r(0);function i(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var o=r(4),a=r.n(o);r(2),a()(console.error);var s=r(5);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,a=t[e];if(h(r)&&p(n))if("function"==typeof i)if("number"==typeof o){var s={callback:i,priority:o,namespace:n};if(a[r]){var c,u=a[r].handlers;for(c=u.length;c>0&&!(o>=u[c-1].priority);c--);c===u.length?u[c]=s:u.splice(c,0,s),a.__current.forEach((function(t){t.name===r&&t.currentIndex>=c&&t.currentIndex++}))}else a[r]={handlers:[s],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,n,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var v=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,i){var o=t[e];if(h(n)&&(r||p(i))){if(!o[n])return 0;var a=0;if(r)a=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var s=o[n].handlers,c=function(t){s[t].namespace===i&&(s.splice(t,1),a++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},u=s.length-1;u>=0;u--)c(u);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,i),a}}};var y=function(t,e){return function(r,n){var i=t[e];return void 0!==n?r in i&&i[r].handlers.some((function(t){return t.namespace===n})):r in i}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=t[e];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var o=i[n].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=u(u(u({},l),n.data[e]),t),n.data[e][""]=u(u({},l[""]),n.data[e][""])},c=function(t,e){a(t,e),o()},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||a(void 0,t),n.dcnpgettext(t,e,r,i,o)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},d=function(t,e,n){var i=p(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+h(n),i,t,e,n)):i};if(t&&c(t,e),r){var v=function(t){f.test(t)&&o()};r.addAction("hookAdded","core/i18n",v),r.addAction("hookRemoved","core/i18n",v)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:c,resetLocaleData:function(t,e){n.data={},n.pluralForms={},c(t,e)},subscribe:function(t){return i.add(t),function(){return i.delete(t)}},__:function(t,e){var n=p(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+h(e),n,t,e)):n},_x:d,_n:function(t,e,n,i){var o=p(i,void 0,t,e,n);return r?(o=r.applyFilters("i18n.ngettext",o,t,e,n,i),r.applyFilters("i18n.ngettext_"+h(i),o,t,e,n,i)):o},_nx:function(t,e,n,i,o){var a=p(o,i,t,e,n);return r?(a=r.applyFilters("i18n.ngettext_with_context",a,t,e,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+h(o),a,t,e,n,i,o)):a},isRTL:function(){return"rtl"===d("ltr","text direction")},hasTranslation:function(t,e,i){var o,a,s=e?e+""+t:t,c=!(null===(o=n.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return r&&(c=r.applyFilters("i18n.has_translation",c,t,e,i),c=r.applyFilters("i18n.has_translation_"+h(i),c,t,e,i)),c}}}(void 0,void 0,_)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var r=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(H(t),e),r=r.substr(0,n)),r+"?"+X(e)}function Z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},V=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),r=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||r},tt=function(){var t,e=(t=U.a.mark((function t(e,r){var n,o,a,s,c,u;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",r(e));case 2:if(V(e)){t.next=4;break}return t.abrupt("return",r(e));case 4:return t.next=6,wt(Y(Y({},(f={per_page:100},p=void 0,h=void 0,p=(l=e).path,h=l.url,Y(Y({},i(l,["path","url"])),{},{url:h&&K(h,f),path:p&&K(p,f)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,q(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(a=Q(n)){t.next=15;break}return t.abrupt("return",o);case 15:s=[].concat(o);case 16:if(!a){t.next=27;break}return t.next=19,wt(Y(Y({},e),{},{path:void 0,url:a,parse:!1}));case 19:return c=t.sent,t.next=22,q(c);case 22:u=t.sent,s=s.concat(u),a=Q(c),t.next=16;break;case 27:return t.abrupt("return",s);case 28:case"end":return t.stop()}var l,f,p,h}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){M(o,n,i,a,s,"next",t)}function s(t){M(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}();function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rt(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},at=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},st=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return ct(t,e)}))};function ct(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return at(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e=500&&e.status<600&&r?n(r).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):ct(e,t.parse)})).then((function(e){return st(e,t.parse)}))};function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e=200&&t.status<300)return t;throw t},gt=function(t){var e=t.url,r=t.path,n=t.data,o=t.parse,a=void 0===o||o,s=i(t,["url","path","data","parse"]),c=t.body,u=t.headers;return u=ht(ht({},dt),u),n&&(c=JSON.stringify(n),u["Content-Type"]="application/json"),window.fetch(e||r||window.location.href,ht(ht(ht({},vt),s),{},{body:c,headers:u})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return ct(t,a)})).then((function(t){return st(t,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function mt(t){return yt.reduceRight((function(t,e){return function(r){return e(r,t)}}),gt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(mt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return mt.nonceMiddleware.nonce=e,mt(t)}))}))}mt.use=function(t){yt.unshift(t)},mt.setFetchHandler=function(t){gt=t},mt.createNonceMiddleware=A,mt.createPreloadingMiddleware=R,mt.createRootURLMiddleware=C,mt.fetchAllMiddleware=tt,mt.mediaUploadMiddleware=ft;var wt=e.a=mt},4:function(t,e,r){t.exports=function(t,e){var r,n,i=0;function o(){var o,a,s=r,c=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(a=0;ae?t:e,this.defaultWidth=t,this.defaultHeight=e,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=Object(n.a)("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",(t=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"})),this.preview.addEventListener("error",(t=>{this.preview.src=this.getNoURL("⚠")})),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url})),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(t,e=!1){this.preview.style.opacity=.6,e?(this.apply.style.display="none",this.preview.src=t):(this.apply.style.display="block",this.url=t)},getNoURL(t="︎"){const e=this.defaultWidth/2-23,r=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,${t}`}},o=r(3);var a={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(t){if(void 0!==cldData.editor)return o.a.use(o.a.createNonceMiddleware(cldData.editor.nonce)),this.callback=t,this},save(t){this.doBefore(t),Object(o.a)({path:cldData.editor.save_url,data:t,method:"POST"}).then((t=>{this.doComplete(t,this)}))},doBefore(t){this.beforeCallbacks.forEach((e=>e(t,this)))},doComplete(t){this.completeCallbacks.forEach((e=>e(t,this)))},onBefore(t){this.beforeCallbacks.push(t)},onComplete(t){this.completeCallbacks.push(t)}};const s={wrap:document.getElementById("cld-asset-edit"),preview:null,id:null,editor:null,base:null,publicId:null,size:null,transformationsInput:document.getElementById("cld-asset-edit-transformations"),saveButton:document.getElementById("cld-asset-edit-save"),currentURL:null,init(){const t=JSON.parse(this.wrap.dataset.item);this.id=t.ID,this.base=t.base+t.size+"/",this.publicId=t.file,this.transformationsInput.value=t.transformations?t.transformations:"",this.initPreview(),this.initEditor()},initPreview(){this.preview=i.init(),this.wrap.appendChild(this.preview.createPreview(900,675)),this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId,!0),this.transformationsInput.addEventListener("input",(t=>{this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId)})),this.transformationsInput.addEventListener("keydown",(t=>{"Enter"===t.code&&(t.preventDefault(),this.saveButton.dispatchEvent(new Event("click")))}))},initEditor(){this.editor=a.init(),this.editor.onBefore((()=>this.preview.reset())),this.editor.onComplete((t=>{this.transformationsInput.value=t.transformations,this.preview.setSrc(this.base+t.transformations+this.publicId,!0),t.note&&alert(t.note)})),this.saveButton.addEventListener("click",(()=>{this.editor.save({ID:this.id,transformations:this.transformationsInput.value})}))}};window.addEventListener("load",(()=>s.init()));e.default=s},5:function(t,e,r){"use strict";var n,i,o,a;r.d(e,"a",(function(){return l})),n={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function c(t){var e=function(t){for(var e,r,s,c,u=[],l=[];e=t.match(a);){for(r=e[0],(s=t.substr(0,e.index).trim())&&u.push(s);c=l.pop();){if(o[r]){if(o[r][0]===c){r=o[r][1]||r;break}}else if(i.indexOf(c)>=0||n[c]1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=s(s(s({},g),d.data[t]),e),d.data[t][""]=s(s({},g[""]),d.data[t][""])},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||p(void 0,e),d.dcnpgettext(e,t,n,r,i)},f=function(e,t,n){return h(n,t,e)},l&&p(l,u),{setLocaleData:p,__:function(e,t){return h(t,void 0,e)},_x:f,_n:function(e,t,n,r){return h(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return h(i,r,e,t,n)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),y=(v.setLocaleData.bind(v),v.__.bind(v));v._x.bind(v),v._n.bind(v),v._nx.bind(v),v.isRTL.bind(v)},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return c(l(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function c(e,t){var n,r,a,c,s,l,u,d,p,h=1,f=e.length,g="";for(r=0;r=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?g+=n:(!i.number.test(c.type)||d&&!c.sign?p="":(p=d?"+":"-",n=n.toString().replace(i.sign,"")),l=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",u=c.width-(p+n).length,s=c.width&&u>0?l.repeat(u):"",g+=c.align?p+n+s:"0"===l?p+s+n:s+p+n)}return g}var s=Object.create(null);function l(e){if(s[e])return s[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],c=t[2],l=[];if(null===(l=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(c=c.substring(l[0].length));)if(null!==(l=i.key_access.exec(c)))a.push(l[1]);else{if(null===(l=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=n(0);function i(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=n(4),a=n.n(o);n(2),a()(console.error);var c=n(5);function s(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 l(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:10,a=e[t];if(h(n)&&p(r))if("function"==typeof i)if("number"==typeof o){var c={callback:i,priority:o,namespace:r};if(a[n]){var s,l=a[n].handlers;for(s=l.length;s>0&&!(o>=l[s-1].priority);s--);s===l.length?l[s]=c:l.splice(s,0,c),a.__current.forEach((function(e){e.name===n&&e.currentIndex>=s&&e.currentIndex++}))}else a[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=e[t];if(h(r)&&(n||p(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var c=o[r].handlers,s=function(e){c[e].namespace===i&&(c.splice(e,1),a++,o.__current.forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},l=c.length-1;l>=0;l--)s(l);return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),a}}};var v=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=l(l(l({},u),r.data[t]),e),r.data[t][""]=l(l({},u[""]),r.data[t][""])},s=function(e,t){a(e,t),o()},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},f=function(e,t,r){var i=p(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+h(r),i,e,t,r)):i};if(e&&s(e,t),n){var g=function(e){d.test(e)&&o()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:function(e,t){r.data={},r.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=p(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+h(t),r,e,t)):r},_x:f,_n:function(e,t,r,i){var o=p(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+h(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=p(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+h(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,c=t?t+""+e:e,s=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+h(i),s,e,t,i)),s}}}(void 0,void 0,x)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(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 S(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(H(e),t),n=n.substr(0,r)),n+"?"+X(t)}function q(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 Y(e){for(var t=1;t]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},V=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},ee=function(){var e,t=(e=B.a.mark((function e(t,n){var r,o,a,c,s,l;return B.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(V(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,Oe(Y(Y({},(d={per_page:100},p=void 0,h=void 0,p=(u=t).path,h=u.url,Y(Y({},i(u,["path","url"])),{},{url:h&&Z(h,d),path:p&&Z(p,d)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,W(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=Q(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,Oe(Y(Y({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,W(s);case 22:l=e.sent,c=c.concat(l),a=Q(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var u,d,p,h}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,c,"next",e)}function c(e){z(o,r,i,a,c,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();function te(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 ne(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},ae=function(e){var t={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},ce=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(oe(e,t)).catch((function(e){return se(e,t)}))};function se(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return ae(e).then((function(e){var t={code:"unknown_error",message:E("An unknown error occurred.")};throw e||t}))}function le(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 ue(e){for(var t=1;t=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):se(t,e.parse)})).then((function(t){return ce(t,e.parse)}))};function pe(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 he(e){for(var t=1;t=200&&e.status<300)return e;throw e},be=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=i(e,["url","path","data","parse"]),s=e.body,l=e.headers;return l=he(he({},fe),l),r&&(s=JSON.stringify(r),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,he(he(he({},ge),c),{},{body:s,headers:l})).then((function(e){return Promise.resolve(e).then(ye).catch((function(e){return se(e,a)})).then((function(e){return ce(e,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function me(e){return ve.reduceRight((function(e,t){return function(n){return t(n,e)}}),be)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(me.nonceEndpoint).then(ye).then((function(e){return e.text()})).then((function(t){return me.nonceMiddleware.nonce=t,me(e)}))}))}me.use=function(e){ve.unshift(e)},me.setFetchHandler=function(e){be=e},me.createNonceMiddleware=L,me.createPreloadingMiddleware=M,me.createRootURLMiddleware=F,me.fetchAllMiddleware=ee,me.mediaUploadMiddleware=de;var Oe=t.a=me},function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function s(e){var t=function(e){for(var t,n,c,s,l=[],u=[];t=e.match(a);){for(n=t[0],(c=e.substr(0,t.index).trim())&&l.push(c);s=u.pop();){if(o[n]){if(o[n][0]===s){n=o[n][1]||n;break}}else if(i.indexOf(s)>=0||r[s]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((e=>e.json())).then((e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))}))}};t.a=r},,,function(e,t,n){"use strict";var r=n(14),i=n.n(r);const o={controlled:null,bind(e){this.controlled=e,this.controlled.forEach((e=>{this._main(e)})),this._init()},_init(){this.controlled.forEach((e=>{this._checkUp(e)}))},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map((t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n})),this._bindEvents(e),e.mains.forEach((e=>{this._bindEvents(e)}))},_bindEvents(e){e.eventBound||(e.addEventListener("click",(t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)})),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))})),e.elements.forEach((t=>{this._checkDown(t),t.elements||this._checkUp(t,e)})))},_checkUp(e,t){e.mains&&[...e.mains].forEach((e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)}))},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach((r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)}));let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach((t=>{t.checked&&(e.filesize+=t.filesize)}));let t=null;0=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},,function(e,t,n){var r,i,o,a;a=function(){var e="BKMGTPEZY".split("");function t(e,t){return e&&e.toLowerCase()===t.toLowerCase()}return function(n,r){return n="number"==typeof n?n:0,(r=r||{}).fixed="number"==typeof r.fixed?r.fixed:2,r.spacer="string"==typeof r.spacer?r.spacer:" ",r.calculate=function(e){var i=t(e,"si")?["k","B"]:["K","iB"],o=t(e,"si")?1e3:1024,a=Math.log(n)/Math.log(o)|0,c=n/Math.pow(o,a),s=c.toFixed(r.fixed);return a-1<3&&!t(e,"si")&&t(e,"jedec")&&(i[1]="B"),{suffix:a?(i[0]+"MGTPEZY")[a-1]+i[1]:1==(0|s)?"Byte":"Bytes",magnitude:a,result:c,fixed:s,bits:{result:c/8,fixed:(c/8).toFixed(r.fixed)}}},r.to=function(r,i){var o=t(i,"si")?1e3:1024,a=e.indexOf("string"==typeof r?r[0].toUpperCase():"B"),c=n;if(-1===a||0===a)return c.toFixed(2);for(;a>0;a--)c/=o;return c.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),i=n(1),o=n(10),a=n(7);const c={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){r.a.use(r.a.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach((e=>this._bind(e)));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",(()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)})),this._watchPurge(t),setInterval((()=>{this._watchPurge(t)}),5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),o=document.createElement("td");o.colSpan=2,o.className="cld-loading",i.appendChild(o);const a=document.getElementById(t.dataset.slug+"_search"),c=document.getElementById(t.dataset.slug+"_reload"),s=document.getElementById(t.dataset.browser),l=document.getElementById(t.dataset.apply);l.style.float="right",l.style.marginLeft="6px",s.addEventListener("change",(t=>{this._handleManager(e)})),n.addEventListener("change",(t=>{this._handleManager(e)})),window.addEventListener("CacheToggle",(e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)})),l.addEventListener("click",(e=>{this._applyChanges(t)})),c.addEventListener("click",(t=>{this._load(e)})),a.addEventListener("keydown",(t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))})),r.className="cld-pagenav",l.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=a,t.controller=s,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=l,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,Object(r.a)({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then((e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");o.a.bind(n),t.loaded=!0}))},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,Object(r.a)({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then((t=>{e.dataset.updating="",0t.percent?(e.disabled="",this._purgeAll(e,!0)):0{e.innerText=Object(i.a)("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout((()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title}),2e3))}))},_set_state(e,t,n){this._showSpinners(n),Object(r.a)({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then((n=>{this._hideSpinners(n),n.forEach((n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"})),"delete"===t&&this._load(e.dataset.cachePoint)}))},_showSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="visible"}))},_hideSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="hidden"}))},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach((t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),o=this._getEdit(t,e);n.appendChild(i),n.appendChild(o),n.appendChild(r),e.appendChild(n)}))},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",(n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)})),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",(n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)}));const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",(n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,(function(){n._load(e.dataset.cachePoint)}))}}))}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=Object(i.a)("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const o=document.createElement("span"),a="spinner_"+t.ID;return o.className="spinner",o.id=a,n.appendChild(o),this.spinners[a]=o,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],o=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const o=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(o)})),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),o=document.createElement("input"),a=document.createElement("span"),c=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",o.type="checkbox",o.value=t.ID,o.checked=!(-1{const i=new CustomEvent("CacheToggle",{detail:{checked:o.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)})),r.appendChild(i),r}},s=document.getElementById("cloudinary-settings-page");s&&(a.a.init(),window.addEventListener("load",(()=>c.init(s,a.a))))}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=37)}([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(4),i=n.n(r);n(2),i()(console.error);var o=n(0),a=n(5);function c(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 s(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=s(s(s({},g),d.data[t]),e),d.data[t][""]=s(s({},g[""]),d.data[t][""])},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||p(void 0,e),d.dcnpgettext(e,t,n,r,i)},f=function(e,t,n){return h(n,t,e)},l&&p(l,u),{setLocaleData:p,__:function(e,t){return h(t,void 0,e)},_x:f,_n:function(e,t,n,r){return h(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return h(i,r,e,t,n)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),y=(v.setLocaleData.bind(v),v.__.bind(v));v._x.bind(v),v._n.bind(v),v._nx.bind(v),v.isRTL.bind(v)},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return c(l(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function c(e,t){var n,r,a,c,s,l,u,d,p,h=1,f=e.length,g="";for(r=0;r=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?g+=n:(!i.number.test(c.type)||d&&!c.sign?p="":(p=d?"+":"-",n=n.toString().replace(i.sign,"")),l=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",u=c.width-(p+n).length,s=c.width&&u>0?l.repeat(u):"",g+=c.align?p+n+s:"0"===l?p+s+n:s+p+n)}return g}var s=Object.create(null);function l(e){if(s[e])return s[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],c=t[2],l=[];if(null===(l=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(c=c.substring(l[0].length));)if(null!==(l=i.key_access.exec(c)))a.push(l[1]);else{if(null===(l=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=n(0);function i(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=n(4),a=n.n(o);n(2),a()(console.error);var c=n(5);function s(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 l(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:10,a=e[t];if(h(n)&&p(r))if("function"==typeof i)if("number"==typeof o){var c={callback:i,priority:o,namespace:r};if(a[n]){var s,l=a[n].handlers;for(s=l.length;s>0&&!(o>=l[s-1].priority);s--);s===l.length?l[s]=c:l.splice(s,0,c),a.__current.forEach((function(e){e.name===n&&e.currentIndex>=s&&e.currentIndex++}))}else a[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=e[t];if(h(r)&&(n||p(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var c=o[r].handlers,s=function(e){c[e].namespace===i&&(c.splice(e,1),a++,o.__current.forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},l=c.length-1;l>=0;l--)s(l);return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),a}}};var v=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=l(l(l({},u),r.data[t]),e),r.data[t][""]=l(l({},u[""]),r.data[t][""])},s=function(e,t){a(e,t),o()},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},f=function(e,t,r){var i=p(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+h(r),i,e,t,r)):i};if(e&&s(e,t),n){var g=function(e){d.test(e)&&o()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:function(e,t){r.data={},r.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=p(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+h(t),r,e,t)):r},_x:f,_n:function(e,t,r,i){var o=p(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+h(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=p(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+h(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,c=t?t+""+e:e,s=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+h(i),s,e,t,i)),s}}}(void 0,void 0,x)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(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 S(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(H(e),t),n=n.substr(0,r)),n+"?"+X(t)}function q(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 Y(e){for(var t=1;t]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},V=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},ee=function(){var e,t=(e=B.a.mark((function e(t,n){var r,o,a,c,s,l;return B.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(V(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,Oe(Y(Y({},(d={per_page:100},p=void 0,h=void 0,p=(u=t).path,h=u.url,Y(Y({},i(u,["path","url"])),{},{url:h&&Z(h,d),path:p&&Z(p,d)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,W(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=Q(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,Oe(Y(Y({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,W(s);case 22:l=e.sent,c=c.concat(l),a=Q(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var u,d,p,h}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,c,"next",e)}function c(e){z(o,r,i,a,c,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();function te(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 ne(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},ae=function(e){var t={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},ce=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(oe(e,t)).catch((function(e){return se(e,t)}))};function se(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return ae(e).then((function(e){var t={code:"unknown_error",message:E("An unknown error occurred.")};throw e||t}))}function le(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 ue(e){for(var t=1;t=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):se(t,e.parse)})).then((function(t){return ce(t,e.parse)}))};function pe(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 he(e){for(var t=1;t=200&&e.status<300)return e;throw e},be=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=i(e,["url","path","data","parse"]),s=e.body,l=e.headers;return l=he(he({},fe),l),r&&(s=JSON.stringify(r),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,he(he(he({},ge),c),{},{body:s,headers:l})).then((function(e){return Promise.resolve(e).then(ye).catch((function(e){return se(e,a)})).then((function(e){return ce(e,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function me(e){return ve.reduceRight((function(e,t){return function(n){return t(n,e)}}),be)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(me.nonceEndpoint).then(ye).then((function(e){return e.text()})).then((function(t){return me.nonceMiddleware.nonce=t,me(e)}))}))}me.use=function(e){ve.unshift(e)},me.setFetchHandler=function(e){be=e},me.createNonceMiddleware=L,me.createPreloadingMiddleware=M,me.createRootURLMiddleware=F,me.fetchAllMiddleware=ee,me.mediaUploadMiddleware=de;var Oe=t.a=me},function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function s(e){var t=function(e){for(var t,n,c,s,l=[],u=[];t=e.match(a);){for(n=t[0],(c=e.substr(0,t.index).trim())&&l.push(c);s=u.pop();){if(o[n]){if(o[n][0]===s){n=o[n][1]||n;break}}else if(i.indexOf(s)>=0||r[s]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((e=>e.json())).then((e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))}))}};t.a=r},,,function(e,t,n){"use strict";var r=n(14),i=n.n(r);const o={controlled:null,bind(e){this.controlled=e,this.controlled.forEach((e=>{this._main(e)})),this._init()},_init(){this.controlled.forEach((e=>{this._checkUp(e)}))},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map((t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n})),this._bindEvents(e),e.mains.forEach((e=>{this._bindEvents(e)}))},_bindEvents(e){e.eventBound||(e.addEventListener("click",(t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)})),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))})),e.elements.forEach((t=>{this._checkDown(t),t.elements||this._checkUp(t,e)})))},_checkUp(e,t){e.mains&&[...e.mains].forEach((e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)}))},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach((r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)}));let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach((t=>{t.checked&&(e.filesize+=t.filesize)}));let t=null;0=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},,function(e,t,n){var r,i,o,a;a=function(){var e="BKMGTPEZY".split("");function t(e,t){return e&&e.toLowerCase()===t.toLowerCase()}return function(n,r){return n="number"==typeof n?n:0,(r=r||{}).fixed="number"==typeof r.fixed?r.fixed:2,r.spacer="string"==typeof r.spacer?r.spacer:" ",r.calculate=function(e){var i=t(e,"si")?["k","B"]:["K","iB"],o=t(e,"si")?1e3:1024,a=Math.log(n)/Math.log(o)|0,c=n/Math.pow(o,a),s=c.toFixed(r.fixed);return a-1<3&&!t(e,"si")&&t(e,"jedec")&&(i[1]="B"),{suffix:a?(i[0]+"MGTPEZY")[a-1]+i[1]:1==(0|s)?"Byte":"Bytes",magnitude:a,result:c,fixed:s,bits:{result:c/8,fixed:(c/8).toFixed(r.fixed)}}},r.to=function(r,i){var o=t(i,"si")?1e3:1024,a=e.indexOf("string"==typeof r?r[0].toUpperCase():"B"),c=n;if(-1===a||0===a)return c.toFixed(2);for(;a>0;a--)c/=o;return c.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),i=n(1),o=n(10),a=n(7);const c={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){r.a.use(r.a.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach((e=>this._bind(e)));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",(()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)})),this._watchPurge(t),setInterval((()=>{this._watchPurge(t)}),5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),o=document.createElement("td");o.colSpan=2,o.className="cld-loading",i.appendChild(o);const a=document.getElementById(t.dataset.slug+"_search"),c=document.getElementById(t.dataset.slug+"_reload"),s=document.getElementById(t.dataset.browser),l=document.getElementById(t.dataset.apply);l.style.float="right",l.style.marginLeft="6px",s.addEventListener("change",(t=>{this._handleManager(e)})),n.addEventListener("change",(t=>{this._handleManager(e)})),window.addEventListener("CacheToggle",(e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)})),l.addEventListener("click",(e=>{this._applyChanges(t)})),c.addEventListener("click",(t=>{this._load(e)})),a.addEventListener("keydown",(t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))})),r.className="cld-pagenav",l.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=a,t.controller=s,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=l,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,Object(r.a)({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then((e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");o.a.bind(n),t.loaded=!0}))},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,Object(r.a)({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then((t=>{e.dataset.updating="",0t.percent?(e.disabled="",this._purgeAll(e,!0)):0{e.innerText=Object(i.a)("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout((()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title}),2e3))}))},_set_state(e,t,n){this._showSpinners(n),Object(r.a)({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then((n=>{this._hideSpinners(n),n.forEach((n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"})),"delete"===t&&this._load(e.dataset.cachePoint)}))},_showSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="visible"}))},_hideSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="hidden"}))},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach((t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),o=this._getEdit(t,e);n.appendChild(i),n.appendChild(o),n.appendChild(r),e.appendChild(n)}))},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",(n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)})),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",(n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)}));const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",(n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,(function(){n._load(e.dataset.cachePoint)}))}}))}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=Object(i.a)("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const o=document.createElement("span"),a="spinner_"+t.ID;return o.className="spinner",o.id=a,n.appendChild(o),this.spinners[a]=o,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],o=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const o=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(o)})),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),o=document.createElement("input"),a=document.createElement("span"),c=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",o.type="checkbox",o.value=t.ID,o.checked=!(-1{const i=new CustomEvent("CacheToggle",{detail:{checked:o.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)})),r.appendChild(i),r}},s=document.getElementById("cloudinary-settings-page");s&&(a.a.init(),window.addEventListener("load",(()=>c.init(s,a.a))))}]); \ No newline at end of file diff --git a/js/block-editor.asset.php b/js/block-editor.asset.php index 9c535732b..2edf3ab58 100644 --- a/js/block-editor.asset.php +++ b/js/block-editor.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'b7c05d4278ab4850dedda4f1a4a04c9f'); \ No newline at end of file + array('react', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'adbf2289a1278713b6070098fccddfde'); \ No newline at end of file diff --git a/js/block-editor.js b/js/block-editor.js index 490e6af3d..86827ae11 100644 --- a/js/block-editor.js +++ b/js/block-editor.js @@ -1 +1 @@ -!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=22)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var o=r(18),n=r(19),i=r(20),a=r(21);e.exports=function(e){return o(e)||n(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.element},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);rt.length)&&(e=t.length);for(var n=0,o=new Array(e);n=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var H=L(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=L(/Edge/i),z=L(/firefox/i),V=L(/safari/i)&&!L(/chrome/i)&&!L(/android/i),q=L(/iP(ad|od|hone)/i),G=L(/chrome/i)&&L(/android/i),U={capture:!1,passive:!1};function $(t,e,n){t.addEventListener(e,n,!H&&U)}function Z(t,e,n){t.removeEventListener(e,n,!H&&U)}function K(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function J(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&K(t,e):K(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var tt,et=/\s+/g;function nt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(et," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(et," ")}}function ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===at())break;o=pt(o,!1)}return!1}function ct(t,e,n,o){for(var r=0,i=0,a=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=F(n,St);xt.pluginEvent.bind(me)(t,e,R({dragEl:Tt,parentEl:Ct,ghostEl:Mt,rootEl:Pt,nextEl:At,lastDownEl:It,cloneEl:Nt,cloneHidden:jt,dragStarted:Gt,putSortable:Ft,activeSortable:me.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt,hideGhostForTarget:pe,unhideGhostForTarget:he,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){Et(R({putSortable:Ft,cloneEl:Nt,targetEl:Tt,rootEl:Pt,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt},t))}var Tt,Ct,Mt,Pt,At,It,Nt,jt,kt,Rt,Yt,Xt,Bt,Ft,Lt,Ht,Wt,zt,Vt,qt,Gt,Ut,$t,Zt,Kt,Qt=!1,Jt=!1,te=[],ee=!1,ne=!1,oe=[],re=!1,ie=[],ae="undefined"!=typeof document,le=q,se=W||H?"cssFloat":"float",ce=ae&&!G&&!q&&"draggable"in document.createElement("div"),ue=function(){if(ae){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),de=function(t,e){var n=ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ct(t,0,e),i=ct(t,1,e),a=r&&ot(r),l=i&&ot(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[se]||i&&"none"===n[se]&&s+c>o)?"vertical":"horizontal"},fe=function(t){function e(t,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pe=function(){!ue&&Mt&&ot(Mt,"display","none")},he=function(){!ue&&Mt&&ot(Mt,"display","")};ae&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ve=function(t){if(Tt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,te.some((function(t){var e=t[bt].options.emptyInsertThreshold;if(e&&!ut(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,l=i>=n.top-e&&i<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[bt]._onDragOver(n)}}var r,i,a},ge=function(t){Tt&&Tt.parentNode[bt]._isOutsideThisEl(t.target)};function me(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=B({},e),t[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return de(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==me.supportPointer&&"PointerEvent"in window&&!V,emptyInsertThreshold:5};for(var o in xt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in fe(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(t,"pointerdown",this._onTapStart):($(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),te.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),B(this,yt())}function be(t,e,n,o,r,i,a,l){var s,c,u=t[bt],d=u.options.onMove;return!window.CustomEvent||H||W?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ye(t){t.draggable=!1}function we(){re=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function xe(t){return setTimeout(t,0)}function Ee(t){return clearTimeout(t)}me.prototype={constructor:me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){ie.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&ie.push(o)}}(n),!Tt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!V||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=J(l,o.draggable,n,!1))&&l.animated||It===l)){if(kt=dt(l),Yt=dt(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Dt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ot("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=J(s,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ot("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!J(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Tt&&n.parentNode===i){var s=lt(n);if(Pt=i,Ct=(Tt=n).parentNode,At=Tt.nextSibling,It=n,Bt=a.group,me.dragged=Tt,Lt={target:Tt,clientX:(e||t).clientX,clientY:(e||t).clientY},Vt=Lt.clientX-s.left,qt=Lt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Tt.style["will-change"]="all",o=function(){Ot("delayEnded",r,{evt:t}),me.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!z&&r.nativeDraggable&&(Tt.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),nt(Tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){it(Tt,t.trim(),ye)})),$(l,"dragover",ve),$(l,"mousemove",ve),$(l,"touchmove",ve),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),z&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Tt.draggable=!0),Ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(W||H))o();else{if(me.eventCanceled)return void this._onDrop();$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Tt&&ye(Tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):$(document,e?"touchmove":"mousemove",this._onTouchMove):($(Tt,"dragend",this),$(Pt,"dragstart",this._onDragStart));try{document.selection?xe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Qt=!1,Pt&&Tt){Ot("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",ge);var n=this.options;!t&&nt(Tt,n.dragClass,!1),nt(Tt,n.ghostClass,!0),me.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,pe();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY))!==e;)e=t;if(Tt.parentNode[bt]._isOutsideThisEl(t),e)do{if(e[bt]){if(e[bt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Mt&&rt(Mt,!0),a=Mt&&i&&i.a,l=Mt&&i&&i.d,s=le&&Kt&&ft(Kt),c=(r.clientX-Lt.clientX+o.x)/(a||1)+(s?s[0]-oe[0]:0)/(a||1),u=(r.clientY-Lt.clientY+o.y)/(l||1)+(s?s[1]-oe[1]:0)/(l||1);if(!me.active&&!Qt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}(t,r,this)&&!v.animated){if(v===Tt)return A(!1);if(v&&i===t.target&&(a=v),a&&(n=lt(a)),!1!==be(Pt,i,Tt,e,a,n,t,!!a))return P(),i.appendChild(Tt),Ct=i,I(),A(!0)}else if(v&&function(t,e,n){var o=lt(ct(n.el,0,n.options,!0)),r=10;return e?t.clientXu+c*i/2:sd-Zt)return-$t}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(t,a,n,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ne,Ut===a))){var O=dt(Tt);do{O-=m,y=Ct.children[O]}while(y&&("none"===ot(y,"display")||y===Mt))}if(0===m||y===a)return A(!1);Ut=a,$t=m;var D=a.nextElementSibling,T=!1,C=be(Pt,i,Tt,e,a,n,t,T=1===m);if(!1!==C)return 1!==C&&-1!==C||(T=1===C),re=!0,setTimeout(we,30),P(),T&&!D?i.appendChild(Tt):a.parentNode.insertBefore(Tt,T?D:a),E&>(E,0,S-E.scrollTop),Ct=Tt.parentNode,void 0===b||ne||(Zt=Math.abs(b-lt(a)[x])),I(),A(!0)}if(i.contains(Tt))return A(!1)}return!1}function M(l,s){Ot(l,p,R({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:A,onMove:function(n,o){return be(Pt,i,Tt,e,n,lt(n),t,o)},changed:I},s))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==f&&(nt(Tt,Ft?Ft.options.ghostClass:c.options.ghostClass,!1),nt(Tt,l.ghostClass,!0)),Ft!==p&&p!==me.active?Ft=p:p===me.active&&Ft&&(Ft=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Tt&&!Tt.animated||a===i&&!a.animated)&&(Ut=null),l.dragoverBubble||t.rootEl||a===document||(Tt.parentNode[bt]._isOutsideThisEl(t.target),!e&&ve(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function I(){Rt=dt(Tt),Xt=dt(Tt,l.draggable),Dt({sortable:p,name:"change",toEl:i,newIndex:Rt,newDraggableIndex:Xt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",ve),Z(document,"mousemove",ve),Z(document,"touchmove",ve)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Rt=dt(Tt),Xt=dt(Tt,n.draggable),Ot("drop",this,{evt:t}),Ct=Tt&&Tt.parentNode,Rt=dt(Tt),Xt=dt(Tt,n.draggable),me.eventCanceled||(Qt=!1,ne=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ee(this.cloneId),Ee(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),V&&ot(document.body,"user-select",""),ot(Tt,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),(Pt===Ct||Ft&&"clone"!==Ft.lastPutMode)&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),Tt&&(this.nativeDraggable&&Z(Tt,"dragend",this),ye(Tt),Tt.style["will-change"]="",Gt&&!Qt&&nt(Tt,Ft?Ft.options.ghostClass:this.options.ghostClass,!1),nt(Tt,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:Ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==Ct?(Rt>=0&&(Dt({rootEl:Ct,name:"add",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:Ct,originalEvent:t}),Dt({rootEl:Ct,name:"sort",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),Ft&&Ft.save()):Rt!==kt&&Rt>=0&&(Dt({sortable:this,name:"update",toEl:Ct,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),me.active&&(null!=Rt&&-1!==Rt||(Rt=kt,Xt=Yt),Dt({sortable:this,name:"end",toEl:Ct,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ot("nulling",this),Pt=Tt=Ct=Mt=At=Nt=It=jt=Lt=Ht=Gt=Rt=Xt=kt=Yt=Ut=$t=Ft=Bt=me.dragged=me.ghost=me.clone=me.active=null,ie.forEach((function(t){t.checked=!0})),ie.length=Wt=zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:"default";p.data[t]=u(u(u({},v),p.data[t]),e),p.data[t][""]=u(u({},v[""]),p.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return p.data[e]||f(void 0,e),p.dcnpgettext(e,t,n,r,i)},h=function(e,t,n){return d(n,t,e)},c&&f(c,l),{setLocaleData:f,__:function(e,t){return d(t,void 0,e)},_x:h,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===h("ltr","text direction")}}),m=(g.setLocaleData.bind(g),g.__.bind(g));g._x.bind(g),g._n.bind(g),g._nx.bind(g),g.isRTL.bind(g)},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,u,c,l,p,f,d=1,h=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,u=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}var u=Object.create(null);function c(e){if(u[e])return u[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return u[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},36:function(e,t,n){"use strict";n.r(t);var r=n(1);const i={template:document.getElementById("main-image"),stepper:document.getElementById("responsive.pixel_step"),counter:document.getElementById("responsive.breakpoints"),max:document.getElementById("responsive.max_width"),min:document.getElementById("responsive.min_width"),details:document.getElementById("preview-details"),preview:null,init(){this.preview=this.template.parentNode,this.stepper.addEventListener("change",(()=>{this.counter.value=this.rebuildPreview()})),this.counter.addEventListener("change",(()=>{this.calculateShift()})),this.max.addEventListener("change",(()=>{this.calculateShift()})),this.min.addEventListener("change",(()=>{this.calculateShift()})),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const e=this.counter.value,t=(this.max.value-this.min.value)/(e-1);this.stepper.value=Math.floor(t),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let e=parseInt(this.max.value),t=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),e||(e=parseInt(this.max.dataset.default),this.max.value=e),t||(t=100,this.min.value=t);let i=e,o=i/e*100;const a=this.makeSize(i,o);a.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(a);let s=1;for(;i>t&&(i-=n,!(ii.init()))},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,u=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function u(e){var t=function(e){for(var t,n,s,u,c=[],l=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]1&&void 0!==arguments[1]?arguments[1]:"default";p.data[t]=u(u(u({},v),p.data[t]),e),p.data[t][""]=u(u({},v[""]),p.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return p.data[e]||f(void 0,e),p.dcnpgettext(e,t,n,r,i)},h=function(e,t,n){return d(n,t,e)},c&&f(c,l),{setLocaleData:f,__:function(e,t){return d(t,void 0,e)},_x:h,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===h("ltr","text direction")}}),m=(g.setLocaleData.bind(g),g.__.bind(g));g._x.bind(g),g._n.bind(g),g._nx.bind(g),g.isRTL.bind(g)},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,u,c,l,p,f,d=1,h=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,u=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}var u=Object.create(null);function c(e){if(u[e])return u[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return u[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},35:function(e,t,n){"use strict";n.r(t);var r=n(1);const i={template:document.getElementById("main-image"),stepper:document.getElementById("responsive.pixel_step"),counter:document.getElementById("responsive.breakpoints"),max:document.getElementById("responsive.max_width"),min:document.getElementById("responsive.min_width"),details:document.getElementById("preview-details"),preview:null,init(){this.preview=this.template.parentNode,this.stepper.addEventListener("change",(()=>{this.counter.value=this.rebuildPreview()})),this.counter.addEventListener("change",(()=>{this.calculateShift()})),this.max.addEventListener("change",(()=>{this.calculateShift()})),this.min.addEventListener("change",(()=>{this.calculateShift()})),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const e=this.counter.value,t=(this.max.value-this.min.value)/(e-1);this.stepper.value=Math.floor(t),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let e=parseInt(this.max.value),t=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),e||(e=parseInt(this.max.dataset.default),this.max.value=e),t||(t=100,this.min.value=t);let i=e,o=i/e*100;const a=this.makeSize(i,o);a.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(a);let s=1;for(;i>t&&(i-=n,!(ii.init()))},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,u=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function u(e){var t=function(e){for(var t,n,s,u,c=[],l=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function Q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function G(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Z=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=N.a.mark((function t(e,i){var n,o,s,a,l,c;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Z(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(G(G({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,G(G({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,K(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=J(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(G(G({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,K(l);case 22:c=t.sent,a=a.concat(c),s=J(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=T,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:T(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",T="end",L="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+T])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+T])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case T:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function G(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),T="clientHeight",L="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(T="scrollHeight",L="scrollWidth"),P=P,o===w&&(M=O,b-=P[T]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[L]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&Q);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var K={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var J={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(t){return t.replace(/left|right|bottom|top/g,(function(t){return J[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===L?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?L:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),T=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,T)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[N,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,G(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,G(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},K,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Z(m)]:function(t){if(W(t)===M)return[];var e=Z(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,T=new Map,L=!0,C=v[0],j=0;j=0,B=z?"width":"height",N=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[B]>_[B]&&(H=Z(H));var $=Z(H),U=[];if(o&&U.push(N[R]<=0),a&&U.push(N[H]<=0,N[$]<=0),U.every((function(t){return t}))){C=I,L=!1;break}T.set(I,U)}if(L)for(var q=function(t){var e=v.find((function(e){var i=T.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",T=e.modifiersData.popperOffsets,L=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(T){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=T[M],z=T[M]+b[j],B=T[M]-b[I],N=f?-C[R]/2:0,$=v===P?L[R]:C[R],U=v===P?-C[R]:-L[R],X=e.elements.arrow,Q=f&&X?g(X):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=G[j],J=G[I],Z=ct(0,L[R],Q[R]),tt=x?L[R]/2-N-Z-K-D:$-Z-K-D,et=x?-L[R]/2+N+Z+J+D:U+Z+J+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=T[M]+tt-rt-nt,st=T[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(B,st):B);T[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=T[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);T[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,T=ct(x,P,M),L=l;i.modifiersData[n]=((e={})[L]=T,e.centerOffset=T-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Tt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Lt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Bt(){var t=document.activeElement;if(Tt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Nt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Nt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Qt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Gt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Kt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Gt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Qt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Qt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Kt.$$tippy=!0;var Jt=1,Zt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Jt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(J(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(T().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=T();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);J(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;L().addEventListener("mousemove",b),Ot(Zt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Z(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function T(){return c||t}function L(){var t=T().parentNode;return t?At(t):document}function C(){return Gt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){L().removeEventListener("mousemove",b),Zt=Zt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(T().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function B(){p=!0}function N(){p=!1}function W(){var t=L();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",N,bt),t.addEventListener("touchmove",B,bt)}function V(){var t=L();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",N,bt),t.removeEventListener("touchmove",B,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",Q,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",Q);break;case"focus":$(Wt?"focusout":"blur",G);break;case"focusin":$("focusout",G)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!K(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Zt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=T().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function Q(t){K(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function G(t){x.props.trigger.indexOf("focusin")<0&&t.target!==T()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function K(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function J(){Z();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Gt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Z(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Bt);var n=Object.assign({},e,{plugins:i}),r=Lt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},K,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Kt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(30),Circle:i(21),SemiCircle:i(32),Square:i(33),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(31),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){!function(){const t=function(){const t=jQuery("#field-video_player").val(),e=jQuery("#field-video_controls").prop("checked"),i=jQuery('#field-video_autoplay_mode option[value="off"]');"cld"!==t||e?i.prop("disabled",!1):(i.prop("disabled",!0),i.prop("selected")&&i.next().prop("selected",!0))};t(),jQuery(document).on("change","#field-video_player",t),jQuery(document).on("change","#field-video_controls",t),jQuery(document).ready((function(t){t.isFunction(t.fn.wpColorPicker)&&t(".regular-color").wpColorPicker(),t(document).on("tabs.init",(function(){const e=t(".settings-tab-trigger"),i=t(".settings-tab-section");t(this).on("click",".settings-tab-trigger",(function(n){const r=t(this),o=t(r.attr("href"));n.preventDefault(),e.removeClass("active"),i.removeClass("active"),r.addClass("active"),o.addClass("active"),t(document).trigger("settings.tabbed",r)})),t(".cld-field").not('[data-condition="false"]').each((function(){const e=t(this),i=e.data("condition");for(const n in i){let r=t("#field-"+n);const o=i[n],s=e.closest("tr");r.length||(r=t(`[id^=field-${n}-]`));let a=!1;r.on("change init",(function(t,e=!1){if(a&&e)return;let i=this.value===o||this.checked;if(Array.isArray(o)&&2===o.length)switch(o[1]){case"neq":i=this.value!==o[0];break;case"gt":i=this.value>o[0];break;case"lt":i=this.value=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Kt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Jt},tween:function(){return mt},unsetBezierFunction:function(){return Zt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return L},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return B},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Bt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},L=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},B=function(t){return Math.pow(t,.25)};function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Z),l1&&void 0!==arguments[1]?arguments[1]:Q,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Q;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;N(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Z),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(K),this._applyFilter(J))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(G,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Tt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Lt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Tt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Lt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Bt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Tt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Nt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Zt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return zs}));i(28),i(29);var n=i(22),r=i.n(n),o=i(23),s=i.n(o);const a={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{const n=!!i.length&&jQuery('[data-item="'+r+":"+i[0].id+'"]');n.length?n.remove():(jQuery(`.cld-tax-order-list-item:contains(${s})`).remove(),--t.startId),this.processTags(e)}))}),jQuery("body").on("change",".selectit input",(function(){const e=jQuery(this),i=e.val(),n=e.is(":checked"),r=e.parent().text().trim();!0===n?t.tags.find(`[data-item="category:${i}"]`).length||t._pushItem(`category:${i}`,r):t.tags.find(`[data-item="category:${i}"]`).remove()}))},_createItem(t,e){const i=jQuery("
  • "),n=jQuery(""),r=jQuery("");return i.addClass("cld-tax-order-list-item").attr("data-item",t),r.addClass("cld-tax-order-list-item-input").attr("type","hidden").attr("name","cld_tax_order[]").val(t),n.addClass("dashicons dashicons-menu cld-tax-order-list-item-handle"),i.append(n).append(e).append(r),i},_pushItem(t,e){const i=this._createItem(t,e);this.tags.append(i)},_sortable(){jQuery(".cld-tax-order-list").sortable({connectWith:".cld-tax-order",axis:"y",handle:".cld-tax-order-list-item-handle",placeholder:"cld-tax-order-list-item-placeholder",forcePlaceholderSize:!0,helper:"clone"})}};void 0!==window.CLDN&&(c._init(),jQuery("[data-wp-lists] .selectit input[checked]").each(((t,e)=>{jQuery(e).trigger("change")})));var h=c,u=i(3);const d={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(u.a.use(u.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(u.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var f=d;window.addEventListener("load",(()=>d._init()));const p={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,x.call(window,(()=>{r=!1,t.apply(e,o)})))}}const w=t=>"start"===t?"left":"end"===t?"right":"center",O=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function k(){}const S=function(){let t=0;return function(){return t++}}();function M(t){return null==t}function E(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function P(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const T=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function L(t,e){return T(t)?t:e}function C(t,e){return void 0===t?e:t}const D=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function A(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function j(t,e,i,n){let r,o,s;if(E(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=V(e,i);return t}function $(t){return t.charAt(0).toUpperCase()+t.slice(1)}const U=t=>void 0!==t,q=t=>"function"==typeof t,Y=Math.PI,X=2*Y,Q=X+Y,G=Number.POSITIVE_INFINITY,K=Y/180,J=Y/2,Z=Y/4,tt=2*Y/3,et=Math.log10,it=Math.sign;function nt(t){const e=Math.round(t);t=ot(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(et(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function rt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function ot(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,mt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*X/i),bt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*X/i)+1,yt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*J),easeOutSine:t=>Math.sin(t*J),easeInOutSine:t=>-.5*(Math.cos(Y*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>gt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>gt(t)?t:mt(t,.075,.3),easeOutElastic:t=>gt(t)?t:bt(t,.075,.3),easeInOutElastic(t){const e=.1125;return gt(t)?t:t<.5?.5*mt(2*t,e,.45):.5+.5*bt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-yt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*yt.easeInBounce(2*t):.5*yt.easeOutBounce(2*t-1)+.5},vt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},xt="0123456789ABCDEF",_t=t=>xt[15&t],wt=t=>xt[(240&t)>>4]+xt[15&t],Ot=t=>(240&t)>>4==(15&t);function kt(t){var e=function(t){return Ot(t.r)&&Ot(t.g)&&Ot(t.b)&&Ot(t.a)}(t)?_t:wt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function St(t){return t+.5|0}const Mt=(t,e,i)=>Math.max(Math.min(t,i),e);function Et(t){return Mt(St(2.55*t),0,255)}function Pt(t){return Mt(St(255*t),0,255)}function Tt(t){return Mt(St(t/2.55)/100,0,1)}function Lt(t){return Mt(St(100*t),0,100)}const Ct=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Dt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function At(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function jt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function It(t,e,i){const n=At(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Rt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Ut(t,e,i){if(t){let n=Rt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=zt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function qt(t,e){return t?Object.assign(e||{},t):t}function Yt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Pt(t[3]))):(e=qt(t,{r:0,g:0,b:0,a:1})).a=Pt(e.a),e}function Xt(t){return"r"===t.charAt(0)?function(t){const e=Ct.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Et(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Et(i):i),n=255&(e[4]?Et(n):n),r=255&(e[6]?Et(r):r),{r:i,g:n,b:r,a:o}}}(t):Nt(t)}class Qt{constructor(t){if(t instanceof Qt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Yt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*vt[n[1]],g:255&17*vt[n[2]],b:255&17*vt[n[3]],a:5===o?17*vt[n[4]]:255}:7!==o&&9!==o||(r={r:vt[n[1]]<<4|vt[n[2]],g:vt[n[3]]<<4|vt[n[4]],b:vt[n[5]]<<4|vt[n[6]],a:9===o?vt[n[7]]<<4|vt[n[8]]:255})),i=r||$t(t)||Xt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=qt(this._rgb);return t&&(t.a=Tt(t.a)),t}set rgb(t){this._rgb=Yt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Tt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?kt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Rt(t),i=e[0],n=Lt(e[1]),r=Lt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Tt(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Qt(this.rgb)}alpha(t){return this._rgb.a=Pt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=St(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ut(this._rgb,2,t),this}darken(t){return Ut(this._rgb,2,-t),this}saturate(t){return Ut(this._rgb,1,t),this}desaturate(t){return Ut(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Rt(t);i[0]=Bt(i[0]+e),i=zt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Gt(t){return new Qt(t)}const Kt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Jt(t){return Kt(t)?t:Gt(t)}function Zt(t){return Kt(t)?t:Gt(t).saturate(.5).darken(.1).hexString()}const te=Object.create(null),ee=Object.create(null);function ie(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Zt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Zt(e.borderColor),this.hoverColor=(t,e)=>Zt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return ne(this,t,e)}get(t){return ie(this,t)}describe(t,e){return ne(ee,t,e)}override(t,e){return ne(te,t,e)}route(t,e,i,n){const r=ie(this,t),o=ie(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return P(t)?Object.assign({},e,t):C(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function oe(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function se(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function he(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);M(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lC(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function we(t){return _e(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Oe(t){return _e(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ke(t){const e=we(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Se(t,e){t=t||{},e=e||re.font;let i=C(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=C(t.style,e.style);n&&!(""+n).match(ve)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:C(t.family,e.family),lineHeight:xe(C(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:C(t.weight,e.weight),string:""};return r.string=function(t){return!t||M(t.size)||M(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function Me(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Te=(t,e,i)=>Pe(t,i,(n=>t[n][e]Pe(t,i,(n=>t[n][e]>=i));const Ce=["push","pop","shift","splice","unshift"];function De(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ce.forEach((e=>{delete t[e]})),delete t._chartjs)}function Ae(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){U(n)||(n=Ue("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>je([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Be(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ue(Fe(o,t),i),U(r))return ze(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>qe(t).includes(e),ownKeys:t=>qe(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ie(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Re(t,n),setContext:e=>Ie(t,e,i,n),override:r=>Ie(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Be(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];q(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),P(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));E(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(U(o.index)&&n(t))e=e[o.index%e.length];else if(P(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Ie(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));ze(e,a)&&(a=Ie(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Re(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:q(i)?i:()=>i,isIndexable:q(n)?n:()=>n}}const Fe=(t,e)=>t?t+$(e):e,ze=(t,e)=>P(e)&&"adapters"!==t;function Be(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ne(t,e,i){return q(t)?t(e,i):t}const We=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function Ve(t,e,i,n){for(const r of e){const e=We(i,r);if(e){t.add(e);const r=Ne(e._fallback,i,e);if(U(r)&&r!==i&&r!==n)return r}else if(!1===e&&U(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ne(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=$e(a,s,i,o||i);return null!==l&&((!U(o)||o===i||(l=$e(a,s,o,l),null!==l))&&je(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(E(r)&&P(i))return i;return r}(e,i,n))))}function $e(t,e,i,n){for(;i;)i=Ve(t,e,i,n);return i}function Ue(t,e){for(const i of e){if(!i)continue;const e=i[t];if(U(e))return e}}function qe(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const Ye=Number.EPSILON||1e-14,Xe=(t,e)=>e"x"===t?"y":"x";function Ge(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=ht(o,r),l=ht(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ke(t,e="x"){const i=Qe(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=Xe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ke(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ri=["top","right","bottom","left"];function oi(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ri[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function si(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=ni(i),o="border-box"===r.boxSizing,s=oi(r,"padding"),a=oi(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ai=t=>Math.round(10*t)/10;function li(t,e,i,n){const r=ni(t),o=oi(r,"margin"),s=ii(r.maxWidth,t,"clientWidth")||G,a=ii(r.maxHeight,t,"clientHeight")||G,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=ei(t);if(o){const t=o.getBoundingClientRect(),s=ni(o),a=oi(s,"border","width"),l=oi(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=ii(s.maxWidth,o,"clientWidth"),r=ii(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||G,maxHeight:r||G}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=oi(r,"border","width"),e=oi(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ai(Math.min(c,s,l.maxWidth)),h=ai(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ai(c/2)),{width:c,height:h}}function ci(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const hi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ui(t,e){const i=function(t,e){return ni(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function di(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function fi(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function pi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=di(t,r,i),a=di(r,o,i),l=di(o,e,i),c=di(s,a,i),h=di(a,l,i);return di(c,h,i)}const gi=new Map;function mi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=gi.get(i);return n||(n=new Intl.NumberFormat(t,e),gi.set(i,n)),n}(e,i).format(t)}function bi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function yi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function vi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function xi(t){return"angle"===t?{between:ft,compare:ut,normalize:dt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function _i({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function wi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=xi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=xi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(_i({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(_i({start:v,end:u,loop:d,count:s,style:f})),p}function Oi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=x.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Pi="transparent",Ti={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Jt(t||Pi),r=n.valid&&Jt(e||Pi);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Li{constructor(t,e,i,n){const r=e[i];n=Me([t.to,n,r,t.from]);const o=Me([t.from,r,n]);this._active=!0,this._fn=t.fn||Ti[t.type||typeof o],this._easing=yt[t.easing]||yt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Me([t.to,e,n,t.from]),this._from=Me([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),re.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),re.describe("animations",{_fallback:"animation"}),re.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Di{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!P(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!P(n))return;const r={};for(const t of Ci)r[t]=n[t];(E(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Li(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Ei.add(this._chart,i),!0):void 0}}function Ai(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function ji(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Bi(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Wi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Vi=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class $i{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ri(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Wi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=C(i.xAxisID,Ni(t,"x")),o=e.yAxisID=C(i.yAxisID,Ni(t,"y")),s=e.rAxisID=C(i.rAxisID,Ni(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&De(this._data,this),t._stacked&&Wi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(P(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+$(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Ri(e.vScale,e),e.stack!==i.stack&&(n=!0,Wi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Bi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=E(n[t])?this.parseArrayData(i,n,t,e):P(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:ji(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!T(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Hi(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Di(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Vi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Vi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Vi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(U(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Yi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=it(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=C(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class en extends $i{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(P(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rft(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ft(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(J,h,d),b=p(Y,c,u),y=p(Y+J,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=D(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/X)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?X*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=mi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},en.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return E(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class nn extends $i{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=pt(Math.min(Te(a,s.axis,c).lo,i?n:Te(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?pt(Math.max(Te(a,s.axis,h).hi+1,i?0:Te(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=rt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}nn.id="line",nn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},nn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class rn extends $i{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=mi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*Y;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?at(this.resolveDataElementOptions(t,e).angle||i):0}}rn.id="polarArea",rn.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},rn.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class on extends en{}on.id="pie",on.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class sn extends $i{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var ln=Object.freeze({__proto__:null,BarController:Zi,BubbleController:tn,DoughnutController:en,LineController:nn,PolarAreaController:rn,PieController:on,RadarController:sn,ScatterController:an});function cn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class hn{constructor(t){this.options=t||{}}formats(){return cn()}parse(t,e){return cn()}format(t,e){return cn()}add(t,e,i){return cn()}diff(t,e,i){return cn()}startOf(t,e,i){return cn()}endOf(t,e){return cn()}}hn.override=function(t){Object.assign(hn.prototype,t)};var un={_date:hn};function dn(t,e){return"native"in t?{x:t.x,y:t.y}:si(t,e)}function fn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Le:Te;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function pn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var yn={modes:{index(t,e,i,n){const r=dn(e,t),o=i.axis||"x",s=i.intersect?gn(t,r,o,n):mn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=dn(e,t),o=i.axis||"xy";let s=i.intersect?gn(t,r,o,n):mn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tgn(t,dn(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>mn(t,dn(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",bn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",bn(t,e,i,n))}};const vn=["left","top","right","bottom"];function xn(t,e){return t.filter((t=>t.pos===e))}function _n(t,e){return t.filter((t=>-1===vn.indexOf(t.pos)&&t.box.axis===e))}function wn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function On(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!vn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Pn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=wn(xn(e,"left"),!0),r=wn(xn(e,"right")),o=wn(xn(e,"top"),!0),s=wn(xn(e,"bottom")),a=_n(e,"x"),l=_n(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:xn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;j(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);Sn(d,ke(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=On(l.concat(c),u);Pn(a.fullSize,f,u,p),Pn(l,f,u,p),Pn(c,f,u,p)&&Pn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ln(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Ln(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},j(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Dn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class An extends Dn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const jn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},In=t=>null===t||""===t;const Rn=!!hi&&{passive:!0};function Fn(t,e,i){t.canvas.removeEventListener(e,i,Rn)}function zn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Bn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Nn=new Map;let Wn=0;function Vn(){const t=window.devicePixelRatio;t!==Wn&&(Wn=t,Nn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&ei(n);if(!r)return;const o=_(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Nn.size||window.addEventListener("resize",Vn),Nn.set(t,e)}(t,o),s}function $n(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Nn.delete(t),Nn.size||window.removeEventListener("resize",Vn)}(t)}function Un(t,e,i){const n=t.canvas,r=_((e=>{null!==t.ctx&&i(function(t,e){const i=jn[t.type]||t.type,{x:n,y:r}=si(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Rn)}(n,e,r),r}class qn extends Dn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",In(r)){const e=ui(t,"width");void 0!==e&&(t.width=e)}if(In(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ui(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];M(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:zn,detach:Bn,resize:Hn}[e]||Un;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:$n,detach:$n,resize:$n}[e]||Fn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return li(t,e,i,n)}isAttached(t){const e=ei(t);return!(!e||!e.isConnected)}}class Yn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return rt(this.x)&&rt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Yn.defaults={},Yn.defaultRoutes=void 0;const Xn={values:t=>E(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=et(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),mi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(et(t)));return 1===n||2===n||5===n?Xn.numeric.call(this,t,e,i):""}};var Qn={formatters:Xn};function Gn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Kn(e,l,c,M(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Qn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),re.route("scale.ticks","color","","color"),re.route("scale.grid","color","","borderColor"),re.route("scale.grid","borderColor","","borderColor"),re.route("scale.title","color","","color"),re.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),re.describe("scales",{_fallback:"scale"}),re.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Jn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Zn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function er(t){return t.drawTicks?t.tickLength:0}function ir(t,e){if(!t.display)return 0;const i=Se(t.font,e),n=ke(t.padding);return(E(t.text)?t.text.length:1)*i.lineHeight+n.height}function nr(t,e,i){let n=w(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class rr extends Yn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=L(t,Number.POSITIVE_INFINITY),e=L(e,Number.NEGATIVE_INFINITY),i=L(i,Number.POSITIVE_INFINITY),n=L(n,Number.NEGATIVE_INFINITY),{min:L(t,i),max:L(e,n),minDefined:T(t),maxDefined:T(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:L(i,L(n,i)),max:L(n,L(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){A(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=D(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=pt(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-er(t.grid)-e.padding-ir(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=lt(Math.min(Math.asin(pt((c.highest.height+6)/o,-1,1)),Math.asin(pt(s/a,-1,1))-Math.asin(pt(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){A(this.options.afterCalculateLabelRotation,[this])}beforeFit(){A(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=ir(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=er(r)+o):(t.height=this.maxHeight,t.width=er(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=at(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){A(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return pt(this._alignToPixels?ae(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=er(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ae(i,t,d)};let g,m,b,y,v,x,_,w,O,k,S,M;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,k=p(t.top)+f,M=t.bottom;else if("bottom"===o)g=p(this.top),k=t.top,M=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,S=t.right;else if("right"===o)g=p(this.left),O=t.left,S=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(P(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}k=t.top,M=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(P(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,S=t.right}const E=C(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/E));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");re.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&re.describe(e,t.descriptors)}(t,o,i),this.override&&re.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in re[n]&&(delete re[n][i],this.override&&delete te[i])}}var sr=new class{constructor(){this.controllers=new or($i,"datasets",!0),this.elements=new or(Yn,"elements"),this.plugins=new or(Object,"plugins"),this.scales=new or(rr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):j(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=$(t);A(i["before"+n],[],i),e[t](i),A(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function lr(t,e){return e||!1!==t?!0===t?{}:t:null}function cr(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function hr(t,e){const i=re.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ur(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function dr(t){const e=t.options||(t.options={});e.plugins=C(e.plugins,{}),e.scales=function(t,e){const i=te[t.type]||{scales:{}},n=e.scales||{},r=hr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!P(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ur(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=N(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||hr(r,e),l=(te[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),N(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];N(e,[re.scales[e.type],re.scale])})),s}(t,e)}function fr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const pr=new Map,gr=new Set;function mr(t,e){let i=pr.get(t);return i||(i=e(),pr.set(t,i),gr.add(i)),i}const br=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class yr{constructor(t){this._config=function(t){return(t=t||{}).data=fr(t.data),dr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=fr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),dr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return mr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return mr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return mr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return mr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>br(a,t,e)))),e.forEach((t=>br(a,n,t))),e.forEach((t=>br(a,te[r]||{},t))),e.forEach((t=>br(a,re,t))),e.forEach((t=>br(a,ee,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),gr.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,te[e]||{},re.datasets[e]||{},{type:e},re,ee]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=vr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Re(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(q(s)||xr(s))||o&&E(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ie(o,i=q(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=vr(this._resolverCache,t,i);return P(e)?Ie(r,e,void 0,n):r}}function vr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:je(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const xr=t=>P(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||q(t[i])),!1);const _r=["top","bottom","left","right","chartArea"];function wr(t,e){return"top"===t||"bottom"===t||-1===_r.indexOf(t)&&"x"===e}function Or(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function kr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),A(i&&i.onComplete,[t],e)}function Sr(t){const e=t.chart,i=e.options.animation;A(i&&i.onProgress,[t],e)}function Mr(t){return ti()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Er={},Pr=t=>{const e=Mr(t);return Object.values(Er).filter((t=>t.canvas===e)).pop()};class Tr{constructor(t,e){const i=this.config=new yr(e),n=Mr(t),r=Pr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!ti()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?An:qn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=S(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ar,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Er[this.id]=this,s&&a?(Ei.listen(this,"complete",kr),Ei.listen(this,"progress",Sr),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return M(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ci(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return le(this.canvas,this.ctx),this}stop(){return Ei.stop(this),this}resize(t,e){Ei.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,ci(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),A(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){j(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ur(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),j(r,(e=>{const r=e.options,o=r.id,s=ur(o,r),a=C(r.type,e.dtype);void 0!==r.position&&wr(r.position,s)===wr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(sr.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),j(n,((t,e)=>{t||delete i[e]})),j(i,(t=>{Cn.configure(this,t,t.options),Cn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());j(this.scales,(t=>{Cn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Or("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Cn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],j(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ue(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&de(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=yn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Ee(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);U(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Ei.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};j(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){j(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},j(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!I(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,he(t,this.chartArea,this._minPadding)&&(A(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||A(n.onClick,[t,s,this],this)),a=!I(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Lr=()=>j(Tr.instances,(t=>t._plugins.invalidate())),Cr=!0;function Dr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+J,n-J),t.closePath(),t.clip()}function Ar(t,e,i,n){const r=_e(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return pt(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:pt(r.innerStart,0,s),innerEnd:pt(r.innerEnd,0,s)}}function jr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Ir(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/Y)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Ar(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=jr(w,k,o,s);t.arc(e.x,e.y,y,k,m+J)}const T=jr(M,m,o,s);if(t.lineTo(T.x,T.y),x>0){const e=jr(M,P,o,s);t.arc(e.x,e.y,x,m+J,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=jr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-J)}const L=jr(_,g,o,s);if(t.lineTo(L.x,L.y),b>0){const e=jr(_,O,o,s);t.arc(e.x,e.y,b,g-J,O)}t.closePath()}function Rr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Dr(t,e,o+X),t.beginPath(),t.arc(n,r,c,o+X,o,!0),h=0;h{sr.add(...t),Lr()}},unregister:{enumerable:Cr,value:(...t)=>{sr.remove(...t),Lr()}}});class Fr extends Yn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*Y&&(o+=X),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=X||ft(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>X?Math.floor(i/X):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=Y&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Ir(t,e,i,n,o+X);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Vr:Wr}Fr.id="arc",Fr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Fr.defaultRoutes={backgroundColor:"backgroundColor"};const $r="function"==typeof Path2D;function Ur(t,e,i,n){$r&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),zr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)zr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class qr extends Yn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ze(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return ki(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class Xr extends Yn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Zr(t,e){t.rect(e.x,e.y,e.w,e.h)}function to(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}Xr.id="point",Xr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Xr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class eo extends Yn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Kr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?be:Zr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,to(o,e,r)),t.clip(),s(t,to(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,to(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Jr(this,t,e,i)}inXRange(t,e){return Jr(this,t,null,e)}inYRange(t,e){return Jr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}eo.id="bar",eo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},eo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var io=Object.freeze({__proto__:null,ArcElement:Fr,LineElement:qr,PointElement:Xr,BarElement:eo});function no(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function ro(t){t.data.datasets.forEach((t=>{no(t)}))}var oo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void ro(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===Me([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=pt(Te(e,o.axis,s).lo,0,i-1)),n=c?pt(Te(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void no(e);let d;switch(M(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!M(c)&&!M(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){ro(t)}};function so(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=C(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(P(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return T(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class ao{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:X},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function lo(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:P(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new ao({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ho(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function fo(t){const{chart:e,fill:i,line:n}=t;if(T(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=co(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new qr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function go(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!T(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function mo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function bo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=dt(r),o=dt(o)),{property:t,start:r,end:o}}function yo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function vo(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function xo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function _o(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=co(n,a,r);const l=bo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=Oi(e,l);for(const e of c){const n=bo(i,o[e.start],o[e.end],e.loop),a=wi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:yo(l,n,"start",Math.max)},end:{[i]:yo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,vo(t,s,u&&bo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():xo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||xo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function wo(t,e,i){const n=fo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ue(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(mo(t,n,s.top),_o(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),mo(t,n,s.bottom)),_o(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),de(t))}var Oo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&wo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&wo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&wo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ko=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class So extends Yn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=A(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=Se(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=ko(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=bi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=O(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=O(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=O(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=O(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ue(t,this),this._draw(),de(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=re.color,a=bi(t.rtl,this.left,this.width),l=Se(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=ko(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:O(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:O(r,this.top+y+h,this.bottom-e[0].height),line:0},yi(this.ctx,t.textDirection);const v=m+h;this.legendItems.forEach(((x,_)=>{n.strokeStyle=x.fontColor||c,n.fillStyle=x.fontColor||c;const w=n.measureText(x.text).width,k=a.textAlign(x.textAlign||(x.textAlign=o.textAlign)),S=p+d+w;let M=f.x,E=f.y;a.setWidth(this.width),b?_>0&&M+S+h>this.right&&(E=f.y+=v,f.line++,M=f.x=O(r,this.left+h,this.right-i[f.line])):_>0&&E+v>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,E=f.y=O(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=C(i.lineWidth,1);if(n.fillStyle=C(i.fillStyle,s),n.lineCap=C(i.lineCap,"butt"),n.lineDashOffset=C(i.lineDashOffset,0),n.lineJoin=C(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=C(i.strokeStyle,s),n.setLineDash(C(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);ce(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=Oe(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?be(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),E,x),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ge(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),E,x),b?f.x+=S+h:f.y+=v})),vi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Se(e.font),n=ke(e.padding);if(!e.display)return;const r=bi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=O(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+O(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=O(s,h,h+u);o.textAlign=r.textAlign(w(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ge(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=Se(t.font),i=ke(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&A(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&A(e.onHover,[t,i,this],this)}else i&&A(e.onClick,[t,i,this],this);var n,r}}var Mo={id:"legend",_element:So,start(t,e,i){const n=t.legend=new So({ctx:t.ctx,options:i,chart:t});Cn.configure(t,n,i),Cn.addBox(t,n)},stop(t){Cn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Cn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=ke(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Eo extends Yn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=E(i.text)?i.text.length:1;this._padding=ke(i.padding);const r=n*Se(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=O(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=O(s,n,e),h=-.5*Y):(l=r-t,c=O(s,e,n),h=.5*Y),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Se(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ge(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:w(e.align),textBaseline:"middle",translation:[r,o]})}}var Po={id:"title",_element:Eo,start(t,e,i){!function(t,e){const i=new Eo({ctx:t.ctx,options:e,chart:t});Cn.configure(t,i,e),Cn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Cn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Cn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const To=new WeakMap;var Lo={id:"subtitle",start(t,e,i){const n=new Eo({ctx:t.ctx,options:i,chart:t});Cn.configure(t,n,i),Cn.addBox(t,n),To.set(t,n)},stop(t){Cn.removeBox(t,To.get(t)),To.delete(t)},beforeUpdate(t,e,i){const n=To.get(t);Cn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Co={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function jo(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Io(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=Se(e.bodyFont),c=Se(e.titleFont),h=Se(e.footerFont),u=o.length,d=r.length,f=n.length,p=ke(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,j(t.title,v),i.font=l.string,j(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,j(n,(t=>{j(t.before,v),j(t.lines,v),j(t.after,v)})),y=0,i.font=h.string,j(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Ro(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Fo(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Ro(t,e,i,n),yAlign:n}}function zo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=Oe(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:pt(p,0,n.width-e.width),y:pt(g,0,n.height-e.height)}}function Bo(t,e,i){const n=ke(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function No(t){return Do([],Ao(t))}function Wo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Vo extends Yn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Di(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Ee(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Do(s,Ao(n)),s=Do(s,Ao(r)),s=Do(s,Ao(o)),s}getBeforeBody(t,e){return No(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return j(t,(t=>{const e={before:[],lines:[],after:[]},r=Wo(i,t);Do(e.before,Ao(r.beforeLabel.call(this,t))),Do(e.lines,r.label.call(this,t)),Do(e.after,Ao(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return No(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Do(s,Ao(n)),s=Do(s,Ao(r)),s=Do(s,Ao(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),j(l,(e=>{const i=Wo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Co[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Io(this,i),s=Object.assign({},t,e),a=Fo(this._chart,i,s),l=zo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=Oe(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=bi(i.rtl,this.x,this.width);for(t.x=Bo(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Se(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,be(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),be(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=Se(i.bodyFont);let u=h.lineHeight,d=0;const f=bi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Bo(this,g,i),e.fillStyle=i.bodyColor,j(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,j(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Co[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Io(this,t),s=Object.assign({},i,this._size),a=Fo(e,t,s),l=zo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ke(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),yi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),vi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!I(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!I(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Co[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}Vo.positioners=Co;var Ho={id:"tooltip",_element:Vo,positioners:Co,afterInit(t,e,i){i&&(t.tooltip=new Vo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:k,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},$o=Object.freeze({__proto__:null,Decimation:oo,Filler:Oo,Legend:Mo,SubTitle:Lo,Title:Po,Tooltip:Ho});function Uo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class qo extends rr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(M(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:pt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Uo(i,t,C(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Yo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!M(o),b=!M(s),y=!M(l),v=(g-p)/(h+1);let x,_,w,O,k=nt((g-p)/f/d)*d;if(k<1e-14&&!m&&!b)return[{value:p},{value:g}];O=Math.ceil(g/k)-Math.floor(p/k),O>f&&(k=nt(O*k/f/d)*d),M(a)||(x=Math.pow(10,a),k=Math.ceil(k*x)/x),"ticks"===n?(_=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(_=p,w=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,k/1e3)?(O=Math.round(Math.min((s-o)/k,c)),k=(s-o)/O,_=o,w=s):y?(_=m?o:_,w=b?s:w,O=l-1,k=(w-_)/O):(O=(w-_)/k,O=ot(O,Math.round(O),k/1e3)?Math.round(O):Math.ceil(O));const S=Math.max(ct(k),ct(_));x=Math.pow(10,M(a)?S:a),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=it(n),e=it(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Yo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&st(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return mi(t,this.chart.options.locale)}}class Go extends Qo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=T(t)?t:0,this.max=T(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=at(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ko(t){return 1===t/Math.pow(10,Math.floor(et(t)))}Go.id="linear",Go.defaults={ticks:{callback:Qn.formatters.numeric}};class Jo extends rr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Qo.prototype.parse.apply(this,[t,e]);if(0!==i)return T(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=T(t)?Math.max(0,t):null,this.max=T(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(et(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(et(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=L(t.min,Math.pow(10,Math.floor(et(e.min)))),s=Math.floor(et(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Ko(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function es(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Zo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function os(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,X);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=A(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?es(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=ss(n),r=ss(r),o=ss(o),s=ss(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return dt(t*(X/this.getLabels().length)+at(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(M(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(M(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=Se(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!M(f)){const t=ke(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ge(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),os(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=Se(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=ke(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ge(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}as.id="radialLinear",as.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},as.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},as.descriptors={angleLines:{_fallback:"grid"}};const ls={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},cs=Object.keys(ls);function hs(t,e){return t-e}function us(t,e){if(M(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),T(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!rt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ds(t,e,i,n){const r=cs.length;for(let o=cs.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function ps(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class gs extends rr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new un._date(t.adapters.date);N(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:us(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=T(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=T(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=cs.indexOf(i);o--){const i=cs[o];if(ls[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return cs[i?cs.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=cs.indexOf(t)+1,i=cs.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?A(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Te(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Te(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}gs.id="time",gs.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class bs extends gs{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ms(e,this.min),this._tableRange=ms(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new vs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>_s()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new v.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new v.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(u.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},ks=i(7);var Ss={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var Ms={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Es={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};ks.a.init(),b.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(m.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),Os.init(t),Ss.init(t),Ms.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=ks.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),ks.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Ps=document.getElementById("cloudinary-settings-page");Ps&&window.addEventListener("load",Es._init(Ps));var Ts=Es;const Ls={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),u.a.use(u.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(u.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ws.a)("Setting up Cloudinary","cloudinary"),Object(u.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ws.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ls.init()));var Cs=Ls;const Ds={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ds._init()));var As=Ds;const js={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;u.a.use(u.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(u.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>js.init()));var Is=js;const Rs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Rs.init()));var Fs=Rs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;window.$=window.jQuery;const zs={UI:Ts,Settings:r.a,Widget:s.a,GlobalTransformations:l,TermsOrder:h,MediaLibrary:f,Notices:g,Wizard:Cs,Storage:As,Extensions:Is,Tabs:Fs}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=T,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:T(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",T="end",L="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+T])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+T])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case T:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),T="clientHeight",L="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(T="scrollHeight",L="scrollWidth"),P=P,o===w&&(M=O,b-=P[T]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[L]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===L?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?L:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),T=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,T)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,T=new Map,L=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,L=!1;break}T.set(I,U)}if(L)for(var q=function(t){var e=v.find((function(e){var i=T.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",T=e.modifiersData.popperOffsets,L=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(T){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=T[M],z=T[M]+b[j],N=T[M]-b[I],B=f?-C[R]/2:0,$=v===P?L[R]:C[R],U=v===P?-C[R]:-L[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,L[R],G[R]),tt=x?L[R]/2-B-Q-J-D:$-Q-J-D,et=x?-L[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=T[M]+tt-rt-nt,st=T[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);T[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=T[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);T[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,T=ct(x,P,M),L=l;i.modifiersData[n]=((e={})[L]=T,e.centerOffset=T-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Tt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Lt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Tt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(T().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=T();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;L().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function T(){return c||t}function L(){var t=T().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){L().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(T().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=L();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=L();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=T().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==T()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Lt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return L},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},L=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Tt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Lt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Tt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Lt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Tt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function T(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function L(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Tt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Lt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Tt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Te(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Le([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Le(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Ti(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Li(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Li(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;L(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},L(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Tn extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ln={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Ln[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){T(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){T(this.options.afterCalculateLabelRotation,[this])}beforeFit(){T(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){T(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const T=E(n.ticks.maxTicksLimit,l),L=Math.max(1,Math.ceil(l/T));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):L(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);T(i["before"+n],[],i),e[t](i),T(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Le(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),T(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;T(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Tn:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),T(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){L(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),L(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),L(n,((t,e)=>{t||delete i[e]})),L(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());L(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],L(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};L(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){L(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},L(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(T(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||T(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>L(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Tr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Lr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Tr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Lr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const T=Lr(M,m,o,s);if(t.lineTo(T.x,T.y),x>0){const e=Lr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Lr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const L=Lr(_,g,o,s);if(t.lineTo(L.x,L.y),b>0){const e=Lr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=T(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&T(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&T(e.onHover,[t,i,this],this)}else i&&T(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Lo(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,L(t.title,v),i.font=l.string,L(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,L(n,(t=>{L(t.before,v),L(t.lines,v),L(t.after,v)})),y=0,i.font=h.string,L(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],To(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,To(n)),s=Po(s,To(r)),s=Po(s,To(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return L(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,To(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,To(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,To(n)),s=Po(s,To(r)),s=Po(s,To(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),L(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,L(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,L(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=T(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?T(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ts=Ps;const Ls={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ls.init()));var Cs=Ls;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ts,Extensions:Cs,Tabs:As}}]); \ No newline at end of file diff --git a/js/deactivate.asset.php b/js/deactivate.asset.php index 73ad33776..bf5fac2bb 100644 --- a/js/deactivate.asset.php +++ b/js/deactivate.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '5608add892473e51a9fb24c20af19a57'); \ No newline at end of file + array('wp-polyfill'), 'version' => '295894c6aa12ceccb33e91935aacb80d'); \ No newline at end of file diff --git a/js/deactivate.js b/js/deactivate.js index b0be8001e..2e43d1931 100644 --- a/js/deactivate.js +++ b/js/deactivate.js @@ -1 +1 @@ -!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=2)}([function(t,e,o){var n=o(3),i=o(4),a=o(5),r=o(6);t.exports=function(t){return n(t)||i(t)||a(t)||r()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o0&&void 0!==arguments[0]?arguments[0]:"";wp.ajax.send({url:CLD_Deactivate.endpoint,data:{reason:this.reason,more:null===(t=this.more)||void 0===t?void 0:t.value,report:null===(e=this.report)||void 0===e?void 0:e.checked,contact:null===(o=this.contact)||void 0===o?void 0:o.checked,email:this.email,dataHandling:n},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",CLD_Deactivate.nonce)}}).always((function(){window.location.reload()}))},init:function(){this.isCloudinaryOnly=!!this.modal.dataset.cloudinaryOnly,this.addEvents()}};a.init(),e.default=a},function(t,e,o){var n=o(1);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,o){var n=o(1);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=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.")},t.exports.default=t.exports,t.exports.__esModule=!0}]); \ No newline at end of file +!function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=158)}({11:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o0&&void 0!==arguments[0]?arguments[0]:"";wp.ajax.send({url:CLD_Deactivate.endpoint,data:{reason:this.reason,more:null===(t=this.more)||void 0===t?void 0:t.value,report:null===(e=this.report)||void 0===e?void 0:e.checked,contact:null===(o=this.contact)||void 0===o?void 0:o.checked,email:this.email,dataHandling:n},beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",CLD_Deactivate.nonce)}}).always((function(){window.location.reload()}))},init:function(){this.isCloudinaryOnly=!!this.modal.dataset.cloudinaryOnly,this.addEvents()}};a.init(),e.default=a},17:function(t,e,o){var n=o(11);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},39:function(t,e,o){var n=o(11);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},40:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},41:function(t,e){t.exports=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.")},t.exports.default=t.exports,t.exports.__esModule=!0},9:function(t,e,o){var n=o(39),i=o(40),a=o(17),r=o(41);t.exports=function(t){return n(t)||i(t)||a(t)||r()},t.exports.default=t.exports,t.exports.__esModule=!0}}); \ No newline at end of file diff --git a/js/front-overlay.js b/js/front-overlay.js index c740b9328..09c072baa 100644 --- a/js/front-overlay.js +++ b/js/front-overlay.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=46)}({0:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},1:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(4),i=n.n(r);n(2),i()(console.error);var o=n(0),a=n(5);function s(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 c(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";f.data[t]=c(c(c({},v),f.data[t]),e),f.data[t][""]=c(c({},v[""]),f.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[e]||l(void 0,e),f.dcnpgettext(e,t,n,r,i)},m=function(e,t,n){return d(n,t,e)},u&&l(u,p),{setLocaleData:l,__:function(e,t){return d(t,void 0,e)},_x:m,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===m("ltr","text direction")}}),g=(h.setLocaleData.bind(h),h.__.bind(h));h._x.bind(h),h._n.bind(h),h._nx.bind(h),h.isRTL.bind(h)},15:function(e,t,n){"use strict";function r(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof i(e).Element||e instanceof Element}function s(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function u(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(p(e)).left+o(e).scrollLeft}function l(e){return i(e).getComputedStyle(e)}function d(e){var t=l(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m(e,t,n){void 0===n&&(n=!1);var a,c,l=p(t),m=r(e),v=s(t),h={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(v||!v&&!n)&&(("body"!==u(t)||d(l))&&(h=(a=t)!==i(a)&&s(a)?{scrollLeft:(c=a).scrollLeft,scrollTop:c.scrollTop}:o(a)),s(t)?((g=r(t)).x+=t.clientLeft,g.y+=t.clientTop):l&&(g.x=f(l))),{x:m.left+h.scrollLeft-g.x,y:m.top+h.scrollTop-g.y,width:m.width,height:m.height}}function v(e){var t=r(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function h(e){return"html"===u(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||p(e)}function g(e){return["html","body","#document"].indexOf(u(e))>=0?e.ownerDocument.body:s(e)&&d(e)?e:g(h(e))}function b(e,t){var n;void 0===t&&(t=[]);var r=g(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=i(r),s=o?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(b(h(s)))}function y(e){return["table","td","th"].indexOf(u(e))>=0}function x(e){return s(e)&&"fixed"!==l(e).position?e.offsetParent:null}function w(e){for(var t=i(e),n=x(e);n&&y(n)&&"static"===l(n).position;)n=x(n);return n&&("html"===u(n)||"body"===u(n)&&"static"===l(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===l(e).position)return null;for(var n=h(e);s(n)&&["html","body"].indexOf(u(n))<0;){var r=l(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",E="bottom",T="right",j="left",k="auto",L=[O,E,T,j],A="start",D="end",_="viewport",C="popper",S=L.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+D])}),[]),P=[].concat(L,[k]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+D])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function q(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?N(i):null,a=i?F(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case O:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=o?z(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case A:t[u]=t[u]-(n[p]/2-r[p]/2);break;case D:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},$=Math.max,X=Math.min,K=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:K(K(t*r)/r)||0,y:K(K(n*r)/r)||0}}(a):"function"==typeof f?f(a):a,m=d.x,v=void 0===m?0:m,h=d.y,g=void 0===h?0:h,b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),x=j,k=O,L=window;if(u){var A=w(n),D="clientHeight",_="clientWidth";A===i(n)&&"static"!==l(A=p(n)).position&&(D="scrollHeight",_="scrollWidth"),A=A,o===O&&(k=E,g-=A[D]-r.height,g*=c?1:-1),o===j&&(x=T,v-=A[_]-r.width,v*=c?1:-1)}var C,S=Object.assign({position:s},u&&Y);return c?Object.assign({},S,((C={})[k]=y?"0":"",C[x]=b?"0":"",C.transform=(L.devicePixelRatio||1)<2?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",C)):Object.assign({},S,((t={})[k]=y?g+"px":"",t[x]=b?v+"px":"",t.transform="",t))}var G={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];s(i)&&u(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});s(r)&&u(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,(function(e){return Q[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&c(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===_?re(function(e){var t=i(e),n=p(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,c=r.offsetTop)),{width:o,height:a,x:s+f(e),y:c}}(e)):s(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):re(function(e){var t,n=p(e),r=o(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=$(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=$(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+f(e),u=-r.scrollTop;return"rtl"===l(i||n).direction&&(c+=$(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:u}}(p(e)))}function oe(e,t,n){var r="clippingParents"===t?function(e){var t=b(h(e)),n=["absolute","fixed"].indexOf(l(e).position)>=0&&s(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&ne(e,n)&&"body"!==u(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],c=i.reduce((function(t,n){var r=ie(e,n);return t.top=$(r.top,t.top),t.right=X(r.right,t.right),t.bottom=X(r.bottom,t.bottom),t.left=$(r.left,t.left),t}),ie(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ae(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ce(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,f=void 0===u?_:u,l=n.elementContext,d=void 0===l?C:l,m=n.altBoundary,v=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,b=ae("number"!=typeof g?g:se(g,L)),y=d===C?"reference":C,x=e.elements.reference,w=e.rects.popper,j=e.elements[v?y:d],k=oe(a(j)?j:j.contextElement||p(e.elements.popper),c,f),A=r(x),D=q({reference:A,element:w,strategy:"absolute",placement:o}),S=re(Object.assign({},w,D)),P=d===C?S:A,M={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},I=e.modifiersData.offset;if(d===C&&I){var H=I[o];Object.keys(M).forEach((function(e){var t=[T,E].indexOf(e)>=0?1:-1,n=[O,E].indexOf(e)>=0?"y":"x";M[e]+=H[n]*t}))}return M}function ue(e,t,n){return $(e,X(t,n))}function pe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fe(e){return[O,T,E,j].some((function(t){return e[t]>=0}))}var le=W({defaultModifiers:[R,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:N(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},G,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=P.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),i=[j,O].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[j,T].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,v=n.allowedAutoPlacements,h=t.options.placement,g=N(h),b=c||(g===h||!m?[Z(h)]:function(e){if(N(e)===k)return[];var t=Z(e);return[te(e),t,te(t)]}(h)),y=[h].concat(b).reduce((function(e,n){return e.concat(N(n)===k?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?P:c,p=F(r),f=p?s?S:S.filter((function(e){return F(e)===p})):L,l=f.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=f);var d=l.reduce((function(t,n){return t[n]=ce(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[N(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,D=new Map,_=!0,C=y[0],M=0;M=0,B=W?"width":"height",R=ce(t,{placement:I,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),z=W?V?T:j:V?E:O;x[B]>w[B]&&(z=Z(z));var q=Z(z),U=[];if(o&&U.push(R[H]<=0),s&&U.push(R[z]<=0,R[q]<=0),U.every((function(e){return e}))){C=I,_=!1;break}D.set(I,U)}if(_)for(var $=function(e){var t=y.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},X=m?3:1;X>0;X--){if("break"===$(X))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,m=n.tetherOffset,h=void 0===m?0:m,g=ce(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),b=N(t.placement),y=F(t.placement),x=!y,k=z(b),L="x"===k?"y":"x",D=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,P={x:0,y:0};if(D){if(o||s){var M="y"===k?O:j,I="y"===k?E:T,H="y"===k?"height":"width",V=D[k],W=D[k]+g[M],B=D[k]-g[I],R=d?-C[H]/2:0,q=y===A?_[H]:C[H],U=y===A?-C[H]:-_[H],K=t.elements.arrow,Y=d&&K?v(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=J[M],Q=J[I],Z=ue(0,_[H],Y[H]),ee=x?_[H]/2-R-Z-G-S:q-Z-G-S,te=x?-_[H]/2+R+Z+Q+S:U+Z+Q+S,ne=t.elements.arrow&&w(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,oe=D[k]+ee-ie-re,ae=D[k]+te-ie;if(o){var se=ue(d?X(W,oe):W,V,d?$(B,ae):B);D[k]=se,P[k]=se-V}if(s){var pe="x"===k?O:j,fe="x"===k?E:T,le=D[L],de=le+g[pe],me=le-g[fe],ve=ue(d?X(de,oe):de,le,d?$(me,ae):me);D[L]=ve,P[L]=ve-le}}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=N(n.placement),c=z(s),u=[j,T].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(e,t){return ae("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,L))}(i.padding,n),f=v(o),l="y"===c?O:j,d="y"===c?E:T,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],h=a[c]-n.rects.reference[c],g=w(o),b=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=m/2-h/2,x=p[l],k=b-f[u]-p[d],A=b/2-f[u]/2+y,D=ue(x,A,k),_=c;n.modifiersData[r]=((t={})[_]=D,t.centerOffset=D-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ce(t,{elementContext:"reference"}),s=ce(t,{altBoundary:!0}),c=pe(a,r),u=pe(s,i,o),p=fe(c),f=fe(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),de="tippy-content",me="tippy-backdrop",ve="tippy-arrow",he="tippy-svg-arrow",ge={passive:!0,capture:!0};function be(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ye(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function xe(e,t){return"function"==typeof e?e.apply(void 0,t):e}function we(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Oe(e){return[].concat(e)}function Ee(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function je(e){return[].slice.call(e)}function ke(){return document.createElement("div")}function Le(e){return["Element","Fragment"].some((function(t){return ye(e,t)}))}function Ae(e){return ye(e,"MouseEvent")}function De(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function _e(e){return Le(e)?[e]:function(e){return ye(e,"NodeList")}(e)?je(e):Array.isArray(e)?e:je(document.querySelectorAll(e))}function Ce(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Se(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Pe(e){var t,n=Oe(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Me(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ie={isTouch:!1},He=0;function Ve(){Ie.isTouch||(Ie.isTouch=!0,window.performance&&document.addEventListener("mousemove",We))}function We(){var e=performance.now();e-He<20&&(Ie.isTouch=!1,document.removeEventListener("mousemove",We)),He=e}function Be(){var e=document.activeElement;if(De(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Re="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Ne=/MSIE |Trident\//.test(Re);var Fe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Fe,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qe=Object.keys(ze);function Ue(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function $e(e,t){var n=Object.assign({},t,{content:xe(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ue(Object.assign({},ze,{plugins:t}))):qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},ze.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Xe(e,t){e.innerHTML=t}function Ke(e){var t=ke();return!0===e?t.className=ve:(t.className=he,Le(e)?t.appendChild(e):Xe(t,e)),t}function Ye(e,t){Le(t.content)?(Xe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Xe(e,t.content):e.textContent=t.content)}function Je(e){var t=e.firstElementChild,n=je(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(de)})),arrow:n.find((function(e){return e.classList.contains(ve)||e.classList.contains(he)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function Ge(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ke();function i(n,r){var i=Je(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ye(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Ke(r.arrow))):o.appendChild(Ke(r.arrow)):s&&o.removeChild(s)}return r.className=de,r.setAttribute("data-state","hidden"),Ye(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ge.$$tippy=!0;var Qe=1,Ze=[],et=[];function tt(e,t){var n,r,i,o,a,s,c,u,p,f=$e(e,Object.assign({},ze,{},Ue((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),l=!1,d=!1,m=!1,v=!1,h=[],g=we(K,f.interactiveDebounce),b=Qe++,y=(p=f.plugins).filter((function(e,t){return p.indexOf(e)===t})),x={id:b,reference:e,popper:ke(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){0;if(x.state.isDestroyed)return;M("onBeforeUpdate",[x,t]),$();var n=x.props,r=$e(e,Object.assign({},x.props,{},t,{ignoreAttributes:!0}));x.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),g=we(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Oe(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");H(),P(),E&&E(n,r);x.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[x,t])},setContent:function(e){x.setProps({content:e})},show:function(){0;var e=x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=Ie.isTouch&&!x.props.touch,i=be(x.props.duration,0,ze.duration);if(e||t||n||r)return;if(D().hasAttribute("disabled"))return;if(M("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(O.style.visibility="visible");P(),N(),x.state.isMounted||(O.style.transition="none");if(A()){var o=C(),a=o.box,s=o.content;Ce([a,s],0)}c=function(){var e;if(x.state.isVisible&&!v){if(v=!0,O.offsetHeight,O.style.transition=x.props.moveTransition,A()&&x.props.animation){var t=C(),n=t.box,r=t.content;Ce([n,r],i),Se([n,r],"visible")}I(),H(),Ee(et,x),null==(e=x.popperInstance)||e.forceUpdate(),x.state.isMounted=!0,M("onMount",[x]),x.props.animation&&A()&&function(e,t){z(e,t)}(i,(function(){x.state.isShown=!0,M("onShown",[x])}))}},function(){var e,t=x.props.appendTo,n=D();e=x.props.interactive&&t===ze.appendTo||"parent"===t?n.parentNode:xe(t,[n]);e.contains(O)||e.appendChild(O);Q(),!1}()},hide:function(){0;var e=!x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=be(x.props.duration,1,ze.duration);if(e||t||n)return;if(M("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,v=!1,l=!1,A()&&(O.style.visibility="hidden");if(V(),F(),P(),A()){var i=C(),o=i.box,a=i.content;x.props.animation&&(Ce([o,a],r),Se([o,a],"hidden"))}I(),H(),x.props.animation?A()&&function(e,t){z(e,(function(){!x.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",g),Ee(Ze,g),g(e)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);et=et.filter((function(e){return e!==x})),x.state.isMounted=!1,M("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete e._tippy,x.state.isDestroyed=!0,M("onDestroy",[x])}};if(!f.render)return x;var w=f.render(x),O=w.popper,E=w.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+x.id,x.popper=O,e._tippy=x,O._tippy=x;var T=y.map((function(e){return e.fn(x)})),j=e.hasAttribute("aria-expanded");return U(),H(),P(),M("onCreate",[x]),f.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(_().addEventListener("mousemove",g),g(e))})),x;function k(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===k()[0]}function A(){var e;return!!(null==(e=x.props.render)?void 0:e.$$tippy)}function D(){return u||e}function _(){var e=D().parentNode;return e?Pe(e):document}function C(){return Je(O)}function S(e){return x.state.isMounted&&!x.state.isVisible||Ie.isTouch||a&&"focus"===a.type?0:be(x.props.delay,e?0:1,ze.delay)}function P(){O.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",O.style.zIndex=""+x.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),T.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=x.props)[e].apply(r,t)}function I(){var t=x.props.aria;if(t.content){var n="aria-"+t.content,r=O.id;Oe(x.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(x.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function H(){!j&&x.props.aria.expanded&&Oe(x.props.triggerTarget||e).forEach((function(e){x.props.interactive?e.setAttribute("aria-expanded",x.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){_().removeEventListener("mousemove",g),Ze=Ze.filter((function(e){return e!==g}))}function W(e){if(!(Ie.isTouch&&(m||"mousedown"===e.type)||x.props.interactive&&O.contains(e.target))){if(D().contains(e.target)){if(Ie.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[x,e]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),d=!0,setTimeout((function(){d=!1})),x.state.isMounted||F())}}function B(){m=!0}function R(){m=!1}function N(){var e=_();e.addEventListener("mousedown",W,!0),e.addEventListener("touchend",W,ge),e.addEventListener("touchstart",R,ge),e.addEventListener("touchmove",B,ge)}function F(){var e=_();e.removeEventListener("mousedown",W,!0),e.removeEventListener("touchend",W,ge),e.removeEventListener("touchstart",R,ge),e.removeEventListener("touchmove",B,ge)}function z(e,t){var n=C().box;function r(e){e.target===n&&(Me(n,"remove",r),t())}if(0===e)return t();Me(n,"remove",s),Me(n,"add",r),s=r}function q(t,n,r){void 0===r&&(r=!1),Oe(x.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;L()&&(q("touchstart",X,{passive:!0}),q("touchend",Y,{passive:!0})),(e=x.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(q(e,X),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Ne?"focusout":"blur",J);break;case"focusin":q("focusout",J)}}))}function $(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),h=[]}function X(e){var t,n=!1;if(x.state.isEnabled&&!G(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,H(),!x.state.isVisible&&Ae(e)&&Ze.forEach((function(t){return t(e)})),"click"===e.type&&(x.props.trigger.indexOf("mouseenter")<0||l)&&!1!==x.props.hideOnClick&&x.state.isVisible?n=!0:te(e),"click"===e.type&&(l=!n),n&&!r&&ne(e)}}function K(e){var t=e.target,n=D().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=Te(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=t.top-r+c>o,d=r-t.bottom-u>o,m=t.left-n+p>o,v=n-t.right-f>o;return l||d||m||v}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:f}:null})).filter(Boolean),e)&&(V(),ne(e))}function Y(e){G(e)||x.props.trigger.indexOf("click")>=0&&l||(x.props.interactive?x.hideWithInteractivity(e):ne(e))}function J(e){x.props.trigger.indexOf("focusin")<0&&e.target!==D()||x.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function G(e){return!!Ie.isTouch&&L()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=x.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=A()?Je(O).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||D()}:e,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&s&&p.push({name:"arrow",options:{element:s,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),x.popperInstance=le(u,O,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:p}))}function Z(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ee(){return je(O.querySelectorAll("[data-tippy-root]"))}function te(e){x.clearDelayTimeouts(),e&&M("onTrigger",[x,e]),N();var t=S(!0),n=k(),i=n[0],o=n[1];Ie.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout((function(){x.show()}),t):x.show()}function ne(e){if(x.clearDelayTimeouts(),M("onUntrigger",[x,e]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&l)){var t=S(!1);t?i=setTimeout((function(){x.state.isVisible&&x.hide()}),t):o=requestAnimationFrame((function(){x.hide()}))}}else F()}}function nt(e,t){void 0===t&&(t={});var n=ze.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ge),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=_e(e).reduce((function(e,t){var n=t&&tt(t,r);return n&&e.push(n),e}),[]);return Le(e)?i[0]:i}nt.defaultProps=ze,nt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){ze[t]=e[t]}))},nt.currentInput=Ie;Object.assign({},G,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});nt.setDefaultProps({render:Ge});t.a=nt},18:function(e,t,n){},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(u(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,c,u,p,f,l,d=1,m=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||f&&!s.sign?l="":(l=f?"+":"-",n=n.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+n).length,c=s.width&&p>0?u.repeat(p):"",v+=s.align?l+n+c:"0"===u?l+c+n:c+l+n)}return v}var c=Object.create(null);function u(e){if(c[e])return c[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a{this.wrapImage(e)}));const e=document.querySelectorAll(".cld-tag");Object(i.a)(e,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:e=>e.template.innerHTML,allowHTML:!0})},wrapImage(e){e.dataset.publicId?this.cldTag(e):this.wpTag(e)},createTag(e){const t=document.createElement("span");return t.classList.add("overlay-tag"),e.parentNode.insertBefore(t,e),t},cldTag(e){const t=this.createTag(e);t.template=this.createTemplate(e),t.innerText=Object(r.a)("Cloudinary","cloudinary"),t.classList.add("cld-tag")},wpTag(e){const t=this.createTag(e);t.innerText=Object(r.a)("WordPress","cloudinary"),t.classList.add("wp-tag")},createTemplate(e){const t=document.createElement("div");t.classList.add("cld-tag-info"),t.appendChild(this.makeLine(Object(r.a)("Local size","cloudinary"),e.dataset.filesize)),t.appendChild(this.makeLine(Object(r.a)("Optimized size","cloudinary"),e.dataset.optsize)),t.appendChild(this.makeLine(Object(r.a)("Optimized format","cloudinary"),e.dataset.optformat)),e.dataset.percent&&t.appendChild(this.makeLine(Object(r.a)("Reduction","cloudinary"),e.dataset.percent+"%")),t.appendChild(this.makeLine(Object(r.a)("Transformations","cloudinary"),e.dataset.transformations));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=e.dataset.permalink,n.innerText=Object(r.a)("Edit asset","cloudinary"),t.appendChild(this.makeLine("","",n)),t},makeLine(e,t,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=e,i.classList.add("title"),o.innerText=t,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r}};window.addEventListener("load",(()=>o.init()))},5:function(e,t,n){"use strict";var r,i,o,a;n.d(t,"a",(function(){return p})),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function c(e){var t=function(e){for(var t,n,s,c,u=[],p=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&u.push(s);c=p.pop();){if(o[n]){if(o[n][0]===c){n=o[n][1]||n;break}}else if(i.indexOf(c)>=0||r[c]1&&void 0!==arguments[1]?arguments[1]:"default";f.data[t]=c(c(c({},v),f.data[t]),e),f.data[t][""]=c(c({},v[""]),f.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[e]||l(void 0,e),f.dcnpgettext(e,t,n,r,i)},m=function(e,t,n){return d(n,t,e)},u&&l(u,p),{setLocaleData:l,__:function(e,t){return d(t,void 0,e)},_x:m,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===m("ltr","text direction")}}),g=(h.setLocaleData.bind(h),h.__.bind(h));h._x.bind(h),h._n.bind(h),h._nx.bind(h),h.isRTL.bind(h)},15:function(e,t,n){"use strict";function r(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof i(e).Element||e instanceof Element}function s(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function u(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(p(e)).left+o(e).scrollLeft}function l(e){return i(e).getComputedStyle(e)}function d(e){var t=l(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m(e,t,n){void 0===n&&(n=!1);var a,c,l=p(t),m=r(e),v=s(t),h={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(v||!v&&!n)&&(("body"!==u(t)||d(l))&&(h=(a=t)!==i(a)&&s(a)?{scrollLeft:(c=a).scrollLeft,scrollTop:c.scrollTop}:o(a)),s(t)?((g=r(t)).x+=t.clientLeft,g.y+=t.clientTop):l&&(g.x=f(l))),{x:m.left+h.scrollLeft-g.x,y:m.top+h.scrollTop-g.y,width:m.width,height:m.height}}function v(e){var t=r(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function h(e){return"html"===u(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||p(e)}function g(e){return["html","body","#document"].indexOf(u(e))>=0?e.ownerDocument.body:s(e)&&d(e)?e:g(h(e))}function b(e,t){var n;void 0===t&&(t=[]);var r=g(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=i(r),s=o?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(b(h(s)))}function y(e){return["table","td","th"].indexOf(u(e))>=0}function x(e){return s(e)&&"fixed"!==l(e).position?e.offsetParent:null}function w(e){for(var t=i(e),n=x(e);n&&y(n)&&"static"===l(n).position;)n=x(n);return n&&("html"===u(n)||"body"===u(n)&&"static"===l(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===l(e).position)return null;for(var n=h(e);s(n)&&["html","body"].indexOf(u(n))<0;){var r=l(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",E="bottom",T="right",j="left",k="auto",L=[O,E,T,j],A="start",D="end",_="viewport",C="popper",S=L.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+D])}),[]),P=[].concat(L,[k]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+D])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function q(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?N(i):null,a=i?F(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case O:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=o?z(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case A:t[u]=t[u]-(n[p]/2-r[p]/2);break;case D:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},$=Math.max,X=Math.min,K=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:K(K(t*r)/r)||0,y:K(K(n*r)/r)||0}}(a):"function"==typeof f?f(a):a,m=d.x,v=void 0===m?0:m,h=d.y,g=void 0===h?0:h,b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),x=j,k=O,L=window;if(u){var A=w(n),D="clientHeight",_="clientWidth";A===i(n)&&"static"!==l(A=p(n)).position&&(D="scrollHeight",_="scrollWidth"),A=A,o===O&&(k=E,g-=A[D]-r.height,g*=c?1:-1),o===j&&(x=T,v-=A[_]-r.width,v*=c?1:-1)}var C,S=Object.assign({position:s},u&&Y);return c?Object.assign({},S,((C={})[k]=y?"0":"",C[x]=b?"0":"",C.transform=(L.devicePixelRatio||1)<2?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",C)):Object.assign({},S,((t={})[k]=y?g+"px":"",t[x]=b?v+"px":"",t.transform="",t))}var G={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];s(i)&&u(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});s(r)&&u(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,(function(e){return Q[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&c(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===_?re(function(e){var t=i(e),n=p(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,c=r.offsetTop)),{width:o,height:a,x:s+f(e),y:c}}(e)):s(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):re(function(e){var t,n=p(e),r=o(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=$(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=$(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+f(e),u=-r.scrollTop;return"rtl"===l(i||n).direction&&(c+=$(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:u}}(p(e)))}function oe(e,t,n){var r="clippingParents"===t?function(e){var t=b(h(e)),n=["absolute","fixed"].indexOf(l(e).position)>=0&&s(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&ne(e,n)&&"body"!==u(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],c=i.reduce((function(t,n){var r=ie(e,n);return t.top=$(r.top,t.top),t.right=X(r.right,t.right),t.bottom=X(r.bottom,t.bottom),t.left=$(r.left,t.left),t}),ie(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ae(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ce(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,f=void 0===u?_:u,l=n.elementContext,d=void 0===l?C:l,m=n.altBoundary,v=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,b=ae("number"!=typeof g?g:se(g,L)),y=d===C?"reference":C,x=e.elements.reference,w=e.rects.popper,j=e.elements[v?y:d],k=oe(a(j)?j:j.contextElement||p(e.elements.popper),c,f),A=r(x),D=q({reference:A,element:w,strategy:"absolute",placement:o}),S=re(Object.assign({},w,D)),P=d===C?S:A,M={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},I=e.modifiersData.offset;if(d===C&&I){var H=I[o];Object.keys(M).forEach((function(e){var t=[T,E].indexOf(e)>=0?1:-1,n=[O,E].indexOf(e)>=0?"y":"x";M[e]+=H[n]*t}))}return M}function ue(e,t,n){return $(e,X(t,n))}function pe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fe(e){return[O,T,E,j].some((function(t){return e[t]>=0}))}var le=W({defaultModifiers:[R,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:N(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},G,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=P.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),i=[j,O].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[j,T].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,v=n.allowedAutoPlacements,h=t.options.placement,g=N(h),b=c||(g===h||!m?[Z(h)]:function(e){if(N(e)===k)return[];var t=Z(e);return[te(e),t,te(t)]}(h)),y=[h].concat(b).reduce((function(e,n){return e.concat(N(n)===k?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?P:c,p=F(r),f=p?s?S:S.filter((function(e){return F(e)===p})):L,l=f.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=f);var d=l.reduce((function(t,n){return t[n]=ce(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[N(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,D=new Map,_=!0,C=y[0],M=0;M=0,B=W?"width":"height",R=ce(t,{placement:I,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),z=W?V?T:j:V?E:O;x[B]>w[B]&&(z=Z(z));var q=Z(z),U=[];if(o&&U.push(R[H]<=0),s&&U.push(R[z]<=0,R[q]<=0),U.every((function(e){return e}))){C=I,_=!1;break}D.set(I,U)}if(_)for(var $=function(e){var t=y.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},X=m?3:1;X>0;X--){if("break"===$(X))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,m=n.tetherOffset,h=void 0===m?0:m,g=ce(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),b=N(t.placement),y=F(t.placement),x=!y,k=z(b),L="x"===k?"y":"x",D=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,P={x:0,y:0};if(D){if(o||s){var M="y"===k?O:j,I="y"===k?E:T,H="y"===k?"height":"width",V=D[k],W=D[k]+g[M],B=D[k]-g[I],R=d?-C[H]/2:0,q=y===A?_[H]:C[H],U=y===A?-C[H]:-_[H],K=t.elements.arrow,Y=d&&K?v(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=J[M],Q=J[I],Z=ue(0,_[H],Y[H]),ee=x?_[H]/2-R-Z-G-S:q-Z-G-S,te=x?-_[H]/2+R+Z+Q+S:U+Z+Q+S,ne=t.elements.arrow&&w(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,oe=D[k]+ee-ie-re,ae=D[k]+te-ie;if(o){var se=ue(d?X(W,oe):W,V,d?$(B,ae):B);D[k]=se,P[k]=se-V}if(s){var pe="x"===k?O:j,fe="x"===k?E:T,le=D[L],de=le+g[pe],me=le-g[fe],ve=ue(d?X(de,oe):de,le,d?$(me,ae):me);D[L]=ve,P[L]=ve-le}}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=N(n.placement),c=z(s),u=[j,T].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(e,t){return ae("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,L))}(i.padding,n),f=v(o),l="y"===c?O:j,d="y"===c?E:T,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],h=a[c]-n.rects.reference[c],g=w(o),b=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=m/2-h/2,x=p[l],k=b-f[u]-p[d],A=b/2-f[u]/2+y,D=ue(x,A,k),_=c;n.modifiersData[r]=((t={})[_]=D,t.centerOffset=D-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ce(t,{elementContext:"reference"}),s=ce(t,{altBoundary:!0}),c=pe(a,r),u=pe(s,i,o),p=fe(c),f=fe(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),de="tippy-content",me="tippy-backdrop",ve="tippy-arrow",he="tippy-svg-arrow",ge={passive:!0,capture:!0};function be(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ye(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function xe(e,t){return"function"==typeof e?e.apply(void 0,t):e}function we(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Oe(e){return[].concat(e)}function Ee(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function je(e){return[].slice.call(e)}function ke(){return document.createElement("div")}function Le(e){return["Element","Fragment"].some((function(t){return ye(e,t)}))}function Ae(e){return ye(e,"MouseEvent")}function De(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function _e(e){return Le(e)?[e]:function(e){return ye(e,"NodeList")}(e)?je(e):Array.isArray(e)?e:je(document.querySelectorAll(e))}function Ce(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Se(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Pe(e){var t,n=Oe(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Me(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ie={isTouch:!1},He=0;function Ve(){Ie.isTouch||(Ie.isTouch=!0,window.performance&&document.addEventListener("mousemove",We))}function We(){var e=performance.now();e-He<20&&(Ie.isTouch=!1,document.removeEventListener("mousemove",We)),He=e}function Be(){var e=document.activeElement;if(De(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Re="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Ne=/MSIE |Trident\//.test(Re);var Fe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Fe,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qe=Object.keys(ze);function Ue(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function $e(e,t){var n=Object.assign({},t,{content:xe(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ue(Object.assign({},ze,{plugins:t}))):qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},ze.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Xe(e,t){e.innerHTML=t}function Ke(e){var t=ke();return!0===e?t.className=ve:(t.className=he,Le(e)?t.appendChild(e):Xe(t,e)),t}function Ye(e,t){Le(t.content)?(Xe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Xe(e,t.content):e.textContent=t.content)}function Je(e){var t=e.firstElementChild,n=je(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(de)})),arrow:n.find((function(e){return e.classList.contains(ve)||e.classList.contains(he)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function Ge(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ke();function i(n,r){var i=Je(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ye(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Ke(r.arrow))):o.appendChild(Ke(r.arrow)):s&&o.removeChild(s)}return r.className=de,r.setAttribute("data-state","hidden"),Ye(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ge.$$tippy=!0;var Qe=1,Ze=[],et=[];function tt(e,t){var n,r,i,o,a,s,c,u,p,f=$e(e,Object.assign({},ze,{},Ue((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),l=!1,d=!1,m=!1,v=!1,h=[],g=we(K,f.interactiveDebounce),b=Qe++,y=(p=f.plugins).filter((function(e,t){return p.indexOf(e)===t})),x={id:b,reference:e,popper:ke(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){0;if(x.state.isDestroyed)return;M("onBeforeUpdate",[x,t]),$();var n=x.props,r=$e(e,Object.assign({},x.props,{},t,{ignoreAttributes:!0}));x.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),g=we(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Oe(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");H(),P(),E&&E(n,r);x.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[x,t])},setContent:function(e){x.setProps({content:e})},show:function(){0;var e=x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=Ie.isTouch&&!x.props.touch,i=be(x.props.duration,0,ze.duration);if(e||t||n||r)return;if(D().hasAttribute("disabled"))return;if(M("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(O.style.visibility="visible");P(),N(),x.state.isMounted||(O.style.transition="none");if(A()){var o=C(),a=o.box,s=o.content;Ce([a,s],0)}c=function(){var e;if(x.state.isVisible&&!v){if(v=!0,O.offsetHeight,O.style.transition=x.props.moveTransition,A()&&x.props.animation){var t=C(),n=t.box,r=t.content;Ce([n,r],i),Se([n,r],"visible")}I(),H(),Ee(et,x),null==(e=x.popperInstance)||e.forceUpdate(),x.state.isMounted=!0,M("onMount",[x]),x.props.animation&&A()&&function(e,t){z(e,t)}(i,(function(){x.state.isShown=!0,M("onShown",[x])}))}},function(){var e,t=x.props.appendTo,n=D();e=x.props.interactive&&t===ze.appendTo||"parent"===t?n.parentNode:xe(t,[n]);e.contains(O)||e.appendChild(O);Q(),!1}()},hide:function(){0;var e=!x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=be(x.props.duration,1,ze.duration);if(e||t||n)return;if(M("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,v=!1,l=!1,A()&&(O.style.visibility="hidden");if(V(),F(),P(),A()){var i=C(),o=i.box,a=i.content;x.props.animation&&(Ce([o,a],r),Se([o,a],"hidden"))}I(),H(),x.props.animation?A()&&function(e,t){z(e,(function(){!x.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",g),Ee(Ze,g),g(e)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);et=et.filter((function(e){return e!==x})),x.state.isMounted=!1,M("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete e._tippy,x.state.isDestroyed=!0,M("onDestroy",[x])}};if(!f.render)return x;var w=f.render(x),O=w.popper,E=w.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+x.id,x.popper=O,e._tippy=x,O._tippy=x;var T=y.map((function(e){return e.fn(x)})),j=e.hasAttribute("aria-expanded");return U(),H(),P(),M("onCreate",[x]),f.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(_().addEventListener("mousemove",g),g(e))})),x;function k(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===k()[0]}function A(){var e;return!!(null==(e=x.props.render)?void 0:e.$$tippy)}function D(){return u||e}function _(){var e=D().parentNode;return e?Pe(e):document}function C(){return Je(O)}function S(e){return x.state.isMounted&&!x.state.isVisible||Ie.isTouch||a&&"focus"===a.type?0:be(x.props.delay,e?0:1,ze.delay)}function P(){O.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",O.style.zIndex=""+x.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),T.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=x.props)[e].apply(r,t)}function I(){var t=x.props.aria;if(t.content){var n="aria-"+t.content,r=O.id;Oe(x.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(x.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function H(){!j&&x.props.aria.expanded&&Oe(x.props.triggerTarget||e).forEach((function(e){x.props.interactive?e.setAttribute("aria-expanded",x.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){_().removeEventListener("mousemove",g),Ze=Ze.filter((function(e){return e!==g}))}function W(e){if(!(Ie.isTouch&&(m||"mousedown"===e.type)||x.props.interactive&&O.contains(e.target))){if(D().contains(e.target)){if(Ie.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[x,e]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),d=!0,setTimeout((function(){d=!1})),x.state.isMounted||F())}}function B(){m=!0}function R(){m=!1}function N(){var e=_();e.addEventListener("mousedown",W,!0),e.addEventListener("touchend",W,ge),e.addEventListener("touchstart",R,ge),e.addEventListener("touchmove",B,ge)}function F(){var e=_();e.removeEventListener("mousedown",W,!0),e.removeEventListener("touchend",W,ge),e.removeEventListener("touchstart",R,ge),e.removeEventListener("touchmove",B,ge)}function z(e,t){var n=C().box;function r(e){e.target===n&&(Me(n,"remove",r),t())}if(0===e)return t();Me(n,"remove",s),Me(n,"add",r),s=r}function q(t,n,r){void 0===r&&(r=!1),Oe(x.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;L()&&(q("touchstart",X,{passive:!0}),q("touchend",Y,{passive:!0})),(e=x.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(q(e,X),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Ne?"focusout":"blur",J);break;case"focusin":q("focusout",J)}}))}function $(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),h=[]}function X(e){var t,n=!1;if(x.state.isEnabled&&!G(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,H(),!x.state.isVisible&&Ae(e)&&Ze.forEach((function(t){return t(e)})),"click"===e.type&&(x.props.trigger.indexOf("mouseenter")<0||l)&&!1!==x.props.hideOnClick&&x.state.isVisible?n=!0:te(e),"click"===e.type&&(l=!n),n&&!r&&ne(e)}}function K(e){var t=e.target,n=D().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=Te(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=t.top-r+c>o,d=r-t.bottom-u>o,m=t.left-n+p>o,v=n-t.right-f>o;return l||d||m||v}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:f}:null})).filter(Boolean),e)&&(V(),ne(e))}function Y(e){G(e)||x.props.trigger.indexOf("click")>=0&&l||(x.props.interactive?x.hideWithInteractivity(e):ne(e))}function J(e){x.props.trigger.indexOf("focusin")<0&&e.target!==D()||x.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function G(e){return!!Ie.isTouch&&L()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=x.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=A()?Je(O).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||D()}:e,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&s&&p.push({name:"arrow",options:{element:s,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),x.popperInstance=le(u,O,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:p}))}function Z(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ee(){return je(O.querySelectorAll("[data-tippy-root]"))}function te(e){x.clearDelayTimeouts(),e&&M("onTrigger",[x,e]),N();var t=S(!0),n=k(),i=n[0],o=n[1];Ie.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout((function(){x.show()}),t):x.show()}function ne(e){if(x.clearDelayTimeouts(),M("onUntrigger",[x,e]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&l)){var t=S(!1);t?i=setTimeout((function(){x.state.isVisible&&x.hide()}),t):o=requestAnimationFrame((function(){x.hide()}))}}else F()}}function nt(e,t){void 0===t&&(t={});var n=ze.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ge),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=_e(e).reduce((function(e,t){var n=t&&tt(t,r);return n&&e.push(n),e}),[]);return Le(e)?i[0]:i}nt.defaultProps=ze,nt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){ze[t]=e[t]}))},nt.currentInput=Ie;Object.assign({},G,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});nt.setDefaultProps({render:Ge});t.a=nt},18:function(e,t,n){},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(u(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,c,u,p,f,l,d=1,m=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||f&&!s.sign?l="":(l=f?"+":"-",n=n.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+n).length,c=s.width&&p>0?u.repeat(p):"",v+=s.align?l+n+c:"0"===u?l+c+n:c+l+n)}return v}var c=Object.create(null);function u(e){if(c[e])return c[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a{this.wrapImage(e)}));const e=document.querySelectorAll(".cld-tag");Object(i.a)(e,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:e=>e.template.innerHTML,allowHTML:!0})},wrapImage(e){e.dataset.publicId?this.cldTag(e):this.wpTag(e)},createTag(e){const t=document.createElement("span");return t.classList.add("overlay-tag"),e.parentNode.insertBefore(t,e),t},cldTag(e){const t=this.createTag(e);t.template=this.createTemplate(e),t.innerText=Object(r.a)("Cloudinary","cloudinary"),t.classList.add("cld-tag")},wpTag(e){const t=this.createTag(e);t.innerText=Object(r.a)("WordPress","cloudinary"),t.classList.add("wp-tag")},createTemplate(e){const t=document.createElement("div");t.classList.add("cld-tag-info"),t.appendChild(this.makeLine(Object(r.a)("Local size","cloudinary"),e.dataset.filesize)),t.appendChild(this.makeLine(Object(r.a)("Optimized size","cloudinary"),e.dataset.optsize)),t.appendChild(this.makeLine(Object(r.a)("Optimized format","cloudinary"),e.dataset.optformat)),e.dataset.percent&&t.appendChild(this.makeLine(Object(r.a)("Reduction","cloudinary"),e.dataset.percent+"%")),t.appendChild(this.makeLine(Object(r.a)("Transformations","cloudinary"),e.dataset.transformations));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=e.dataset.permalink,n.innerText=Object(r.a)("Edit asset","cloudinary"),t.appendChild(this.makeLine("","",n)),t},makeLine(e,t,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=e,i.classList.add("title"),o.innerText=t,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r}};window.addEventListener("load",(()=>o.init()))},5:function(e,t,n){"use strict";var r,i,o,a;n.d(t,"a",(function(){return p})),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function c(e){var t=function(e){for(var t,n,s,c,u=[],p=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&u.push(s);c=p.pop();){if(o[n]){if(o[n][0]===c){n=o[n][1]||n;break}}else if(i.indexOf(c)>=0||r[c] array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '14121b76ae7717c7bd4bb8a27e2f588a'); \ No newline at end of file + array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '7bf014ed9e66426e4c266a17b0af0345'); \ No newline at end of file diff --git a/js/gallery-block.js b/js/gallery-block.js index 9f30fdb94..7c8398628 100644 --- a/js/gallery-block.js +++ b/js/gallery-block.js @@ -1 +1 @@ -!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}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=137)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.element},function(e,t,n){var r=n(37),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){var r=n(78),o=n(84);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.blockEditor},function(e,t,n){"use strict";function r(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(u).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function v(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[i])){if(!this.override){if(!a(n)||!c(n))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}t[i]={}}this._fill(e,t[i],n,o)}else{if(!this.override&&a(t[i])&&!c(t[i])){if(!a(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var i=void 0===t?null:t[o],a=l(o,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),e,e[o],i),delete e[o]):e[o]=r(e[o],i)})),e},f.prototype.str=function(e,t,n,o){var i=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var i,a,c,s,u;for(a=l(e,this.separator),i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(68),o=n(69),i=n(70),a=n(71),c=n(72);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(36),o=n(43);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(48),o=n(49),i=n(29),a=n(46),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(64);e.exports=function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1}},function(e,t,n){var r=n(13);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(12);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(12),o=n(20),i=n(85);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(36),o=n(82),i=n(9),a=n(38),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,p=u.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:c).test(a(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),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(83),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(4)["__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(86),o=n(93),i=n(95),a=n(96),c=n(97);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0?e.ownerDocument.body:M(e)&&N(e)?e:z(W(e))}function U(e,t){var n;void 0===t&&(t=[]);var r=z(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=A(r),a=o?[i].concat(i.visualViewport||[],N(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(U(W(a)))}function V(e){return["table","td","th"].indexOf(D(e))>=0}function H(e){return M(e)&&"fixed"!==Z(e).position?e.offsetParent:null}function q(e){for(var t=A(e),n=H(e);n&&V(n)&&"static"===Z(n).position;)n=H(n);return n&&("html"===D(n)||"body"===D(n)&&"static"===Z(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&M(e)&&"fixed"===Z(e).position)return null;for(var n=W(e);M(n)&&["html","body"].indexOf(D(n))<0;){var r=Z(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var $="top",G="bottom",X="right",J="left",Y="auto",K=[$,G,X,J],Q="start",ee="end",te="viewport",ne="popper",re=K.reduce((function(e,t){return e.concat([t+"-"+Q,t+"-"+ee])}),[]),oe=[].concat(K,[Y]).reduce((function(e,t){return e.concat([t,t+"-"+Q,t+"-"+ee])}),[]),ie=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ae(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var ce={placement:"bottom",modifiers:[],strategy:"absolute"};function se(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function me(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?fe(o):null,a=o?de(o):null,c=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case $:t={x:c,y:n.y-r.height};break;case G:t={x:c,y:n.y+n.height};break;case X:t={x:n.x+n.width,y:s};break;case J:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=i?ve(i):null;if(null!=u){var l="y"===u?"height":"width";switch(a){case Q:t[u]=t[u]-(n[l]/2-r[l]/2);break;case ee:t[u]=t[u]+(n[l]/2-r[l]/2)}}return t}var ye={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=me({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},be=Math.max,he=Math.min,ge=Math.round,_e={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oe(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.offsets,a=e.position,c=e.gpuAcceleration,s=e.adaptive,u=e.roundOffsets,l=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:ge(ge(t*r)/r)||0,y:ge(ge(n*r)/r)||0}}(i):"function"==typeof u?u(i):i,p=l.x,f=void 0===p?0:p,d=l.y,v=void 0===d?0:d,m=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),b=J,h=$,g=window;if(s){var _=q(n),O="clientHeight",x="clientWidth";_===A(n)&&"static"!==Z(_=B(n)).position&&(O="scrollHeight",x="scrollWidth"),_=_,o===$&&(h=G,v-=_[O]-r.height,v*=c?1:-1),o===J&&(b=X,f-=_[x]-r.width,f*=c?1:-1)}var w,j=Object.assign({position:a},s&&_e);return c?Object.assign({},j,((w={})[h]=y?"0":"",w[b]=m?"0":"",w.transform=(g.devicePixelRatio||1)<2?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",w)):Object.assign({},j,((t={})[h]=y?v+"px":"",t[b]=m?f+"px":"",t.transform="",t))}var xe={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];M(o)&&D(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});M(r)&&D(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var we={left:"right",right:"left",bottom:"top",top:"bottom"};function je(e){return e.replace(/left|right|bottom|top/g,(function(e){return we[e]}))}var Le={start:"end",end:"start"};function Ee(e){return e.replace(/start|end/g,(function(e){return Le[e]}))}function Pe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&T(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ke(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ae(e,t){return t===te?ke(function(e){var t=A(e),n=B(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,c=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,c=r.offsetTop)),{width:o,height:i,x:a+R(e),y:c}}(e)):M(t)?function(e){var t=k(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):ke(function(e){var t,n=B(e),r=S(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=be(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=be(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+R(e),s=-r.scrollTop;return"rtl"===Z(o||n).direction&&(c+=be(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:c,y:s}}(B(e)))}function Se(e,t,n){var r="clippingParents"===t?function(e){var t=U(W(e)),n=["absolute","fixed"].indexOf(Z(e).position)>=0&&M(e)?q(e):e;return C(n)?t.filter((function(e){return C(e)&&Pe(e,n)&&"body"!==D(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=Ae(e,n);return t.top=be(r.top,t.top),t.right=he(r.right,t.right),t.bottom=he(r.bottom,t.bottom),t.left=be(r.left,t.left),t}),Ae(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Me(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Te(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,c=n.rootBoundary,s=void 0===c?te:c,u=n.elementContext,l=void 0===u?ne:u,p=n.altBoundary,f=void 0!==p&&p,d=n.padding,v=void 0===d?0:d,m=Ce("number"!=typeof v?v:Me(v,K)),y=l===ne?"reference":ne,b=e.elements.reference,h=e.rects.popper,g=e.elements[f?y:l],_=Se(C(g)?g:g.contextElement||B(e.elements.popper),a,s),O=k(b),x=me({reference:O,element:h,strategy:"absolute",placement:o}),w=ke(Object.assign({},h,x)),j=l===ne?w:O,L={top:_.top-j.top+m.top,bottom:j.bottom-_.bottom+m.bottom,left:_.left-j.left+m.left,right:j.right-_.right+m.right},E=e.modifiersData.offset;if(l===ne&&E){var P=E[o];Object.keys(L).forEach((function(e){var t=[X,G].indexOf(e)>=0?1:-1,n=[$,G].indexOf(e)>=0?"y":"x";L[e]+=P[n]*t}))}return L}function De(e,t,n){return be(e,he(t,n))}function Be(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Re(e){return[$,X,G,J].some((function(t){return e[t]>=0}))}var Ze=ue({defaultModifiers:[pe,ye,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,s=void 0===c||c,u={placement:fe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Oe(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Oe(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},xe,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=oe.reduce((function(e,n){return e[n]=function(e,t,n){var r=fe(e),o=[J,$].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[J,X].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),c=a[t.placement],s=c.x,u=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,s=n.fallbackPlacements,u=n.padding,l=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,v=void 0===d||d,m=n.allowedAutoPlacements,y=t.options.placement,b=fe(y),h=s||(b===y||!v?[je(y)]:function(e){if(fe(e)===Y)return[];var t=je(e);return[Ee(e),t,Ee(t)]}(y)),g=[y].concat(h).reduce((function(e,n){return e.concat(fe(n)===Y?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,c=n.flipVariations,s=n.allowedAutoPlacements,u=void 0===s?oe:s,l=de(r),p=l?c?re:re.filter((function(e){return de(e)===l})):K,f=p.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=Te(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[fe(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:p,padding:u,flipVariations:v,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,O=t.rects.popper,x=new Map,w=!0,j=g[0],L=0;L=0,S=A?"width":"height",C=Te(t,{placement:E,boundary:l,rootBoundary:p,altBoundary:f,padding:u}),M=A?k?X:J:k?G:$;_[S]>O[S]&&(M=je(M));var T=je(M),D=[];if(i&&D.push(C[P]<=0),c&&D.push(C[M]<=0,C[T]<=0),D.every((function(e){return e}))){j=E,w=!1;break}x.set(E,D)}if(w)for(var B=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},R=v?3:1;R>0;R--){if("break"===B(R))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,s=n.boundary,u=n.rootBoundary,l=n.altBoundary,p=n.padding,f=n.tether,d=void 0===f||f,v=n.tetherOffset,m=void 0===v?0:v,y=Te(t,{boundary:s,rootBoundary:u,padding:p,altBoundary:l}),b=fe(t.placement),h=de(t.placement),g=!h,_=ve(b),O="x"===_?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,j=t.rects.popper,L="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,E={x:0,y:0};if(x){if(i||c){var P="y"===_?$:J,k="y"===_?G:X,A="y"===_?"height":"width",S=x[_],C=x[_]+y[P],M=x[_]-y[k],T=d?-j[A]/2:0,D=h===Q?w[A]:j[A],B=h===Q?-j[A]:-w[A],R=t.elements.arrow,Z=d&&R?F(R):{width:0,height:0},N=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},I=N[P],W=N[k],z=De(0,w[A],Z[A]),U=g?w[A]/2-T-z-I-L:D-z-I-L,V=g?-w[A]/2+T+z+W+L:B+z+W+L,H=t.elements.arrow&&q(t.elements.arrow),Y=H?"y"===_?H.clientTop||0:H.clientLeft||0:0,K=t.modifiersData.offset?t.modifiersData.offset[t.placement][_]:0,ee=x[_]+U-K-Y,te=x[_]+V-K;if(i){var ne=De(d?he(C,ee):C,S,d?be(M,te):M);x[_]=ne,E[_]=ne-S}if(c){var re="x"===_?$:J,oe="x"===_?G:X,ie=x[O],ae=ie+y[re],ce=ie-y[oe],se=De(d?he(ae,ee):ae,ie,d?be(ce,te):ce);x[O]=se,E[O]=se-ie}}t.modifiersData[r]=E}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=fe(n.placement),s=ve(c),u=[J,X].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return Ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Me(e,K))}(o.padding,n),p=F(i),f="y"===s?$:J,d="y"===s?G:X,v=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],m=a[s]-n.rects.reference[s],y=q(i),b=y?"y"===s?y.clientHeight||0:y.clientWidth||0:0,h=v/2-m/2,g=l[f],_=b-p[u]-l[d],O=b/2-p[u]/2+h,x=De(g,O,_),w=s;n.modifiersData[r]=((t={})[w]=x,t.centerOffset=x-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Pe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Te(t,{elementContext:"reference"}),c=Te(t,{altBoundary:!0}),s=Be(a,r),u=Be(c,o,i),l=Re(s),p=Re(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),Ne="tippy-content",Ie="tippy-backdrop",Fe="tippy-arrow",We="tippy-svg-arrow",ze={passive:!0,capture:!0};function Ue(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Ve(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function He(e,t){return"function"==typeof e?e.apply(void 0,t):e}function qe(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function $e(e){return[].concat(e)}function Ge(e,t){-1===e.indexOf(t)&&e.push(t)}function Xe(e){return e.split("-")[0]}function Je(e){return[].slice.call(e)}function Ye(){return document.createElement("div")}function Ke(e){return["Element","Fragment"].some((function(t){return Ve(e,t)}))}function Qe(e){return Ve(e,"MouseEvent")}function et(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function tt(e){return Ke(e)?[e]:function(e){return Ve(e,"NodeList")}(e)?Je(e):Array.isArray(e)?e:Je(document.querySelectorAll(e))}function nt(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function rt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ot(e){var t,n=$e(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function it(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var at={isTouch:!1},ct=0;function st(){at.isTouch||(at.isTouch=!0,window.performance&&document.addEventListener("mousemove",ut))}function ut(){var e=performance.now();e-ct<20&&(at.isTouch=!1,document.removeEventListener("mousemove",ut)),ct=e}function lt(){var e=document.activeElement;if(et(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var pt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",ft=/MSIE |Trident\//.test(pt);var dt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},vt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},dt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),mt=Object.keys(vt);function yt(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:o),t}),{});return Object.assign({},e,{},t)}function bt(e,t){var n=Object.assign({},t,{content:He(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(yt(Object.assign({},vt,{plugins:t}))):mt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},vt.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function ht(e,t){e.innerHTML=t}function gt(e){var t=Ye();return!0===e?t.className=Fe:(t.className=We,Ke(e)?t.appendChild(e):ht(t,e)),t}function _t(e,t){Ke(t.content)?(ht(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?ht(e,t.content):e.textContent=t.content)}function Ot(e){var t=e.firstElementChild,n=Je(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Ne)})),arrow:n.find((function(e){return e.classList.contains(Fe)||e.classList.contains(We)})),backdrop:n.find((function(e){return e.classList.contains(Ie)}))}}function xt(e){var t=Ye(),n=Ye();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ye();function o(n,r){var o=Ot(t),i=o.box,a=o.content,c=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||_t(a,e.props),r.arrow?c?n.arrow!==r.arrow&&(i.removeChild(c),i.appendChild(gt(r.arrow))):i.appendChild(gt(r.arrow)):c&&i.removeChild(c)}return r.className=Ne,r.setAttribute("data-state","hidden"),_t(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}xt.$$tippy=!0;var wt=1,jt=[],Lt=[];function Et(e,t){var n,r,o,i,a,c,s,u,l,p=bt(e,Object.assign({},vt,{},yt((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),f=!1,d=!1,v=!1,m=!1,y=[],b=qe(G,p.interactiveDebounce),h=wt++,g=(l=p.plugins).filter((function(e,t){return l.indexOf(e)===t})),_={id:h,reference:e,popper:Ye(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){0;if(_.state.isDestroyed)return;D("onBeforeUpdate",[_,t]),q();var n=_.props,r=bt(e,Object.assign({},_.props,{},t,{ignoreAttributes:!0}));_.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(Z(),b=qe(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?$e(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),w&&w(n,r);_.popperInstance&&(K(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[_,t])},setContent:function(e){_.setProps({content:e})},show:function(){0;var e=_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=at.isTouch&&!_.props.touch,o=Ue(_.props.duration,0,vt.duration);if(e||t||n||r)return;if(A().hasAttribute("disabled"))return;if(D("onShow",[_],!1),!1===_.props.onShow(_))return;_.state.isVisible=!0,k()&&(x.style.visibility="visible");T(),W(),_.state.isMounted||(x.style.transition="none");if(k()){var i=C(),a=i.box,c=i.content;nt([a,c],0)}s=function(){var e;if(_.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,k()&&_.props.animation){var t=C(),n=t.box,r=t.content;nt([n,r],o),rt([n,r],"visible")}B(),R(),Ge(Lt,_),null==(e=_.popperInstance)||e.forceUpdate(),_.state.isMounted=!0,D("onMount",[_]),_.props.animation&&k()&&function(e,t){U(e,t)}(o,(function(){_.state.isShown=!0,D("onShown",[_])}))}},function(){var e,t=_.props.appendTo,n=A();e=_.props.interactive&&t===vt.appendTo||"parent"===t?n.parentNode:He(t,[n]);e.contains(x)||e.appendChild(x);K(),!1}()},hide:function(){0;var e=!_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=Ue(_.props.duration,1,vt.duration);if(e||t||n)return;if(D("onHide",[_],!1),!1===_.props.onHide(_))return;_.state.isVisible=!1,_.state.isShown=!1,m=!1,f=!1,k()&&(x.style.visibility="hidden");if(Z(),z(),T(),k()){var o=C(),i=o.box,a=o.content;_.props.animation&&(nt([i,a],r),rt([i,a],"hidden"))}B(),R(),_.props.animation?k()&&function(e,t){U(e,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,_.unmount):_.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",b),Ge(jt,b),b(e)},enable:function(){_.state.isEnabled=!0},disable:function(){_.hide(),_.state.isEnabled=!1},unmount:function(){0;_.state.isVisible&&_.hide();if(!_.state.isMounted)return;Q(),ee().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);Lt=Lt.filter((function(e){return e!==_})),_.state.isMounted=!1,D("onHidden",[_])},destroy:function(){0;if(_.state.isDestroyed)return;_.clearDelayTimeouts(),_.unmount(),q(),delete e._tippy,_.state.isDestroyed=!0,D("onDestroy",[_])}};if(!p.render)return _;var O=p.render(_),x=O.popper,w=O.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var j=g.map((function(e){return e.fn(_)})),L=e.hasAttribute("aria-expanded");return H(),R(),T(),D("onCreate",[_]),p.showOnCreate&&te(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(e){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(S().addEventListener("mousemove",b),b(e))})),_;function E(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function P(){return"hold"===E()[0]}function k(){var e;return!!(null==(e=_.props.render)?void 0:e.$$tippy)}function A(){return u||e}function S(){var e=A().parentNode;return e?ot(e):document}function C(){return Ot(x)}function M(e){return _.state.isMounted&&!_.state.isVisible||at.isTouch||a&&"focus"===a.type?0:Ue(_.props.delay,e?0:1,vt.delay)}function T(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=_.props)[e].apply(r,t)}function B(){var t=_.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;$e(_.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(_.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!L&&_.props.aria.expanded&&$e(_.props.triggerTarget||e).forEach((function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===A()?"true":"false"):e.removeAttribute("aria-expanded")}))}function Z(){S().removeEventListener("mousemove",b),jt=jt.filter((function(e){return e!==b}))}function N(e){if(!(at.isTouch&&(v||"mousedown"===e.type)||_.props.interactive&&x.contains(e.target))){if(A().contains(e.target)){if(at.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||z())}}function I(){v=!0}function F(){v=!1}function W(){var e=S();e.addEventListener("mousedown",N,!0),e.addEventListener("touchend",N,ze),e.addEventListener("touchstart",F,ze),e.addEventListener("touchmove",I,ze)}function z(){var e=S();e.removeEventListener("mousedown",N,!0),e.removeEventListener("touchend",N,ze),e.removeEventListener("touchstart",F,ze),e.removeEventListener("touchmove",I,ze)}function U(e,t){var n=C().box;function r(e){e.target===n&&(it(n,"remove",r),t())}if(0===e)return t();it(n,"remove",c),it(n,"add",r),c=r}function V(t,n,r){void 0===r&&(r=!1),$e(_.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),y.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;P()&&(V("touchstart",$,{passive:!0}),V("touchend",X,{passive:!0})),(e=_.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(V(e,$),e){case"mouseenter":V("mouseleave",X);break;case"focus":V(ft?"focusout":"blur",J);break;case"focusin":V("focusout",J)}}))}function q(){y.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),y=[]}function $(e){var t,n=!1;if(_.state.isEnabled&&!Y(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,R(),!_.state.isVisible&&Qe(e)&&jt.forEach((function(t){return t(e)})),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||f)&&!1!==_.props.hideOnClick&&_.state.isVisible?n=!0:te(e),"click"===e.type&&(f=!n),n&&!r&&ne(e)}}function G(e){var t=e.target,n=A().contains(t)||x.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Xe(o.placement),c=o.modifiersData.offset;if(!c)return!0;var s="bottom"===a?c.top.y:0,u="top"===a?c.bottom.y:0,l="right"===a?c.left.x:0,p="left"===a?c.right.x:0,f=t.top-r+s>i,d=r-t.bottom-u>i,v=t.left-n+l>i,m=n-t.right-p>i;return f||d||v||m}))}(ee().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean),e)&&(Z(),ne(e))}function X(e){Y(e)||_.props.trigger.indexOf("click")>=0&&f||(_.props.interactive?_.hideWithInteractivity(e):ne(e))}function J(e){_.props.trigger.indexOf("focusin")<0&&e.target!==A()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||ne(e)}function Y(e){return!!at.isTouch&&P()!==e.type.indexOf("touch")>=0}function K(){Q();var t=_.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=k()?Ot(x).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||A()}:e,l=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];k()&&c&&l.push({name:"arrow",options:{element:c,padding:3}}),l.push.apply(l,(null==n?void 0:n.modifiers)||[]),_.popperInstance=Ze(u,x,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:l}))}function Q(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ee(){return Je(x.querySelectorAll("[data-tippy-root]"))}function te(e){_.clearDelayTimeouts(),e&&D("onTrigger",[_,e]),W();var t=M(!0),n=E(),o=n[0],i=n[1];at.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout((function(){_.show()}),t):_.show()}function ne(e){if(_.clearDelayTimeouts(),D("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=M(!1);t?o=setTimeout((function(){_.state.isVisible&&_.hide()}),t):i=requestAnimationFrame((function(){_.hide()}))}}else z()}}function Pt(e,t){void 0===t&&(t={});var n=vt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",st,ze),window.addEventListener("blur",lt);var r=Object.assign({},t,{plugins:n}),o=tt(e).reduce((function(e,t){var n=t&&Et(t,r);return n&&e.push(n),e}),[]);return Ke(e)?o[0]:o}Pt.defaultProps=vt,Pt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){vt[t]=e[t]}))},Pt.currentInput=at;Object.assign({},xe,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Pt.setDefaultProps({render:xt});var kt=Pt,At=n(55);function St(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var Ct="undefined"!=typeof window&&"undefined"!=typeof document;function Mt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Tt(){return Ct&&document.createElement("div")}function Dt(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!Dt(e[n],t[n]))return!1}return!0}return!1}function Bt(e){var t=[];return e.forEach((function(e){t.find((function(t){return Dt(e,t)}))||t.push(e)})),t}function Rt(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Bt([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var Zt=Ct?v.useLayoutEffect:v.useEffect;function Nt(e){var t=Object(v.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function It(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var Ft={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||It(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&It(t,"remove",e.props.className)},onAfterUpdate:r}}};function Wt(e){return function(t){var n=t.children,r=t.content,o=t.visible,i=t.singleton,a=t.render,c=t.reference,s=t.disabled,u=void 0!==s&&s,l=t.ignoreAttributes,p=void 0===l||l,f=(t.__source,t.__self,St(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),d=void 0!==o,y=void 0!==i,b=Object(v.useState)(!1),h=b[0],g=b[1],_=Object(v.useState)({}),O=_[0],x=_[1],w=Object(v.useState)(),j=w[0],L=w[1],E=Nt((function(){return{container:Tt(),renders:1}})),P=Object.assign({ignoreAttributes:p},f,{content:E.container});d&&(P.trigger="manual",P.hideOnClick=!1),y&&(u=!0);var k=P,A=P.plugins||[];a&&(k=Object.assign({},P,{plugins:y?[].concat(A,[{fn:function(){return{onTrigger:function(e,t){var n=i.data.children.find((function(e){return e.instance.reference===t.currentTarget})).content;L(n)}}}}]):A,render:function(){return{popper:E.container}}}));var S=[c].concat(n?[n.type]:[]);return Zt((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||E.ref||Tt(),Object.assign({},k,{plugins:[Ft].concat(P.plugins||[])}));return E.instance=n,u&&n.disable(),o&&n.show(),y&&i.hook({instance:n,content:r,props:k}),g(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),S),Zt((function(){var e;if(1!==E.renders){var t=E.instance;t.setProps(Rt(t.props,k)),null==(e=t.popperInstance)||e.forceUpdate(),u?t.disable():t.enable(),d&&(o?t.show():t.hide()),y&&i.hook({instance:t,content:r,props:k})}else E.renders++})),Zt((function(){var e;if(a){var t=E.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;O.placement===n.placement&&O.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&O.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[O.placement,O.referenceHidden,O.escaped].concat(S)),m.a.createElement(m.a.Fragment,null,n?Object(v.cloneElement)(n,{ref:function(e){E.ref=e,Mt(n.ref,e)}}):null,h&&Object(At.createPortal)(a?a(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(O),j,E.instance):r,E.container))}}var zt=function(e,t){return Object(v.forwardRef)((function(n,r){var o=n.children,i=St(n,["children"]);return m.a.createElement(e,Object.assign({},t,i),o?Object(v.cloneElement)(o,{ref:function(e){Mt(r,e),Mt(o.ref,e)}}):null)}))},Ut=zt(Wt(kt)),Vt=function(){return m.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"shape-round"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"}))))},Ht=function(){return m.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"ratio-square"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"}))))},qt=function(){return m.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"shape-radius"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"}))))},$t=function(){return m.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"shape-none"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"}))))},Gt=[{value:{type:"expanded",columns:1},icon:function(){return m.a.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"layout-modern"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"}))))},label:Object(r.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:function(){return m.a.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"layout-grid-2-column"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},m.a.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"}))))},label:Object(r.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:function(){return m.a.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"layout-grid-3-column"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},m.a.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"}))))},label:Object(r.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:function(){return m.a.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"layout-classic"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},m.a.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"}))))},label:Object(r.__)("Classic","cloudinary")}],Xt=["image"],Jt=[{label:Object(r.__)("1:1","cloudinary"),value:"1:1"},{label:Object(r.__)("3:4","cloudinary"),value:"3:4"},{label:Object(r.__)("4:3","cloudinary"),value:"4:3"},{label:Object(r.__)("4:6","cloudinary"),value:"4:6"},{label:Object(r.__)("6:4","cloudinary"),value:"6:4"},{label:Object(r.__)("5:7","cloudinary"),value:"5:7"},{label:Object(r.__)("7:5","cloudinary"),value:"7:5"},{label:Object(r.__)("8:5","cloudinary"),value:"8:5"},{label:Object(r.__)("5:8","cloudinary"),value:"5:8"},{label:Object(r.__)("9:16","cloudinary"),value:"9:16"},{label:Object(r.__)("16:9","cloudinary"),value:"16:9"}],Yt=[{label:Object(r.__)("None","cloudinary"),value:"none"},{label:Object(r.__)("Fade","cloudinary"),value:"fade"},{label:Object(r.__)("Slide","cloudinary"),value:"slide"}],Kt=[{label:Object(r.__)("Always","cloudinary"),value:"always"},{label:Object(r.__)("None","cloudinary"),value:"none"},{label:Object(r.__)("MouseOver","cloudinary"),value:"mouseover"}],Qt=[{label:Object(r.__)("Inline","cloudinary"),value:"inline"},{label:Object(r.__)("Flyout","cloudinary"),value:"flyout"},{label:Object(r.__)("Popup","cloudinary"),value:"popup"}],en=[{label:Object(r.__)("Top","cloudinary"),value:"top"},{label:Object(r.__)("Bottom","cloudinary"),value:"bottom"},{label:Object(r.__)("Left","cloudinary"),value:"left"},{label:Object(r.__)("Right","cloudinary"),value:"right"}],tn=[{label:Object(r.__)("Click","cloudinary"),value:"click"},{label:Object(r.__)("Hover","cloudinary"),value:"hover"}],nn=[{label:Object(r.__)("Left","cloudinary"),value:"left"},{label:Object(r.__)("Right","cloudinary"),value:"right"},{label:Object(r.__)("Top","cloudinary"),value:"top"},{label:Object(r.__)("Bottom","cloudinary"),value:"bottom"}],rn=[{label:Object(r.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:Object(r.__)("Indicators","cloudinary"),value:"indicators"},{label:Object(r.__)("None","cloudinary"),value:"none"}],on=[{value:"round",icon:Vt,label:Object(r.__)("Round","cloudinary")},{value:"radius",icon:qt,label:Object(r.__)("Radius","cloudinary")},{value:"none",icon:$t,label:Object(r.__)("None","cloudinary")},{value:"square",icon:Ht,label:Object(r.__)("Square","cloudinary")},{value:"rectangle",icon:function(){return m.a.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},m.a.createElement("title",null,"ratio-9-16"),m.a.createElement("desc",null,"Created with Sketch."),m.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},m.a.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},m.a.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "}))))},label:Object(r.__)("Rectangle","cloudinary")}],an=[{value:"round",icon:Vt,label:Object(r.__)("Round","cloudinary")},{value:"radius",icon:qt,label:Object(r.__)("Radius","cloudinary")},{value:"square",icon:Ht,label:Object(r.__)("Square","cloudinary")}],cn=[{label:Object(r.__)("All","cloudinary"),value:"all"},{label:Object(r.__)("Border","cloudinary"),value:"border"},{label:Object(r.__)("Gradient","cloudinary"),value:"gradient"}],sn=[{label:Object(r.__)("All","cloudinary"),value:"all"},{label:Object(r.__)("Top","cloudinary"),value:"top"},{label:Object(r.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:Object(r.__)("Left-Right","cloudinary"),value:"left-right"},{label:Object(r.__)("Bottom","cloudinary"),value:"bottom"},{label:Object(r.__)("Left","cloudinary"),value:"left"},{label:Object(r.__)("Right","cloudinary"),value:"right"}],un=[{value:"round",icon:Vt,label:Object(r.__)("Round","cloudinary")},{value:"radius",icon:qt,label:Object(r.__)("Radius","cloudinary")},{value:"none",icon:$t,label:Object(r.__)("None","cloudinary")},{value:"square",icon:Ht,label:Object(r.__)("Square","cloudinary")}],ln=[{label:Object(r.__)("Pad","cloudinary"),value:"pad"},{label:Object(r.__)("Fill","cloudinary"),value:"fill"}],pn=[{label:Object(r.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:Object(r.__)("Border color padding","cloudinary"),value:"auto"},{label:Object(r.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:Object(r.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}],fn=n(54),dn=n.n(fn),vn=function(e){var t=e.value,n=e.children,r=e.icon,o=e.onChange,i=e.current,a="object"===L()(t)?JSON.stringify(t)===JSON.stringify(i):i===t;return m.a.createElement("button",{type:"button",onClick:function(){return o(t)},className:dn()("radio-select",{"radio-select--active":a})},m.a.createElement(r,null),m.a.createElement("div",{className:"radio-select__label"},n))},mn=function(e){var t=e.children,n=e.value;return m.a.createElement("div",{className:"colorpalette-color-label"},m.a.createElement("span",null,t),m.a.createElement("span",{className:"component-color-indicator","aria-label":"Color: ".concat(n),style:{background:n}}))},yn=new g.a("_"),bn=function(e){var t=e.attributes,n=e.setAttributes,o=e.colors,i=P()(t),a=yn.object(i);return a.customSettings="object"===L()(a.customSettings)?JSON.stringify(a.customSettings):a.customSettings,t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background,m.a.createElement(m.a.Fragment,null,m.a.createElement(x.PanelBody,{title:Object(r.__)("Layout","cloudinary")},Gt.map((function(e){return m.a.createElement(vn,{key:"".concat(e.value.type,"-").concat(e.value.columns,"-layout"),value:e.value,onChange:function(e){n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1}},e.label)}))),m.a.createElement(x.PanelBody,{title:Object(r.__)("Color Palette","cloudinary"),initialOpen:!1},m.a.createElement(mn,{value:t.themeProps_primary},Object(r.__)("Primary","cloudinary")),m.a.createElement(w.ColorPalette,{value:t.themeProps_primary,colors:o,disableCustomColors:!1,onChange:function(e){return n({themeProps_primary:e})}}),m.a.createElement(mn,{value:t.themeProps_onPrimary},Object(r.__)("On Primary","cloudinary")),m.a.createElement(w.ColorPalette,{value:t.themeProps_onPrimary,colors:o,disableCustomColors:!1,onChange:function(e){return n({themeProps_onPrimary:e})}}),m.a.createElement(mn,{value:t.themeProps_active},Object(r.__)("Active","cloudinary")),m.a.createElement(w.ColorPalette,{value:t.themeProps_active,colors:o,disableCustomColors:!1,onChange:function(e){return n({themeProps_active:e})}})),"classic"===t.displayProps_mode&&m.a.createElement(x.PanelBody,{title:Object(r.__)("Fade Transition","cloudinary"),initialOpen:!1},m.a.createElement(x.SelectControl,{value:t.transition,options:Yt,onChange:function(e){return n({transition:e})}})),m.a.createElement(x.PanelBody,{title:Object(r.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},m.a.createElement(x.SelectControl,{label:Object(r.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:Jt,onChange:function(e){return n({aspectRatio:e})}}),m.a.createElement("p",null,m.a.createElement(Ut,{content:m.a.createElement("span",null,Object(r.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")),theme:"cloudinary",arrow:!1,placement:"bottom-start"},m.a.createElement("div",{className:"cld-ui-title"},Object(r.__)("Resize/Crop Mode","cloudinary"),m.a.createElement("span",{className:"dashicons dashicons-info cld-tooltip"}))),m.a.createElement(x.ButtonGroup,null,ln.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-look-and-feel",isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:function(){return n({transformation_crop:e.value,transformation_background:null})}},e.label)})))),"pad"===t.transformation_crop&&m.a.createElement(x.SelectControl,{label:Object(r.__)("Pad style","cloudinary"),value:t.transformation_background,options:pn,onChange:function(e){n({transformation_background:e})}}),m.a.createElement("p",null,Object(r.__)("Navigation","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,Kt.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-navigation",isDefault:!0,isPressed:e.value===t.navigation,onClick:function(){return n({navigation:e.value})}},e.label)})))),m.a.createElement("div",{style:{marginTop:"30px"}},m.a.createElement(x.ToggleControl,{label:Object(r.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:function(){return n({zoom:!t.zoom})}}),t.zoom&&m.a.createElement(m.a.Fragment,null,m.a.createElement("p",null,Object(r.__)("Zoom Type","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,Qt.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-zoom-type",isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:function(){return n({zoomProps_type:e.value})}},e.label)})))),"flyout"===t.zoomProps_type&&m.a.createElement(x.SelectControl,{label:Object(r.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:en,onChange:function(e){return n({zoomProps_viewerPosition:e})}}),"popup"!==t.zoomProps_type&&m.a.createElement(m.a.Fragment,null,m.a.createElement("p",null,Object(r.__)("Zoom Trigger","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,tn.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-zoom-trigger",isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:function(){return n({zoomProps_trigger:e.value})}},e.label)})))))))),m.a.createElement(x.PanelBody,{title:Object(r.__)("Carousel Parameters","cloudinary"),initialOpen:!1},m.a.createElement("p",null,Object(r.__)("Carousel Location","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,nn.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-carousel-location",isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:function(){return n({carouselLocation:e.value})}},e.label)})))),m.a.createElement(x.RangeControl,{label:Object(r.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:function(e){return n({carouselOffset:e})},min:0,max:100}),m.a.createElement("p",null,Object(r.__)("Carousel Style","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,rn.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-carousel-style",isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:function(){return n({carouselStyle:e.value})}},e.label)})))),"thumbnails"===t.carouselStyle&&m.a.createElement(m.a.Fragment,null,m.a.createElement(x.RangeControl,{label:Object(r.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:function(e){return n({thumbnailProps_width:e})},min:5,max:300}),m.a.createElement(x.RangeControl,{label:Object(r.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:function(e){return n({thumbnailProps_height:e})},min:5,max:300}),m.a.createElement("p",null,Object(r.__)("Navigation Button Shape","cloudinary")),on.map((function(e){return m.a.createElement(vn,{key:e.value+"-navigation-button-shape",value:e.value,onChange:function(e){return n({thumbnailProps_navigationShape:e})},icon:e.icon,current:t.thumbnailProps_navigationShape},e.label)})),m.a.createElement("p",null,Object(r.__)("Selected Style","cloudinary")),m.a.createElement("p",null,m.a.createElement(x.ButtonGroup,null,cn.map((function(e){return m.a.createElement(x.Button,{key:e.value+"-selected-style",isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:function(){return n({thumbnailProps_selectedStyle:e.value})}},e.label)})))),m.a.createElement(x.SelectControl,{label:Object(r.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:sn,onChange:function(e){return n({thumbnailProps_selectedBorderPosition:e})}}),m.a.createElement(x.RangeControl,{label:Object(r.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:function(e){return n({thumbnailProps_selectedBorderWidth:e})},min:0,max:10}),m.a.createElement("p",null,Object(r.__)("Media Shape Icon","cloudinary")),un.map((function(e){return m.a.createElement(vn,{key:e.value+"-media",value:e.value,onChange:function(e){return n({thumbnailProps_mediaSymbolShape:e})},icon:e.icon,current:t.thumbnailProps_mediaSymbolShape},e.label)}))),"indicators"===t.carouselStyle&&m.a.createElement(m.a.Fragment,null,m.a.createElement("p",null,Object(r.__)("Indicators Shape","cloudinary")),an.map((function(e){return m.a.createElement(vn,{key:e.value+"-indicator",value:e.value,onChange:function(e){return n({indicatorProps_shape:e})},icon:e.icon,current:t.indicatorProps_shape},e.label)})))),m.a.createElement(x.PanelBody,{title:Object(r.__)("Additional Settings","cloudinary"),initialOpen:!1},m.a.createElement(x.TextareaControl,{label:Object(r.__)("Custom Settings","cloudinary"),help:Object(r.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:a.customSettings,onChange:function(e){try{n({customSettings:JSON.parse(e)})}catch(t){n({customSettings:e})}}})))},hn=n(56);function gn(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 _n(e){for(var t=1;t=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(s).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function v(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[i])){if(!this.override){if(!a(n)||!c(n))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}t[i]={}}this._fill(e,t[i],n,o)}else{if(!this.override&&a(t[i])&&!c(t[i])){if(!a(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var i=void 0===t?null:t[o],a=l(o,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),e,e[o],i),delete e[o]):e[o]=r(e[o],i)})),e},f.prototype.str=function(e,t,n,o){var i=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var i,a,c,u,s;for(a=l(e,this.separator),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(11);e.exports=function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(71),o=n(72),i=n(73),a=n(74),c=n(75);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(43),o=n(50);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(55),o=n(56),i=n(35),a=n(53),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=0?e.ownerDocument.body:b(e)&&x(e)?e:E(L(e))}function P(e,t){var n;void 0===t&&(t=[]);var r=E(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=d(r),a=o?[i].concat(i.visualViewport||[],x(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(P(L(a)))}function k(e){return["table","td","th"].indexOf(h(e))>=0}function A(e){return b(e)&&"fixed"!==O(e).position?e.offsetParent:null}function S(e){for(var t=d(e),n=A(e);n&&k(n)&&"static"===O(n).position;)n=A(n);return n&&("html"===h(n)||"body"===h(n)&&"static"===O(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&b(e)&&"fixed"===O(e).position)return null;for(var n=L(e);b(n)&&["html","body"].indexOf(h(n))<0;){var r=O(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var C="top",M="bottom",T="right",D="left",B="auto",R=[C,M,T,D],Z="start",N="end",I="viewport",F="popper",W=R.reduce((function(e,t){return e.concat([t+"-"+Z,t+"-"+N])}),[]),z=[].concat(R,[B]).reduce((function(e,t){return e.concat([t,t+"-"+Z,t+"-"+N])}),[]),U=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function V(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Q(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?J(o):null,a=o?Y(o):null,c=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case C:t={x:c,y:n.y-r.height};break;case M:t={x:c,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:u};break;case D:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?K(i):null;if(null!=s){var l="y"===s?"height":"width";switch(a){case Z:t[s]=t[s]-(n[l]/2-r[l]/2);break;case N:t[s]=t[s]+(n[l]/2-r[l]/2)}}return t}var ee={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},te=Math.max,ne=Math.min,re=Math.round,oe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,s=e.roundOffsets,l=!0===s?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:re(re(t*r)/r)||0,y:re(re(n*r)/r)||0}}(i):"function"==typeof s?s(i):i,p=l.x,f=void 0===p?0:p,v=l.y,m=void 0===v?0:v,b=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),h=D,_=C,x=window;if(u){var w=S(n),j="clientHeight",L="clientWidth";w===d(n)&&"static"!==O(w=g(n)).position&&(j="scrollHeight",L="scrollWidth"),w=w,o===C&&(_=M,m-=w[j]-r.height,m*=c?1:-1),o===D&&(h=T,f-=w[L]-r.width,f*=c?1:-1)}var E,P=Object.assign({position:a},u&&oe);return c?Object.assign({},P,((E={})[_]=y?"0":"",E[h]=b?"0":"",E.transform=(x.devicePixelRatio||1)<2?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},P,((t={})[_]=y?m+"px":"",t[h]=b?f+"px":"",t.transform="",t))}var ae={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];b(o)&&h(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});b(r)&&h(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ce={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var se={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function pe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&y(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t){return t===I?fe(function(e){var t=d(e),n=g(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,c=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,c=r.offsetTop)),{width:o,height:i,x:a+_(e),y:c}}(e)):b(t)?function(e){var t=f(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=g(e),r=v(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=te(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=te(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+_(e),u=-r.scrollTop;return"rtl"===O(o||n).direction&&(c+=te(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:c,y:u}}(g(e)))}function ve(e,t,n){var r="clippingParents"===t?function(e){var t=P(L(e)),n=["absolute","fixed"].indexOf(O(e).position)>=0&&b(e)?S(e):e;return m(n)?t.filter((function(e){return m(e)&&pe(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=de(e,n);return t.top=te(r.top,t.top),t.right=ne(r.right,t.right),t.bottom=ne(r.bottom,t.bottom),t.left=te(r.left,t.left),t}),de(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function me(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function be(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ye(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,c=n.rootBoundary,u=void 0===c?I:c,s=n.elementContext,l=void 0===s?F:s,p=n.altBoundary,d=void 0!==p&&p,v=n.padding,b=void 0===v?0:v,y=me("number"!=typeof b?b:be(b,R)),h=l===F?"reference":F,_=e.elements.reference,O=e.rects.popper,x=e.elements[d?h:l],w=ve(m(x)?x:x.contextElement||g(e.elements.popper),a,u),j=f(_),L=Q({reference:j,element:O,strategy:"absolute",placement:o}),E=fe(Object.assign({},O,L)),P=l===F?E:j,k={top:w.top-P.top+y.top,bottom:P.bottom-w.bottom+y.bottom,left:w.left-P.left+y.left,right:P.right-w.right+y.right},A=e.modifiersData.offset;if(l===F&&A){var S=A[o];Object.keys(k).forEach((function(e){var t=[T,M].indexOf(e)>=0?1:-1,n=[C,M].indexOf(e)>=0?"y":"x";k[e]+=S[n]*t}))}return k}function he(e,t,n){return te(e,ne(t,n))}function ge(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _e(e){return[C,T,M,D].some((function(t){return e[t]>=0}))}var Oe=$({defaultModifiers:[X,ee,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,u=void 0===c||c,s={placement:J(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ae,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=z.reduce((function(e,n){return e[n]=function(e,t,n){var r=J(e),o=[D,C].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[D,T].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),c=a[t.placement],u=c.x,s=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,u=n.fallbackPlacements,s=n.padding,l=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,v=void 0===d||d,m=n.allowedAutoPlacements,b=t.options.placement,y=J(b),h=u||(y===b||!v?[ue(b)]:function(e){if(J(e)===B)return[];var t=ue(e);return[le(e),t,le(t)]}(b)),g=[b].concat(h).reduce((function(e,n){return e.concat(J(n)===B?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?z:u,l=Y(r),p=l?c?W:W.filter((function(e){return Y(e)===l})):R,f=p.filter((function(e){return s.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=ye(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[J(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:p,padding:s,flipVariations:v,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,O=t.rects.popper,x=new Map,w=!0,j=g[0],L=0;L=0,S=A?"width":"height",N=ye(t,{placement:E,boundary:l,rootBoundary:p,altBoundary:f,padding:s}),I=A?k?T:D:k?M:C;_[S]>O[S]&&(I=ue(I));var F=ue(I),U=[];if(i&&U.push(N[P]<=0),c&&U.push(N[I]<=0,N[F]<=0),U.every((function(e){return e}))){j=E,w=!1;break}x.set(E,U)}if(w)for(var V=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},H=v?3:1;H>0;H--){if("break"===V(H))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,u=n.boundary,s=n.rootBoundary,l=n.altBoundary,p=n.padding,f=n.tether,d=void 0===f||f,v=n.tetherOffset,m=void 0===v?0:v,b=ye(t,{boundary:u,rootBoundary:s,padding:p,altBoundary:l}),y=J(t.placement),h=Y(t.placement),g=!h,_=K(y),O="x"===_?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,L=t.rects.popper,E="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,P={x:0,y:0};if(x){if(i||c){var k="y"===_?C:D,A="y"===_?M:T,B="y"===_?"height":"width",R=x[_],N=x[_]+b[k],I=x[_]-b[A],F=d?-L[B]/2:0,W=h===Z?w[B]:L[B],z=h===Z?-L[B]:-w[B],U=t.elements.arrow,V=d&&U?j(U):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=H[k],$=H[A],G=he(0,w[B],V[B]),X=g?w[B]/2-F-G-q-E:W-G-q-E,Q=g?-w[B]/2+F+G+$+E:z+G+$+E,ee=t.elements.arrow&&S(t.elements.arrow),re=ee?"y"===_?ee.clientTop||0:ee.clientLeft||0:0,oe=t.modifiersData.offset?t.modifiersData.offset[t.placement][_]:0,ie=x[_]+X-oe-re,ae=x[_]+Q-oe;if(i){var ce=he(d?ne(N,ie):N,R,d?te(I,ae):I);x[_]=ce,P[_]=ce-R}if(c){var ue="x"===_?C:D,se="x"===_?M:T,le=x[O],pe=le+b[ue],fe=le-b[se],de=he(d?ne(pe,ie):pe,le,d?te(fe,ae):fe);x[O]=de,P[O]=de-le}}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=J(n.placement),u=K(c),s=[D,T].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return me("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:be(e,R))}(o.padding,n),p=j(i),f="y"===u?C:D,d="y"===u?M:T,v=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],m=a[u]-n.rects.reference[u],b=S(i),y=b?"y"===u?b.clientHeight||0:b.clientWidth||0:0,h=v/2-m/2,g=l[f],_=y-p[s]-l[d],O=y/2-p[s]/2+h,x=he(g,O,_),w=u;n.modifiersData[r]=((t={})[w]=x,t.centerOffset=x-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&pe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ye(t,{elementContext:"reference"}),c=ye(t,{altBoundary:!0}),u=ge(a,r),s=ge(c,o,i),l=_e(u),p=_e(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),xe="tippy-content",we="tippy-backdrop",je="tippy-arrow",Le="tippy-svg-arrow",Ee={passive:!0,capture:!0};function Pe(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ke(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Ae(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Se(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ce(e){return[].concat(e)}function Me(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function De(e){return[].slice.call(e)}function Be(){return document.createElement("div")}function Re(e){return["Element","Fragment"].some((function(t){return ke(e,t)}))}function Ze(e){return ke(e,"MouseEvent")}function Ne(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Ie(e){return Re(e)?[e]:function(e){return ke(e,"NodeList")}(e)?De(e):Array.isArray(e)?e:De(document.querySelectorAll(e))}function Fe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function We(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ze(e){var t,n=Ce(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Ue(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ve={isTouch:!1},He=0;function qe(){Ve.isTouch||(Ve.isTouch=!0,window.performance&&document.addEventListener("mousemove",$e))}function $e(){var e=performance.now();e-He<20&&(Ve.isTouch=!1,document.removeEventListener("mousemove",$e)),He=e}function Ge(){var e=document.activeElement;if(Ne(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Xe="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Je=/MSIE |Trident\//.test(Xe);var Ye={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ke=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ye,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Qe=Object.keys(Ke);function et(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:o),t}),{});return Object.assign({},e,{},t)}function tt(e,t){var n=Object.assign({},t,{content:Ae(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(et(Object.assign({},Ke,{plugins:t}))):Qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ke.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function nt(e,t){e.innerHTML=t}function rt(e){var t=Be();return!0===e?t.className=je:(t.className=Le,Re(e)?t.appendChild(e):nt(t,e)),t}function ot(e,t){Re(t.content)?(nt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?nt(e,t.content):e.textContent=t.content)}function it(e){var t=e.firstElementChild,n=De(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(xe)})),arrow:n.find((function(e){return e.classList.contains(je)||e.classList.contains(Le)})),backdrop:n.find((function(e){return e.classList.contains(we)}))}}function at(e){var t=Be(),n=Be();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Be();function o(n,r){var o=it(t),i=o.box,a=o.content,c=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||ot(a,e.props),r.arrow?c?n.arrow!==r.arrow&&(i.removeChild(c),i.appendChild(rt(r.arrow))):i.appendChild(rt(r.arrow)):c&&i.removeChild(c)}return r.className=xe,r.setAttribute("data-state","hidden"),ot(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}at.$$tippy=!0;var ct=1,ut=[],st=[];function lt(e,t){var n,r,o,i,a,c,u,s,l,p=tt(e,Object.assign({},Ke,{},et((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),f=!1,d=!1,v=!1,m=!1,b=[],y=Se(G,p.interactiveDebounce),h=ct++,g=(l=p.plugins).filter((function(e,t){return l.indexOf(e)===t})),_={id:h,reference:e,popper:Be(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){0;if(_.state.isDestroyed)return;D("onBeforeUpdate",[_,t]),q();var n=_.props,r=tt(e,Object.assign({},_.props,{},t,{ignoreAttributes:!0}));_.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(Z(),y=Se(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Ce(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),w&&w(n,r);_.popperInstance&&(K(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[_,t])},setContent:function(e){_.setProps({content:e})},show:function(){0;var e=_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=Ve.isTouch&&!_.props.touch,o=Pe(_.props.duration,0,Ke.duration);if(e||t||n||r)return;if(A().hasAttribute("disabled"))return;if(D("onShow",[_],!1),!1===_.props.onShow(_))return;_.state.isVisible=!0,k()&&(x.style.visibility="visible");T(),W(),_.state.isMounted||(x.style.transition="none");if(k()){var i=C(),a=i.box,c=i.content;Fe([a,c],0)}u=function(){var e;if(_.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,k()&&_.props.animation){var t=C(),n=t.box,r=t.content;Fe([n,r],o),We([n,r],"visible")}B(),R(),Me(st,_),null==(e=_.popperInstance)||e.forceUpdate(),_.state.isMounted=!0,D("onMount",[_]),_.props.animation&&k()&&function(e,t){U(e,t)}(o,(function(){_.state.isShown=!0,D("onShown",[_])}))}},function(){var e,t=_.props.appendTo,n=A();e=_.props.interactive&&t===Ke.appendTo||"parent"===t?n.parentNode:Ae(t,[n]);e.contains(x)||e.appendChild(x);K(),!1}()},hide:function(){0;var e=!_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=Pe(_.props.duration,1,Ke.duration);if(e||t||n)return;if(D("onHide",[_],!1),!1===_.props.onHide(_))return;_.state.isVisible=!1,_.state.isShown=!1,m=!1,f=!1,k()&&(x.style.visibility="hidden");if(Z(),z(),T(),k()){var o=C(),i=o.box,a=o.content;_.props.animation&&(Fe([i,a],r),We([i,a],"hidden"))}B(),R(),_.props.animation?k()&&function(e,t){U(e,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,_.unmount):_.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",y),Me(ut,y),y(e)},enable:function(){_.state.isEnabled=!0},disable:function(){_.hide(),_.state.isEnabled=!1},unmount:function(){0;_.state.isVisible&&_.hide();if(!_.state.isMounted)return;Q(),ee().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);st=st.filter((function(e){return e!==_})),_.state.isMounted=!1,D("onHidden",[_])},destroy:function(){0;if(_.state.isDestroyed)return;_.clearDelayTimeouts(),_.unmount(),q(),delete e._tippy,_.state.isDestroyed=!0,D("onDestroy",[_])}};if(!p.render)return _;var O=p.render(_),x=O.popper,w=O.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var j=g.map((function(e){return e.fn(_)})),L=e.hasAttribute("aria-expanded");return H(),R(),T(),D("onCreate",[_]),p.showOnCreate&&te(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(e){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(S().addEventListener("mousemove",y),y(e))})),_;function E(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function P(){return"hold"===E()[0]}function k(){var e;return!!(null==(e=_.props.render)?void 0:e.$$tippy)}function A(){return s||e}function S(){var e=A().parentNode;return e?ze(e):document}function C(){return it(x)}function M(e){return _.state.isMounted&&!_.state.isVisible||Ve.isTouch||a&&"focus"===a.type?0:Pe(_.props.delay,e?0:1,Ke.delay)}function T(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=_.props)[e].apply(r,t)}function B(){var t=_.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;Ce(_.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(_.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!L&&_.props.aria.expanded&&Ce(_.props.triggerTarget||e).forEach((function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===A()?"true":"false"):e.removeAttribute("aria-expanded")}))}function Z(){S().removeEventListener("mousemove",y),ut=ut.filter((function(e){return e!==y}))}function N(e){if(!(Ve.isTouch&&(v||"mousedown"===e.type)||_.props.interactive&&x.contains(e.target))){if(A().contains(e.target)){if(Ve.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||z())}}function I(){v=!0}function F(){v=!1}function W(){var e=S();e.addEventListener("mousedown",N,!0),e.addEventListener("touchend",N,Ee),e.addEventListener("touchstart",F,Ee),e.addEventListener("touchmove",I,Ee)}function z(){var e=S();e.removeEventListener("mousedown",N,!0),e.removeEventListener("touchend",N,Ee),e.removeEventListener("touchstart",F,Ee),e.removeEventListener("touchmove",I,Ee)}function U(e,t){var n=C().box;function r(e){e.target===n&&(Ue(n,"remove",r),t())}if(0===e)return t();Ue(n,"remove",c),Ue(n,"add",r),c=r}function V(t,n,r){void 0===r&&(r=!1),Ce(_.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),b.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;P()&&(V("touchstart",$,{passive:!0}),V("touchend",X,{passive:!0})),(e=_.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(V(e,$),e){case"mouseenter":V("mouseleave",X);break;case"focus":V(Je?"focusout":"blur",J);break;case"focusin":V("focusout",J)}}))}function q(){b.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),b=[]}function $(e){var t,n=!1;if(_.state.isEnabled&&!Y(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,s=e.currentTarget,R(),!_.state.isVisible&&Ze(e)&&ut.forEach((function(t){return t(e)})),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||f)&&!1!==_.props.hideOnClick&&_.state.isVisible?n=!0:te(e),"click"===e.type&&(f=!n),n&&!r&&ne(e)}}function G(e){var t=e.target,n=A().contains(t)||x.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Te(o.placement),c=o.modifiersData.offset;if(!c)return!0;var u="bottom"===a?c.top.y:0,s="top"===a?c.bottom.y:0,l="right"===a?c.left.x:0,p="left"===a?c.right.x:0,f=t.top-r+u>i,d=r-t.bottom-s>i,v=t.left-n+l>i,m=n-t.right-p>i;return f||d||v||m}))}(ee().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean),e)&&(Z(),ne(e))}function X(e){Y(e)||_.props.trigger.indexOf("click")>=0&&f||(_.props.interactive?_.hideWithInteractivity(e):ne(e))}function J(e){_.props.trigger.indexOf("focusin")<0&&e.target!==A()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||ne(e)}function Y(e){return!!Ve.isTouch&&P()!==e.type.indexOf("touch")>=0}function K(){Q();var t=_.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=k()?it(x).arrow:null,s=i?{getBoundingClientRect:i,contextElement:i.contextElement||A()}:e,l=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];k()&&c&&l.push({name:"arrow",options:{element:c,padding:3}}),l.push.apply(l,(null==n?void 0:n.modifiers)||[]),_.popperInstance=Oe(s,x,Object.assign({},n,{placement:r,onFirstUpdate:u,modifiers:l}))}function Q(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ee(){return De(x.querySelectorAll("[data-tippy-root]"))}function te(e){_.clearDelayTimeouts(),e&&D("onTrigger",[_,e]),W();var t=M(!0),n=E(),o=n[0],i=n[1];Ve.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout((function(){_.show()}),t):_.show()}function ne(e){if(_.clearDelayTimeouts(),D("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=M(!1);t?o=setTimeout((function(){_.state.isVisible&&_.hide()}),t):i=requestAnimationFrame((function(){_.hide()}))}}else z()}}function pt(e,t){void 0===t&&(t={});var n=Ke.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",qe,Ee),window.addEventListener("blur",Ge);var r=Object.assign({},t,{plugins:n}),o=Ie(e).reduce((function(e,t){var n=t&<(t,r);return n&&e.push(n),e}),[]);return Re(e)?o[0]:o}pt.defaultProps=Ke,pt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ke[t]=e[t]}))},pt.currentInput=Ve;Object.assign({},ae,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});pt.setDefaultProps({render:at});var ft=pt,dt=n(59);function vt(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var mt="undefined"!=typeof window&&"undefined"!=typeof document;function bt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function yt(){return mt&&document.createElement("div")}function ht(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!ht(e[n],t[n]))return!1}return!0}return!1}function gt(e){var t=[];return e.forEach((function(e){t.find((function(t){return ht(e,t)}))||t.push(e)})),t}function _t(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:gt([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var Ot=mt?i.useLayoutEffect:i.useEffect;function xt(e){var t=Object(i.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function wt(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var jt={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||wt(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&wt(t,"remove",e.props.className)},onAfterUpdate:r}}};function Lt(e){return function(t){var n=t.children,r=t.content,o=t.visible,c=t.singleton,u=t.render,s=t.reference,l=t.disabled,p=void 0!==l&&l,f=t.ignoreAttributes,d=void 0===f||f,v=(t.__source,t.__self,vt(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==o,b=void 0!==c,y=Object(i.useState)(!1),h=y[0],g=y[1],_=Object(i.useState)({}),O=_[0],x=_[1],w=Object(i.useState)(),j=w[0],L=w[1],E=xt((function(){return{container:yt(),renders:1}})),P=Object.assign({ignoreAttributes:d},v,{content:E.container});m&&(P.trigger="manual",P.hideOnClick=!1),b&&(p=!0);var k=P,A=P.plugins||[];u&&(k=Object.assign({},P,{plugins:b?[].concat(A,[{fn:function(){return{onTrigger:function(e,t){var n=c.data.children.find((function(e){return e.instance.reference===t.currentTarget})).content;L(n)}}}}]):A,render:function(){return{popper:E.container}}}));var S=[s].concat(n?[n.type]:[]);return Ot((function(){var t=s;s&&s.hasOwnProperty("current")&&(t=s.current);var n=e(t||E.ref||yt(),Object.assign({},k,{plugins:[jt].concat(P.plugins||[])}));return E.instance=n,p&&n.disable(),o&&n.show(),b&&c.hook({instance:n,content:r,props:k}),g(!0),function(){n.destroy(),null==c||c.cleanup(n)}}),S),Ot((function(){var e;if(1!==E.renders){var t=E.instance;t.setProps(_t(t.props,k)),null==(e=t.popperInstance)||e.forceUpdate(),p?t.disable():t.enable(),m&&(o?t.show():t.hide()),b&&c.hook({instance:t,content:r,props:k})}else E.renders++})),Ot((function(){var e;if(u){var t=E.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;O.placement===n.placement&&O.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&O.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[O.placement,O.referenceHidden,O.escaped].concat(S)),a.a.createElement(a.a.Fragment,null,n?Object(i.cloneElement)(n,{ref:function(e){E.ref=e,bt(n.ref,e)}}):null,h&&Object(dt.createPortal)(u?u(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(O),j,E.instance):r,E.container))}}var Et=function(e,t){return Object(i.forwardRef)((function(n,r){var o=n.children,c=vt(n,["children"]);return a.a.createElement(e,Object.assign({},t,c),o?Object(i.cloneElement)(o,{ref:function(e){bt(r,e),bt(o.ref,e)}}):null)}))},Pt=Et(Lt(ft)),kt=(n(62),n(2)),At=n(13),St=n(3),Ct=n(58),Mt=n.n(Ct),Tt=function(e){var t=e.value,n=e.children,r=e.icon,i=e.onChange,c=e.current,u="object"===o()(t)?JSON.stringify(t)===JSON.stringify(c):c===t;return a.a.createElement("button",{type:"button",onClick:function(){return i(t)},className:Mt()("radio-select",{"radio-select--active":u})},a.a.createElement(r,null),a.a.createElement("div",{className:"radio-select__label"},n))},Dt=function(e){var t=e.children,n=e.value;return a.a.createElement("div",{className:"colorpalette-color-label"},a.a.createElement("span",null,t),a.a.createElement("span",{className:"component-color-indicator","aria-label":"Color: ".concat(n),style:{background:n}}))},Bt=new u.a("_");t.a=function(e){var t=e.attributes,n=e.setAttributes,r=e.colors,i=p()(t),c=Bt.object(i);return c.customSettings="object"===o()(c.customSettings)?JSON.stringify(c.customSettings):c.customSettings,t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background,a.a.createElement(a.a.Fragment,null,a.a.createElement(kt.PanelBody,{title:Object(s.__)("Layout","cloudinary")},St.g.map((function(e){return a.a.createElement(Tt,{key:"".concat(e.value.type,"-").concat(e.value.columns,"-layout"),value:e.value,onChange:function(e){n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1}},e.label)}))),a.a.createElement(kt.PanelBody,{title:Object(s.__)("Color Palette","cloudinary"),initialOpen:!1},a.a.createElement(Dt,{value:t.themeProps_primary},Object(s.__)("Primary","cloudinary")),a.a.createElement(At.ColorPalette,{value:t.themeProps_primary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_primary:e})}}),a.a.createElement(Dt,{value:t.themeProps_onPrimary},Object(s.__)("On Primary","cloudinary")),a.a.createElement(At.ColorPalette,{value:t.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_onPrimary:e})}}),a.a.createElement(Dt,{value:t.themeProps_active},Object(s.__)("Active","cloudinary")),a.a.createElement(At.ColorPalette,{value:t.themeProps_active,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_active:e})}})),"classic"===t.displayProps_mode&&a.a.createElement(kt.PanelBody,{title:Object(s.__)("Fade Transition","cloudinary"),initialOpen:!1},a.a.createElement(kt.SelectControl,{value:t.transition,options:St.e,onChange:function(e){return n({transition:e})}})),a.a.createElement(kt.PanelBody,{title:Object(s.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},a.a.createElement(kt.SelectControl,{label:Object(s.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:St.b,onChange:function(e){return n({aspectRatio:e})}}),a.a.createElement("p",null,a.a.createElement(Pt,{content:a.a.createElement("span",null,Object(s.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")),theme:"cloudinary",arrow:!1,placement:"bottom-start"},a.a.createElement("div",{className:"cld-ui-title"},Object(s.__)("Resize/Crop Mode","cloudinary"),a.a.createElement("span",{className:"dashicons dashicons-info cld-tooltip"}))),a.a.createElement(kt.ButtonGroup,null,St.l.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-look-and-feel",isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:function(){return n({transformation_crop:e.value,transformation_background:null})}},e.label)})))),"pad"===t.transformation_crop&&a.a.createElement(kt.SelectControl,{label:Object(s.__)("Pad style","cloudinary"),value:t.transformation_background,options:St.k,onChange:function(e){n({transformation_background:e})}}),a.a.createElement("p",null,Object(s.__)("Navigation","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.i.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-navigation",isDefault:!0,isPressed:e.value===t.navigation,onClick:function(){return n({navigation:e.value})}},e.label)})))),a.a.createElement("div",{style:{marginTop:"30px"}},a.a.createElement(kt.ToggleControl,{label:Object(s.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:function(){return n({zoom:!t.zoom})}}),t.zoom&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Zoom Type","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.p.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-zoom-type",isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:function(){return n({zoomProps_type:e.value})}},e.label)})))),"flyout"===t.zoomProps_type&&a.a.createElement(kt.SelectControl,{label:Object(s.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:St.q,onChange:function(e){return n({zoomProps_viewerPosition:e})}}),"popup"!==t.zoomProps_type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Zoom Trigger","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.o.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-zoom-trigger",isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:function(){return n({zoomProps_trigger:e.value})}},e.label)})))))))),a.a.createElement(kt.PanelBody,{title:Object(s.__)("Carousel Parameters","cloudinary"),initialOpen:!1},a.a.createElement("p",null,Object(s.__)("Carousel Location","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.c.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-carousel-location",isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:function(){return n({carouselLocation:e.value})}},e.label)})))),a.a.createElement(kt.RangeControl,{label:Object(s.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:function(e){return n({carouselOffset:e})},min:0,max:100}),a.a.createElement("p",null,Object(s.__)("Carousel Style","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.d.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-carousel-style",isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:function(){return n({carouselStyle:e.value})}},e.label)})))),"thumbnails"===t.carouselStyle&&a.a.createElement(a.a.Fragment,null,a.a.createElement(kt.RangeControl,{label:Object(s.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:function(e){return n({thumbnailProps_width:e})},min:5,max:300}),a.a.createElement(kt.RangeControl,{label:Object(s.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:function(e){return n({thumbnailProps_height:e})},min:5,max:300}),a.a.createElement("p",null,Object(s.__)("Navigation Button Shape","cloudinary")),St.j.map((function(e){return a.a.createElement(Tt,{key:e.value+"-navigation-button-shape",value:e.value,onChange:function(e){return n({thumbnailProps_navigationShape:e})},icon:e.icon,current:t.thumbnailProps_navigationShape},e.label)})),a.a.createElement("p",null,Object(s.__)("Selected Style","cloudinary")),a.a.createElement("p",null,a.a.createElement(kt.ButtonGroup,null,St.n.map((function(e){return a.a.createElement(kt.Button,{key:e.value+"-selected-style",isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:function(){return n({thumbnailProps_selectedStyle:e.value})}},e.label)})))),a.a.createElement(kt.SelectControl,{label:Object(s.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:St.m,onChange:function(e){return n({thumbnailProps_selectedBorderPosition:e})}}),a.a.createElement(kt.RangeControl,{label:Object(s.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:function(e){return n({thumbnailProps_selectedBorderWidth:e})},min:0,max:10}),a.a.createElement("p",null,Object(s.__)("Media Shape Icon","cloudinary")),St.h.map((function(e){return a.a.createElement(Tt,{key:e.value+"-media",value:e.value,onChange:function(e){return n({thumbnailProps_mediaSymbolShape:e})},icon:e.icon,current:t.thumbnailProps_mediaSymbolShape},e.label)}))),"indicators"===t.carouselStyle&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Indicators Shape","cloudinary")),St.f.map((function(e){return a.a.createElement(Tt,{key:e.value+"-indicator",value:e.value,onChange:function(e){return n({indicatorProps_shape:e})},icon:e.icon,current:t.indicatorProps_shape},e.label)})))),a.a.createElement(kt.PanelBody,{title:Object(s.__)("Additional Settings","cloudinary"),initialOpen:!1},a.a.createElement(kt.TextareaControl,{label:Object(s.__)("Custom Settings","cloudinary"),help:Object(s.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:c.customSettings,onChange:function(e){try{n({customSettings:JSON.parse(e)})}catch(t){n({customSettings:e})}}})))}},,function(e,t){e.exports=window.wp["components/buildStyle/style.css"]},,,function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(70),o=n(101),i=n(46),a=n(103),c=n(113),u=n(116),s=n(117),l=n(118),p=n(120),f=n(121),d=n(122),v=n(36),m=n(127),b=n(128),y=n(134),h=n(29),g=n(49),_=n(136),O=n(14),x=n(138),w=n(28),j=n(34),L="[object Arguments]",E="[object Function]",P="[object Object]",k={};k[L]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[P]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[E]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,A,S,C,M){var T,D=1&n,B=2&n,R=4&n;if(A&&(T=C?A(t,S,C,M):A(t)),void 0!==T)return T;if(!O(t))return t;var Z=h(t);if(Z){if(T=m(t),!D)return s(t,T)}else{var N=v(t),I=N==E||"[object GeneratorFunction]"==N;if(g(t))return u(t,D);if(N==P||N==L||I&&!C){if(T=B||I?{}:y(t),!D)return B?p(t,c(T,t)):l(t,a(T,t))}else{if(!k[N])return C?t:{};T=b(t,N,D)}}M||(M=new r);var F=M.get(t);if(F)return F;M.set(t,T),x(t)?t.forEach((function(r){T.add(e(r,n,A,r,t,M))})):_(t)&&t.forEach((function(r,o){T.set(o,e(r,n,A,o,t,M))}));var W=Z?void 0:(R?B?d:f:B?j:w)(t);return o(W||t,(function(r,o){W&&(r=t[o=r]),i(T,o,e(r,n,A,o,t,M))})),T}},function(e,t,n){var r=n(18),o=n(76),i=n(77),a=n(78),c=n(79),u=n(80);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,e.exports=s},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(19),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(19);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(19);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(19);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(18);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(18),o=n(26),i=n(88);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(43),o=n(85),i=n(14),a=n(45),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,p=s.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:c).test(a(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(27),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),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(86),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(5)["__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(89),o=n(96),i=n(98),a=n(99),c=n(100);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e array('wp-polyfill'), 'version' => '7dee1274efa118f514dd4a926a80bccd'); \ No newline at end of file + array('wp-polyfill'), 'version' => '3cd83470a0f2b2271912352b651ad1dd'); \ No newline at end of file diff --git a/js/gallery-init.js b/js/gallery-init.js index 3397f0b2b..3070da18a 100644 --- a/js/gallery-init.js +++ b/js/gallery-init.js @@ -1 +1 @@ -!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}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=0)}([function(e,t){var n;n=cloudinary.galleryWidget,window.addEventListener("load",(function(){var e,t;document.querySelector(".woocommerce-page")&&CLD_GALLERY_CONFIG&&(null===(e=CLD_GALLERY_CONFIG)||void 0===e||null===(t=e.mediaAssets)||void 0===t?void 0:t.length)&&n(CLD_GALLERY_CONFIG).render()}))}]); \ No newline at end of file +!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}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=156)}({156:function(e,t){var n;n=cloudinary.galleryWidget,window.addEventListener("load",(function(){var e,t;document.querySelector(".woocommerce-page")&&CLD_GALLERY_CONFIG&&(null===(e=CLD_GALLERY_CONFIG)||void 0===e||null===(t=e.mediaAssets)||void 0===t?void 0:t.length)&&n(CLD_GALLERY_CONFIG).render()}))}}); \ No newline at end of file diff --git a/js/gallery-ui.js b/js/gallery-ui.js index 05e4c3fc4..89b01d8f4 100644 --- a/js/gallery-ui.js +++ b/js/gallery-ui.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t)}]); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=42)}({42:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file diff --git a/js/gallery.asset.php b/js/gallery.asset.php index 6b297fc52..18de515de 100644 --- a/js/gallery.asset.php +++ b/js/gallery.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '5cc5a850dd4df9f9fb1a483a4df1b890'); \ No newline at end of file + array('react', 'react-dom', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '2ed5d425cc2385081d23985a93ffc4a5'); \ No newline at end of file diff --git a/js/gallery.js b/js/gallery.js index a8a7ced44..6b2c770c3 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -1 +1 @@ -!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}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=132)}([function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var r=n(34),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=window.wp.element},function(e,t,n){var r=n(72),o=n(78);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(s).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function v(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[i])){if(!this.override){if(!a(n)||!c(n))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}t[i]={}}this._fill(e,t[i],n,o)}else{if(!this.override&&a(t[i])&&!c(t[i])){if(!a(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var i=void 0===t?null:t[o],a=l(o,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),e,e[o],i),delete e[o]):e[o]=r(e[o],i)})),e},f.prototype.str=function(e,t,n,o){var i=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var i,a,c,u,s;for(a=l(e,this.separator),i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(62),o=n(63),i=n(64),a=n(65),c=n(66);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(33),o=n(40);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(45),o=n(46),i=n(29),a=n(43),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(61),o=n(92),i=n(36),a=n(94),c=n(104),u=n(107),s=n(108),l=n(109),p=n(111),f=n(112),d=n(113),v=n(30),m=n(118),b=n(119),h=n(125),y=n(23),g=n(39),_=n(127),O=n(8),x=n(129),w=n(22),j=n(28),L="[object Arguments]",E="[object Function]",k="[object Object]",A={};A[L]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[k]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[E]=A["[object WeakMap]"]=!1,e.exports=function e(t,n,P,S,C,M){var T,D=1&n,B=2&n,R=4&n;if(P&&(T=C?P(t,S,C,M):P(t)),void 0!==T)return T;if(!O(t))return t;var N=y(t);if(N){if(T=m(t),!D)return s(t,T)}else{var Z=v(t),I=Z==E||"[object GeneratorFunction]"==Z;if(g(t))return u(t,D);if(Z==k||Z==L||I&&!C){if(T=B||I?{}:h(t),!D)return B?p(t,c(T,t)):l(t,a(T,t))}else{if(!A[Z])return C?t:{};T=b(t,Z,D)}}M||(M=new r);var F=M.get(t);if(F)return F;M.set(t,T),x(t)?t.forEach((function(r){T.add(e(r,n,P,r,t,M))})):_(t)&&t.forEach((function(r,o){T.set(o,e(r,n,P,o,t,M))}));var W=N?void 0:(R?B?d:f:B?j:w)(t);return o(W||t,(function(r,o){W&&(r=t[o=r]),i(T,o,e(r,n,P,o,t,M))})),T}},function(e,t,n){var r=n(11),o=n(67),i=n(68),a=n(69),c=n(70),u=n(71);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,e.exports=s},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(12),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(12);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(12);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(12);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(11);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(11),o=n(20),i=n(79);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(33),o=n(76),i=n(8),a=n(35),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,p=s.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:c).test(a(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(21),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),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(77),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(3)["__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(80),o=n(87),i=n(89),a=n(90),c=n(91);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e=0?e.ownerDocument.body:w(e)&&P(e)?e:T(M(e))}function D(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_(r),a=o?[i].concat(i.visualViewport||[],P(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(D(M(a)))}function B(e){return["table","td","th"].indexOf(L(e))>=0}function R(e){return w(e)&&"fixed"!==A(e).position?e.offsetParent:null}function N(e){for(var t=_(e),n=R(e);n&&B(n)&&"static"===A(n).position;)n=R(n);return n&&("html"===L(n)||"body"===L(n)&&"static"===A(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&w(e)&&"fixed"===A(e).position)return null;for(var n=M(e);w(n)&&["html","body"].indexOf(L(n))<0;){var r=A(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Z="top",I="bottom",F="right",W="left",z="auto",H=[Z,I,F,W],U="start",V="end",q="viewport",$="popper",G=H.reduce((function(e,t){return e.concat([t+"-"+U,t+"-"+V])}),[]),X=[].concat(H,[z]).reduce((function(e,t){return e.concat([t,t+"-"+U,t+"-"+V])}),[]),J=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Y(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function ae(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?re(o):null,a=o?oe(o):null,c=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case Z:t={x:c,y:n.y-r.height};break;case I:t={x:c,y:n.y+n.height};break;case F:t={x:n.x+n.width,y:u};break;case W:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?ie(i):null;if(null!=s){var l="y"===s?"height":"width";switch(a){case U:t[s]=t[s]-(n[l]/2-r[l]/2);break;case V:t[s]=t[s]+(n[l]/2-r[l]/2)}}return t}var ce={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ae({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ue=Math.max,se=Math.min,le=Math.round,pe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fe(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,s=e.roundOffsets,l=!0===s?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:le(le(t*r)/r)||0,y:le(le(n*r)/r)||0}}(i):"function"==typeof s?s(i):i,p=l.x,f=void 0===p?0:p,d=l.y,v=void 0===d?0:d,m=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),h=W,y=Z,g=window;if(u){var O=N(n),x="clientHeight",w="clientWidth";O===_(n)&&"static"!==A(O=E(n)).position&&(x="scrollHeight",w="scrollWidth"),O=O,o===Z&&(y=I,v-=O[x]-r.height,v*=c?1:-1),o===W&&(h=F,f-=O[w]-r.width,f*=c?1:-1)}var j,L=Object.assign({position:a},u&&pe);return c?Object.assign({},L,((j={})[y]=b?"0":"",j[h]=m?"0":"",j.transform=(g.devicePixelRatio||1)<2?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",j)):Object.assign({},L,((t={})[y]=b?v+"px":"",t[h]=m?f+"px":"",t.transform="",t))}var de={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];w(o)&&L(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});w(r)&&L(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ve={left:"right",right:"left",bottom:"top",top:"bottom"};function me(e){return e.replace(/left|right|bottom|top/g,(function(e){return ve[e]}))}var be={start:"end",end:"start"};function he(e){return e.replace(/start|end/g,(function(e){return be[e]}))}function ye(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&j(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ge(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _e(e,t){return t===q?ge(function(e){var t=_(e),n=E(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,c=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,c=r.offsetTop)),{width:o,height:i,x:a+k(e),y:c}}(e)):w(t)?function(e){var t=g(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):ge(function(e){var t,n=E(e),r=O(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=ue(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=ue(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+k(e),u=-r.scrollTop;return"rtl"===A(o||n).direction&&(c+=ue(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:c,y:u}}(E(e)))}function Oe(e,t,n){var r="clippingParents"===t?function(e){var t=D(M(e)),n=["absolute","fixed"].indexOf(A(e).position)>=0&&w(e)?N(e):e;return x(n)?t.filter((function(e){return x(e)&&ye(e,n)&&"body"!==L(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=_e(e,n);return t.top=ue(r.top,t.top),t.right=se(r.right,t.right),t.bottom=se(r.bottom,t.bottom),t.left=ue(r.left,t.left),t}),_e(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function xe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function we(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function je(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,c=n.rootBoundary,u=void 0===c?q:c,s=n.elementContext,l=void 0===s?$:s,p=n.altBoundary,f=void 0!==p&&p,d=n.padding,v=void 0===d?0:d,m=xe("number"!=typeof v?v:we(v,H)),b=l===$?"reference":$,h=e.elements.reference,y=e.rects.popper,_=e.elements[f?b:l],O=Oe(x(_)?_:_.contextElement||E(e.elements.popper),a,u),w=g(h),j=ae({reference:w,element:y,strategy:"absolute",placement:o}),L=ge(Object.assign({},y,j)),k=l===$?L:w,A={top:O.top-k.top+m.top,bottom:k.bottom-O.bottom+m.bottom,left:O.left-k.left+m.left,right:k.right-O.right+m.right},P=e.modifiersData.offset;if(l===$&&P){var S=P[o];Object.keys(A).forEach((function(e){var t=[F,I].indexOf(e)>=0?1:-1,n=[Z,I].indexOf(e)>=0?"y":"x";A[e]+=S[n]*t}))}return A}function Le(e,t,n){return ue(e,se(t,n))}function Ee(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ke(e){return[Z,F,I,W].some((function(t){return e[t]>=0}))}var Ae=ee({defaultModifiers:[ne,ce,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,u=void 0===c||c,s={placement:re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,fe(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,fe(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},de,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=X.reduce((function(e,n){return e[n]=function(e,t,n){var r=re(e),o=[W,Z].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[W,F].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),c=a[t.placement],u=c.x,s=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,u=n.fallbackPlacements,s=n.padding,l=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,v=void 0===d||d,m=n.allowedAutoPlacements,b=t.options.placement,h=re(b),y=u||(h===b||!v?[me(b)]:function(e){if(re(e)===z)return[];var t=me(e);return[he(e),t,he(t)]}(b)),g=[b].concat(y).reduce((function(e,n){return e.concat(re(n)===z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?X:u,l=oe(r),p=l?c?G:G.filter((function(e){return oe(e)===l})):H,f=p.filter((function(e){return s.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=je(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[re(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:p,padding:s,flipVariations:v,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,O=t.rects.popper,x=new Map,w=!0,j=g[0],L=0;L=0,S=P?"width":"height",C=je(t,{placement:E,boundary:l,rootBoundary:p,altBoundary:f,padding:s}),M=P?A?F:W:A?I:Z;_[S]>O[S]&&(M=me(M));var T=me(M),D=[];if(i&&D.push(C[k]<=0),c&&D.push(C[M]<=0,C[T]<=0),D.every((function(e){return e}))){j=E,w=!1;break}x.set(E,D)}if(w)for(var B=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},R=v?3:1;R>0;R--){if("break"===B(R))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,u=n.boundary,s=n.rootBoundary,l=n.altBoundary,p=n.padding,f=n.tether,d=void 0===f||f,v=n.tetherOffset,m=void 0===v?0:v,b=je(t,{boundary:u,rootBoundary:s,padding:p,altBoundary:l}),h=re(t.placement),y=oe(t.placement),g=!y,_=ie(h),O="x"===_?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,j=t.rects.popper,L="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,E={x:0,y:0};if(x){if(i||c){var k="y"===_?Z:W,A="y"===_?I:F,P="y"===_?"height":"width",S=x[_],M=x[_]+b[k],T=x[_]-b[A],D=d?-j[P]/2:0,B=y===U?w[P]:j[P],R=y===U?-j[P]:-w[P],z=t.elements.arrow,H=d&&z?C(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=V[k],$=V[A],G=Le(0,w[P],H[P]),X=g?w[P]/2-D-G-q-L:B-G-q-L,J=g?-w[P]/2+D+G+$+L:R+G+$+L,Y=t.elements.arrow&&N(t.elements.arrow),K=Y?"y"===_?Y.clientTop||0:Y.clientLeft||0:0,Q=t.modifiersData.offset?t.modifiersData.offset[t.placement][_]:0,ee=x[_]+X-Q-K,te=x[_]+J-Q;if(i){var ne=Le(d?se(M,ee):M,S,d?ue(T,te):T);x[_]=ne,E[_]=ne-S}if(c){var ae="x"===_?Z:W,ce="x"===_?I:F,le=x[O],pe=le+b[ae],fe=le-b[ce],de=Le(d?se(pe,ee):pe,le,d?ue(fe,te):fe);x[O]=de,E[O]=de-le}}t.modifiersData[r]=E}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=re(n.placement),u=ie(c),s=[W,F].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return xe("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:we(e,H))}(o.padding,n),p=C(i),f="y"===u?Z:W,d="y"===u?I:F,v=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],m=a[u]-n.rects.reference[u],b=N(i),h=b?"y"===u?b.clientHeight||0:b.clientWidth||0:0,y=v/2-m/2,g=l[f],_=h-p[s]-l[d],O=h/2-p[s]/2+y,x=Le(g,O,_),w=u;n.modifiersData[r]=((t={})[w]=x,t.centerOffset=x-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ye(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=je(t,{elementContext:"reference"}),c=je(t,{altBoundary:!0}),u=Ee(a,r),s=Ee(c,o,i),l=ke(u),p=ke(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),Pe="tippy-content",Se="tippy-backdrop",Ce="tippy-arrow",Me="tippy-svg-arrow",Te={passive:!0,capture:!0};function De(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Be(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Re(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ne(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ze(e){return[].concat(e)}function Ie(e,t){-1===e.indexOf(t)&&e.push(t)}function Fe(e){return e.split("-")[0]}function We(e){return[].slice.call(e)}function ze(){return document.createElement("div")}function He(e){return["Element","Fragment"].some((function(t){return Be(e,t)}))}function Ue(e){return Be(e,"MouseEvent")}function Ve(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function qe(e){return He(e)?[e]:function(e){return Be(e,"NodeList")}(e)?We(e):Array.isArray(e)?e:We(document.querySelectorAll(e))}function $e(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Ge(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Xe(e){var t,n=Ze(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Je(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ye={isTouch:!1},Ke=0;function Qe(){Ye.isTouch||(Ye.isTouch=!0,window.performance&&document.addEventListener("mousemove",et))}function et(){var e=performance.now();e-Ke<20&&(Ye.isTouch=!1,document.removeEventListener("mousemove",et)),Ke=e}function tt(){var e=document.activeElement;if(Ve(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var nt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",rt=/MSIE |Trident\//.test(nt);var ot={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},it=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ot,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),at=Object.keys(it);function ct(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:o),t}),{});return Object.assign({},e,{},t)}function ut(e,t){var n=Object.assign({},t,{content:Re(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(ct(Object.assign({},it,{plugins:t}))):at).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},it.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function st(e,t){e.innerHTML=t}function lt(e){var t=ze();return!0===e?t.className=Ce:(t.className=Me,He(e)?t.appendChild(e):st(t,e)),t}function pt(e,t){He(t.content)?(st(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?st(e,t.content):e.textContent=t.content)}function ft(e){var t=e.firstElementChild,n=We(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Pe)})),arrow:n.find((function(e){return e.classList.contains(Ce)||e.classList.contains(Me)})),backdrop:n.find((function(e){return e.classList.contains(Se)}))}}function dt(e){var t=ze(),n=ze();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ze();function o(n,r){var o=ft(t),i=o.box,a=o.content,c=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||pt(a,e.props),r.arrow?c?n.arrow!==r.arrow&&(i.removeChild(c),i.appendChild(lt(r.arrow))):i.appendChild(lt(r.arrow)):c&&i.removeChild(c)}return r.className=Pe,r.setAttribute("data-state","hidden"),pt(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}dt.$$tippy=!0;var vt=1,mt=[],bt=[];function ht(e,t){var n,r,o,i,a,c,u,s,l,p=ut(e,Object.assign({},it,{},ct((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),f=!1,d=!1,v=!1,m=!1,b=[],h=Ne(G,p.interactiveDebounce),y=vt++,g=(l=p.plugins).filter((function(e,t){return l.indexOf(e)===t})),_={id:y,reference:e,popper:ze(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){0;if(_.state.isDestroyed)return;D("onBeforeUpdate",[_,t]),q();var n=_.props,r=ut(e,Object.assign({},_.props,{},t,{ignoreAttributes:!0}));_.props=r,V(),n.interactiveDebounce!==r.interactiveDebounce&&(N(),h=Ne(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Ze(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),w&&w(n,r);_.popperInstance&&(K(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[_,t])},setContent:function(e){_.setProps({content:e})},show:function(){0;var e=_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=Ye.isTouch&&!_.props.touch,o=De(_.props.duration,0,it.duration);if(e||t||n||r)return;if(P().hasAttribute("disabled"))return;if(D("onShow",[_],!1),!1===_.props.onShow(_))return;_.state.isVisible=!0,A()&&(x.style.visibility="visible");T(),W(),_.state.isMounted||(x.style.transition="none");if(A()){var i=C(),a=i.box,c=i.content;$e([a,c],0)}u=function(){var e;if(_.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,A()&&_.props.animation){var t=C(),n=t.box,r=t.content;$e([n,r],o),Ge([n,r],"visible")}B(),R(),Ie(bt,_),null==(e=_.popperInstance)||e.forceUpdate(),_.state.isMounted=!0,D("onMount",[_]),_.props.animation&&A()&&function(e,t){H(e,t)}(o,(function(){_.state.isShown=!0,D("onShown",[_])}))}},function(){var e,t=_.props.appendTo,n=P();e=_.props.interactive&&t===it.appendTo||"parent"===t?n.parentNode:Re(t,[n]);e.contains(x)||e.appendChild(x);K(),!1}()},hide:function(){0;var e=!_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=De(_.props.duration,1,it.duration);if(e||t||n)return;if(D("onHide",[_],!1),!1===_.props.onHide(_))return;_.state.isVisible=!1,_.state.isShown=!1,m=!1,f=!1,A()&&(x.style.visibility="hidden");if(N(),z(),T(),A()){var o=C(),i=o.box,a=o.content;_.props.animation&&($e([i,a],r),Ge([i,a],"hidden"))}B(),R(),_.props.animation?A()&&function(e,t){H(e,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,_.unmount):_.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",h),Ie(mt,h),h(e)},enable:function(){_.state.isEnabled=!0},disable:function(){_.hide(),_.state.isEnabled=!1},unmount:function(){0;_.state.isVisible&&_.hide();if(!_.state.isMounted)return;Q(),ee().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);bt=bt.filter((function(e){return e!==_})),_.state.isMounted=!1,D("onHidden",[_])},destroy:function(){0;if(_.state.isDestroyed)return;_.clearDelayTimeouts(),_.unmount(),q(),delete e._tippy,_.state.isDestroyed=!0,D("onDestroy",[_])}};if(!p.render)return _;var O=p.render(_),x=O.popper,w=O.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var j=g.map((function(e){return e.fn(_)})),L=e.hasAttribute("aria-expanded");return V(),R(),T(),D("onCreate",[_]),p.showOnCreate&&te(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(e){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(S().addEventListener("mousemove",h),h(e))})),_;function E(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function A(){var e;return!!(null==(e=_.props.render)?void 0:e.$$tippy)}function P(){return s||e}function S(){var e=P().parentNode;return e?Xe(e):document}function C(){return ft(x)}function M(e){return _.state.isMounted&&!_.state.isVisible||Ye.isTouch||a&&"focus"===a.type?0:De(_.props.delay,e?0:1,it.delay)}function T(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=_.props)[e].apply(r,t)}function B(){var t=_.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;Ze(_.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(_.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!L&&_.props.aria.expanded&&Ze(_.props.triggerTarget||e).forEach((function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===P()?"true":"false"):e.removeAttribute("aria-expanded")}))}function N(){S().removeEventListener("mousemove",h),mt=mt.filter((function(e){return e!==h}))}function Z(e){if(!(Ye.isTouch&&(v||"mousedown"===e.type)||_.props.interactive&&x.contains(e.target))){if(P().contains(e.target)){if(Ye.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||z())}}function I(){v=!0}function F(){v=!1}function W(){var e=S();e.addEventListener("mousedown",Z,!0),e.addEventListener("touchend",Z,Te),e.addEventListener("touchstart",F,Te),e.addEventListener("touchmove",I,Te)}function z(){var e=S();e.removeEventListener("mousedown",Z,!0),e.removeEventListener("touchend",Z,Te),e.removeEventListener("touchstart",F,Te),e.removeEventListener("touchmove",I,Te)}function H(e,t){var n=C().box;function r(e){e.target===n&&(Je(n,"remove",r),t())}if(0===e)return t();Je(n,"remove",c),Je(n,"add",r),c=r}function U(t,n,r){void 0===r&&(r=!1),Ze(_.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),b.push({node:e,eventType:t,handler:n,options:r})}))}function V(){var e;k()&&(U("touchstart",$,{passive:!0}),U("touchend",X,{passive:!0})),(e=_.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(U(e,$),e){case"mouseenter":U("mouseleave",X);break;case"focus":U(rt?"focusout":"blur",J);break;case"focusin":U("focusout",J)}}))}function q(){b.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),b=[]}function $(e){var t,n=!1;if(_.state.isEnabled&&!Y(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,s=e.currentTarget,R(),!_.state.isVisible&&Ue(e)&&mt.forEach((function(t){return t(e)})),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||f)&&!1!==_.props.hideOnClick&&_.state.isVisible?n=!0:te(e),"click"===e.type&&(f=!n),n&&!r&&ne(e)}}function G(e){var t=e.target,n=P().contains(t)||x.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Fe(o.placement),c=o.modifiersData.offset;if(!c)return!0;var u="bottom"===a?c.top.y:0,s="top"===a?c.bottom.y:0,l="right"===a?c.left.x:0,p="left"===a?c.right.x:0,f=t.top-r+u>i,d=r-t.bottom-s>i,v=t.left-n+l>i,m=n-t.right-p>i;return f||d||v||m}))}(ee().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean),e)&&(N(),ne(e))}function X(e){Y(e)||_.props.trigger.indexOf("click")>=0&&f||(_.props.interactive?_.hideWithInteractivity(e):ne(e))}function J(e){_.props.trigger.indexOf("focusin")<0&&e.target!==P()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||ne(e)}function Y(e){return!!Ye.isTouch&&k()!==e.type.indexOf("touch")>=0}function K(){Q();var t=_.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=A()?ft(x).arrow:null,s=i?{getBoundingClientRect:i,contextElement:i.contextElement||P()}:e,l=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&c&&l.push({name:"arrow",options:{element:c,padding:3}}),l.push.apply(l,(null==n?void 0:n.modifiers)||[]),_.popperInstance=Ae(s,x,Object.assign({},n,{placement:r,onFirstUpdate:u,modifiers:l}))}function Q(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ee(){return We(x.querySelectorAll("[data-tippy-root]"))}function te(e){_.clearDelayTimeouts(),e&&D("onTrigger",[_,e]),W();var t=M(!0),n=E(),o=n[0],i=n[1];Ye.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout((function(){_.show()}),t):_.show()}function ne(e){if(_.clearDelayTimeouts(),D("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=M(!1);t?o=setTimeout((function(){_.state.isVisible&&_.hide()}),t):i=requestAnimationFrame((function(){_.hide()}))}}else z()}}function yt(e,t){void 0===t&&(t={});var n=it.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Qe,Te),window.addEventListener("blur",tt);var r=Object.assign({},t,{plugins:n}),o=qe(e).reduce((function(e,t){var n=t&&ht(t,r);return n&&e.push(n),e}),[]);return He(e)?o[0]:o}yt.defaultProps=it,yt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){it[t]=e[t]}))},yt.currentInput=Ye;Object.assign({},de,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});yt.setDefaultProps({render:dt});var gt=yt,_t=n(50);function Ot(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var xt="undefined"!=typeof window&&"undefined"!=typeof document;function wt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function jt(){return xt&&document.createElement("div")}function Lt(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!Lt(e[n],t[n]))return!1}return!0}return!1}function Et(e){var t=[];return e.forEach((function(e){t.find((function(t){return Lt(e,t)}))||t.push(e)})),t}function kt(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Et([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var At=xt?l.useLayoutEffect:l.useEffect;function Pt(e){var t=Object(l.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function St(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var Ct={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||St(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&St(t,"remove",e.props.className)},onAfterUpdate:r}}};function Mt(e){return function(t){var n=t.children,r=t.content,o=t.visible,i=t.singleton,a=t.render,c=t.reference,u=t.disabled,s=void 0!==u&&u,f=t.ignoreAttributes,d=void 0===f||f,v=(t.__source,t.__self,Ot(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==o,b=void 0!==i,h=Object(l.useState)(!1),y=h[0],g=h[1],_=Object(l.useState)({}),O=_[0],x=_[1],w=Object(l.useState)(),j=w[0],L=w[1],E=Pt((function(){return{container:jt(),renders:1}})),k=Object.assign({ignoreAttributes:d},v,{content:E.container});m&&(k.trigger="manual",k.hideOnClick=!1),b&&(s=!0);var A=k,P=k.plugins||[];a&&(A=Object.assign({},k,{plugins:b?[].concat(P,[{fn:function(){return{onTrigger:function(e,t){var n=i.data.children.find((function(e){return e.instance.reference===t.currentTarget})).content;L(n)}}}}]):P,render:function(){return{popper:E.container}}}));var S=[c].concat(n?[n.type]:[]);return At((function(){var t=c;c&&c.hasOwnProperty("current")&&(t=c.current);var n=e(t||E.ref||jt(),Object.assign({},A,{plugins:[Ct].concat(k.plugins||[])}));return E.instance=n,s&&n.disable(),o&&n.show(),b&&i.hook({instance:n,content:r,props:A}),g(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),S),At((function(){var e;if(1!==E.renders){var t=E.instance;t.setProps(kt(t.props,A)),null==(e=t.popperInstance)||e.forceUpdate(),s?t.disable():t.enable(),m&&(o?t.show():t.hide()),b&&i.hook({instance:t,content:r,props:A})}else E.renders++})),At((function(){var e;if(a){var t=E.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;O.placement===n.placement&&O.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&O.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[O.placement,O.referenceHidden,O.escaped].concat(S)),p.a.createElement(p.a.Fragment,null,n?Object(l.cloneElement)(n,{ref:function(e){E.ref=e,wt(n.ref,e)}}):null,y&&Object(_t.createPortal)(a?a(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(O),j,E.instance):r,E.container))}}var Tt=function(e,t){return Object(l.forwardRef)((function(n,r){var o=n.children,i=Ot(n,["children"]);return p.a.createElement(e,Object.assign({},t,i),o?Object(l.cloneElement)(o,{ref:function(e){wt(r,e),wt(o.ref,e)}}):null)}))},Dt=Tt(Mt(gt)),Bt=(n(131),n(2)),Rt=n(19),Nt=function(){return p.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"shape-round"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"}))))},Zt=function(){return p.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"ratio-square"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"}))))},It=function(){return p.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"shape-radius"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"}))))},Ft=function(){return p.a.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"shape-none"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"}))))},Wt=[{value:{type:"expanded",columns:1},icon:function(){return p.a.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"layout-modern"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"}))))},label:Object(b.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:function(){return p.a.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"layout-grid-2-column"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},p.a.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"}))))},label:Object(b.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:function(){return p.a.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"layout-grid-3-column"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},p.a.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"}))))},label:Object(b.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:function(){return p.a.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"layout-classic"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},p.a.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"}))))},label:Object(b.__)("Classic","cloudinary")}],zt=[{label:Object(b.__)("1:1","cloudinary"),value:"1:1"},{label:Object(b.__)("3:4","cloudinary"),value:"3:4"},{label:Object(b.__)("4:3","cloudinary"),value:"4:3"},{label:Object(b.__)("4:6","cloudinary"),value:"4:6"},{label:Object(b.__)("6:4","cloudinary"),value:"6:4"},{label:Object(b.__)("5:7","cloudinary"),value:"5:7"},{label:Object(b.__)("7:5","cloudinary"),value:"7:5"},{label:Object(b.__)("8:5","cloudinary"),value:"8:5"},{label:Object(b.__)("5:8","cloudinary"),value:"5:8"},{label:Object(b.__)("9:16","cloudinary"),value:"9:16"},{label:Object(b.__)("16:9","cloudinary"),value:"16:9"}],Ht=[{label:Object(b.__)("None","cloudinary"),value:"none"},{label:Object(b.__)("Fade","cloudinary"),value:"fade"},{label:Object(b.__)("Slide","cloudinary"),value:"slide"}],Ut=[{label:Object(b.__)("Always","cloudinary"),value:"always"},{label:Object(b.__)("None","cloudinary"),value:"none"},{label:Object(b.__)("MouseOver","cloudinary"),value:"mouseover"}],Vt=[{label:Object(b.__)("Inline","cloudinary"),value:"inline"},{label:Object(b.__)("Flyout","cloudinary"),value:"flyout"},{label:Object(b.__)("Popup","cloudinary"),value:"popup"}],qt=[{label:Object(b.__)("Top","cloudinary"),value:"top"},{label:Object(b.__)("Bottom","cloudinary"),value:"bottom"},{label:Object(b.__)("Left","cloudinary"),value:"left"},{label:Object(b.__)("Right","cloudinary"),value:"right"}],$t=[{label:Object(b.__)("Click","cloudinary"),value:"click"},{label:Object(b.__)("Hover","cloudinary"),value:"hover"}],Gt=[{label:Object(b.__)("Left","cloudinary"),value:"left"},{label:Object(b.__)("Right","cloudinary"),value:"right"},{label:Object(b.__)("Top","cloudinary"),value:"top"},{label:Object(b.__)("Bottom","cloudinary"),value:"bottom"}],Xt=[{label:Object(b.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:Object(b.__)("Indicators","cloudinary"),value:"indicators"},{label:Object(b.__)("None","cloudinary"),value:"none"}],Jt=[{value:"round",icon:Nt,label:Object(b.__)("Round","cloudinary")},{value:"radius",icon:It,label:Object(b.__)("Radius","cloudinary")},{value:"none",icon:Ft,label:Object(b.__)("None","cloudinary")},{value:"square",icon:Zt,label:Object(b.__)("Square","cloudinary")},{value:"rectangle",icon:function(){return p.a.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},p.a.createElement("title",null,"ratio-9-16"),p.a.createElement("desc",null,"Created with Sketch."),p.a.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},p.a.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},p.a.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "}))))},label:Object(b.__)("Rectangle","cloudinary")}],Yt=[{value:"round",icon:Nt,label:Object(b.__)("Round","cloudinary")},{value:"radius",icon:It,label:Object(b.__)("Radius","cloudinary")},{value:"square",icon:Zt,label:Object(b.__)("Square","cloudinary")}],Kt=[{label:Object(b.__)("All","cloudinary"),value:"all"},{label:Object(b.__)("Border","cloudinary"),value:"border"},{label:Object(b.__)("Gradient","cloudinary"),value:"gradient"}],Qt=[{label:Object(b.__)("All","cloudinary"),value:"all"},{label:Object(b.__)("Top","cloudinary"),value:"top"},{label:Object(b.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:Object(b.__)("Left-Right","cloudinary"),value:"left-right"},{label:Object(b.__)("Bottom","cloudinary"),value:"bottom"},{label:Object(b.__)("Left","cloudinary"),value:"left"},{label:Object(b.__)("Right","cloudinary"),value:"right"}],en=[{value:"round",icon:Nt,label:Object(b.__)("Round","cloudinary")},{value:"radius",icon:It,label:Object(b.__)("Radius","cloudinary")},{value:"none",icon:Ft,label:Object(b.__)("None","cloudinary")},{value:"square",icon:Zt,label:Object(b.__)("Square","cloudinary")}],tn=[{label:Object(b.__)("Pad","cloudinary"),value:"pad"},{label:Object(b.__)("Fill","cloudinary"),value:"fill"}],nn=[{label:Object(b.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:Object(b.__)("Border color padding","cloudinary"),value:"auto"},{label:Object(b.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:Object(b.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}],rn=n(49),on=n.n(rn),an=function(e){var t=e.value,n=e.children,r=e.icon,o=e.onChange,i=e.current,a="object"===m()(t)?JSON.stringify(t)===JSON.stringify(i):i===t;return p.a.createElement("button",{type:"button",onClick:function(){return o(t)},className:on()("radio-select",{"radio-select--active":a})},p.a.createElement(r,null),p.a.createElement("div",{className:"radio-select__label"},n))},cn=function(e){var t=e.children,n=e.value;return p.a.createElement("div",{className:"colorpalette-color-label"},p.a.createElement("span",null,t),p.a.createElement("span",{className:"component-color-indicator","aria-label":"Color: ".concat(n),style:{background:n}}))},un=new d.a("_"),sn=function(e){var t=e.attributes,n=e.setAttributes,r=e.colors,o=y()(t),i=un.object(o);return i.customSettings="object"===m()(i.customSettings)?JSON.stringify(i.customSettings):i.customSettings,t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background,p.a.createElement(p.a.Fragment,null,p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Layout","cloudinary")},Wt.map((function(e){return p.a.createElement(an,{key:"".concat(e.value.type,"-").concat(e.value.columns,"-layout"),value:e.value,onChange:function(e){n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1}},e.label)}))),p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Color Palette","cloudinary"),initialOpen:!1},p.a.createElement(cn,{value:t.themeProps_primary},Object(b.__)("Primary","cloudinary")),p.a.createElement(Rt.ColorPalette,{value:t.themeProps_primary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_primary:e})}}),p.a.createElement(cn,{value:t.themeProps_onPrimary},Object(b.__)("On Primary","cloudinary")),p.a.createElement(Rt.ColorPalette,{value:t.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_onPrimary:e})}}),p.a.createElement(cn,{value:t.themeProps_active},Object(b.__)("Active","cloudinary")),p.a.createElement(Rt.ColorPalette,{value:t.themeProps_active,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_active:e})}})),"classic"===t.displayProps_mode&&p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Fade Transition","cloudinary"),initialOpen:!1},p.a.createElement(Bt.SelectControl,{value:t.transition,options:Ht,onChange:function(e){return n({transition:e})}})),p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},p.a.createElement(Bt.SelectControl,{label:Object(b.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:zt,onChange:function(e){return n({aspectRatio:e})}}),p.a.createElement("p",null,p.a.createElement(Dt,{content:p.a.createElement("span",null,Object(b.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")),theme:"cloudinary",arrow:!1,placement:"bottom-start"},p.a.createElement("div",{className:"cld-ui-title"},Object(b.__)("Resize/Crop Mode","cloudinary"),p.a.createElement("span",{className:"dashicons dashicons-info cld-tooltip"}))),p.a.createElement(Bt.ButtonGroup,null,tn.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-look-and-feel",isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:function(){return n({transformation_crop:e.value,transformation_background:null})}},e.label)})))),"pad"===t.transformation_crop&&p.a.createElement(Bt.SelectControl,{label:Object(b.__)("Pad style","cloudinary"),value:t.transformation_background,options:nn,onChange:function(e){n({transformation_background:e})}}),p.a.createElement("p",null,Object(b.__)("Navigation","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,Ut.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-navigation",isDefault:!0,isPressed:e.value===t.navigation,onClick:function(){return n({navigation:e.value})}},e.label)})))),p.a.createElement("div",{style:{marginTop:"30px"}},p.a.createElement(Bt.ToggleControl,{label:Object(b.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:function(){return n({zoom:!t.zoom})}}),t.zoom&&p.a.createElement(p.a.Fragment,null,p.a.createElement("p",null,Object(b.__)("Zoom Type","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,Vt.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-zoom-type",isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:function(){return n({zoomProps_type:e.value})}},e.label)})))),"flyout"===t.zoomProps_type&&p.a.createElement(Bt.SelectControl,{label:Object(b.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:qt,onChange:function(e){return n({zoomProps_viewerPosition:e})}}),"popup"!==t.zoomProps_type&&p.a.createElement(p.a.Fragment,null,p.a.createElement("p",null,Object(b.__)("Zoom Trigger","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,$t.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-zoom-trigger",isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:function(){return n({zoomProps_trigger:e.value})}},e.label)})))))))),p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Carousel Parameters","cloudinary"),initialOpen:!1},p.a.createElement("p",null,Object(b.__)("Carousel Location","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,Gt.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-carousel-location",isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:function(){return n({carouselLocation:e.value})}},e.label)})))),p.a.createElement(Bt.RangeControl,{label:Object(b.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:function(e){return n({carouselOffset:e})},min:0,max:100}),p.a.createElement("p",null,Object(b.__)("Carousel Style","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,Xt.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-carousel-style",isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:function(){return n({carouselStyle:e.value})}},e.label)})))),"thumbnails"===t.carouselStyle&&p.a.createElement(p.a.Fragment,null,p.a.createElement(Bt.RangeControl,{label:Object(b.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:function(e){return n({thumbnailProps_width:e})},min:5,max:300}),p.a.createElement(Bt.RangeControl,{label:Object(b.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:function(e){return n({thumbnailProps_height:e})},min:5,max:300}),p.a.createElement("p",null,Object(b.__)("Navigation Button Shape","cloudinary")),Jt.map((function(e){return p.a.createElement(an,{key:e.value+"-navigation-button-shape",value:e.value,onChange:function(e){return n({thumbnailProps_navigationShape:e})},icon:e.icon,current:t.thumbnailProps_navigationShape},e.label)})),p.a.createElement("p",null,Object(b.__)("Selected Style","cloudinary")),p.a.createElement("p",null,p.a.createElement(Bt.ButtonGroup,null,Kt.map((function(e){return p.a.createElement(Bt.Button,{key:e.value+"-selected-style",isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:function(){return n({thumbnailProps_selectedStyle:e.value})}},e.label)})))),p.a.createElement(Bt.SelectControl,{label:Object(b.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:Qt,onChange:function(e){return n({thumbnailProps_selectedBorderPosition:e})}}),p.a.createElement(Bt.RangeControl,{label:Object(b.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:function(e){return n({thumbnailProps_selectedBorderWidth:e})},min:0,max:10}),p.a.createElement("p",null,Object(b.__)("Media Shape Icon","cloudinary")),en.map((function(e){return p.a.createElement(an,{key:e.value+"-media",value:e.value,onChange:function(e){return n({thumbnailProps_mediaSymbolShape:e})},icon:e.icon,current:t.thumbnailProps_mediaSymbolShape},e.label)}))),"indicators"===t.carouselStyle&&p.a.createElement(p.a.Fragment,null,p.a.createElement("p",null,Object(b.__)("Indicators Shape","cloudinary")),Yt.map((function(e){return p.a.createElement(an,{key:e.value+"-indicator",value:e.value,onChange:function(e){return n({indicatorProps_shape:e})},icon:e.icon,current:t.indicatorProps_shape},e.label)})))),p.a.createElement(Bt.PanelBody,{title:Object(b.__)("Additional Settings","cloudinary"),initialOpen:!1},p.a.createElement(Bt.TextareaControl,{label:Object(b.__)("Custom Settings","cloudinary"),help:Object(b.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:i.customSettings,onChange:function(e){try{n({customSettings:JSON.parse(e)})}catch(t){n({customSettings:e})}}})))};n(51);function ln(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 pn(e){for(var t=1;t=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(s).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var p=Object.prototype.hasOwnProperty;function f(e,t,n,r){if(!(this instanceof f))return new f(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var d=new f(".",!1,!0,!0);function v(e){return function(){return d[e].apply(d,arguments)}}f.prototype._fill=function(e,t,n,o){var i=e.shift();if(e.length>0){if(t[i]=t[i]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!a(t[i])){if(!this.override){if(!a(n)||!c(n))throw new Error("Trying to redefine `"+i+"` which is a "+typeof t[i]);return}t[i]={}}this._fill(e,t[i],n,o)}else{if(!this.override&&a(t[i])&&!c(t[i])){if(!a(n)||!c(n))throw new Error("Trying to redefine non-empty obj['"+i+"']");return}t[i]=r(n,o)}},f.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach((function(o){var i=void 0===t?null:t[o],a=l(o,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),e,e[o],i),delete e[o]):e[o]=r(e[o],i)})),e},f.prototype.str=function(e,t,n,o){var i=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),n,t,o):n[e]=r(t,o),n},f.prototype.pick=function(e,t,n,r){var i,a,c,u,s;for(a=l(e,this.separator),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(11);e.exports=function(e,t){if(e){if("string"==typeof e)return r(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)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(71),o=n(72),i=n(73),a=n(74),c=n(75);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(43),o=n(50);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(55),o=n(56),i=n(35),a=n(53),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=0?e.ownerDocument.body:b(e)&&x(e)?e:E(L(e))}function k(e,t){var n;void 0===t&&(t=[]);var r=E(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=d(r),a=o?[i].concat(i.visualViewport||[],x(r)?r:[]):r,c=t.concat(a);return o?c:c.concat(k(L(a)))}function A(e){return["table","td","th"].indexOf(y(e))>=0}function P(e){return b(e)&&"fixed"!==O(e).position?e.offsetParent:null}function S(e){for(var t=d(e),n=P(e);n&&A(n)&&"static"===O(n).position;)n=P(n);return n&&("html"===y(n)||"body"===y(n)&&"static"===O(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&b(e)&&"fixed"===O(e).position)return null;for(var n=L(e);b(n)&&["html","body"].indexOf(y(n))<0;){var r=O(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var C="top",M="bottom",T="right",D="left",B="auto",R=[C,M,T,D],N="start",Z="end",I="viewport",F="popper",W=R.reduce((function(e,t){return e.concat([t+"-"+N,t+"-"+Z])}),[]),z=[].concat(R,[B]).reduce((function(e,t){return e.concat([t,t+"-"+N,t+"-"+Z])}),[]),H=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function U(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var V={placement:"bottom",modifiers:[],strategy:"absolute"};function q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Q(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?J(o):null,a=o?Y(o):null,c=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case C:t={x:c,y:n.y-r.height};break;case M:t={x:c,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:u};break;case D:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?K(i):null;if(null!=s){var l="y"===s?"height":"width";switch(a){case N:t[s]=t[s]-(n[l]/2-r[l]/2);break;case Z:t[s]=t[s]+(n[l]/2-r[l]/2)}}return t}var ee={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},te=Math.max,ne=Math.min,re=Math.round,oe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.offsets,a=e.position,c=e.gpuAcceleration,u=e.adaptive,s=e.roundOffsets,l=!0===s?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:re(re(t*r)/r)||0,y:re(re(n*r)/r)||0}}(i):"function"==typeof s?s(i):i,p=l.x,f=void 0===p?0:p,v=l.y,m=void 0===v?0:v,b=i.hasOwnProperty("x"),h=i.hasOwnProperty("y"),y=D,_=C,x=window;if(u){var w=S(n),j="clientHeight",L="clientWidth";w===d(n)&&"static"!==O(w=g(n)).position&&(j="scrollHeight",L="scrollWidth"),w=w,o===C&&(_=M,m-=w[j]-r.height,m*=c?1:-1),o===D&&(y=T,f-=w[L]-r.width,f*=c?1:-1)}var E,k=Object.assign({position:a},u&&oe);return c?Object.assign({},k,((E={})[_]=h?"0":"",E[y]=b?"0":"",E.transform=(x.devicePixelRatio||1)<2?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",E)):Object.assign({},k,((t={})[_]=h?m+"px":"",t[y]=b?f+"px":"",t.transform="",t))}var ae={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];b(o)&&y(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});b(r)&&y(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ce={left:"right",right:"left",bottom:"top",top:"bottom"};function ue(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var se={start:"end",end:"start"};function le(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function pe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&h(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function de(e,t){return t===I?fe(function(e){var t=d(e),n=g(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,a=0,c=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,c=r.offsetTop)),{width:o,height:i,x:a+_(e),y:c}}(e)):b(t)?function(e){var t=f(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=g(e),r=v(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=te(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=te(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+_(e),u=-r.scrollTop;return"rtl"===O(o||n).direction&&(c+=te(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:c,y:u}}(g(e)))}function ve(e,t,n){var r="clippingParents"===t?function(e){var t=k(L(e)),n=["absolute","fixed"].indexOf(O(e).position)>=0&&b(e)?S(e):e;return m(n)?t.filter((function(e){return m(e)&&pe(e,n)&&"body"!==y(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],a=o.reduce((function(t,n){var r=de(e,n);return t.top=te(r.top,t.top),t.right=ne(r.right,t.right),t.bottom=ne(r.bottom,t.bottom),t.left=te(r.left,t.left),t}),de(e,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function me(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function be(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function he(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,a=void 0===i?"clippingParents":i,c=n.rootBoundary,u=void 0===c?I:c,s=n.elementContext,l=void 0===s?F:s,p=n.altBoundary,d=void 0!==p&&p,v=n.padding,b=void 0===v?0:v,h=me("number"!=typeof b?b:be(b,R)),y=l===F?"reference":F,_=e.elements.reference,O=e.rects.popper,x=e.elements[d?y:l],w=ve(m(x)?x:x.contextElement||g(e.elements.popper),a,u),j=f(_),L=Q({reference:j,element:O,strategy:"absolute",placement:o}),E=fe(Object.assign({},O,L)),k=l===F?E:j,A={top:w.top-k.top+h.top,bottom:k.bottom-w.bottom+h.bottom,left:w.left-k.left+h.left,right:k.right-w.right+h.right},P=e.modifiersData.offset;if(l===F&&P){var S=P[o];Object.keys(A).forEach((function(e){var t=[T,M].indexOf(e)>=0?1:-1,n=[C,M].indexOf(e)>=0?"y":"x";A[e]+=S[n]*t}))}return A}function ye(e,t,n){return te(e,ne(t,n))}function ge(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _e(e){return[C,T,M,D].some((function(t){return e[t]>=0}))}var Oe=$({defaultModifiers:[X,ee,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,c=n.roundOffsets,u=void 0===c||c,s={placement:J(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ie(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ie(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ae,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=z.reduce((function(e,n){return e[n]=function(e,t,n){var r=J(e),o=[D,C].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],c=i[1];return a=a||0,c=(c||0)*o,[D,T].indexOf(r)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),c=a[t.placement],u=c.x,s=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0===a||a,u=n.fallbackPlacements,s=n.padding,l=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,v=void 0===d||d,m=n.allowedAutoPlacements,b=t.options.placement,h=J(b),y=u||(h===b||!v?[ue(b)]:function(e){if(J(e)===B)return[];var t=ue(e);return[le(e),t,le(t)]}(b)),g=[b].concat(y).reduce((function(e,n){return e.concat(J(n)===B?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?z:u,l=Y(r),p=l?c?W:W.filter((function(e){return Y(e)===l})):R,f=p.filter((function(e){return s.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=he(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[J(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:p,padding:s,flipVariations:v,allowedAutoPlacements:m}):n)}),[]),_=t.rects.reference,O=t.rects.popper,x=new Map,w=!0,j=g[0],L=0;L=0,S=P?"width":"height",Z=he(t,{placement:E,boundary:l,rootBoundary:p,altBoundary:f,padding:s}),I=P?A?T:D:A?M:C;_[S]>O[S]&&(I=ue(I));var F=ue(I),H=[];if(i&&H.push(Z[k]<=0),c&&H.push(Z[I]<=0,Z[F]<=0),H.every((function(e){return e}))){j=E,w=!1;break}x.set(E,H)}if(w)for(var U=function(e){var t=g.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return j=t,"break"},V=v?3:1;V>0;V--){if("break"===U(V))break}t.placement!==j&&(t.modifiersData[r]._skip=!0,t.placement=j,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,c=void 0!==a&&a,u=n.boundary,s=n.rootBoundary,l=n.altBoundary,p=n.padding,f=n.tether,d=void 0===f||f,v=n.tetherOffset,m=void 0===v?0:v,b=he(t,{boundary:u,rootBoundary:s,padding:p,altBoundary:l}),h=J(t.placement),y=Y(t.placement),g=!y,_=K(h),O="x"===_?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,L=t.rects.popper,E="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,k={x:0,y:0};if(x){if(i||c){var A="y"===_?C:D,P="y"===_?M:T,B="y"===_?"height":"width",R=x[_],Z=x[_]+b[A],I=x[_]-b[P],F=d?-L[B]/2:0,W=y===N?w[B]:L[B],z=y===N?-L[B]:-w[B],H=t.elements.arrow,U=d&&H?j(H):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=V[A],$=V[P],G=ye(0,w[B],U[B]),X=g?w[B]/2-F-G-q-E:W-G-q-E,Q=g?-w[B]/2+F+G+$+E:z+G+$+E,ee=t.elements.arrow&&S(t.elements.arrow),re=ee?"y"===_?ee.clientTop||0:ee.clientLeft||0:0,oe=t.modifiersData.offset?t.modifiersData.offset[t.placement][_]:0,ie=x[_]+X-oe-re,ae=x[_]+Q-oe;if(i){var ce=ye(d?ne(Z,ie):Z,R,d?te(I,ae):I);x[_]=ce,k[_]=ce-R}if(c){var ue="x"===_?C:D,se="x"===_?M:T,le=x[O],pe=le+b[ue],fe=le-b[se],de=ye(d?ne(pe,ie):pe,le,d?te(fe,ae):fe);x[O]=de,k[O]=de-le}}t.modifiersData[r]=k}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,c=J(n.placement),u=K(c),s=[D,T].indexOf(c)>=0?"height":"width";if(i&&a){var l=function(e,t){return me("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:be(e,R))}(o.padding,n),p=j(i),f="y"===u?C:D,d="y"===u?M:T,v=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],m=a[u]-n.rects.reference[u],b=S(i),h=b?"y"===u?b.clientHeight||0:b.clientWidth||0:0,y=v/2-m/2,g=l[f],_=h-p[s]-l[d],O=h/2-p[s]/2+y,x=ye(g,O,_),w=u;n.modifiersData[r]=((t={})[w]=x,t.centerOffset=x-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&pe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=he(t,{elementContext:"reference"}),c=he(t,{altBoundary:!0}),u=ge(a,r),s=ge(c,o,i),l=_e(u),p=_e(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),xe="tippy-content",we="tippy-backdrop",je="tippy-arrow",Le="tippy-svg-arrow",Ee={passive:!0,capture:!0};function ke(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Ae(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Pe(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Se(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ce(e){return[].concat(e)}function Me(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function De(e){return[].slice.call(e)}function Be(){return document.createElement("div")}function Re(e){return["Element","Fragment"].some((function(t){return Ae(e,t)}))}function Ne(e){return Ae(e,"MouseEvent")}function Ze(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Ie(e){return Re(e)?[e]:function(e){return Ae(e,"NodeList")}(e)?De(e):Array.isArray(e)?e:De(document.querySelectorAll(e))}function Fe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function We(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ze(e){var t,n=Ce(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function He(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ue={isTouch:!1},Ve=0;function qe(){Ue.isTouch||(Ue.isTouch=!0,window.performance&&document.addEventListener("mousemove",$e))}function $e(){var e=performance.now();e-Ve<20&&(Ue.isTouch=!1,document.removeEventListener("mousemove",$e)),Ve=e}function Ge(){var e=document.activeElement;if(Ze(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Xe="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Je=/MSIE |Trident\//.test(Xe);var Ye={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ke=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ye,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Qe=Object.keys(Ke);function et(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,o=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:o),t}),{});return Object.assign({},e,{},t)}function tt(e,t){var n=Object.assign({},t,{content:Pe(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(et(Object.assign({},Ke,{plugins:t}))):Qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Ke.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function nt(e,t){e.innerHTML=t}function rt(e){var t=Be();return!0===e?t.className=je:(t.className=Le,Re(e)?t.appendChild(e):nt(t,e)),t}function ot(e,t){Re(t.content)?(nt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?nt(e,t.content):e.textContent=t.content)}function it(e){var t=e.firstElementChild,n=De(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(xe)})),arrow:n.find((function(e){return e.classList.contains(je)||e.classList.contains(Le)})),backdrop:n.find((function(e){return e.classList.contains(we)}))}}function at(e){var t=Be(),n=Be();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Be();function o(n,r){var o=it(t),i=o.box,a=o.content,c=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||ot(a,e.props),r.arrow?c?n.arrow!==r.arrow&&(i.removeChild(c),i.appendChild(rt(r.arrow))):i.appendChild(rt(r.arrow)):c&&i.removeChild(c)}return r.className=xe,r.setAttribute("data-state","hidden"),ot(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}at.$$tippy=!0;var ct=1,ut=[],st=[];function lt(e,t){var n,r,o,i,a,c,u,s,l,p=tt(e,Object.assign({},Ke,{},et((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),f=!1,d=!1,v=!1,m=!1,b=[],h=Se(G,p.interactiveDebounce),y=ct++,g=(l=p.plugins).filter((function(e,t){return l.indexOf(e)===t})),_={id:y,reference:e,popper:Be(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(t){0;if(_.state.isDestroyed)return;D("onBeforeUpdate",[_,t]),q();var n=_.props,r=tt(e,Object.assign({},_.props,{},t,{ignoreAttributes:!0}));_.props=r,V(),n.interactiveDebounce!==r.interactiveDebounce&&(N(),h=Se(G,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Ce(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),T(),w&&w(n,r);_.popperInstance&&(K(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[_,t])},setContent:function(e){_.setProps({content:e})},show:function(){0;var e=_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=Ue.isTouch&&!_.props.touch,o=ke(_.props.duration,0,Ke.duration);if(e||t||n||r)return;if(P().hasAttribute("disabled"))return;if(D("onShow",[_],!1),!1===_.props.onShow(_))return;_.state.isVisible=!0,A()&&(x.style.visibility="visible");T(),W(),_.state.isMounted||(x.style.transition="none");if(A()){var i=C(),a=i.box,c=i.content;Fe([a,c],0)}u=function(){var e;if(_.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=_.props.moveTransition,A()&&_.props.animation){var t=C(),n=t.box,r=t.content;Fe([n,r],o),We([n,r],"visible")}B(),R(),Me(st,_),null==(e=_.popperInstance)||e.forceUpdate(),_.state.isMounted=!0,D("onMount",[_]),_.props.animation&&A()&&function(e,t){H(e,t)}(o,(function(){_.state.isShown=!0,D("onShown",[_])}))}},function(){var e,t=_.props.appendTo,n=P();e=_.props.interactive&&t===Ke.appendTo||"parent"===t?n.parentNode:Pe(t,[n]);e.contains(x)||e.appendChild(x);K(),!1}()},hide:function(){0;var e=!_.state.isVisible,t=_.state.isDestroyed,n=!_.state.isEnabled,r=ke(_.props.duration,1,Ke.duration);if(e||t||n)return;if(D("onHide",[_],!1),!1===_.props.onHide(_))return;_.state.isVisible=!1,_.state.isShown=!1,m=!1,f=!1,A()&&(x.style.visibility="hidden");if(N(),z(),T(),A()){var o=C(),i=o.box,a=o.content;_.props.animation&&(Fe([i,a],r),We([i,a],"hidden"))}B(),R(),_.props.animation?A()&&function(e,t){H(e,(function(){!_.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,_.unmount):_.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",h),Me(ut,h),h(e)},enable:function(){_.state.isEnabled=!0},disable:function(){_.hide(),_.state.isEnabled=!1},unmount:function(){0;_.state.isVisible&&_.hide();if(!_.state.isMounted)return;Q(),ee().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);st=st.filter((function(e){return e!==_})),_.state.isMounted=!1,D("onHidden",[_])},destroy:function(){0;if(_.state.isDestroyed)return;_.clearDelayTimeouts(),_.unmount(),q(),delete e._tippy,_.state.isDestroyed=!0,D("onDestroy",[_])}};if(!p.render)return _;var O=p.render(_),x=O.popper,w=O.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+_.id,_.popper=x,e._tippy=_,x._tippy=_;var j=g.map((function(e){return e.fn(_)})),L=e.hasAttribute("aria-expanded");return V(),R(),T(),D("onCreate",[_]),p.showOnCreate&&te(),x.addEventListener("mouseenter",(function(){_.props.interactive&&_.state.isVisible&&_.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(e){_.props.interactive&&_.props.trigger.indexOf("mouseenter")>=0&&(S().addEventListener("mousemove",h),h(e))})),_;function E(){var e=_.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===E()[0]}function A(){var e;return!!(null==(e=_.props.render)?void 0:e.$$tippy)}function P(){return s||e}function S(){var e=P().parentNode;return e?ze(e):document}function C(){return it(x)}function M(e){return _.state.isMounted&&!_.state.isVisible||Ue.isTouch||a&&"focus"===a.type?0:ke(_.props.delay,e?0:1,Ke.delay)}function T(){x.style.pointerEvents=_.props.interactive&&_.state.isVisible?"":"none",x.style.zIndex=""+_.props.zIndex}function D(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=_.props)[e].apply(r,t)}function B(){var t=_.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;Ce(_.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(_.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!L&&_.props.aria.expanded&&Ce(_.props.triggerTarget||e).forEach((function(e){_.props.interactive?e.setAttribute("aria-expanded",_.state.isVisible&&e===P()?"true":"false"):e.removeAttribute("aria-expanded")}))}function N(){S().removeEventListener("mousemove",h),ut=ut.filter((function(e){return e!==h}))}function Z(e){if(!(Ue.isTouch&&(v||"mousedown"===e.type)||_.props.interactive&&x.contains(e.target))){if(P().contains(e.target)){if(Ue.isTouch)return;if(_.state.isVisible&&_.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[_,e]);!0===_.props.hideOnClick&&(_.clearDelayTimeouts(),_.hide(),d=!0,setTimeout((function(){d=!1})),_.state.isMounted||z())}}function I(){v=!0}function F(){v=!1}function W(){var e=S();e.addEventListener("mousedown",Z,!0),e.addEventListener("touchend",Z,Ee),e.addEventListener("touchstart",F,Ee),e.addEventListener("touchmove",I,Ee)}function z(){var e=S();e.removeEventListener("mousedown",Z,!0),e.removeEventListener("touchend",Z,Ee),e.removeEventListener("touchstart",F,Ee),e.removeEventListener("touchmove",I,Ee)}function H(e,t){var n=C().box;function r(e){e.target===n&&(He(n,"remove",r),t())}if(0===e)return t();He(n,"remove",c),He(n,"add",r),c=r}function U(t,n,r){void 0===r&&(r=!1),Ce(_.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),b.push({node:e,eventType:t,handler:n,options:r})}))}function V(){var e;k()&&(U("touchstart",$,{passive:!0}),U("touchend",X,{passive:!0})),(e=_.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(U(e,$),e){case"mouseenter":U("mouseleave",X);break;case"focus":U(Je?"focusout":"blur",J);break;case"focusin":U("focusout",J)}}))}function q(){b.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),b=[]}function $(e){var t,n=!1;if(_.state.isEnabled&&!Y(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,s=e.currentTarget,R(),!_.state.isVisible&&Ne(e)&&ut.forEach((function(t){return t(e)})),"click"===e.type&&(_.props.trigger.indexOf("mouseenter")<0||f)&&!1!==_.props.hideOnClick&&_.state.isVisible?n=!0:te(e),"click"===e.type&&(f=!n),n&&!r&&ne(e)}}function G(e){var t=e.target,n=P().contains(t)||x.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Te(o.placement),c=o.modifiersData.offset;if(!c)return!0;var u="bottom"===a?c.top.y:0,s="top"===a?c.bottom.y:0,l="right"===a?c.left.x:0,p="left"===a?c.right.x:0,f=t.top-r+u>i,d=r-t.bottom-s>i,v=t.left-n+l>i,m=n-t.right-p>i;return f||d||v||m}))}(ee().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean),e)&&(N(),ne(e))}function X(e){Y(e)||_.props.trigger.indexOf("click")>=0&&f||(_.props.interactive?_.hideWithInteractivity(e):ne(e))}function J(e){_.props.trigger.indexOf("focusin")<0&&e.target!==P()||_.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||ne(e)}function Y(e){return!!Ue.isTouch&&k()!==e.type.indexOf("touch")>=0}function K(){Q();var t=_.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=A()?it(x).arrow:null,s=i?{getBoundingClientRect:i,contextElement:i.contextElement||P()}:e,l=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&c&&l.push({name:"arrow",options:{element:c,padding:3}}),l.push.apply(l,(null==n?void 0:n.modifiers)||[]),_.popperInstance=Oe(s,x,Object.assign({},n,{placement:r,onFirstUpdate:u,modifiers:l}))}function Q(){_.popperInstance&&(_.popperInstance.destroy(),_.popperInstance=null)}function ee(){return De(x.querySelectorAll("[data-tippy-root]"))}function te(e){_.clearDelayTimeouts(),e&&D("onTrigger",[_,e]),W();var t=M(!0),n=E(),o=n[0],i=n[1];Ue.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout((function(){_.show()}),t):_.show()}function ne(e){if(_.clearDelayTimeouts(),D("onUntrigger",[_,e]),_.state.isVisible){if(!(_.props.trigger.indexOf("mouseenter")>=0&&_.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=M(!1);t?o=setTimeout((function(){_.state.isVisible&&_.hide()}),t):i=requestAnimationFrame((function(){_.hide()}))}}else z()}}function pt(e,t){void 0===t&&(t={});var n=Ke.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",qe,Ee),window.addEventListener("blur",Ge);var r=Object.assign({},t,{plugins:n}),o=Ie(e).reduce((function(e,t){var n=t&<(t,r);return n&&e.push(n),e}),[]);return Re(e)?o[0]:o}pt.defaultProps=Ke,pt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){Ke[t]=e[t]}))},pt.currentInput=Ue;Object.assign({},ae,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});pt.setDefaultProps({render:at});var ft=pt,dt=n(59);function vt(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var mt="undefined"!=typeof window&&"undefined"!=typeof document;function bt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function ht(){return mt&&document.createElement("div")}function yt(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!yt(e[n],t[n]))return!1}return!0}return!1}function gt(e){var t=[];return e.forEach((function(e){t.find((function(t){return yt(e,t)}))||t.push(e)})),t}function _t(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:gt([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var Ot=mt?i.useLayoutEffect:i.useEffect;function xt(e){var t=Object(i.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function wt(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var jt={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||wt(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&wt(t,"remove",e.props.className)},onAfterUpdate:r}}};function Lt(e){return function(t){var n=t.children,r=t.content,o=t.visible,c=t.singleton,u=t.render,s=t.reference,l=t.disabled,p=void 0!==l&&l,f=t.ignoreAttributes,d=void 0===f||f,v=(t.__source,t.__self,vt(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),m=void 0!==o,b=void 0!==c,h=Object(i.useState)(!1),y=h[0],g=h[1],_=Object(i.useState)({}),O=_[0],x=_[1],w=Object(i.useState)(),j=w[0],L=w[1],E=xt((function(){return{container:ht(),renders:1}})),k=Object.assign({ignoreAttributes:d},v,{content:E.container});m&&(k.trigger="manual",k.hideOnClick=!1),b&&(p=!0);var A=k,P=k.plugins||[];u&&(A=Object.assign({},k,{plugins:b?[].concat(P,[{fn:function(){return{onTrigger:function(e,t){var n=c.data.children.find((function(e){return e.instance.reference===t.currentTarget})).content;L(n)}}}}]):P,render:function(){return{popper:E.container}}}));var S=[s].concat(n?[n.type]:[]);return Ot((function(){var t=s;s&&s.hasOwnProperty("current")&&(t=s.current);var n=e(t||E.ref||ht(),Object.assign({},A,{plugins:[jt].concat(k.plugins||[])}));return E.instance=n,p&&n.disable(),o&&n.show(),b&&c.hook({instance:n,content:r,props:A}),g(!0),function(){n.destroy(),null==c||c.cleanup(n)}}),S),Ot((function(){var e;if(1!==E.renders){var t=E.instance;t.setProps(_t(t.props,A)),null==(e=t.popperInstance)||e.forceUpdate(),p?t.disable():t.enable(),m&&(o?t.show():t.hide()),b&&c.hook({instance:t,content:r,props:A})}else E.renders++})),Ot((function(){var e;if(u){var t=E.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;O.placement===n.placement&&O.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&O.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[O.placement,O.referenceHidden,O.escaped].concat(S)),a.a.createElement(a.a.Fragment,null,n?Object(i.cloneElement)(n,{ref:function(e){E.ref=e,bt(n.ref,e)}}):null,y&&Object(dt.createPortal)(u?u(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(O),j,E.instance):r,E.container))}}var Et=function(e,t){return Object(i.forwardRef)((function(n,r){var o=n.children,c=vt(n,["children"]);return a.a.createElement(e,Object.assign({},t,c),o?Object(i.cloneElement)(o,{ref:function(e){bt(r,e),bt(o.ref,e)}}):null)}))},kt=Et(Lt(ft)),At=(n(62),n(2)),Pt=n(13),St=n(3),Ct=n(58),Mt=n.n(Ct),Tt=function(e){var t=e.value,n=e.children,r=e.icon,i=e.onChange,c=e.current,u="object"===o()(t)?JSON.stringify(t)===JSON.stringify(c):c===t;return a.a.createElement("button",{type:"button",onClick:function(){return i(t)},className:Mt()("radio-select",{"radio-select--active":u})},a.a.createElement(r,null),a.a.createElement("div",{className:"radio-select__label"},n))},Dt=function(e){var t=e.children,n=e.value;return a.a.createElement("div",{className:"colorpalette-color-label"},a.a.createElement("span",null,t),a.a.createElement("span",{className:"component-color-indicator","aria-label":"Color: ".concat(n),style:{background:n}}))},Bt=new u.a("_");t.a=function(e){var t=e.attributes,n=e.setAttributes,r=e.colors,i=p()(t),c=Bt.object(i);return c.customSettings="object"===o()(c.customSettings)?JSON.stringify(c.customSettings):c.customSettings,t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background,a.a.createElement(a.a.Fragment,null,a.a.createElement(At.PanelBody,{title:Object(s.__)("Layout","cloudinary")},St.g.map((function(e){return a.a.createElement(Tt,{key:"".concat(e.value.type,"-").concat(e.value.columns,"-layout"),value:e.value,onChange:function(e){n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1}},e.label)}))),a.a.createElement(At.PanelBody,{title:Object(s.__)("Color Palette","cloudinary"),initialOpen:!1},a.a.createElement(Dt,{value:t.themeProps_primary},Object(s.__)("Primary","cloudinary")),a.a.createElement(Pt.ColorPalette,{value:t.themeProps_primary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_primary:e})}}),a.a.createElement(Dt,{value:t.themeProps_onPrimary},Object(s.__)("On Primary","cloudinary")),a.a.createElement(Pt.ColorPalette,{value:t.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_onPrimary:e})}}),a.a.createElement(Dt,{value:t.themeProps_active},Object(s.__)("Active","cloudinary")),a.a.createElement(Pt.ColorPalette,{value:t.themeProps_active,colors:r,disableCustomColors:!1,onChange:function(e){return n({themeProps_active:e})}})),"classic"===t.displayProps_mode&&a.a.createElement(At.PanelBody,{title:Object(s.__)("Fade Transition","cloudinary"),initialOpen:!1},a.a.createElement(At.SelectControl,{value:t.transition,options:St.e,onChange:function(e){return n({transition:e})}})),a.a.createElement(At.PanelBody,{title:Object(s.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},a.a.createElement(At.SelectControl,{label:Object(s.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:St.b,onChange:function(e){return n({aspectRatio:e})}}),a.a.createElement("p",null,a.a.createElement(kt,{content:a.a.createElement("span",null,Object(s.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")),theme:"cloudinary",arrow:!1,placement:"bottom-start"},a.a.createElement("div",{className:"cld-ui-title"},Object(s.__)("Resize/Crop Mode","cloudinary"),a.a.createElement("span",{className:"dashicons dashicons-info cld-tooltip"}))),a.a.createElement(At.ButtonGroup,null,St.l.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-look-and-feel",isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:function(){return n({transformation_crop:e.value,transformation_background:null})}},e.label)})))),"pad"===t.transformation_crop&&a.a.createElement(At.SelectControl,{label:Object(s.__)("Pad style","cloudinary"),value:t.transformation_background,options:St.k,onChange:function(e){n({transformation_background:e})}}),a.a.createElement("p",null,Object(s.__)("Navigation","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.i.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-navigation",isDefault:!0,isPressed:e.value===t.navigation,onClick:function(){return n({navigation:e.value})}},e.label)})))),a.a.createElement("div",{style:{marginTop:"30px"}},a.a.createElement(At.ToggleControl,{label:Object(s.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:function(){return n({zoom:!t.zoom})}}),t.zoom&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Zoom Type","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.p.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-zoom-type",isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:function(){return n({zoomProps_type:e.value})}},e.label)})))),"flyout"===t.zoomProps_type&&a.a.createElement(At.SelectControl,{label:Object(s.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:St.q,onChange:function(e){return n({zoomProps_viewerPosition:e})}}),"popup"!==t.zoomProps_type&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Zoom Trigger","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.o.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-zoom-trigger",isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:function(){return n({zoomProps_trigger:e.value})}},e.label)})))))))),a.a.createElement(At.PanelBody,{title:Object(s.__)("Carousel Parameters","cloudinary"),initialOpen:!1},a.a.createElement("p",null,Object(s.__)("Carousel Location","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.c.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-carousel-location",isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:function(){return n({carouselLocation:e.value})}},e.label)})))),a.a.createElement(At.RangeControl,{label:Object(s.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:function(e){return n({carouselOffset:e})},min:0,max:100}),a.a.createElement("p",null,Object(s.__)("Carousel Style","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.d.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-carousel-style",isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:function(){return n({carouselStyle:e.value})}},e.label)})))),"thumbnails"===t.carouselStyle&&a.a.createElement(a.a.Fragment,null,a.a.createElement(At.RangeControl,{label:Object(s.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:function(e){return n({thumbnailProps_width:e})},min:5,max:300}),a.a.createElement(At.RangeControl,{label:Object(s.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:function(e){return n({thumbnailProps_height:e})},min:5,max:300}),a.a.createElement("p",null,Object(s.__)("Navigation Button Shape","cloudinary")),St.j.map((function(e){return a.a.createElement(Tt,{key:e.value+"-navigation-button-shape",value:e.value,onChange:function(e){return n({thumbnailProps_navigationShape:e})},icon:e.icon,current:t.thumbnailProps_navigationShape},e.label)})),a.a.createElement("p",null,Object(s.__)("Selected Style","cloudinary")),a.a.createElement("p",null,a.a.createElement(At.ButtonGroup,null,St.n.map((function(e){return a.a.createElement(At.Button,{key:e.value+"-selected-style",isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:function(){return n({thumbnailProps_selectedStyle:e.value})}},e.label)})))),a.a.createElement(At.SelectControl,{label:Object(s.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:St.m,onChange:function(e){return n({thumbnailProps_selectedBorderPosition:e})}}),a.a.createElement(At.RangeControl,{label:Object(s.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:function(e){return n({thumbnailProps_selectedBorderWidth:e})},min:0,max:10}),a.a.createElement("p",null,Object(s.__)("Media Shape Icon","cloudinary")),St.h.map((function(e){return a.a.createElement(Tt,{key:e.value+"-media",value:e.value,onChange:function(e){return n({thumbnailProps_mediaSymbolShape:e})},icon:e.icon,current:t.thumbnailProps_mediaSymbolShape},e.label)}))),"indicators"===t.carouselStyle&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,Object(s.__)("Indicators Shape","cloudinary")),St.f.map((function(e){return a.a.createElement(Tt,{key:e.value+"-indicator",value:e.value,onChange:function(e){return n({indicatorProps_shape:e})},icon:e.icon,current:t.indicatorProps_shape},e.label)})))),a.a.createElement(At.PanelBody,{title:Object(s.__)("Additional Settings","cloudinary"),initialOpen:!1},a.a.createElement(At.TextareaControl,{label:Object(s.__)("Custom Settings","cloudinary"),help:Object(s.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:c.customSettings,onChange:function(e){try{n({customSettings:JSON.parse(e)})}catch(t){n({customSettings:e})}}})))}},,function(e,t){e.exports=window.wp["components/buildStyle/style.css"]},,,function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(70),o=n(101),i=n(46),a=n(103),c=n(113),u=n(116),s=n(117),l=n(118),p=n(120),f=n(121),d=n(122),v=n(36),m=n(127),b=n(128),h=n(134),y=n(29),g=n(49),_=n(136),O=n(14),x=n(138),w=n(28),j=n(34),L="[object Arguments]",E="[object Function]",k="[object Object]",A={};A[L]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[k]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[E]=A["[object WeakMap]"]=!1,e.exports=function e(t,n,P,S,C,M){var T,D=1&n,B=2&n,R=4&n;if(P&&(T=C?P(t,S,C,M):P(t)),void 0!==T)return T;if(!O(t))return t;var N=y(t);if(N){if(T=m(t),!D)return s(t,T)}else{var Z=v(t),I=Z==E||"[object GeneratorFunction]"==Z;if(g(t))return u(t,D);if(Z==k||Z==L||I&&!C){if(T=B||I?{}:h(t),!D)return B?p(t,c(T,t)):l(t,a(T,t))}else{if(!A[Z])return C?t:{};T=b(t,Z,D)}}M||(M=new r);var F=M.get(t);if(F)return F;M.set(t,T),x(t)?t.forEach((function(r){T.add(e(r,n,P,r,t,M))})):_(t)&&t.forEach((function(r,o){T.set(o,e(r,n,P,o,t,M))}));var W=N?void 0:(R?B?d:f:B?j:w)(t);return o(W||t,(function(r,o){W&&(r=t[o=r]),i(T,o,e(r,n,P,o,t,M))})),T}},function(e,t,n){var r=n(18),o=n(76),i=n(77),a=n(78),c=n(79),u=n(80);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,e.exports=s},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(19),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(19);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(19);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(19);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(18);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(18),o=n(26),i=n(88);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(43),o=n(85),i=n(14),a=n(45),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,p=s.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:c).test(a(e))}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(27),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),n=e[c];try{e[c]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[c]=n:delete e[c]),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(86),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(5)["__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(89),o=n(96),i=n(98),a=n(99),c=n(100);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e array('wp-polyfill'), 'version' => '37570643f51b47c7e76cf52f909c916f'); \ No newline at end of file + array('wp-polyfill'), 'version' => 'a38d8abbc3556dac384ece093274f888'); \ No newline at end of file diff --git a/js/inline-loader.js b/js/inline-loader.js index ac29380ac..aaa87d155 100644 --- a/js/inline-loader.js +++ b/js/inline-loader.js @@ -1 +1 @@ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t){var i={deviceDensity:window.devicePixelRatio?window.devicePixelRatio:"auto",density:null,config:CLDLB||{},lazyThreshold:0,enabled:!1,sizeBands:[],iObserver:null,pObserver:null,rObserver:null,aboveFold:!0,bind:function(e){var t=this;e.CLDbound=!0,this.enabled||this._init();var i=e.dataset.size.split(" ");e.originalWidth=i[0],e.originalHeight=i[1],this.pObserver?(this.aboveFold&&this.inInitialView(e)?this.buildImage(e):(this.pObserver.observe(e),this.iObserver.observe(e)),e.addEventListener("error",(function(i){e.srcset="",e.src='data:image/svg+xml;utf8,%26%23x26A0%3B︎',t.rObserver.unobserve(e)}))):this.setupFallback(e)},buildImage:function(e){e.dataset.srcset?(e.cld_loaded=!0,e.srcset=e.dataset.srcset):(e.src=this.getSizeURL(e),e.dataset.responsive&&this.rObserver.observe(e))},inInitialView:function(e){var t=e.getBoundingClientRect();return this.aboveFold=t.top=t;)e-=i,this.sizeBands.push(e);"undefined"!=typeof IntersectionObserver&&this._setupObservers(),this.enabled=!0},_setupObservers:function(){var e=this,t={rootMargin:this.lazyThreshold+"px 0px "+this.lazyThreshold+"px 0px"},i={rootMargin:2*this.lazyThreshold+"px 0px "+2*this.lazyThreshold+"px 0px"};this.rObserver=new ResizeObserver((function(t,i){t.forEach((function(t){t.target.cld_loaded&&t.contentRect.width>=t.target.cld_loaded&&(t.target.src=e.getSizeURL(t.target))}))})),this.iObserver=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&(e.buildImage(t.target),i.unobserve(t.target))}))}),t),this.pObserver=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&(t.intersectionRatio<.5&&(t.target.src=e.getPlaceholderURL(t.target)),i.unobserve(t.target))}))}),i)},_calcThreshold:function(){var e=this.config.lazy_threshold.replace(/[^0-9]/g,""),t=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":t=parseFloat(getComputedStyle(document.body).fontSize)*e;break;case"rem":t=parseFloat(getComputedStyle(document.documentElement).fontSize)*e;break;case"vh":t=window.innerHeight/e*100;break;default:t=e}this.lazyThreshold=parseInt(t,10)},_getDensity:function(){var e=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===e)return this.density=1,1;var t=this.deviceDensity;"max"!==e&&"auto"!==t&&(e=parseFloat(e),t=t>Math.ceil(e)?e:t),this.density=t},scaleWidth:function(e,t){var i=parseInt(this.config.max_width);if(!t)for(t=e.width;-1===this.sizeBands.indexOf(t)&&ti&&(t=i),e.originalWidth%26%23x26A0%3B︎',t.rObserver.unobserve(e)}))):this.setupFallback(e)},buildImage:function(e){e.dataset.srcset?(e.cld_loaded=!0,e.srcset=e.dataset.srcset):(e.src=this.getSizeURL(e),e.dataset.responsive&&this.rObserver.observe(e))},inInitialView:function(e){var t=e.getBoundingClientRect();return this.aboveFold=t.top=t;)e-=i,this.sizeBands.push(e);"undefined"!=typeof IntersectionObserver&&this._setupObservers(),this.enabled=!0},_setupObservers:function(){var e=this,t={rootMargin:this.lazyThreshold+"px 0px "+this.lazyThreshold+"px 0px"},i={rootMargin:2*this.lazyThreshold+"px 0px "+2*this.lazyThreshold+"px 0px"};this.rObserver=new ResizeObserver((function(t,i){t.forEach((function(t){t.target.cld_loaded&&t.contentRect.width>=t.target.cld_loaded&&(t.target.src=e.getSizeURL(t.target))}))})),this.iObserver=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&(e.buildImage(t.target),i.unobserve(t.target))}))}),t),this.pObserver=new IntersectionObserver((function(t,i){t.forEach((function(t){t.isIntersecting&&(t.intersectionRatio<.5&&(t.target.src=e.getPlaceholderURL(t.target)),i.unobserve(t.target))}))}),i)},_calcThreshold:function(){var e=this.config.lazy_threshold.replace(/[^0-9]/g,""),t=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":t=parseFloat(getComputedStyle(document.body).fontSize)*e;break;case"rem":t=parseFloat(getComputedStyle(document.documentElement).fontSize)*e;break;case"vh":t=window.innerHeight/e*100;break;default:t=e}this.lazyThreshold=parseInt(t,10)},_getDensity:function(){var e=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===e)return this.density=1,1;var t=this.deviceDensity;"max"!==e&&"auto"!==t&&(e=parseFloat(e),t=t>Math.ceil(e)?e:t),this.density=t},scaleWidth:function(e,t){var i=parseInt(this.config.max_width);if(!t)for(t=e.width;-1===this.sizeBands.indexOf(t)&&ti&&(t=i),e.originalWidth array('wp-polyfill'), 'version' => '88615cf44e90608b794b3047ebf8dd33'); \ No newline at end of file + array('wp-polyfill'), 'version' => '2136ca7b92b202a88270e40f725678ed'); \ No newline at end of file diff --git a/js/lazy-load.js b/js/lazy-load.js index ff1593a73..607b063b9 100644 --- a/js/lazy-load.js +++ b/js/lazy-load.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2)}([function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i%26%23x26A0%3B︎';var n=t.images.indexOf(e);t.images.splice(n,1)}))}})),window.addEventListener("resize",(function(){t._throttle(t._build.bind(t),100,!0)})),window.addEventListener("scroll",(function(){t._throttle(t._build.bind(t),100,!1)})),setTimeout((function(){return t._build()}),0)},_calcThreshold:function(){var t=this.config.lazy_threshold.replace(/[^0-9]/g,""),e=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":e=parseFloat(getComputedStyle(document.body).fontSize)*t;break;case"rem":e=parseFloat(getComputedStyle(document.documentElement).fontSize)*t;break;case"vh":e=window.innerHeight/t*100;break;default:e=t}this.lazyThreshold=window.innerHeight+parseInt(e,10)},_getDensity:function(){if(this.density)return this.density;var t=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===t)return this.density=1,1;var e=this.deviceDensity;return"max"!==t&&"auto"!==e&&(t=parseFloat(t),e=e>Math.ceil(t)?t:e),this.density=e,e},_throttle:function(t,e,i){var n=this;this.throttle||setTimeout((function(){t(i),n.throttle=!1}),e)},_build:function(t){var e=this;this.images.forEach((function(i){!t&&i.cld_loaded||e.buildSize(i)}))},_shouldRebuild:function(t){var e=this.scaleWidth(t),i=t.getBoundingClientRect(),n="auto"!==this.density?this._getDensity():1;return i.topt.naturalWidth/n||!t.cld_loaded)},_shouldPlacehold:function(t){var e=this.scaleWidth(t),i=t.getBoundingClientRect(),n="auto"!==this.density?this._getDensity():1;return this.config.placeholder&&!t.cld_loaded&&i.top<2*this.lazyThreshold&&(e>t.naturalWidth/n||!t.cld_placehold)},scaleWidth:function(t){var e=this.config.pixel_step,i=Math.floor((t.originalWidth-t.width)/e),n=t.originalWidth-e*i;return n>t.originalWidth?n=t.originalWidth:this.config.max_widthn&&(n=this.config.min_width),n},scaleSize:function(t,e){var i=(t.originalWidth/t.originalHeight).toFixed(3),n=(t.width/t.height).toFixed(3),r=this.scaleWidth(t),o=[];t.width!==t.originalWidth&&o.push(i===n?"c_scale":"c_fill,g_auto");var a=Math.round(r/n);if(o.push("w_"+r),o.push("h_"+a),e){var s=this._getDensity();1!==s&&o.push("dpr_"+s)}return{transformation:o.join(","),nameExtension:r+"x"+a}},buildSize:function(t){this._shouldRebuild(t)?t.dataset.srcset?(t.cld_loaded=!0,t.srcset=t.dataset.srcset):t.src=this.getSizeURL(t):this._shouldPlacehold(t)&&(t.src=this.getPlaceholderURL(t))},getSizeURL:function(t){t.cld_loaded=!0;var e=this.scaleSize(t,!0),i="auto"!==this.config.image_format&&"none"!==this.config.image_format?this.config.image_format:t.dataset.format,n=t.dataset.publicId.split("/").pop();return[this.config.base_url,"images",e.transformation,t.dataset.transformations,t.dataset.publicId,n+"-"+e.nameExtension+"."+i+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL:function(t){t.cld_placehold=!0;var e=this.scaleSize(t,!1);return[this.config.base_url,"images",e.transformation,this.config.placeholder,t.dataset.publicId,"placeholder"].filter(this.empty).join("/")},empty:function(t){return 0!==t.length}};window.addEventListener("load",(function(){o._init()}))},function(t,e,i){var n=i(0);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){var n=i(0);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=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.")},t.exports.default=t.exports,t.exports.__esModule=!0}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=160)}({11:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i%26%23x26A0%3B︎';var n=t.images.indexOf(e);t.images.splice(n,1)}))}})),window.addEventListener("resize",(function(){t._throttle(t._build.bind(t),100,!0)})),window.addEventListener("scroll",(function(){t._throttle(t._build.bind(t),100,!1)})),setTimeout((function(){return t._build()}),0)},_calcThreshold:function(){var t=this.config.lazy_threshold.replace(/[^0-9]/g,""),e=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":e=parseFloat(getComputedStyle(document.body).fontSize)*t;break;case"rem":e=parseFloat(getComputedStyle(document.documentElement).fontSize)*t;break;case"vh":e=window.innerHeight/t*100;break;default:e=t}this.lazyThreshold=window.innerHeight+parseInt(e,10)},_getDensity:function(){if(this.density)return this.density;var t=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===t)return this.density=1,1;var e=this.deviceDensity;return"max"!==t&&"auto"!==e&&(t=parseFloat(t),e=e>Math.ceil(t)?t:e),this.density=e,e},_throttle:function(t,e,i){var n=this;this.throttle||setTimeout((function(){t(i),n.throttle=!1}),e)},_build:function(t){var e=this;this.images.forEach((function(i){!t&&i.cld_loaded||e.buildSize(i)}))},_shouldRebuild:function(t){var e=this.scaleWidth(t),i=t.getBoundingClientRect(),n="auto"!==this.density?this._getDensity():1;return i.topt.naturalWidth/n||!t.cld_loaded)},_shouldPlacehold:function(t){var e=this.scaleWidth(t),i=t.getBoundingClientRect(),n="auto"!==this.density?this._getDensity():1;return this.config.placeholder&&!t.cld_loaded&&i.top<2*this.lazyThreshold&&(e>t.naturalWidth/n||!t.cld_placehold)},scaleWidth:function(t){var e=this.config.pixel_step,i=Math.floor((t.originalWidth-t.width)/e),n=t.originalWidth-e*i;return n>t.originalWidth?n=t.originalWidth:this.config.max_widthn&&(n=this.config.min_width),n},scaleSize:function(t,e){var i=(t.originalWidth/t.originalHeight).toFixed(3),n=(t.width/t.height).toFixed(3),r=this.scaleWidth(t),o=[];t.width!==t.originalWidth&&o.push(i===n?"c_scale":"c_fill,g_auto");var a=Math.round(r/n);if(o.push("w_"+r),o.push("h_"+a),e){var s=this._getDensity();1!==s&&o.push("dpr_"+s)}return{transformation:o.join(","),nameExtension:r+"x"+a}},buildSize:function(t){this._shouldRebuild(t)?t.dataset.srcset?(t.cld_loaded=!0,t.srcset=t.dataset.srcset):t.src=this.getSizeURL(t):this._shouldPlacehold(t)&&(t.src=this.getPlaceholderURL(t))},getSizeURL:function(t){t.cld_loaded=!0;var e=this.scaleSize(t,!0),i="auto"!==this.config.image_format&&"none"!==this.config.image_format?this.config.image_format:t.dataset.format,n=t.dataset.publicId.split("/").pop();return[this.config.base_url,"images",e.transformation,t.dataset.transformations,t.dataset.publicId,n+"-"+e.nameExtension+"."+i+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL:function(t){t.cld_placehold=!0;var e=this.scaleSize(t,!1);return[this.config.base_url,"images",e.transformation,this.config.placeholder,t.dataset.publicId,"placeholder"].filter(this.empty).join("/")},empty:function(t){return 0!==t.length}};window.addEventListener("load",(function(){o._init()}))},17:function(t,e,i){var n=i(11);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},39:function(t,e,i){var n=i(11);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},40:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},41:function(t,e){t.exports=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.")},t.exports.default=t.exports,t.exports.__esModule=!0},9:function(t,e,i){var n=i(39),r=i(40),o=i(17),a=i(41);t.exports=function(t){return n(t)||r(t)||o(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0}}); \ No newline at end of file diff --git a/js/lazyload-preview.js b/js/lazyload-preview.js index ed58531eb..4f29bf8f1 100644 --- a/js/lazyload-preview.js +++ b/js/lazyload-preview.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=37)}({0:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},1:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(4),i=r.n(n);r(2),i()(console.error);var o=r(0),s=r(5);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=l(l(l({},g),d.data[t]),e),d.data[t][""]=l(l({},g[""]),d.data[t][""])},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||h(void 0,e),d.dcnpgettext(e,t,r,n,i)},f=function(e,t,r){return p(r,t,e)},c&&h(c,u),{setLocaleData:h,__:function(e,t){return p(t,void 0,e)},_x:f,_n:function(e,t,r,n){return p(n,void 0,e,t,r)},_nx:function(e,t,r,n,i){return p(i,n,e,t,r)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),m=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},2:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return a(c(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}function a(e,t){var r,n,s,a,l,c,u,d,h,p=1,f=e.length,g="";for(n=0;n=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=r:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",r=r.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+r).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?h+r+l:"0"===c?h+l+r:l+h+r)}return g}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],a=t[2],c=[];if(null===(c=i.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=i.key_access.exec(a)))s.push(c[1]);else{if(null===(c=i.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return l[e]=n}t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},37:function(e,t,r){"use strict";r.r(t);r(1);const n={cycleTime:2e3,animate:document.getElementById("lazy_loading.lazy_animate"),image:document.getElementById("lazyload-image"),placeHolders:document.querySelectorAll('[name="lazy_loading[lazy_placeholder]"]'),preloader:document.getElementById("preloader-image"),color:document.getElementById("lazy_loading.lazy_custom_color"),previewCycle:document.getElementById("preview-cycle"),progress:document.getElementById("progress-bar"),threshold:document.getElementById("lazy_loading.lazy_threshold"),currentPlaceholder:null,svg:null,running:!1,init(){this.svg=this.image.dataset.svg,this.currentPlaceholder=document.getElementById("placeholder-"+this.getPlaceholder()),[...this.placeHolders].forEach((e=>{e.addEventListener("change",(()=>this.changePlaceholder(e.value)))})),this.color.addEventListener("input",(()=>this.changePreloader())),this.animate.addEventListener("change",(()=>this.changePreloader())),this.previewCycle.addEventListener("click",(()=>this.startCycle()))},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout((()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout((()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout((()=>{setTimeout((()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()}),this.cycleTime/3)}),this.cycleTime/2)}),this.cycleTime/2)}),this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout((()=>{this.showImage()}),this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout((()=>{this.endCycle()}),this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout((()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)}),this.cycleTime)}};window.addEventListener("load",(()=>n.init())),t.default=n},4:function(e,t,r){e.exports=function(e,t){var r,n,i=0;function o(){var o,s,a=r,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function l(e){var t=function(e){for(var t,r,a,l,c=[],u=[];t=e.match(s);){for(r=t[0],(a=e.substr(0,t.index).trim())&&c.push(a);l=u.pop();){if(o[r]){if(o[r][0]===l){r=o[r][1]||r;break}}else if(i.indexOf(l)>=0||n[l]1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=l(l(l({},g),d.data[t]),e),d.data[t][""]=l(l({},g[""]),d.data[t][""])},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||h(void 0,e),d.dcnpgettext(e,t,r,n,i)},f=function(e,t,r){return p(r,t,e)},c&&h(c,u),{setLocaleData:h,__:function(e,t){return p(t,void 0,e)},_x:f,_n:function(e,t,r,n){return p(n,void 0,e,t,r)},_nx:function(e,t,r,n,i){return p(i,n,e,t,r)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),m=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},2:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return a(c(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}function a(e,t){var r,n,s,a,l,c,u,d,h,p=1,f=e.length,g="";for(n=0;n=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=r:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",r=r.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+r).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?h+r+l:"0"===c?h+l+r:l+h+r)}return g}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],a=t[2],c=[];if(null===(c=i.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=i.key_access.exec(a)))s.push(c[1]);else{if(null===(c=i.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return l[e]=n}t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},36:function(e,t,r){"use strict";r.r(t);r(1);const n={cycleTime:2e3,animate:document.getElementById("lazy_loading.lazy_animate"),image:document.getElementById("lazyload-image"),placeHolders:document.querySelectorAll('[name="lazy_loading[lazy_placeholder]"]'),preloader:document.getElementById("preloader-image"),color:document.getElementById("lazy_loading.lazy_custom_color"),previewCycle:document.getElementById("preview-cycle"),progress:document.getElementById("progress-bar"),threshold:document.getElementById("lazy_loading.lazy_threshold"),currentPlaceholder:null,svg:null,running:!1,init(){this.svg=this.image.dataset.svg,this.currentPlaceholder=document.getElementById("placeholder-"+this.getPlaceholder()),[...this.placeHolders].forEach((e=>{e.addEventListener("change",(()=>this.changePlaceholder(e.value)))})),this.color.addEventListener("input",(()=>this.changePreloader())),this.animate.addEventListener("change",(()=>this.changePreloader())),this.previewCycle.addEventListener("click",(()=>this.startCycle()))},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout((()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout((()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout((()=>{setTimeout((()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()}),this.cycleTime/3)}),this.cycleTime/2)}),this.cycleTime/2)}),this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout((()=>{this.showImage()}),this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout((()=>{this.endCycle()}),this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout((()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)}),this.cycleTime)}};window.addEventListener("load",(()=>n.init())),t.default=n},4:function(e,t,r){e.exports=function(e,t){var r,n,i=0;function o(){var o,s,a=r,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function l(e){var t=function(e){for(var t,r,a,l,c=[],u=[];t=e.match(s);){for(r=t[0],(a=e.substr(0,t.index).trim())&&c.push(a);l=u.pop();){if(o[r]){if(o[r][0]===l){r=o[r][1]||r;break}}else if(i.indexOf(l)>=0||n[l]a.ch)?l("{","}",a)||s&&l("[","]",s):s?l("[","]",s)||a&&l("{","}",a):null})),e.registerHelper("fold","import",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var i=r,o=Math.min(t.lastLine(),r+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:n.end,end:e.Pos(i,l)}}}var i,o=r.line,l=n(o);if(!l||n(o-1)||(i=n(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=n(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var i=r.line,o=n(i);if(null==o||null!=n(i-1))return null;for(var l=i;null!=n(l+1);)++l;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}(r(9))},40:function(e,t,r){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",c),t.off("viewportChange",f),t.off("fold",d),t.off("unfold",d),t.off("swapDoc",c)),i&&(t.state.foldGutter=new r(n(i)),s(t),t.on("gutterClick",u),t.on("changes",c),t.on("viewportChange",f),t.on("fold",d),t.on("unfold",d),t.on("swapDoc",c))}));var t=e.Pos;function r(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,r){for(var n=e.findMarks(t(r,0),t(r+1,0)),i=0;i=u){if(d&&a&&d.test(a.className))return;n=o(l.indicatorOpen)}}(n||a)&&e.setGutterMarker(r,l.gutter,n)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation((function(){l(e,t.from,t.to)})),r.from=t.from,r.to=t.to)}function u(e,r,n){var o=e.state.foldGutter;if(o){var l=o.options;if(n==l.gutter){var a=i(e,r);a?a.clear():e.foldCode(t(r,0),l)}}}function c(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),r.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?s(e):e.operation((function(){r.fromt.to&&(l(e,t.to,r.to),t.to=r.to)}))}),r.updateViewportTimeSpan||400)}}function d(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&nt.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==l){var f=r(t,o,c);e.on(f,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(r,n){e.signal(t,"unfold",t,r,n)})),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t,r){var n=i(e,t,"widget");if("function"==typeof n&&(n=n(r.from,r.to)),"string"==typeof n){var o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}e.newFoldFunction=function(e,r){return function(n,i){t(n,i,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",(function(e,r,n){t(this,e,r,n)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),r=0;r!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,i=r,t}function m(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return v(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return r.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=m),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var x="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;l>=0;--l){var a=e.string.charAt(l),s=x.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(f.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}}o&&!i&&(t.fatArrowAt=l)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function T(e,t,r,n,i){var o=e.cc;for(M.state=e,M.stream=i,M.marked=null,M.cc=o,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?_:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return M.marked?M.marked:"variable"==r&&L(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function N(){return O.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function D(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=W(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new H(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new H(e,t.globalVars))}}function W(e,t){if(t){if(t.block){var r=W(e,t.prev);return r?r==t.prev?t:new E(r,t.vars,!0):null}return A(e,t.vars)?t:new E(t.prev,new H(e,t.vars),!1)}return null}function F(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function E(e,t,r){this.prev=e,this.vars=t,this.block=r}function H(e,t){this.name=e,this.next=t}var P=new H("this",new H("arguments",null));function I(){M.state.context=new E(M.state.context,M.state.localVars,!1),M.state.localVars=P}function z(){M.state.context=new E(M.state.context,M.state.localVars,!0),M.state.localVars=null}function R(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function B(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function G(e){function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?O():N(t)}return t}function V(e,t){return"var"==e?N(B("vardef",t),Oe,G(";"),j):"keyword a"==e?N(B("form"),X,V,j):"keyword b"==e?N(B("form"),V,j):"keyword d"==e?M.stream.match(/^\s*$/,!1)?N():N(B("stat"),Y,G(";"),j):"debugger"==e?N(G(";")):"{"==e?N(B("}"),z,de,j,R):";"==e?N():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==j&&M.state.cc.pop()(),N(B("form"),X,V,j,Ee)):"function"==e?N(ze):"for"==e?N(B("form"),z,He,V,R,j):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form","class"==e?e:t),Ve,j)):"variable"==e?c&&"declare"==t?(M.marked="keyword",N(V)):c&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?N(tt):"type"==t?N(Be,G("operator"),me,G(";")):N(B("form"),Ne,G("{"),B("}"),de,j,j)):c&&"namespace"==t?(M.marked="keyword",N(B("form"),_,V,j)):c&&"abstract"==t?(M.marked="keyword",N(V)):N(B("stat"),oe):"switch"==e?N(B("form"),X,G("{"),B("}","switch"),z,de,j,j,R):"case"==e?N(_,G(":")):"default"==e?N(G(":")):"catch"==e?N(B("form"),I,U,V,j,R):"export"==e?N(B("stat"),Xe,j):"import"==e?N(B("stat"),Ye,j):"async"==e?N(V):"@"==t?N(_,V):O(B("stat"),_,G(";"),j)}function U(e){if("("==e)return N(je,G(")"))}function _(e,t){return $(e,t,!1)}function K(e,t){return $(e,t,!0)}function X(e){return"("!=e?O():N(B(")"),Y,G(")"),j)}function $(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?te:ee;if("("==e)return N(I,B(")"),ce(je,")"),j,G("=>"),n,R);if("variable"==e)return O(I,Ne,G("=>"),n,R)}var i=r?Z:q;return k.hasOwnProperty(e)?N(i):"function"==e?N(ze,i):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form"),Ge,j)):"keyword c"==e||"async"==e?N(r?K:_):"("==e?N(B(")"),Y,G(")"),j,i):"operator"==e||"spread"==e?N(r?K:_):"["==e?N(B("]"),et,j,i):"{"==e?fe(ae,"}",null,i):"quasi"==e?O(J,i):"new"==e?N(re(r)):N()}function Y(e){return e.match(/[;\}\)\],]/)?O():O(_)}function q(e,t){return","==e?N(Y):Z(e,t,!1)}function Z(e,t,r){var n=0==r?q:Z,i=0==r?_:K;return"=>"==e?N(I,r?te:ee,R):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(n):c&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(B(">"),ce(me,">"),j,n):"?"==t?N(_,G(":"),i):N(i):"quasi"==e?O(J,n):";"!=e?"("==e?fe(K,")","call",n):"."==e?N(le,n):"["==e?N(B("]"),Y,G("]"),j,n):c&&"as"==t?(M.marked="keyword",N(me,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(J):N(Y,Q)}function Q(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(J)}function ee(e){return C(M.stream,M.state),O("{"==e?V:_)}function te(e){return C(M.stream,M.state),O("{"==e?V:K)}function re(e){return function(t){return"."==t?N(e?ie:ne):"variable"==t&&c?N(Le,e?Z:q):O(e?K:_)}}function ne(e,t){if("target"==t)return M.marked="keyword",N(q)}function ie(e,t){if("target"==t)return M.marked="keyword",N(Z)}function oe(e){return":"==e?N(j,V):O(q,G(";"),j)}function le(e){if("variable"==e)return M.marked="property",N()}function ae(e,t){return"async"==e?(M.marked="property",N(ae)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?N(se):(c&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),N(ue))):"number"==e||"string"==e?(M.marked=a?"property":M.style+" property",N(ue)):"jsonld-keyword"==e?N(ue):c&&F(t)?(M.marked="keyword",N(ae)):"["==e?N(_,he,G("]"),ue):"spread"==e?N(K,ue):"*"==t?(M.marked="keyword",N(ae)):":"==e?O(ue):void 0;var r}function se(e){return"variable"!=e?O(ue):(M.marked="property",N(ze))}function ue(e){return":"==e?N(K):"("==e?O(ze):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var l=M.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),N((function(r,n){return r==t||n==t?O():O(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?O(e):N(G(t))}return function(r,i){return r==t||i==t?N():O(e,n)}}function fe(e,t,r){for(var n=3;n"),me):"quasi"==e?O(xe,Se):void 0}function ye(e){if("=>"==e)return N(me)}function be(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(be):O(we,be)}function we(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",N(we)):"?"==t||"number"==e||"string"==e?N(we):":"==e?N(me):"["==e?N(G("variable"),pe,G("]"),we):"("==e?O(Re,we):e.match(/[;\}\)\],]/)?void 0:N()}function xe(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(xe):N(me,Ce)}function Ce(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(xe)}function ke(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?N(ke):":"==e?N(me):"spread"==e?N(ke):O(me)}function Se(e,t){return"<"==t?N(B(">"),ce(me,">"),j,Se):"|"==t||"."==e||"&"==t?N(me):"["==e?N(me,G("]"),Se):"extends"==t||"implements"==t?(M.marked="keyword",N(me)):"?"==t?N(me,G(":"),me):void 0}function Le(e,t){if("<"==t)return N(B(">"),ce(me,">"),j,Se)}function Te(){return O(me,Me)}function Me(e,t){if("="==t)return N(me)}function Oe(e,t){return"enum"==t?(M.marked="keyword",N(tt)):O(Ne,he,We,Fe)}function Ne(e,t){return c&&F(t)?(M.marked="keyword",N(Ne)):"variable"==e?(D(t),N()):"spread"==e?N(Ne):"["==e?fe(De,"]"):"{"==e?fe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?N(Ne):"}"==e?O():"["==e?N(_,G("]"),G(":"),Ae):N(G(":"),Ne,We)):(D(t),N(We))}function De(){return O(Ne,We)}function We(e,t){if("="==t)return N(K)}function Fe(e){if(","==e)return N(Oe)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(B("form","else"),V,j)}function He(e,t){return"await"==t?N(He):"("==e?N(B(")"),Pe,j):void 0}function Pe(e){return"var"==e?N(Oe,Ie):"variable"==e?N(Ie):O(Ie)}function Ie(e,t){return")"==e?N():";"==e?N(Ie):"in"==t||"of"==t?(M.marked="keyword",N(_,Ie)):O(_,Ie)}function ze(e,t){return"*"==t?(M.marked="keyword",N(ze)):"variable"==e?(D(t),N(ze)):"("==e?N(I,B(")"),ce(je,")"),j,ge,V,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,ze):void 0}function Re(e,t){return"*"==t?(M.marked="keyword",N(Re)):"variable"==e?(D(t),N(Re)):"("==e?N(I,B(")"),ce(je,")"),j,ge,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,Re):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(M.marked="type",N(Be)):"<"==t?N(B(">"),ce(Te,">"),j):void 0}function je(e,t){return"@"==t&&N(_,je),"spread"==e?N(je):c&&F(t)?(M.marked="keyword",N(je)):c&&"this"==e?N(he,We):O(Ne,he,We)}function Ge(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return D(t),N(Ue)}function Ue(e,t){return"<"==t?N(B(">"),ce(Te,">"),j,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(M.marked="keyword"),N(c?me:_,Ue)):"{"==e?N(B("}"),_e,j):void 0}function _e(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&F(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",N(_e)):"variable"==e||"keyword"==M.style?(M.marked="property",N(Ke,_e)):"number"==e||"string"==e?N(Ke,_e):"["==e?N(_,he,G("]"),Ke,_e):"*"==t?(M.marked="keyword",N(_e)):c&&"("==e?O(Re,_e):";"==e||","==e?N(_e):"}"==e?N():"@"==t?N(_,_e):void 0}function Ke(e,t){if("!"==t)return N(Ke);if("?"==t)return N(Ke);if(":"==e)return N(me,We);if("="==t)return N(K);var r=M.state.lexical.prev;return O(r&&"interface"==r.info?Re:ze)}function Xe(e,t){return"*"==t?(M.marked="keyword",N(Qe,G(";"))):"default"==t?(M.marked="keyword",N(_,G(";"))):"{"==e?N(ce($e,"}"),Qe,G(";")):O(V)}function $e(e,t){return"as"==t?(M.marked="keyword",N(G("variable"))):"variable"==e?O(K,$e):void 0}function Ye(e){return"string"==e?N():"("==e?O(_):"."==e?O(q):O(qe,Ze,Qe)}function qe(e,t){return"{"==e?fe(qe,"}"):("variable"==e&&D(t),"*"==t&&(M.marked="keyword"),N(Je))}function Ze(e){if(","==e)return N(qe,Ze)}function Je(e,t){if("as"==t)return M.marked="keyword",N(qe)}function Qe(e,t){if("from"==t)return M.marked="keyword",N(_)}function et(e){return"]"==e?N():O(ce(K,"]"))}function tt(){return O(B("form"),Ne,G("{"),B("}"),ce(rt,"}"),j,j)}function rt(){return O(Ne,We)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new E(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",T(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=m)return 0;var i,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==j)s=s.prev;else if(c!=Ee&&c!=R)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==q||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(nt(t,n)?l||o:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:it,skipExpression:function(t){T(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(9))},44:function(e,t,r){"use strict";r.r(t);var n=r(9),i=r.n(n);r(39),r(40),r(42);const o={init(){document.addEventListener("DOMContentLoaded",(function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data");i()(e,{value:JSON.stringify(CLD_METADATA,null," "),lineNumbers:!0,theme:"material",readOnly:!0,mode:{name:"javascript",json:!0},matchBrackets:!0,foldGutter:!0,htmlMode:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],viewportMargin:50}).setSize(null,600)}))}};o.init();t.default=o},9:function(e,t,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,a=l&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,s=!0);var C=y&&(u||f&&(null==x||x<12.11)),k=r||l&&a>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return M(e).appendChild(t)}function N(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(H=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function $(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var ue=null;function ce(e,t,r){var n;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ue=i)}return null!=n?n:ue}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){Ce(e),ke(e)}function Te(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ne,Ae=function(){if(l&&a<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Oe){var t=N("span","​");O(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var r=Oe?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function We(e){if(null!=Ne)return Ne;var t=O(e,document.createTextNode("AخA")),r=L(t,0,1).getBoundingClientRect(),n=L(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Ne=n.right-r.right<3)}var Fe,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(Fe=N("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Ie=null;function ze(e){if(null!=Ie)return Ie;var t=O(e,N("span","x")),r=t.getBoundingClientRect(),n=L(t,0,1).getBoundingClientRect();return Ie=Math.abs(r.left-n.left)>1}var Re={},Be={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function Ge(e,t){Be[e]=t}function Ve(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Ve(t);var r=Re[t.name];if(!r)return Ue(e,"text/plain");var n=r(e,t);if(_e.hasOwnProperty(t.name)){var i=_e[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var _e={};function Ke(e,t){I(t,_e.hasOwnProperty(e)?_e[e]:_e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ot(r,Ze(e,r).text.length):ht(t,Ze(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?ot(e.line,t):r<0?ot(e.line,0):e}function pt(e,t){for(var r=[],n=0;n=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,r,n){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,a=function(n){r.baseTokens=i;var a=e.state.overlays[n],s=1,u=0;r.state=!0,Tt(e,t.text,a.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Xe(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new vt(n,!0,t);var o=Mt(e,t,r),l=o>n.first&&Ze(n,o-1).stateAfter,a=l?vt.fromSaved(n,l,o):new vt(n,Ye(n.mode),o);return n.iter(o,t,(function(r){wt(e,r.text,a);var n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,r){return t instanceof gt?new vt(e,Xe(e.mode,t.state),r,t.lookAhead):new vt(e,Xe(e.mode,t),r)},vt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function St(e,t,r,n){var i,o,l=e.doc,a=l.mode,s=Ze(l,(t=dt(l,t)).line),u=bt(e,t.line,r),c=new qe(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(a=!1,l&&wt(e,t,n,f.pos),f.pos=t.length,s=null):s=Lt(Ct(r,f,n.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;ul;--a){if(a<=o.first)return o.first;var s=Ze(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof gt?u.lookAhead:0)<=o.modeFrontier))return a;var c=z(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=a-1,n=c)}return i}function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof gt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new Ft(l,o.from,a?null:o.to))}}return n}function zt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var b=0;b0)){var c=[s,1],f=lt(u.from,a.from),d=lt(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Kt(r,o.marker)<0)&&(r=o.marker)}return r}function Zt(e,t,r,n,i){var o=Ze(e,t),l=At&&o.markedSpans;if(l)for(var a=0;a=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.to,r)>=0:lt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.from,n)<=0:lt(u.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function er(e){for(var t,r;t=Yt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function tr(e,t){var r=Ze(e,t),n=Jt(r);return r==n?t:tt(n)}function rr(e,t){if(t>e.lastLine())return t;var r,n=Ze(e,t);if(!nr(e,n))return t;for(;r=Yt(n);)n=r.find(1,!0).line;return tt(n)+1}function nr(e,t){var r=At&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function ur(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&et(e,i)}function cr(e){e.parent=null,Gt(e)}sr.prototype.lineNo=function(){return tt(this)},xe(sr);var fr={},dr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dr:fr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function pr(e,t){var r=A("span",null,null,s?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=vr,We(e.display.measure)&&(l=de(o,e.doc.direction))&&(n.addToken=yr(n.addToken,l)),n.map=[],wr(o,n,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function gr(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?mr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(N("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(N("span",$(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(N("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(N("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||d||o||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=N("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function mr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u);d++);if(f.to>=c)return e(r,n,i,o,l,a,s);e(r,n.slice(0,f.to-u),i,o,null,a,s),o=null,n=n.slice(f.to-u),u=f.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function wr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!f||Kt(f.marker,C)<0)&&(f=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=h)break;for(var T=Math.min(h,m);;){if(v){var M=p+v.length;if(!f){var O=M>T?v.slice(0,T-p):v;t.addToken(t,O,l?l+s:s,c,p+O.length==m?u:"",a,d)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=hr(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Zr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=tt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=pr(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}function Qr(e,t,r,n){return rn(e,tn(e,t),r,n)}function en(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(n=e[u+2],a==s&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==s-a)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=ln(t.map,r,n),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(f=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+An(e.display),top:p.top,bottom:p.bottom}:on}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,r){return l(r?e-1:e,1==a[t].level!=r)}var f=ce(a,s,u),d=ue,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function wn(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=An(e.display)*t.ch);var n=Ze(e.doc,t.line),i=or(n)+Ur(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=ot(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Cn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=rt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ze(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ze(n,i);;){var a=Tn(e,l,i,t,r),s=qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=Ze(n,i=u.line)}}function kn(e,t,r,n){n-=gn(t);var i=t.text.length,o=ae((function(t){return rn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=ae((function(t){return rn(e,r,t).top>n}),o,i)}}function Sn(e,t,r,n){return r||(r=tn(e,t)),kn(e,t,r,vn(e,t,rn(e,r,n),"line").top)}function Ln(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Tn(e,t,r,n,i){i-=or(t);var o=tn(e,t),l=gn(t),a=0,s=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?On:Mn)(e,t,r,o,c,n,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,v=ae((function(t){var r=rn(e,o,t);return r.top+=l,r.bottom+=l,!!Ln(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),a,s),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return xn(r,v=le(t.text,v,1),h,m,n-d)}function Mn(e,t,r,n,i,o,l){var a=ae((function(a){var s=i[a],u=1!=s.level;return Ln(bn(e,ot(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=bn(e,ot(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Ln(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function On(e,t,r,n,i,o,l){var a=kn(e,t,n,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d=u||h.to<=s)){var p=rn(e,n,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=pg)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==nn){nn=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nn.appendChild(document.createTextNode("x")),nn.appendChild(N("br"));nn.appendChild(document.createTextNode("x"))}O(e.measure,nn);var r=nn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function An(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;r[a]=o.offsetLeft+o.clientLeft+i,n[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fn(e){var t=Nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/An(e.display)-3);return function(i){if(nr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=Ze(e.doc,u.line).text).length==u.ch){var c=z(s,s.length,e.options.tabSize)-s.length;u=ot(u.line,Math.max(0,Math.round((o-Kr(e.display).left)/An(e.display))-c))}return u}function Pn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&tr(e.doc,t)i.viewFrom?Rn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Rn(e);else if(t<=i.viewFrom){var o=Bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Rn(e)}else if(r>=i.viewTo){var l=Bn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Rn(e)}else{var a=Bn(e,t,t,-1),s=Bn(e,r,r+n,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Cr(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Rn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Pn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bn(e,t,r,n){var i,o=Pn(e,t),l=e.display.view;if(!At||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;tr(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function jn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Cr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Cr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Pn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var a=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Kn(e,t){return e.top-t.top||e.left-t.left}function Xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Kr(e.display),a=l.left,s=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=Ze(i,t),d=f.text.length;function h(r,n){return yn(e,ot(t,r),"div",f,n)}function p(t,r,n){var i=Sn(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=de(f,i.direction);return se(g,r||0,null==n?d:n,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,x=0==f,C=!g||f==g.length-1;if(y.top-m.top<=3){var k=(u?w:b)&&C,S=(u?b:w)&&x?a:(v?m:y).left,L=k?s:(v?y:m).right;c(S,m.top,L-S,m.bottom)}else{var T,M,O,N;v?(T=u&&b&&x?a:m.left,M=u?s:p(e,i,"before"),O=u?a:p(t,i,"after"),N=u&&w&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&x?s:m.right,O=!u&&w&&C?a:y.left,N=u?p(t,i,"after"):s),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zn(e))}function qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Zn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(d/An(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ei(e){if(e.widgets)for(var t=0;t=l&&(o=rt(t,or(Ze(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ri(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ur(e.display))+"px;\n height: "+(t.bottom-t.top+Xr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ot(t.line,t.ch+1,"before"):t,t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=bn(e,t),s=r&&r!=t?bn(e,r):a,u=oi(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(di(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(pi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function ii(e,t){var r=oi(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null!=r.scrollLeft&&pi(e,r.scrollLeft)}function oi(e,t){var r=e.display,n=Nn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Yr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+_r(r),s=t.topa-n;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,h=$r(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function li(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,fi(e,wn(e,t.from),wn(e,t.to),t.margin))}function fi(e,t,r,n){var i=oi(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Vi(e,{top:t}),hi(e,t,!0),r&&Vi(e),Hi(e,100))}function hi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Xi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_r(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Xr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var vi=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},vi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function yi(e,t){t||(t=gi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Qn(e),bi(e,gi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var wi={native:vi,null:mi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ci=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ci,markArrays:null},Sr(e.curOp)}function Si(e){var t=e.curOp;t&&Tr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function Oi(e){var t=e.cm,r=t.display;e.updatedDisplay&&Qn(t),e.barMeasure=gi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Xr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Xe(t.mode,n.state):null,s=mt(e,o,n,!0);a&&(n.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dr)return Hi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Di(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;$i(e)&&(Rn(e),t.dims=Dn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),At&&(o=tr(e.doc,o),l=rr(e.doc,l));var a=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jn(e,o,l),r.viewOffset=or(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!a&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ri(e);return s>4&&(r.lineDiv.style.display="none"),Ui(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Bi(u),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Hi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ti(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+_r(e.display)-Yr(e),r.top)}),t.visible=ti(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ji(e,t))break;Qn(e);var i=gi(e);Vn(e),yi(e,i),Ki(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Vi(e,t){var r=new Ii(e,t);if(ji(e,r)){Qn(e),Gi(e,r);var n=gi(e);Vn(e),yi(e,n),Ki(e,n),r.finish()}}function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function a(t){var r=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,f=0;f-1&&(h=!1),Ar(e,d,c,r)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),l=d.node.nextSibling}else{var p=zr(e,d,c,r);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}function _i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Or(e,"gutterChanged",e)}function Ki(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xr(e)+"px"}function Xi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lu.clientWidth,d=u.scrollHeight>u.clientHeight;if(i&&c||o&&d){if(o&&y&&s)e:for(var h=t.target,p=a.view;h!=u;h=h.parentNode)for(var g=0;g=0&<(e,n.to())<=0)return r}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function lo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=B(t,i);for(var o=1;o0:s>=0){var u=ct(a.from(),l.from()),c=ut(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=r&&--r,t.splice(--o,2,new oo(f?c:u,f?u:c))}}return new io(t,r)}function ao(e,t){return new io([new oo(e,t||e)],0)}function so(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),ot(r,n)}function co(e,t){for(var r=[],n=0;n1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Or(e,"change",e,t)}function yo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function To(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Lo(i,i.lastOp==n)))l=Y(o.changes),0==lt(t.from,t.to)&&0==lt(t.from,l.to)?l.to=so(t):o.changes.push(ko(e,t));else{var s=Y(i.done);for(s&&s.ranges||No(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||me(e,"historyAdded")}function Mo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Oo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Mo(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&So(i.undone)}function No(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,r=0;r-1&&(Y(a)[f]=u[f],delete u[f])}}}return n}function Ho(e,t,r,n){if(n){var i=e.anchor;if(r){var o=lt(t,i)<0;o!=lt(r,i)<0?(i=t,t=r):o!=lt(t,r)<0&&(t=r)}return new oo(i,t)}return new oo(r||t,t)}function Po(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new io([Ho(e.sel.primary(),t,r,i)],0),n)}function Io(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(me(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(f=Yo(e,f,-n,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Xo(e,f,t,n,i)}var h=s.find(n<0?-1:1);return(n<0?u:c)&&(h=Yo(e,h,n,h.line==t.line?o:null)),h?Xo(e,h,t,n,i):null}}return t}function $o(e,t,r,n,i){var o=n||1,l=Xo(e,t,r,o,i)||!i&&Xo(e,t,r,o,!0)||Xo(e,t,r,-o,i)||!i&&Xo(e,t,r,-o,!0);return l||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,ot(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=co(e,t);To(e,t,r,e.cm?e.cm.curOp.id:NaN),rl(e,t,r,Rt(e,t));var n=[];yo(e,(function(e,r){r||-1!=B(n,e.history)||(al(e.history,t),n.push(e.history)),rl(e,t,null,Rt(e,t))}))}}function el(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--h){var p=d(h);if(p)return p.v}}}}function tl(e,t){if(0!=t&&(e.first+=t,e.sel=new io(q(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){In(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=co(e,t)),e.cm?nl(e.cm,t,n):mo(e,t,n),Vo(e,r,V),e.cantEdit&&$o(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function nl(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=tt(Jt(Ze(n,o.line))),n.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&be(e),mo(n,t,r,Fn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=lr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Ot(n,o.line),Hi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?In(e):o.line!=l.line||1!=t.text.length||vo(e.doc,t)?In(e,o.line,l.line+1,u):zn(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Or(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function il(e,t,r,n,i){var o;n||(n=r),lt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ol(e,t,r,n){r1||!(this.children[0]instanceof ul))){var a=[];this.collapse(a),this.children=[new ul(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Zt(e,t.line,t,r,o)||t.line!=r.line&&Zt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wt()}o.addToHistory&&To(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&Jt(n)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&et(n,0),Pt(n,new Ft(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){nr(e,t)&&et(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)In(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)zn(u,c,"text");o.atomic&&_o(u.doc),Or(u,"markerAdded",u,o)}return o}gl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),we(this,"clear")){var r=this.find();r&&Or(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&In(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_o(e.doc)),e&&Or(e,"markerCleared",e,this,n,i),t&&Si(e),this.parent&&this.parent.clear()}},gl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)Jo(this,n[s]);a?jo(this,a):this.cm&&ai(this.cm)})),undo:Ei((function(){el(this,"undo")})),redo:Ei((function(){el(this,"redo")})),undoSelection:Ei((function(){el(this,"undo",!0)})),redoSelection:Ei((function(){el(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),dt(this,ot(r,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vo(t.doc,ao(r,r)),d)for(var h=0;h=0;t--)il(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Xl(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $l(e,t,r){var n=Xl(e,t.ch,r);return null==n?null:new ot(t.line,n,r<0?"after":"before")}function Yl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var l,a=i<0?Y(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=tn(t,r);l=i<0?r.text.length-1:0;var c=rn(t,u,l).top;l=ae((function(e){return rn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=Xl(r,l,1))}else l=i<0?a.to:a.from;return new ot(n,l,s)}}return new ot(n,i<0?r.text.length:0,i<0?"before":"after")}function ql(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return $l(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&d>=c.begin)){var h=f?"before":"after";return new ot(r.line,d,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ot(r.line,s(e,1),"before"):new ot(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?n.begin:s(n.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}zl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zl.default=y?zl.macDefault:zl.pcDefault;var Zl={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Kl(e,(function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ze(e.doc,i.line-1).text;l&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ot(i.line-1,l.length-1),i,"+transpose"))}r.push(new oo(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(lt((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(lt(i.to(),t)>0||t.xRel<0)?Ca(e,n,t,o):Sa(e,n,t,o)}function Ca(e,t,r,n){var i=e.display,o=!1,u=Wi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:qn(e)),ve(i.wrapper.ownerDocument,"mouseup",u),ve(i.wrapper.ownerDocument,"mousemove",c),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",u),o||(Ce(t),n.addNew||Po(e.doc,r,null,null,n.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ka(e,t,r){if("char"==r)return new oo(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new oo(ot(t.line,0),dt(e.doc,ot(t.line+1,0)));var n=r(e,t);return new oo(n.from,n.to)}function Sa(e,t,r,n){l&&qn(e);var i=e.display,o=e.doc;Ce(t);var a,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new oo(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new oo(r,r)),r=Hn(e,t,!0,!0),s=-1;else{var f=ka(e,r,n.unit);a=n.extend?Ho(a,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=c.length,Go(o,lo(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,lo(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):zo(o,s,a,U):(s=0,Go(o,new io([a],0),U),u=o.sel);var d=r;function h(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=z(Ze(o,r.line).text,r.ch,l),f=z(Ze(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Ze(o,g).text,y=K(m,h,l);h==p?i.push(new oo(ot(g,y),ot(g,y))):m.length>y&&i.push(new oo(ot(g,y),ot(g,K(m,p,l))))}i.length||i.push(new oo(r,r)),Go(o,lo(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=ka(e,t,n.unit),C=w.anchor;lt(x.anchor,C)>0?(b=x.head,C=ct(w.from(),x.anchor)):(b=x.anchor,C=ut(w.to(),x.head));var k=u.ranges.slice(0);k[s]=La(e,new oo(dt(o,C),b)),Go(o,lo(e,k,s),U)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var r=++g,l=Hn(e,t,!0,"rectangle"==n.unit);if(l)if(0!=lt(l,d)){e.curOp.focus=W(),h(l);var a=ti(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Wi(e,(function(){g==r&&(i.scroller.scrollTop+=s,v(t))})),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Wi(e,(function(e){0!==e.buttons&&Me(e)?v(e):m(e)})),b=Wi(e,m);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}function La(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var l=ce(o,r.ch,r.sticky),a=o[l];if(a.from!=r.ch&&a.to!=r.ch)return t;var s,u=l+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new oo(new ot(r.line,p,g),n)}function Ta(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ce(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!we(e,r))return Se(t);o-=a.top-l.viewOffset;for(var s=0;s=i)return me(e,r,e,rt(e.doc,o),e.display.gutterSpecs[s].className,t),Se(t)}}function Ma(e,t){return Ta(e,t,"gutterClick",!0)}function Oa(e,t){Vr(e.display,t)||Na(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Na(e,t){return!!we(e,"gutterContextMenu")&&Ta(e,t,"gutterContextMenu",!1)}function Aa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dn(e)}va.prototype.compare=function(e,t,r){return this.time+ga>e&&0==lt(t,this.pos)&&r==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Wa={},Fa={};function Ea(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Da&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Da,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),r("indentUnit",2,po,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){go(e),dn(e),In(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ot(n,o))}n++}));for(var i=r.length-1;i>=0;i--)il(e.doc,t,r[i],ot(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Da&&e.refresh()})),r("specialCharPlaceholder",gr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Aa(e),Zi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=_l(t),i=r!=Da&&_l(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Pa,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Zi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Wn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Zi(e)}),!0),r("firstLineNumber",1,Zi,!0),r("lineNumberFormatter",(function(e){return e}),Zi,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ha),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,go,!0),r("addModeClass",!1,go,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,go,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Ha(e,t,r){if(!t!=!(r&&r!=Da)){var n=e.display.dragFunctions,i=t?pe:ve;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Pa(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),ar(e)),En(e),In(e),dn(e),setTimeout((function(){return yi(e)}),100)}function Ia(e,t){var r=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?I(t):{},I(Wa,t,!1);var n=t.value;"string"==typeof n?n=new kl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ia.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Aa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),za(this),Dl(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Zn(r)}),20):Jn(this),Fa)Fa.hasOwnProperty(u)&&Fa[u](this,t[u],Da);$i(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ma(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new oo(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new oo(ot(l.line,0),dt(e.doc,ot(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(r)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Le(t)},over:function(t){ye(e,t)||(Ml(e,t),Le(t))},start:function(t){return Tl(e,t)},drop:Wi(e,Ll),leave:function(t){ye(e,t)||Ol(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return fa.call(e,t)})),pe(u,"keydown",Wi(e,ua)),pe(u,"keypress",Wi(e,da)),pe(u,"focus",(function(t){return Zn(e,t)})),pe(u,"blur",(function(t){return Jn(e,t)}))}Ia.defaults=Wa,Ia.optionHandlers=Fa;var Ra=[];function Ba(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var l=e.options.tabSize,a=Ze(o,t),s=z(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==r&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Ze(o,t-1).text,null,l):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(dl,s=Ee(t),u=null;if(a&&n.ranges.length>1)if(ja&&ja.text.join("\n")==t){if(n.ranges.length%ja.text.length==0){u=[];for(var c=0;c=0;d--){var h=n.ranges[d],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=ot(p.line,p.ch-r):e.state.overwrite&&!a?g=ot(g.line,Math.min(Ze(o,g.line).text.length,g.ch+Y(s).length)):a&&ja&&ja.lineWise&&ja.text.join("\n")==s.join("\n")&&(p=g=ot(p.line,0)));var v={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jo(e.doc,v),Or(e,"inputRead",e,v)}t&&!a&&_a(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ua(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Va(t,r,0,null,"paste")})),!0}function _a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Ba(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ba(e,i.head.line,"smart"));l&&Or(e,"electricInput",e,i.head.line)}}}function Ka(e){for(var t=[],r=[],n=0;nr&&(Ba(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),l=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&zo(this.doc,n,new oo(o,u[n].to()),V)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,r=yt(this,Ze(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Ze(this.doc,e)}else n=e;return vn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-or(n):0)},defaultTextHeight:function(){return Nn(this.display)},defaultCharWidth:function(){return An(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=bn(this,dt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ii(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Fi(ua),triggerOnKeyPress:Fi(da),triggerOnKeyUp:fa,triggerOnMouseDown:Fi(ya),execCommand:function(e){if(Zl.hasOwnProperty(e))return Zl[e].call(null,this)},triggerElectric:Fi((function(e){_a(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&En(this),me(this,"refresh",this)})),swapDoc:Fi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),dn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Or(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function qa(e,t,r,n,i){var o=t,l=r,a=Ze(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ot(r,t.ch,t.sticky),a=Ze(e,r))}function c(o){var l;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ot(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(f?2:1))),-r)}}else l=i?ql(e.cm,a,t,r):$l(a,t,r);if(null==l){if(o||!u())return!1;t=Yl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var g=a.text.charAt(t.ch)||"\n",v=re(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!p))break}var m=$o(e,t,o,l,!0);return at(o,m)&&(m.hitSide=!0),m}function Za(e,t,r,n){var i,o,l=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Nn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Cn(e,a,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qa(e,t){var r=en(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=Zr(r,n,t.line),o=de(n,e.doc.direction),l="left";o&&(l=ce(o,t.ch)%2?"right":"left");var a=ln(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function es(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ts(e,t){return t&&(e.bad=!0),e}function rs(e,t,r,n,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(ot(n,0),ot(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(Je(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&Qa(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=ot(l.line-1,Ze(n.doc,l.line-1).length)),a.ch==Ze(n.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Pn(n,l.line))?(t=tt(i.view[0].line),r=i.view[0].node):(t=tt(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Pn(n,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(rs(n,r,u,t,s)),d=Je(n.doc,ot(t,0),ot(s,Ze(n.doc,s).text.length));f.length>1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);hl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=ot(t,h),C=ot(s,d.length?Y(d).length-p:0);return f.length>1||f[0]||lt(x,C)?(il(n.doc,f,x,C,"+input"),!0):void 0},Ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ja.prototype.reset=function(){this.forceCompositionEnd()},Ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return In(e.cm)}))},Ja.prototype.setUneditable=function(e){e.contentEditable="false"},Ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Wi(this.cm,Va)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ja.prototype.onContextMenu=function(){},Ja.prototype.resetPosition=function(){},Ja.prototype.needsContentAttribute=!0;var os=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};function ls(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=a.getValue()}var i;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function as(e){e.off=ve,e.on=pe,e.wheelEventPixels=ro,e.Doc=kl,e.splitLines=Ee,e.countColumn=z,e.findColumn=K,e.isWordChar=te,e.Pass=G,e.signal=me,e.Line=sr,e.changeEnd=so,e.scrollbarModel=wi,e.Pos=ot,e.cmpPos=lt,e.modes=Re,e.mimeModes=Be,e.resolveMode=Ve,e.getMode=Ue,e.modeExtensions=_e,e.extendMode=Ke,e.copyState=Xe,e.startState=Ye,e.innerMode=$e,e.commands=Zl,e.keyMap=zl,e.keyName=Ul,e.isModifierKey=Gl,e.lookupKey=jl,e.normalizeKeyMap=Bl,e.StringStream=qe,e.SharedTextMarker=ml,e.TextMarker=gl,e.LineWidget=fl,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Le,e.addClass=F,e.contains=D,e.rmClass=T,e.keyNames=El}os.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(n,e)){if(n.somethingSelected())Ga({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ka(n);Ga({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(i,"paste",(function(e){ye(n,e)||Ua(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!ye(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},os.prototype.createField=function(e){this.wrapper=$a(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Un(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},os.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},os.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&H(this.textarea),l&&a>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},os.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},os.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Hn(r,e),u=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Wi(r,Go)(r.doc,ao(o),V);var c,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),n.input.focus(),s&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&a>=9&&v(),k){Le(e);var g=function(){ve(window,"mouseup",g),setTimeout(m,20)};pe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,l&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Wi(r,qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},os.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1,Ea(Ia),Ya(Ia);var ss="iter insert remove copy getEditor constructor".split(" ");for(var us in kl.prototype)kl.prototype.hasOwnProperty(us)&&B(ss,us)<0&&(Ia.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(kl.prototype[us]));return xe(kl),Ia.inputStyles={textarea:os,contenteditable:Ja},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),je.apply(this,arguments)},Ia.defineMIME=Ge,Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){kl.prototype[e]=t},Ia.fromTextArea=ls,as(Ia),Ia.version="5.65.0",Ia}()}}); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=45)}({38:function(e,t,r){!function(e){"use strict";e.registerHelper("fold","brace",(function(t,r){var n=r.line,i=t.getLine(n);function o(o){for(var l,a=r.ch,s=0;;){var u=a<=0?-1:i.lastIndexOf(o,a-1);if(-1!=u){if(1==s&&ua.ch)?l("{","}",a)||s&&l("[","]",s):s?l("[","]",s)||a&&l("{","}",a):null})),e.registerHelper("fold","import",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var i=r,o=Math.min(t.lastLine(),r+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:n.end,end:e.Pos(i,l)}}}var i,o=r.line,l=n(o);if(!l||n(o-1)||(i=n(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=n(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var i=r.line,o=n(i);if(null==o||null!=n(i-1))return null;for(var l=i;null!=n(l+1);)++l;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}(r(9))},39:function(e,t,r){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",c),t.off("viewportChange",f),t.off("fold",d),t.off("unfold",d),t.off("swapDoc",c)),i&&(t.state.foldGutter=new r(n(i)),s(t),t.on("gutterClick",u),t.on("changes",c),t.on("viewportChange",f),t.on("fold",d),t.on("unfold",d),t.on("swapDoc",c))}));var t=e.Pos;function r(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,r){for(var n=e.findMarks(t(r,0),t(r+1,0)),i=0;i=u){if(d&&a&&d.test(a.className))return;n=o(l.indicatorOpen)}}(n||a)&&e.setGutterMarker(r,l.gutter,n)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation((function(){l(e,t.from,t.to)})),r.from=t.from,r.to=t.to)}function u(e,r,n){var o=e.state.foldGutter;if(o){var l=o.options;if(n==l.gutter){var a=i(e,r);a?a.clear():e.foldCode(t(r,0),l)}}}function c(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),r.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?s(e):e.operation((function(){r.fromt.to&&(l(e,t.to,r.to),t.to=r.to)}))}),r.updateViewportTimeSpan||400)}}function d(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&nt.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==l){var f=r(t,o,c);e.on(f,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(r,n){e.signal(t,"unfold",t,r,n)})),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t,r){var n=i(e,t,"widget");if("function"==typeof n&&(n=n(r.from,r.to)),"string"==typeof n){var o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}e.newFoldFunction=function(e,r){return function(n,i){t(n,i,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",(function(e,r,n){t(this,e,r,n)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),r=0;r!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,i=r,t}function m(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return v(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return r.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=m),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var x="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;l>=0;--l){var a=e.string.charAt(l),s=x.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(f.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}}o&&!i&&(t.fatArrowAt=l)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function T(e,t,r,n,i){var o=e.cc;for(M.state=e,M.stream=i,M.marked=null,M.cc=o,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?_:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return M.marked?M.marked:"variable"==r&&L(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function N(){return O.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function D(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=W(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new H(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new H(e,t.globalVars))}}function W(e,t){if(t){if(t.block){var r=W(e,t.prev);return r?r==t.prev?t:new E(r,t.vars,!0):null}return A(e,t.vars)?t:new E(t.prev,new H(e,t.vars),!1)}return null}function F(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function E(e,t,r){this.prev=e,this.vars=t,this.block=r}function H(e,t){this.name=e,this.next=t}var P=new H("this",new H("arguments",null));function I(){M.state.context=new E(M.state.context,M.state.localVars,!1),M.state.localVars=P}function z(){M.state.context=new E(M.state.context,M.state.localVars,!0),M.state.localVars=null}function R(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function B(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function G(e){function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?O():N(t)}return t}function V(e,t){return"var"==e?N(B("vardef",t),Oe,G(";"),j):"keyword a"==e?N(B("form"),X,V,j):"keyword b"==e?N(B("form"),V,j):"keyword d"==e?M.stream.match(/^\s*$/,!1)?N():N(B("stat"),Y,G(";"),j):"debugger"==e?N(G(";")):"{"==e?N(B("}"),z,de,j,R):";"==e?N():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==j&&M.state.cc.pop()(),N(B("form"),X,V,j,Ee)):"function"==e?N(ze):"for"==e?N(B("form"),z,He,V,R,j):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form","class"==e?e:t),Ve,j)):"variable"==e?c&&"declare"==t?(M.marked="keyword",N(V)):c&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?N(tt):"type"==t?N(Be,G("operator"),me,G(";")):N(B("form"),Ne,G("{"),B("}"),de,j,j)):c&&"namespace"==t?(M.marked="keyword",N(B("form"),_,V,j)):c&&"abstract"==t?(M.marked="keyword",N(V)):N(B("stat"),oe):"switch"==e?N(B("form"),X,G("{"),B("}","switch"),z,de,j,j,R):"case"==e?N(_,G(":")):"default"==e?N(G(":")):"catch"==e?N(B("form"),I,U,V,j,R):"export"==e?N(B("stat"),Xe,j):"import"==e?N(B("stat"),Ye,j):"async"==e?N(V):"@"==t?N(_,V):O(B("stat"),_,G(";"),j)}function U(e){if("("==e)return N(je,G(")"))}function _(e,t){return $(e,t,!1)}function K(e,t){return $(e,t,!0)}function X(e){return"("!=e?O():N(B(")"),Y,G(")"),j)}function $(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?te:ee;if("("==e)return N(I,B(")"),ce(je,")"),j,G("=>"),n,R);if("variable"==e)return O(I,Ne,G("=>"),n,R)}var i=r?Z:q;return k.hasOwnProperty(e)?N(i):"function"==e?N(ze,i):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form"),Ge,j)):"keyword c"==e||"async"==e?N(r?K:_):"("==e?N(B(")"),Y,G(")"),j,i):"operator"==e||"spread"==e?N(r?K:_):"["==e?N(B("]"),et,j,i):"{"==e?fe(ae,"}",null,i):"quasi"==e?O(J,i):"new"==e?N(re(r)):N()}function Y(e){return e.match(/[;\}\)\],]/)?O():O(_)}function q(e,t){return","==e?N(Y):Z(e,t,!1)}function Z(e,t,r){var n=0==r?q:Z,i=0==r?_:K;return"=>"==e?N(I,r?te:ee,R):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(n):c&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(B(">"),ce(me,">"),j,n):"?"==t?N(_,G(":"),i):N(i):"quasi"==e?O(J,n):";"!=e?"("==e?fe(K,")","call",n):"."==e?N(le,n):"["==e?N(B("]"),Y,G("]"),j,n):c&&"as"==t?(M.marked="keyword",N(me,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(J):N(Y,Q)}function Q(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(J)}function ee(e){return C(M.stream,M.state),O("{"==e?V:_)}function te(e){return C(M.stream,M.state),O("{"==e?V:K)}function re(e){return function(t){return"."==t?N(e?ie:ne):"variable"==t&&c?N(Le,e?Z:q):O(e?K:_)}}function ne(e,t){if("target"==t)return M.marked="keyword",N(q)}function ie(e,t){if("target"==t)return M.marked="keyword",N(Z)}function oe(e){return":"==e?N(j,V):O(q,G(";"),j)}function le(e){if("variable"==e)return M.marked="property",N()}function ae(e,t){return"async"==e?(M.marked="property",N(ae)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?N(se):(c&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),N(ue))):"number"==e||"string"==e?(M.marked=a?"property":M.style+" property",N(ue)):"jsonld-keyword"==e?N(ue):c&&F(t)?(M.marked="keyword",N(ae)):"["==e?N(_,he,G("]"),ue):"spread"==e?N(K,ue):"*"==t?(M.marked="keyword",N(ae)):":"==e?O(ue):void 0;var r}function se(e){return"variable"!=e?O(ue):(M.marked="property",N(ze))}function ue(e){return":"==e?N(K):"("==e?O(ze):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var l=M.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),N((function(r,n){return r==t||n==t?O():O(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?O(e):N(G(t))}return function(r,i){return r==t||i==t?N():O(e,n)}}function fe(e,t,r){for(var n=3;n"),me):"quasi"==e?O(xe,Se):void 0}function ye(e){if("=>"==e)return N(me)}function be(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(be):O(we,be)}function we(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",N(we)):"?"==t||"number"==e||"string"==e?N(we):":"==e?N(me):"["==e?N(G("variable"),pe,G("]"),we):"("==e?O(Re,we):e.match(/[;\}\)\],]/)?void 0:N()}function xe(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(xe):N(me,Ce)}function Ce(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(xe)}function ke(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?N(ke):":"==e?N(me):"spread"==e?N(ke):O(me)}function Se(e,t){return"<"==t?N(B(">"),ce(me,">"),j,Se):"|"==t||"."==e||"&"==t?N(me):"["==e?N(me,G("]"),Se):"extends"==t||"implements"==t?(M.marked="keyword",N(me)):"?"==t?N(me,G(":"),me):void 0}function Le(e,t){if("<"==t)return N(B(">"),ce(me,">"),j,Se)}function Te(){return O(me,Me)}function Me(e,t){if("="==t)return N(me)}function Oe(e,t){return"enum"==t?(M.marked="keyword",N(tt)):O(Ne,he,We,Fe)}function Ne(e,t){return c&&F(t)?(M.marked="keyword",N(Ne)):"variable"==e?(D(t),N()):"spread"==e?N(Ne):"["==e?fe(De,"]"):"{"==e?fe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?N(Ne):"}"==e?O():"["==e?N(_,G("]"),G(":"),Ae):N(G(":"),Ne,We)):(D(t),N(We))}function De(){return O(Ne,We)}function We(e,t){if("="==t)return N(K)}function Fe(e){if(","==e)return N(Oe)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(B("form","else"),V,j)}function He(e,t){return"await"==t?N(He):"("==e?N(B(")"),Pe,j):void 0}function Pe(e){return"var"==e?N(Oe,Ie):"variable"==e?N(Ie):O(Ie)}function Ie(e,t){return")"==e?N():";"==e?N(Ie):"in"==t||"of"==t?(M.marked="keyword",N(_,Ie)):O(_,Ie)}function ze(e,t){return"*"==t?(M.marked="keyword",N(ze)):"variable"==e?(D(t),N(ze)):"("==e?N(I,B(")"),ce(je,")"),j,ge,V,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,ze):void 0}function Re(e,t){return"*"==t?(M.marked="keyword",N(Re)):"variable"==e?(D(t),N(Re)):"("==e?N(I,B(")"),ce(je,")"),j,ge,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,Re):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(M.marked="type",N(Be)):"<"==t?N(B(">"),ce(Te,">"),j):void 0}function je(e,t){return"@"==t&&N(_,je),"spread"==e?N(je):c&&F(t)?(M.marked="keyword",N(je)):c&&"this"==e?N(he,We):O(Ne,he,We)}function Ge(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return D(t),N(Ue)}function Ue(e,t){return"<"==t?N(B(">"),ce(Te,">"),j,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(M.marked="keyword"),N(c?me:_,Ue)):"{"==e?N(B("}"),_e,j):void 0}function _e(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&F(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",N(_e)):"variable"==e||"keyword"==M.style?(M.marked="property",N(Ke,_e)):"number"==e||"string"==e?N(Ke,_e):"["==e?N(_,he,G("]"),Ke,_e):"*"==t?(M.marked="keyword",N(_e)):c&&"("==e?O(Re,_e):";"==e||","==e?N(_e):"}"==e?N():"@"==t?N(_,_e):void 0}function Ke(e,t){if("!"==t)return N(Ke);if("?"==t)return N(Ke);if(":"==e)return N(me,We);if("="==t)return N(K);var r=M.state.lexical.prev;return O(r&&"interface"==r.info?Re:ze)}function Xe(e,t){return"*"==t?(M.marked="keyword",N(Qe,G(";"))):"default"==t?(M.marked="keyword",N(_,G(";"))):"{"==e?N(ce($e,"}"),Qe,G(";")):O(V)}function $e(e,t){return"as"==t?(M.marked="keyword",N(G("variable"))):"variable"==e?O(K,$e):void 0}function Ye(e){return"string"==e?N():"("==e?O(_):"."==e?O(q):O(qe,Ze,Qe)}function qe(e,t){return"{"==e?fe(qe,"}"):("variable"==e&&D(t),"*"==t&&(M.marked="keyword"),N(Je))}function Ze(e){if(","==e)return N(qe,Ze)}function Je(e,t){if("as"==t)return M.marked="keyword",N(qe)}function Qe(e,t){if("from"==t)return M.marked="keyword",N(_)}function et(e){return"]"==e?N():O(ce(K,"]"))}function tt(){return O(B("form"),Ne,G("{"),B("}"),ce(rt,"}"),j,j)}function rt(){return O(Ne,We)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new E(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",T(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=m)return 0;var i,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==j)s=s.prev;else if(c!=Ee&&c!=R)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==q||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(nt(t,n)?l||o:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:it,skipExpression:function(t){T(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(9))},45:function(e,t,r){"use strict";r.r(t);var n=r(9),i=r.n(n);r(38),r(39),r(41);const o={init(){document.addEventListener("DOMContentLoaded",(function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data");i()(e,{value:JSON.stringify(CLD_METADATA,null," "),lineNumbers:!0,theme:"material",readOnly:!0,mode:{name:"javascript",json:!0},matchBrackets:!0,foldGutter:!0,htmlMode:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],viewportMargin:50}).setSize(null,600)}))}};o.init();t.default=o},9:function(e,t,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,a=l&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,s=!0);var C=y&&(u||f&&(null==x||x<12.11)),k=r||l&&a>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return M(e).appendChild(t)}function N(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(H=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function $(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var ue=null;function ce(e,t,r){var n;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ue=i)}return null!=n?n:ue}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){Ce(e),ke(e)}function Te(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ne,Ae=function(){if(l&&a<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Oe){var t=N("span","​");O(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var r=Oe?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function We(e){if(null!=Ne)return Ne;var t=O(e,document.createTextNode("AخA")),r=L(t,0,1).getBoundingClientRect(),n=L(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Ne=n.right-r.right<3)}var Fe,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(Fe=N("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Ie=null;function ze(e){if(null!=Ie)return Ie;var t=O(e,N("span","x")),r=t.getBoundingClientRect(),n=L(t,0,1).getBoundingClientRect();return Ie=Math.abs(r.left-n.left)>1}var Re={},Be={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function Ge(e,t){Be[e]=t}function Ve(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Ve(t);var r=Re[t.name];if(!r)return Ue(e,"text/plain");var n=r(e,t);if(_e.hasOwnProperty(t.name)){var i=_e[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var _e={};function Ke(e,t){I(t,_e.hasOwnProperty(e)?_e[e]:_e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ot(r,Ze(e,r).text.length):ht(t,Ze(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?ot(e.line,t):r<0?ot(e.line,0):e}function pt(e,t){for(var r=[],n=0;n=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,r,n){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,a=function(n){r.baseTokens=i;var a=e.state.overlays[n],s=1,u=0;r.state=!0,Tt(e,t.text,a.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Xe(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new vt(n,!0,t);var o=Mt(e,t,r),l=o>n.first&&Ze(n,o-1).stateAfter,a=l?vt.fromSaved(n,l,o):new vt(n,Ye(n.mode),o);return n.iter(o,t,(function(r){wt(e,r.text,a);var n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,r){return t instanceof gt?new vt(e,Xe(e.mode,t.state),r,t.lookAhead):new vt(e,Xe(e.mode,t),r)},vt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function St(e,t,r,n){var i,o,l=e.doc,a=l.mode,s=Ze(l,(t=dt(l,t)).line),u=bt(e,t.line,r),c=new qe(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(a=!1,l&&wt(e,t,n,f.pos),f.pos=t.length,s=null):s=Lt(Ct(r,f,n.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;ul;--a){if(a<=o.first)return o.first;var s=Ze(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof gt?u.lookAhead:0)<=o.modeFrontier))return a;var c=z(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=a-1,n=c)}return i}function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof gt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new Ft(l,o.from,a?null:o.to))}}return n}function zt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var b=0;b0)){var c=[s,1],f=lt(u.from,a.from),d=lt(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Kt(r,o.marker)<0)&&(r=o.marker)}return r}function Zt(e,t,r,n,i){var o=Ze(e,t),l=At&&o.markedSpans;if(l)for(var a=0;a=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.to,r)>=0:lt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.from,n)<=0:lt(u.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function er(e){for(var t,r;t=Yt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function tr(e,t){var r=Ze(e,t),n=Jt(r);return r==n?t:tt(n)}function rr(e,t){if(t>e.lastLine())return t;var r,n=Ze(e,t);if(!nr(e,n))return t;for(;r=Yt(n);)n=r.find(1,!0).line;return tt(n)+1}function nr(e,t){var r=At&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function ur(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&et(e,i)}function cr(e){e.parent=null,Gt(e)}sr.prototype.lineNo=function(){return tt(this)},xe(sr);var fr={},dr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dr:fr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function pr(e,t){var r=A("span",null,null,s?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=vr,We(e.display.measure)&&(l=de(o,e.doc.direction))&&(n.addToken=yr(n.addToken,l)),n.map=[],wr(o,n,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function gr(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?mr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(N("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(N("span",$(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(N("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(N("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||d||o||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=N("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function mr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u);d++);if(f.to>=c)return e(r,n,i,o,l,a,s);e(r,n.slice(0,f.to-u),i,o,null,a,s),o=null,n=n.slice(f.to-u),u=f.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function wr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!f||Kt(f.marker,C)<0)&&(f=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=h)break;for(var T=Math.min(h,m);;){if(v){var M=p+v.length;if(!f){var O=M>T?v.slice(0,T-p):v;t.addToken(t,O,l?l+s:s,c,p+O.length==m?u:"",a,d)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=hr(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Zr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=tt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=pr(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}function Qr(e,t,r,n){return rn(e,tn(e,t),r,n)}function en(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(n=e[u+2],a==s&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==s-a)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=ln(t.map,r,n),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(f=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+An(e.display),top:p.top,bottom:p.bottom}:on}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,r){return l(r?e-1:e,1==a[t].level!=r)}var f=ce(a,s,u),d=ue,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function wn(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=An(e.display)*t.ch);var n=Ze(e.doc,t.line),i=or(n)+Ur(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=ot(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Cn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=rt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ze(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ze(n,i);;){var a=Tn(e,l,i,t,r),s=qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=Ze(n,i=u.line)}}function kn(e,t,r,n){n-=gn(t);var i=t.text.length,o=ae((function(t){return rn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=ae((function(t){return rn(e,r,t).top>n}),o,i)}}function Sn(e,t,r,n){return r||(r=tn(e,t)),kn(e,t,r,vn(e,t,rn(e,r,n),"line").top)}function Ln(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Tn(e,t,r,n,i){i-=or(t);var o=tn(e,t),l=gn(t),a=0,s=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?On:Mn)(e,t,r,o,c,n,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,v=ae((function(t){var r=rn(e,o,t);return r.top+=l,r.bottom+=l,!!Ln(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),a,s),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return xn(r,v=le(t.text,v,1),h,m,n-d)}function Mn(e,t,r,n,i,o,l){var a=ae((function(a){var s=i[a],u=1!=s.level;return Ln(bn(e,ot(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=bn(e,ot(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Ln(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function On(e,t,r,n,i,o,l){var a=kn(e,t,n,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d=u||h.to<=s)){var p=rn(e,n,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=pg)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==nn){nn=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nn.appendChild(document.createTextNode("x")),nn.appendChild(N("br"));nn.appendChild(document.createTextNode("x"))}O(e.measure,nn);var r=nn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function An(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;r[a]=o.offsetLeft+o.clientLeft+i,n[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fn(e){var t=Nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/An(e.display)-3);return function(i){if(nr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=Ze(e.doc,u.line).text).length==u.ch){var c=z(s,s.length,e.options.tabSize)-s.length;u=ot(u.line,Math.max(0,Math.round((o-Kr(e.display).left)/An(e.display))-c))}return u}function Pn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&tr(e.doc,t)i.viewFrom?Rn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Rn(e);else if(t<=i.viewFrom){var o=Bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Rn(e)}else if(r>=i.viewTo){var l=Bn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Rn(e)}else{var a=Bn(e,t,t,-1),s=Bn(e,r,r+n,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Cr(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Rn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Pn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bn(e,t,r,n){var i,o=Pn(e,t),l=e.display.view;if(!At||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;tr(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function jn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Cr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Cr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Pn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var a=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Kn(e,t){return e.top-t.top||e.left-t.left}function Xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Kr(e.display),a=l.left,s=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=Ze(i,t),d=f.text.length;function h(r,n){return yn(e,ot(t,r),"div",f,n)}function p(t,r,n){var i=Sn(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=de(f,i.direction);return se(g,r||0,null==n?d:n,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,x=0==f,C=!g||f==g.length-1;if(y.top-m.top<=3){var k=(u?w:b)&&C,S=(u?b:w)&&x?a:(v?m:y).left,L=k?s:(v?y:m).right;c(S,m.top,L-S,m.bottom)}else{var T,M,O,N;v?(T=u&&b&&x?a:m.left,M=u?s:p(e,i,"before"),O=u?a:p(t,i,"after"),N=u&&w&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&x?s:m.right,O=!u&&w&&C?a:y.left,N=u?p(t,i,"after"):s),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zn(e))}function qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Zn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(d/An(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ei(e){if(e.widgets)for(var t=0;t=l&&(o=rt(t,or(Ze(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ri(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ur(e.display))+"px;\n height: "+(t.bottom-t.top+Xr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ot(t.line,t.ch+1,"before"):t,t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=bn(e,t),s=r&&r!=t?bn(e,r):a,u=oi(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(di(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(pi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function ii(e,t){var r=oi(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null!=r.scrollLeft&&pi(e,r.scrollLeft)}function oi(e,t){var r=e.display,n=Nn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Yr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+_r(r),s=t.topa-n;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,h=$r(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function li(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,fi(e,wn(e,t.from),wn(e,t.to),t.margin))}function fi(e,t,r,n){var i=oi(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Vi(e,{top:t}),hi(e,t,!0),r&&Vi(e),Hi(e,100))}function hi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Xi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_r(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Xr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var vi=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},vi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function yi(e,t){t||(t=gi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Qn(e),bi(e,gi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var wi={native:vi,null:mi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ci=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ci,markArrays:null},Sr(e.curOp)}function Si(e){var t=e.curOp;t&&Tr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function Oi(e){var t=e.cm,r=t.display;e.updatedDisplay&&Qn(t),e.barMeasure=gi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Xr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Xe(t.mode,n.state):null,s=mt(e,o,n,!0);a&&(n.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dr)return Hi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Di(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;$i(e)&&(Rn(e),t.dims=Dn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),At&&(o=tr(e.doc,o),l=rr(e.doc,l));var a=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jn(e,o,l),r.viewOffset=or(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!a&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ri(e);return s>4&&(r.lineDiv.style.display="none"),Ui(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Bi(u),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Hi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ti(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+_r(e.display)-Yr(e),r.top)}),t.visible=ti(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ji(e,t))break;Qn(e);var i=gi(e);Vn(e),yi(e,i),Ki(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Vi(e,t){var r=new Ii(e,t);if(ji(e,r)){Qn(e),Gi(e,r);var n=gi(e);Vn(e),yi(e,n),Ki(e,n),r.finish()}}function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function a(t){var r=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,f=0;f-1&&(h=!1),Ar(e,d,c,r)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),l=d.node.nextSibling}else{var p=zr(e,d,c,r);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}function _i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Or(e,"gutterChanged",e)}function Ki(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xr(e)+"px"}function Xi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lu.clientWidth,d=u.scrollHeight>u.clientHeight;if(i&&c||o&&d){if(o&&y&&s)e:for(var h=t.target,p=a.view;h!=u;h=h.parentNode)for(var g=0;g=0&<(e,n.to())<=0)return r}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function lo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=B(t,i);for(var o=1;o0:s>=0){var u=ct(a.from(),l.from()),c=ut(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=r&&--r,t.splice(--o,2,new oo(f?c:u,f?u:c))}}return new io(t,r)}function ao(e,t){return new io([new oo(e,t||e)],0)}function so(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),ot(r,n)}function co(e,t){for(var r=[],n=0;n1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Or(e,"change",e,t)}function yo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function To(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Lo(i,i.lastOp==n)))l=Y(o.changes),0==lt(t.from,t.to)&&0==lt(t.from,l.to)?l.to=so(t):o.changes.push(ko(e,t));else{var s=Y(i.done);for(s&&s.ranges||No(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||me(e,"historyAdded")}function Mo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Oo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Mo(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&So(i.undone)}function No(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,r=0;r-1&&(Y(a)[f]=u[f],delete u[f])}}}return n}function Ho(e,t,r,n){if(n){var i=e.anchor;if(r){var o=lt(t,i)<0;o!=lt(r,i)<0?(i=t,t=r):o!=lt(t,r)<0&&(t=r)}return new oo(i,t)}return new oo(r||t,t)}function Po(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new io([Ho(e.sel.primary(),t,r,i)],0),n)}function Io(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(me(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(f=Yo(e,f,-n,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Xo(e,f,t,n,i)}var h=s.find(n<0?-1:1);return(n<0?u:c)&&(h=Yo(e,h,n,h.line==t.line?o:null)),h?Xo(e,h,t,n,i):null}}return t}function $o(e,t,r,n,i){var o=n||1,l=Xo(e,t,r,o,i)||!i&&Xo(e,t,r,o,!0)||Xo(e,t,r,-o,i)||!i&&Xo(e,t,r,-o,!0);return l||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,ot(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=co(e,t);To(e,t,r,e.cm?e.cm.curOp.id:NaN),rl(e,t,r,Rt(e,t));var n=[];yo(e,(function(e,r){r||-1!=B(n,e.history)||(al(e.history,t),n.push(e.history)),rl(e,t,null,Rt(e,t))}))}}function el(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--h){var p=d(h);if(p)return p.v}}}}function tl(e,t){if(0!=t&&(e.first+=t,e.sel=new io(q(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){In(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=co(e,t)),e.cm?nl(e.cm,t,n):mo(e,t,n),Vo(e,r,V),e.cantEdit&&$o(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function nl(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=tt(Jt(Ze(n,o.line))),n.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&be(e),mo(n,t,r,Fn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=lr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Ot(n,o.line),Hi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?In(e):o.line!=l.line||1!=t.text.length||vo(e.doc,t)?In(e,o.line,l.line+1,u):zn(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Or(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function il(e,t,r,n,i){var o;n||(n=r),lt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ol(e,t,r,n){r1||!(this.children[0]instanceof ul))){var a=[];this.collapse(a),this.children=[new ul(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Zt(e,t.line,t,r,o)||t.line!=r.line&&Zt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wt()}o.addToHistory&&To(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&Jt(n)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&et(n,0),Pt(n,new Ft(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){nr(e,t)&&et(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)In(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)zn(u,c,"text");o.atomic&&_o(u.doc),Or(u,"markerAdded",u,o)}return o}gl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),we(this,"clear")){var r=this.find();r&&Or(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&In(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_o(e.doc)),e&&Or(e,"markerCleared",e,this,n,i),t&&Si(e),this.parent&&this.parent.clear()}},gl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)Jo(this,n[s]);a?jo(this,a):this.cm&&ai(this.cm)})),undo:Ei((function(){el(this,"undo")})),redo:Ei((function(){el(this,"redo")})),undoSelection:Ei((function(){el(this,"undo",!0)})),redoSelection:Ei((function(){el(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),dt(this,ot(r,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vo(t.doc,ao(r,r)),d)for(var h=0;h=0;t--)il(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Xl(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $l(e,t,r){var n=Xl(e,t.ch,r);return null==n?null:new ot(t.line,n,r<0?"after":"before")}function Yl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var l,a=i<0?Y(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=tn(t,r);l=i<0?r.text.length-1:0;var c=rn(t,u,l).top;l=ae((function(e){return rn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=Xl(r,l,1))}else l=i<0?a.to:a.from;return new ot(n,l,s)}}return new ot(n,i<0?r.text.length:0,i<0?"before":"after")}function ql(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return $l(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&d>=c.begin)){var h=f?"before":"after";return new ot(r.line,d,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ot(r.line,s(e,1),"before"):new ot(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?n.begin:s(n.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}zl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zl.default=y?zl.macDefault:zl.pcDefault;var Zl={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Kl(e,(function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ze(e.doc,i.line-1).text;l&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ot(i.line-1,l.length-1),i,"+transpose"))}r.push(new oo(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(lt((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(lt(i.to(),t)>0||t.xRel<0)?Ca(e,n,t,o):Sa(e,n,t,o)}function Ca(e,t,r,n){var i=e.display,o=!1,u=Wi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:qn(e)),ve(i.wrapper.ownerDocument,"mouseup",u),ve(i.wrapper.ownerDocument,"mousemove",c),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",u),o||(Ce(t),n.addNew||Po(e.doc,r,null,null,n.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ka(e,t,r){if("char"==r)return new oo(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new oo(ot(t.line,0),dt(e.doc,ot(t.line+1,0)));var n=r(e,t);return new oo(n.from,n.to)}function Sa(e,t,r,n){l&&qn(e);var i=e.display,o=e.doc;Ce(t);var a,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new oo(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new oo(r,r)),r=Hn(e,t,!0,!0),s=-1;else{var f=ka(e,r,n.unit);a=n.extend?Ho(a,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=c.length,Go(o,lo(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,lo(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):zo(o,s,a,U):(s=0,Go(o,new io([a],0),U),u=o.sel);var d=r;function h(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=z(Ze(o,r.line).text,r.ch,l),f=z(Ze(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Ze(o,g).text,y=K(m,h,l);h==p?i.push(new oo(ot(g,y),ot(g,y))):m.length>y&&i.push(new oo(ot(g,y),ot(g,K(m,p,l))))}i.length||i.push(new oo(r,r)),Go(o,lo(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=ka(e,t,n.unit),C=w.anchor;lt(x.anchor,C)>0?(b=x.head,C=ct(w.from(),x.anchor)):(b=x.anchor,C=ut(w.to(),x.head));var k=u.ranges.slice(0);k[s]=La(e,new oo(dt(o,C),b)),Go(o,lo(e,k,s),U)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var r=++g,l=Hn(e,t,!0,"rectangle"==n.unit);if(l)if(0!=lt(l,d)){e.curOp.focus=W(),h(l);var a=ti(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Wi(e,(function(){g==r&&(i.scroller.scrollTop+=s,v(t))})),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Wi(e,(function(e){0!==e.buttons&&Me(e)?v(e):m(e)})),b=Wi(e,m);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}function La(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var l=ce(o,r.ch,r.sticky),a=o[l];if(a.from!=r.ch&&a.to!=r.ch)return t;var s,u=l+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new oo(new ot(r.line,p,g),n)}function Ta(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ce(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!we(e,r))return Se(t);o-=a.top-l.viewOffset;for(var s=0;s=i)return me(e,r,e,rt(e.doc,o),e.display.gutterSpecs[s].className,t),Se(t)}}function Ma(e,t){return Ta(e,t,"gutterClick",!0)}function Oa(e,t){Vr(e.display,t)||Na(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Na(e,t){return!!we(e,"gutterContextMenu")&&Ta(e,t,"gutterContextMenu",!1)}function Aa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dn(e)}va.prototype.compare=function(e,t,r){return this.time+ga>e&&0==lt(t,this.pos)&&r==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Wa={},Fa={};function Ea(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Da&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Da,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),r("indentUnit",2,po,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){go(e),dn(e),In(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ot(n,o))}n++}));for(var i=r.length-1;i>=0;i--)il(e.doc,t,r[i],ot(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Da&&e.refresh()})),r("specialCharPlaceholder",gr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Aa(e),Zi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=_l(t),i=r!=Da&&_l(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Pa,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Zi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Wn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Zi(e)}),!0),r("firstLineNumber",1,Zi,!0),r("lineNumberFormatter",(function(e){return e}),Zi,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ha),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,go,!0),r("addModeClass",!1,go,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,go,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Ha(e,t,r){if(!t!=!(r&&r!=Da)){var n=e.display.dragFunctions,i=t?pe:ve;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Pa(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),ar(e)),En(e),In(e),dn(e),setTimeout((function(){return yi(e)}),100)}function Ia(e,t){var r=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?I(t):{},I(Wa,t,!1);var n=t.value;"string"==typeof n?n=new kl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ia.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Aa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),za(this),Dl(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Zn(r)}),20):Jn(this),Fa)Fa.hasOwnProperty(u)&&Fa[u](this,t[u],Da);$i(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ma(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new oo(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new oo(ot(l.line,0),dt(e.doc,ot(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(r)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Le(t)},over:function(t){ye(e,t)||(Ml(e,t),Le(t))},start:function(t){return Tl(e,t)},drop:Wi(e,Ll),leave:function(t){ye(e,t)||Ol(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return fa.call(e,t)})),pe(u,"keydown",Wi(e,ua)),pe(u,"keypress",Wi(e,da)),pe(u,"focus",(function(t){return Zn(e,t)})),pe(u,"blur",(function(t){return Jn(e,t)}))}Ia.defaults=Wa,Ia.optionHandlers=Fa;var Ra=[];function Ba(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var l=e.options.tabSize,a=Ze(o,t),s=z(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==r&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Ze(o,t-1).text,null,l):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(dl,s=Ee(t),u=null;if(a&&n.ranges.length>1)if(ja&&ja.text.join("\n")==t){if(n.ranges.length%ja.text.length==0){u=[];for(var c=0;c=0;d--){var h=n.ranges[d],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=ot(p.line,p.ch-r):e.state.overwrite&&!a?g=ot(g.line,Math.min(Ze(o,g.line).text.length,g.ch+Y(s).length)):a&&ja&&ja.lineWise&&ja.text.join("\n")==s.join("\n")&&(p=g=ot(p.line,0)));var v={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jo(e.doc,v),Or(e,"inputRead",e,v)}t&&!a&&_a(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ua(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Va(t,r,0,null,"paste")})),!0}function _a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Ba(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ba(e,i.head.line,"smart"));l&&Or(e,"electricInput",e,i.head.line)}}}function Ka(e){for(var t=[],r=[],n=0;nr&&(Ba(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),l=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&zo(this.doc,n,new oo(o,u[n].to()),V)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,r=yt(this,Ze(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Ze(this.doc,e)}else n=e;return vn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-or(n):0)},defaultTextHeight:function(){return Nn(this.display)},defaultCharWidth:function(){return An(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=bn(this,dt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ii(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Fi(ua),triggerOnKeyPress:Fi(da),triggerOnKeyUp:fa,triggerOnMouseDown:Fi(ya),execCommand:function(e){if(Zl.hasOwnProperty(e))return Zl[e].call(null,this)},triggerElectric:Fi((function(e){_a(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&En(this),me(this,"refresh",this)})),swapDoc:Fi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),dn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Or(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function qa(e,t,r,n,i){var o=t,l=r,a=Ze(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ot(r,t.ch,t.sticky),a=Ze(e,r))}function c(o){var l;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ot(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(f?2:1))),-r)}}else l=i?ql(e.cm,a,t,r):$l(a,t,r);if(null==l){if(o||!u())return!1;t=Yl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var g=a.text.charAt(t.ch)||"\n",v=re(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!p))break}var m=$o(e,t,o,l,!0);return at(o,m)&&(m.hitSide=!0),m}function Za(e,t,r,n){var i,o,l=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Nn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Cn(e,a,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qa(e,t){var r=en(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=Zr(r,n,t.line),o=de(n,e.doc.direction),l="left";o&&(l=ce(o,t.ch)%2?"right":"left");var a=ln(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function es(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ts(e,t){return t&&(e.bad=!0),e}function rs(e,t,r,n,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(ot(n,0),ot(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(Je(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&Qa(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=ot(l.line-1,Ze(n.doc,l.line-1).length)),a.ch==Ze(n.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Pn(n,l.line))?(t=tt(i.view[0].line),r=i.view[0].node):(t=tt(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Pn(n,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(rs(n,r,u,t,s)),d=Je(n.doc,ot(t,0),ot(s,Ze(n.doc,s).text.length));f.length>1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);hl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=ot(t,h),C=ot(s,d.length?Y(d).length-p:0);return f.length>1||f[0]||lt(x,C)?(il(n.doc,f,x,C,"+input"),!0):void 0},Ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ja.prototype.reset=function(){this.forceCompositionEnd()},Ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return In(e.cm)}))},Ja.prototype.setUneditable=function(e){e.contentEditable="false"},Ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Wi(this.cm,Va)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ja.prototype.onContextMenu=function(){},Ja.prototype.resetPosition=function(){},Ja.prototype.needsContentAttribute=!0;var os=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};function ls(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=a.getValue()}var i;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function as(e){e.off=ve,e.on=pe,e.wheelEventPixels=ro,e.Doc=kl,e.splitLines=Ee,e.countColumn=z,e.findColumn=K,e.isWordChar=te,e.Pass=G,e.signal=me,e.Line=sr,e.changeEnd=so,e.scrollbarModel=wi,e.Pos=ot,e.cmpPos=lt,e.modes=Re,e.mimeModes=Be,e.resolveMode=Ve,e.getMode=Ue,e.modeExtensions=_e,e.extendMode=Ke,e.copyState=Xe,e.startState=Ye,e.innerMode=$e,e.commands=Zl,e.keyMap=zl,e.keyName=Ul,e.isModifierKey=Gl,e.lookupKey=jl,e.normalizeKeyMap=Bl,e.StringStream=qe,e.SharedTextMarker=ml,e.TextMarker=gl,e.LineWidget=fl,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Le,e.addClass=F,e.contains=D,e.rmClass=T,e.keyNames=El}os.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(n,e)){if(n.somethingSelected())Ga({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ka(n);Ga({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(i,"paste",(function(e){ye(n,e)||Ua(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!ye(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},os.prototype.createField=function(e){this.wrapper=$a(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Un(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},os.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},os.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&H(this.textarea),l&&a>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},os.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},os.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Hn(r,e),u=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Wi(r,Go)(r.doc,ao(o),V);var c,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),n.input.focus(),s&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&a>=9&&v(),k){Le(e);var g=function(){ve(window,"mouseup",g),setTimeout(m,20)};pe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,l&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Wi(r,qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},os.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1,Ea(Ia),Ya(Ia);var ss="iter insert remove copy getEditor constructor".split(" ");for(var us in kl.prototype)kl.prototype.hasOwnProperty(us)&&B(ss,us)<0&&(Ia.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(kl.prototype[us]));return xe(kl),Ia.inputStyles={textarea:os,contenteditable:Ja},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),je.apply(this,arguments)},Ia.defineMIME=Ge,Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){kl.prototype[e]=t},Ia.fromTextArea=ls,as(Ia),Ia.version="5.65.0",Ia}()}}); \ No newline at end of file diff --git a/js/video-init.asset.php b/js/video-init.asset.php index eead0e416..cbe9e3aba 100644 --- a/js/video-init.asset.php +++ b/js/video-init.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '3ab27ab002de5aa27056ece5ef61f88f'); \ No newline at end of file + array('wp-polyfill'), 'version' => '6c765f098fc5cb898b5e412c863e0317'); \ No newline at end of file diff --git a/js/video-init.js b/js/video-init.js index 01b380cc2..d35deefab 100644 --- a/js/video-init.js +++ b/js/video-init.js @@ -1 +1 @@ -!function(e){var r={};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=e,o.c=r,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,r){if(1&r&&(e=o(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var t in e)o.d(n,t,function(r){return e[r]}.bind(null,t));return n},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s=0)}([function(e,r){!function(){if("undefined"!=typeof cldVideos){for(var e in cldVideos=JSON.parse(cldVideos),cldVideos){var r=cldVideos[e],o="cloudinary-video-"+e;cld.videoPlayer(o,r)}window.addEventListener("load",(function(){for(var e in cldVideos){var r="cloudinary-video-"+e,o=document.getElementById(r).getElementsByTagName("video");1===o.length&&((o=o[0]).style.width="100%",videoFreeForm&&-1===o.src.indexOf(videoFreeForm)&&!cldVideos[e].overwrite_transformations&&(o.src=o.src.replace("upload/","upload/"+videoFreeForm+"/")))}}))}}()}]); \ No newline at end of file +!function(e){var r={};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=e,o.c=r,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,r){if(1&r&&(e=o(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var t in e)o.d(n,t,function(r){return e[r]}.bind(null,t));return n},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s=159)}({159:function(e,r){!function(){if("undefined"!=typeof cldVideos){for(var e in cldVideos=JSON.parse(cldVideos),cldVideos){var r=cldVideos[e],o="cloudinary-video-"+e;cld.videoPlayer(o,r)}window.addEventListener("load",(function(){for(var e in cldVideos){var r="cloudinary-video-"+e,o=document.getElementById(r).getElementsByTagName("video");1===o.length&&((o=o[0]).style.width="100%",videoFreeForm&&-1===o.src.indexOf(videoFreeForm)&&!cldVideos[e].overwrite_transformations&&(o.src=o.src.replace("upload/","upload/"+videoFreeForm+"/")))}}))}}()}}); \ No newline at end of file diff --git a/js/video.js b/js/video.js index 7843cbf57..76bbd479e 100644 --- a/js/video.js +++ b/js/video.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=34)}({34:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=33)}({33:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file diff --git a/js/wp-color-picker-alpha.js b/js/wp-color-picker-alpha.js index 0bf1e732a..bb590c5c4 100644 --- a/js/wp-color-picker-alpha.js +++ b/js/wp-color-picker-alpha.js @@ -1 +1 @@ -!function(o){var t={};function a(r){if(t[r])return t[r].exports;var e=t[r]={i:r,l:!1,exports:{}};return o[r].call(e.exports,e,e.exports,a),e.l=!0,e.exports}a.m=o,a.c=t,a.d=function(o,t,r){a.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:r})},a.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,t){if(1&t&&(o=a(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var e in o)a.d(r,e,function(t){return o[t]}.bind(null,e));return r},a.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(t,"a",t),t},a.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},a.p="",a(a.s=35)}({35:function(o,t){!function(o,t){var a={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=a.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var t="";return"hex"===o?t=this.toString():this.error||(t=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),t},window.wpColorPickerAlpha=a;var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===t&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var t=this,a=function(a){var r=o.val(),e=new Color(r),i=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),t.alphaOptions.alphaColorType);o.removeClass("iris-error"),e.error?""!==r&&o.addClass("iris-error"):"hex"===i&&"keyup"===a.type&&r.match(/^[0-9a-fA-F]{3}$/)||e.toIEOctoHex()!==t._color.toIEOctoHex()&&t._setOption("color",t._getColor(e))};o.on("change",a).on("keyup",t._debounce(a,100)),t.options.hide&&o.one("focus",(function(){t.show()}))},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var t=this,a=t.controls.strip.clone(!1,!1),r=a.find(".iris-slider-offset"),e={stripAlpha:a,stripAlphaSlider:r};a.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),a.appendTo(t.picker.find(".iris-picker-inner")),o.each(e,(function(o,a){t.controls[o]=a})),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,a){t.active="strip",t._color._alpha=parseFloat(a.value/100),t._change.apply(t,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var t,a,r,e,i,l=this,n=l.options,s=l.controls.square,p=l.picker.find(".iris-strip");for(t=Math.round(l.picker.outerWidth(!0)-(n.border?22:0)),a=Math.round(s.outerWidth()),r=Math.round((t-a)/2),e=Math.round(r/2),i=Math.round(a+2*r+2*e);i>t;)r=Math.round(r-2),e=Math.round(e-1),i=Math.round(a+2*r+2*e);s.css("margin","0"),p.width(r).css("margin-left",e+"px")}},_change:function(){var t=this,a=t.active;if(t._super(),t.alphaOptions.alphaEnabled){var r=t.controls,i=parseInt(100*t._color._alpha),l=t._color.toRgb(),n=["rgb("+l.r+","+l.g+","+l.b+") 0%","rgba("+l.r+","+l.g+","+l.b+", 0) 100%"];t.picker.closest(".wp-picker-container").find(".wp-color-result");t.options.color=t._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+e+")"}),a&&r.stripAlphaSlider.slider("value",i),t._color.error||t.element.removeClass("iris-error").val(t.options.color),t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",(function(){var a=o(this).data("color");t.alphaOptions.alphaReset&&(t._color._alpha=1,a=t._getColor()),t._setOption("color",a)}))}},_paintDimension:function(o,t){var a=this,r=!1;a.alphaOptions.alphaEnabled&&"strip"===t&&(r=a._color,a._color=new Color(r.toString()),a.hue=a._color.h()),a._super(o,t),r&&(a._color=r)},_setOption:function(o,t){var a=this;if("color"!==o||!a.alphaOptions.alphaEnabled)return a._super(o,t);t=""+t,newColor=new Color(t).setHSpace(a.options.mode),newColor.error||a._getColor(newColor)===a._getColor()||(a._color=newColor,a.options.color=a._getColor(),a.active="external",a._change())},color:function(o){return!0===o?this._color.clone():o===t?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var t=this.element,a=t.data("type")||this.options.type,r=t.data("defaultColor")||t.val(),e={alphaEnabled:t.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return e.alphaEnabled&&(e.alphaEnabled=t.is("input")&&"full"===a),e.alphaEnabled?(e.alphaColorWithSpace=r&&r.match(/\s/),o.each(e,(function(o,a){var i=t.data(o)||a;switch(o){case"alphaCustomWidth":i=i?parseInt(i,10):0,i=isNaN(i)?a:i;break;case"alphaColorType":i.match(/^(hex|(rgb|hsl)a?)$/)||(i=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":a);break;default:i=!!i}e[o]=i})),e):e},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var t=this,a=t.element,r=t.toggler.is("a");this.alphaOptions.defaultWidth=a.width(),this.alphaOptions.alphaCustomWidth&&a.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),t.toggler.css({position:"relative","background-image":"url("+e+")"}),r?t.toggler.html(''):t.toggler.append(''),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":a.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),a.iris({change:function(a,r){t.colorAlpha.css({"background-color":r.color.to_s(t.alphaOptions.alphaColorType)}),o.isFunction(t.options.change)&&t.options.change.call(this,a,r)}}),t.wrap.on("click.wpcolorpicker",(function(o){o.stopPropagation()})),t.toggler.click((function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()})),a.change((function(e){var i=o(this).val();(a.hasClass("iris-error")||""===i||i.match(/^(#|(rgb|hsl)a?)$/))&&(r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e))})),t.button.click((function(e){o(this).hasClass("wp-picker-default")?a.val(t.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(a.val(""),r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e),a.trigger("change"))}))}})}}(jQuery)}}); \ No newline at end of file +!function(o){var t={};function a(r){if(t[r])return t[r].exports;var e=t[r]={i:r,l:!1,exports:{}};return o[r].call(e.exports,e,e.exports,a),e.l=!0,e.exports}a.m=o,a.c=t,a.d=function(o,t,r){a.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:r})},a.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,t){if(1&t&&(o=a(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var e in o)a.d(r,e,function(t){return o[t]}.bind(null,e));return r},a.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(t,"a",t),t},a.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},a.p="",a(a.s=34)}({34:function(o,t){!function(o,t){var a={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=a.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var t="";return"hex"===o?t=this.toString():this.error||(t=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),t},window.wpColorPickerAlpha=a;var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===t&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var t=this,a=function(a){var r=o.val(),e=new Color(r),i=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),t.alphaOptions.alphaColorType);o.removeClass("iris-error"),e.error?""!==r&&o.addClass("iris-error"):"hex"===i&&"keyup"===a.type&&r.match(/^[0-9a-fA-F]{3}$/)||e.toIEOctoHex()!==t._color.toIEOctoHex()&&t._setOption("color",t._getColor(e))};o.on("change",a).on("keyup",t._debounce(a,100)),t.options.hide&&o.one("focus",(function(){t.show()}))},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var t=this,a=t.controls.strip.clone(!1,!1),r=a.find(".iris-slider-offset"),e={stripAlpha:a,stripAlphaSlider:r};a.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),a.appendTo(t.picker.find(".iris-picker-inner")),o.each(e,(function(o,a){t.controls[o]=a})),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,a){t.active="strip",t._color._alpha=parseFloat(a.value/100),t._change.apply(t,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var t,a,r,e,i,l=this,n=l.options,s=l.controls.square,p=l.picker.find(".iris-strip");for(t=Math.round(l.picker.outerWidth(!0)-(n.border?22:0)),a=Math.round(s.outerWidth()),r=Math.round((t-a)/2),e=Math.round(r/2),i=Math.round(a+2*r+2*e);i>t;)r=Math.round(r-2),e=Math.round(e-1),i=Math.round(a+2*r+2*e);s.css("margin","0"),p.width(r).css("margin-left",e+"px")}},_change:function(){var t=this,a=t.active;if(t._super(),t.alphaOptions.alphaEnabled){var r=t.controls,i=parseInt(100*t._color._alpha),l=t._color.toRgb(),n=["rgb("+l.r+","+l.g+","+l.b+") 0%","rgba("+l.r+","+l.g+","+l.b+", 0) 100%"];t.picker.closest(".wp-picker-container").find(".wp-color-result");t.options.color=t._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+e+")"}),a&&r.stripAlphaSlider.slider("value",i),t._color.error||t.element.removeClass("iris-error").val(t.options.color),t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",(function(){var a=o(this).data("color");t.alphaOptions.alphaReset&&(t._color._alpha=1,a=t._getColor()),t._setOption("color",a)}))}},_paintDimension:function(o,t){var a=this,r=!1;a.alphaOptions.alphaEnabled&&"strip"===t&&(r=a._color,a._color=new Color(r.toString()),a.hue=a._color.h()),a._super(o,t),r&&(a._color=r)},_setOption:function(o,t){var a=this;if("color"!==o||!a.alphaOptions.alphaEnabled)return a._super(o,t);t=""+t,newColor=new Color(t).setHSpace(a.options.mode),newColor.error||a._getColor(newColor)===a._getColor()||(a._color=newColor,a.options.color=a._getColor(),a.active="external",a._change())},color:function(o){return!0===o?this._color.clone():o===t?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var t=this.element,a=t.data("type")||this.options.type,r=t.data("defaultColor")||t.val(),e={alphaEnabled:t.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return e.alphaEnabled&&(e.alphaEnabled=t.is("input")&&"full"===a),e.alphaEnabled?(e.alphaColorWithSpace=r&&r.match(/\s/),o.each(e,(function(o,a){var i=t.data(o)||a;switch(o){case"alphaCustomWidth":i=i?parseInt(i,10):0,i=isNaN(i)?a:i;break;case"alphaColorType":i.match(/^(hex|(rgb|hsl)a?)$/)||(i=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":a);break;default:i=!!i}e[o]=i})),e):e},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var t=this,a=t.element,r=t.toggler.is("a");this.alphaOptions.defaultWidth=a.width(),this.alphaOptions.alphaCustomWidth&&a.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),t.toggler.css({position:"relative","background-image":"url("+e+")"}),r?t.toggler.html(''):t.toggler.append(''),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":a.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),a.iris({change:function(a,r){t.colorAlpha.css({"background-color":r.color.to_s(t.alphaOptions.alphaColorType)}),o.isFunction(t.options.change)&&t.options.change.call(this,a,r)}}),t.wrap.on("click.wpcolorpicker",(function(o){o.stopPropagation()})),t.toggler.click((function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()})),a.change((function(e){var i=o(this).val();(a.hasClass("iris-error")||""===i||i.match(/^(#|(rgb|hsl)a?)$/))&&(r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e))})),t.button.click((function(e){o(this).hasClass("wp-picker-default")?a.val(t.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(a.val(""),r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e),a.trigger("change"))}))}})}}(jQuery)}}); \ No newline at end of file From 512666cb36b1d9e306a60b16b60510910c03a2f6 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Tue, 25 Jan 2022 12:10:08 +0200 Subject: [PATCH 04/19] remove jQuery ajax dependancy --- .eslintrc.json | 3 +- js/cloudinary.js | 2 +- src/js/components/global-transformations.js | 39 +++++++++++++++------ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 20a1a2fd4..0cebfd461 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,8 @@ "samplePlayer": "readonly", "CLDCACHE": "readonly", "cldData": "readonly", - "CLD_METADATA": "readonly" + "CLD_METADATA": "readonly", + "wpAjax": "readonly" }, "extends": [ "plugin:@wordpress/eslint-plugin/recommended" diff --git a/js/cloudinary.js b/js/cloudinary.js index 9ff6c1a01..41c78ae38 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=T,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:T(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",T="end",L="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+T])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+T])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case T:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),T="clientHeight",L="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(T="scrollHeight",L="scrollWidth"),P=P,o===w&&(M=O,b-=P[T]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[L]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===L?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?L:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),T=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,T)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,T=new Map,L=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,L=!1;break}T.set(I,U)}if(L)for(var q=function(t){var e=v.find((function(e){var i=T.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",T=e.modifiersData.popperOffsets,L=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(T){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=T[M],z=T[M]+b[j],N=T[M]-b[I],B=f?-C[R]/2:0,$=v===P?L[R]:C[R],U=v===P?-C[R]:-L[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,L[R],G[R]),tt=x?L[R]/2-B-Q-J-D:$-Q-J-D,et=x?-L[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=T[M]+tt-rt-nt,st=T[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);T[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=T[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);T[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,T=ct(x,P,M),L=l;i.modifiersData[n]=((e={})[L]=T,e.centerOffset=T-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Tt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Lt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Tt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(T().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=T();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;L().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(L().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function T(){return c||t}function L(){var t=T().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===T()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){L().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(T().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=L();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=L();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=T().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==T()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||T()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Lt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return L},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},L=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Tt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Lt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Tt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Lt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Tt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function T(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function L(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Tt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Lt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Tt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Te(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Le([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Le(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Ti(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Li(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Li(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;L(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},L(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Tn extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ln={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Ln[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){T(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){T(this.options.afterCalculateLabelRotation,[this])}beforeFit(){T(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){T(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const T=E(n.ticks.maxTicksLimit,l),L=Math.max(1,Math.ceil(l/T));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):L(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);T(i["before"+n],[],i),e[t](i),T(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Le(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),T(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;T(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Tn:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),T(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){L(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),L(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),L(n,((t,e)=>{t||delete i[e]})),L(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());L(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],L(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};L(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){L(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},L(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(T(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||T(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>L(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Tr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Lr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Tr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Lr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const T=Lr(M,m,o,s);if(t.lineTo(T.x,T.y),x>0){const e=Lr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Lr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const L=Lr(_,g,o,s);if(t.lineTo(L.x,L.y),b>0){const e=Lr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=T(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&T(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&T(e.onHover,[t,i,this],this)}else i&&T(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Lo(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,L(t.title,v),i.font=l.string,L(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,L(n,(t=>{L(t.before,v),L(t.lines,v),L(t.after,v)})),y=0,i.font=h.string,L(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],To(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,To(n)),s=Po(s,To(r)),s=Po(s,To(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return L(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,To(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,To(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,To(n)),s=Po(s,To(r)),s=Po(s,To(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),L(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,L(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,L(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=T(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?T(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ts=Ps;const Ls={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ls.init()));var Cs=Ls;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ts,Extensions:Cs,Tabs:As}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=L,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",L="end",T="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+L])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+L])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),L="clientHeight",T="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(L="scrollHeight",T="scrollWidth"),P=P,o===w&&(M=O,b-=P[L]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[T]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===T?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?T:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),L=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,L)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,T=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,T=!1;break}L.set(I,U)}if(T)for(var q=function(t){var e=v.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",L=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(L){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=L[M],z=L[M]+b[j],N=L[M]-b[I],B=f?-C[R]/2:0,$=v===P?T[R]:C[R],U=v===P?-C[R]:-T[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,T[R],G[R]),tt=x?T[R]/2-B-Q-J-D:$-Q-J-D,et=x?-T[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=L[M]+tt-rt-nt,st=L[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);L[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=L[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);L[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,L=ct(x,P,M),T=l;i.modifiersData[n]=((e={})[T]=L,e.centerOffset=L-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Tt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(T().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function T(){var t=L().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){T().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=T();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=T();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Tt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return T},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return L},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},T=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Tt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Lt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Tt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Lt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrSend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrSend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function T(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Tt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Te([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Te(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ti(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ti(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;T(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},T(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Tn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const L=E(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):T(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){T(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),T(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),T(n,((t,e)=>{t||delete i[e]})),T(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());T(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],T(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};T(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){T(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},T(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>T(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Tr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Tr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const L=Tr(M,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Tr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Tr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const T=Tr(_,g,o,s);if(t.lineTo(T.x,T.y),b>0){const e=Tr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function To(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,T(t.title,v),i.font=l.string,T(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,T(n,(t=>{T(t.before,v),T(t.lines,v),T(t.after,v)})),y=0,i.font=h.string,T(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],Lo(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return T(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,Lo(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),T(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,T(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,T(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?L(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ls=Ps;const Ts={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ts.init()));var Cs=Ts;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ls,Extensions:Cs,Tabs:As}}]); \ No newline at end of file diff --git a/src/js/components/global-transformations.js b/src/js/components/global-transformations.js index 1749eec10..419f132a2 100644 --- a/src/js/components/global-transformations.js +++ b/src/js/components/global-transformations.js @@ -304,19 +304,36 @@ const GlobalTransformations = { self._refresh( null, type ); } } ); - // listen to AJAX add-tag complete - jQuery( document ).ajaxComplete( function ( event, xhr, settings ) { - // bail early if is other ajax call - if ( settings.data.indexOf( 'action=add-tag' ) === -1 ) { - return; - } - // bail early if response contains error - if ( xhr.responseText.indexOf( 'wp_error' ) !== -1 ) { - return; + if ( this.form ) { + this.form.addEventListener( 'submit', () => { + this.pendingClear = true; + } ); + } + + // Lets clone the send method. + XMLHttpRequest.prototype.xhrSend = XMLHttpRequest.prototype.send; + // Redefine the send method to be able to set an event listener to the instance. + XMLHttpRequest.prototype.send = function ( content ) { + if ( content.indexOf( 'action=add-tag' ) !== -1 ) { + this.addEventListener( 'load', ( ev ) => { + const parser = new DOMParser(); + const html = parser.parseFromString( + this.response, + 'text/html' + ); + const res = wpAjax.parseAjaxResponse( + html, + 'ajax-response' + ); + if ( ! res.errors ) { + self._reset(); + } + } ); } - self._reset(); - } ); + // Send the original. + this.xhrSend( content ); + }; } }, }; From 21ef959c4ca302ff050cb38ae3c38244f16d5493 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Wed, 26 Jan 2022 11:27:05 +0200 Subject: [PATCH 05/19] rename to unique --- js/cloudinary.js | 2 +- src/js/components/global-transformations.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/cloudinary.js b/js/cloudinary.js index 41c78ae38..f9d32c132 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=L,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",L="end",T="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+L])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+L])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),L="clientHeight",T="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(L="scrollHeight",T="scrollWidth"),P=P,o===w&&(M=O,b-=P[L]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[T]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===T?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?T:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),L=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,L)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,T=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,T=!1;break}L.set(I,U)}if(T)for(var q=function(t){var e=v.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",L=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(L){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=L[M],z=L[M]+b[j],N=L[M]-b[I],B=f?-C[R]/2:0,$=v===P?T[R]:C[R],U=v===P?-C[R]:-T[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,T[R],G[R]),tt=x?T[R]/2-B-Q-J-D:$-Q-J-D,et=x?-T[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=L[M]+tt-rt-nt,st=L[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);L[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=L[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);L[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,L=ct(x,P,M),T=l;i.modifiersData[n]=((e={})[T]=L,e.centerOffset=L-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Tt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(T().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function T(){var t=L().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){T().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=T();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=T();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Tt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return T},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return L},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},T=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Tt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Lt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Tt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Lt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrSend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrSend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function T(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Tt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Te([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Te(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ti(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ti(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;T(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},T(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Tn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const L=E(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):T(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){T(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),T(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),T(n,((t,e)=>{t||delete i[e]})),T(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());T(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],T(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};T(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){T(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},T(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>T(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Tr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Tr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const L=Tr(M,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Tr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Tr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const T=Tr(_,g,o,s);if(t.lineTo(T.x,T.y),b>0){const e=Tr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function To(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,T(t.title,v),i.font=l.string,T(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,T(n,(t=>{T(t.before,v),T(t.lines,v),T(t.after,v)})),y=0,i.font=h.string,T(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],Lo(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return T(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,Lo(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),T(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,T(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,T(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?L(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ls=Ps;const Ts={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ts.init()));var Cs=Ts;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ls,Extensions:Cs,Tabs:As}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=L,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",L="end",T="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+L])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+L])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),L="clientHeight",T="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(L="scrollHeight",T="scrollWidth"),P=P,o===w&&(M=O,b-=P[L]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[T]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===T?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?T:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),L=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,L)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,T=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,T=!1;break}L.set(I,U)}if(T)for(var q=function(t){var e=v.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",L=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(L){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=L[M],z=L[M]+b[j],N=L[M]-b[I],B=f?-C[R]/2:0,$=v===P?T[R]:C[R],U=v===P?-C[R]:-T[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,T[R],G[R]),tt=x?T[R]/2-B-Q-J-D:$-Q-J-D,et=x?-T[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=L[M]+tt-rt-nt,st=L[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);L[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=L[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);L[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,L=ct(x,P,M),T=l;i.modifiersData[n]=((e={})[T]=L,e.centerOffset=L-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Tt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(T().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function T(){var t=L().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){T().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=T();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=T();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Tt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return T},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return L},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},T=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Tt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Lt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Tt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Lt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function T(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Tt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Te([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Te(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ti(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ti(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;T(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},T(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Tn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const L=E(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):T(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){T(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),T(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),T(n,((t,e)=>{t||delete i[e]})),T(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());T(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],T(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};T(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){T(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},T(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>T(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Tr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Tr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const L=Tr(M,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Tr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Tr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const T=Tr(_,g,o,s);if(t.lineTo(T.x,T.y),b>0){const e=Tr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function To(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,T(t.title,v),i.font=l.string,T(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,T(n,(t=>{T(t.before,v),T(t.lines,v),T(t.after,v)})),y=0,i.font=h.string,T(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],Lo(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return T(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,Lo(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),T(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,T(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,T(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?L(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ls=Ps;const Ts={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ts.init()));var Cs=Ts;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ls,Extensions:Cs,Tabs:As}}]); \ No newline at end of file diff --git a/src/js/components/global-transformations.js b/src/js/components/global-transformations.js index 419f132a2..a715d59bd 100644 --- a/src/js/components/global-transformations.js +++ b/src/js/components/global-transformations.js @@ -312,7 +312,8 @@ const GlobalTransformations = { } // Lets clone the send method. - XMLHttpRequest.prototype.xhrSend = XMLHttpRequest.prototype.send; + XMLHttpRequest.prototype.xhrCloudinarySend = + XMLHttpRequest.prototype.send; // Redefine the send method to be able to set an event listener to the instance. XMLHttpRequest.prototype.send = function ( content ) { if ( content.indexOf( 'action=add-tag' ) !== -1 ) { @@ -332,7 +333,7 @@ const GlobalTransformations = { } ); } // Send the original. - this.xhrSend( content ); + this.xhrCloudinarySend( content ); }; } }, From 7109e03c26ae53cb5eaa1b33fcf317df73ff203c Mon Sep 17 00:00:00 2001 From: David Cramer Date: Thu, 27 Jan 2022 14:14:26 +0200 Subject: [PATCH 06/19] add color picker --- css/cloudinary.css | 2 +- js/cloudinary.js | 2 +- package-lock.json | 32 +++++++++ package.json | 3 +- php/ui/component/class-color.php | 80 ++++++++++++---------- src/css/components/ui/_input.scss | 1 + src/css/components/ui/controls/_color.scss | 18 +++++ src/js/components/color-picker.js | 63 +++++++++++++++++ src/js/components/ui.js | 2 + 9 files changed, 165 insertions(+), 38 deletions(-) create mode 100644 src/css/components/ui/controls/_color.scss create mode 100644 src/js/components/color-picker.js diff --git a/css/cloudinary.css b/css/cloudinary.css index 399710eed..60fe3d571 100644 --- a/css/cloudinary.css +++ b/css/cloudinary.css @@ -1 +1 @@ -.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.dashicons-cloudinary:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:""}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:""}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:""}.dashicons-cloudinary.syncing:before{content:""}.dashicons-cloudinary.media:before{content:""}.dashicons-cloudinary.dam:before{content:""}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-settings{margin-left:-20px}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-info-box,.cld-panel,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db;margin-top:13px;padding:23px 24px}.cld-panel.full-width,.full-width.cld-info-box,.full-width.cld-panel-short{max-width:100%}.cld-panel.has-heading,.has-heading.cld-info-box,.has-heading.cld-panel-short{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86.3%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-info-box hr,.cld-panel-short hr,.cld-panel hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-info-box ul,.cld-panel-short ul,.cld-panel ul{list-style:initial;padding:0 3em}.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-bottom:none}.cld-info-box .stat-boxes .box .cld-ui-icon,.cld-panel-short .stat-boxes .box .cld-ui-icon,.cld-panel .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-info-box .stat-boxes .icon,.cld-panel-short .stat-boxes .icon,.cld-panel .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-info-box .stat-boxes h3,.cld-panel-short .stat-boxes h3,.cld-panel .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-info-box .stat-boxes .limit,.cld-panel-short .stat-boxes .limit,.cld-panel .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-info-box .stat-boxes .usage,.cld-panel-short .stat-boxes .usage,.cld-panel .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{font-size:1.2em}}.cld-info-box .img-connection-string,.cld-panel-short .img-connection-string,.cld-panel .img-connection-string{max-width:607px;width:100%}.cld-info-box .media-status-box,.cld-info-box .stat-boxes,.cld-panel-short .media-status-box,.cld-panel-short .stat-boxes,.cld-panel .media-status-box,.cld-panel .stat-boxes{border:1px solid #e5e5e5}.cld-info-box .media-status-box,.cld-panel-short .media-status-box,.cld-panel .media-status-box{padding:2rem;text-align:center}.cld-info-box .media-status-box .status,.cld-panel-short .media-status-box .status,.cld-panel .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-info-box .media-status-box .cld-ui-icon,.cld-panel-short .media-status-box .cld-ui-icon,.cld-panel .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-info-box .notification,.cld-panel-short .notification,.cld-panel .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-info-box .notification-success,.cld-panel-short .notification-success,.cld-panel .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-info-box .notification-success:before,.cld-panel-short .notification-success:before,.cld-panel .notification-success:before{color:#20b832}.cld-info-box .notification-syncing,.cld-panel-short .notification-syncing,.cld-panel .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-info-box .notification-syncing:before,.cld-panel-short .notification-syncing:before,.cld-panel .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-info-box .notification:before,.cld-panel-short .notification:before,.cld-panel .notification:before{margin-right:.5em}.cld-info-box .help-wrap,.cld-panel-short .help-wrap,.cld-panel .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}.cld-info-box .help-wrap .help-box .large-button,.cld-panel-short .help-wrap .help-box .large-button,.cld-panel .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-info-box .help-wrap .help-box .large-button:hover,.cld-panel-short .help-wrap .help-box .large-button:hover,.cld-panel .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-info-box .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel-short .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-info-box .help-wrap .help-box img,.cld-panel-short .help-wrap .help-box img,.cld-panel .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-info-box .help-wrap .help-box div,.cld-info-box .help-wrap .help-box h4,.cld-panel-short .help-wrap .help-box div,.cld-panel-short .help-wrap .help-box h4,.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4{padding:0 12px}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud,.closed.cld-info-box+.cld-submit,.closed.cld-info-box+.cld-switch-cloud,.closed.cld-panel-short+.cld-submit,.closed.cld-panel-short+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button{background-color:#e9ecf9;border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-info-box,.cld-ui-sidebar .cld-panel,.cld-ui-sidebar .cld-panel-short{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{align-items:center;display:flex;justify-content:space-between;margin-top:50px}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em} \ No newline at end of file +.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.dashicons-cloudinary:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:""}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:""}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:""}.dashicons-cloudinary.syncing:before{content:""}.dashicons-cloudinary.media:before{content:""}.dashicons-cloudinary.dam:before{content:""}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-settings{margin-left:-20px}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-info-box,.cld-panel,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db;margin-top:13px;padding:23px 24px}.cld-panel.full-width,.full-width.cld-info-box,.full-width.cld-panel-short{max-width:100%}.cld-panel.has-heading,.has-heading.cld-info-box,.has-heading.cld-panel-short{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86.3%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-info-box hr,.cld-panel-short hr,.cld-panel hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-info-box ul,.cld-panel-short ul,.cld-panel ul{list-style:initial;padding:0 3em}.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-bottom:none}.cld-info-box .stat-boxes .box .cld-ui-icon,.cld-panel-short .stat-boxes .box .cld-ui-icon,.cld-panel .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-info-box .stat-boxes .icon,.cld-panel-short .stat-boxes .icon,.cld-panel .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-info-box .stat-boxes h3,.cld-panel-short .stat-boxes h3,.cld-panel .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-info-box .stat-boxes .limit,.cld-panel-short .stat-boxes .limit,.cld-panel .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-info-box .stat-boxes .usage,.cld-panel-short .stat-boxes .usage,.cld-panel .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{font-size:1.2em}}.cld-info-box .img-connection-string,.cld-panel-short .img-connection-string,.cld-panel .img-connection-string{max-width:607px;width:100%}.cld-info-box .media-status-box,.cld-info-box .stat-boxes,.cld-panel-short .media-status-box,.cld-panel-short .stat-boxes,.cld-panel .media-status-box,.cld-panel .stat-boxes{border:1px solid #e5e5e5}.cld-info-box .media-status-box,.cld-panel-short .media-status-box,.cld-panel .media-status-box{padding:2rem;text-align:center}.cld-info-box .media-status-box .status,.cld-panel-short .media-status-box .status,.cld-panel .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-info-box .media-status-box .cld-ui-icon,.cld-panel-short .media-status-box .cld-ui-icon,.cld-panel .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-info-box .notification,.cld-panel-short .notification,.cld-panel .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-info-box .notification-success,.cld-panel-short .notification-success,.cld-panel .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-info-box .notification-success:before,.cld-panel-short .notification-success:before,.cld-panel .notification-success:before{color:#20b832}.cld-info-box .notification-syncing,.cld-panel-short .notification-syncing,.cld-panel .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-info-box .notification-syncing:before,.cld-panel-short .notification-syncing:before,.cld-panel .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-info-box .notification:before,.cld-panel-short .notification:before,.cld-panel .notification:before{margin-right:.5em}.cld-info-box .help-wrap,.cld-panel-short .help-wrap,.cld-panel .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}.cld-info-box .help-wrap .help-box .large-button,.cld-panel-short .help-wrap .help-box .large-button,.cld-panel .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-info-box .help-wrap .help-box .large-button:hover,.cld-panel-short .help-wrap .help-box .large-button:hover,.cld-panel .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-info-box .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel-short .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-info-box .help-wrap .help-box img,.cld-panel-short .help-wrap .help-box img,.cld-panel .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-info-box .help-wrap .help-box div,.cld-info-box .help-wrap .help-box h4,.cld-panel-short .help-wrap .help-box div,.cld-panel-short .help-wrap .help-box h4,.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4{padding:0 12px}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud,.closed.cld-info-box+.cld-submit,.closed.cld-info-box+.cld-switch-cloud,.closed.cld-panel-short+.cld-submit,.closed.cld-panel-short+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-input-color-picker{position:absolute;z-index:100}.cld-input-color-preview{border:3px solid #c6d1db;border-radius:4px;box-shadow:inset 0 0 3px rgba(0,0,0,.5);cursor:pointer;display:inline-block;height:40px;margin:0 0 6px;vertical-align:middle;width:70px}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button{background-color:#e9ecf9;border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-info-box,.cld-ui-sidebar .cld-panel,.cld-ui-sidebar .cld-panel-short{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{align-items:center;display:flex;justify-content:space-between;margin-top:50px}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em} \ No newline at end of file diff --git a/js/cloudinary.js b/js/cloudinary.js index f9d32c132..477e9c239 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},p=function(t,e,i){return f(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return f(e,void 0,t)},_x:p,_n:function(t,e,i,n){return f(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return f(r,n,t,e,i)},isRTL:function(){return"rtl"===p("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(f(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(f(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},p=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+f(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+f(e),n,t,e)):n},_x:p,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+f(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+f(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+f(r),l,t,e,r)),l}}}(void 0,void 0,k)),M=(S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S));S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);function E(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function P(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign($(t),e),i=i.substr(0,n)),i+"?"+Y(e)}function G(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=B.a.mark((function t(e,i){var n,o,s,a,l,c;return B.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,K(K({},r(h,["path","url"])),{},{url:f&&X(f,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){z(o,n,r,s,a,"next",t)}function a(t){z(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:M("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:M("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:M("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ft(t){for(var e=1;e=200&&t.status<300)return t;throw t},yt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=ft(ft({},pt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,ft(ft(ft({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:M("You are probably offline.")}}))};function vt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),yt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(vt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return vt.nonceMiddleware.nonce=e,vt(t)}))}))}vt.use=function(t){mt.unshift(t)},vt.setFetchHandler=function(t){yt=t},vt.createNonceMiddleware=L,vt.createPreloadingMiddleware=F,vt.createRootURLMiddleware=I,vt.fetchAllMiddleware=tt,vt.mediaUploadMiddleware=ut;var xt=e.a=vt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;E(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function f(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function p(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),p=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||f(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:p.left+m.scrollLeft-b.x,y:p.top+m.scrollTop-b.y,width:p.width,height:p.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&f(t)?t:b(m(t))}function y(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],f(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(y(m(a)))}function v(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&v(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",O="bottom",k="right",S="left",M="auto",E=[w,O,k,S],P="start",L="end",T="viewport",C="popper",D=E.reduce((function(t,e){return t.concat([e+"-"+P,e+"-"+L])}),[]),A=[].concat(E,[M]).reduce((function(t,e){return t.concat([e,e+"-"+P,e+"-"+L])}),[]),j=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var R={placement:"bottom",modifiers:[],strategy:"absolute"};function F(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function $(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?W(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case O:e={x:a,y:i.y+i.height};break;case k:e={x:i.x+i.width,y:l};break;case S:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?H(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case P:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=$({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},q=Math.max,Y=Math.min,X=Math.round,G={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,f=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,p=f.x,g=void 0===p?0:p,m=f.y,b=void 0===m?0:m,y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),x=S,M=w,E=window;if(c){var P=_(i),L="clientHeight",T="clientWidth";P===r(i)&&"static"!==d(P=h(i)).position&&(L="scrollHeight",T="scrollWidth"),P=P,o===w&&(M=O,b-=P[L]-n.height,b*=l?1:-1),o===S&&(x=k,g-=P[T]-n.width,g*=l?1:-1)}var C,D=Object.assign({position:a},c&&G);return l?Object.assign({},D,((C={})[M]=v?"0":"",C[x]=y?"0":"",C.transform=(E.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",C)):Object.assign({},D,((e={})[M]=v?b+"px":"",e[x]=y?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===T?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=q(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=q(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=q(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=y(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=q(n.top,e.top),e.right=Y(n.right,e.right),e.bottom=Y(n.bottom,e.bottom),e.left=q(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?T:c,d=i.elementContext,f=void 0===d?C:d,p=i.altBoundary,g=void 0!==p&&p,m=i.padding,b=void 0===m?0:m,y=st("number"!=typeof b?b:at(b,E)),v=f===C?"reference":C,x=t.elements.reference,_=t.rects.popper,S=t.elements[g?v:f],M=ot(s(S)?S:S.contextElement||h(t.elements.popper),l,u),P=n(x),L=$({reference:P,element:_,strategy:"absolute",placement:o}),D=nt(Object.assign({},_,L)),A=f===C?D:P,j={top:M.top-A.top+y.top,bottom:A.bottom-M.bottom+y.bottom,left:M.left-A.left+y.left,right:A.right-M.right+y.right},I=t.modifiersData.offset;if(f===C&&I){var R=I[o];Object.keys(j).forEach((function(t){var e=[k,O].indexOf(t)>=0?1:-1,i=[w,O].indexOf(t)>=0?"y":"x";j[t]+=R[i]*e}))}return j}function ct(t,e,i){return q(t,Y(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,k,O,S].some((function(e){return t[e]>=0}))}var dt=z({defaultModifiers:[B,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:W(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=A.reduce((function(t,i){return t[i]=function(t,e,i){var n=W(t),r=[S,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[S,k].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=W(m),y=l||(b===m||!p?[Q(m)]:function(t){if(W(t)===M)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),v=[m].concat(y).reduce((function(t,i){return t.concat(W(i)===M?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?A:l,h=V(n),u=h?a?D:D.filter((function(t){return V(t)===h})):E,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[W(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,T=!0,C=v[0],j=0;j=0,N=z?"width":"height",B=lt(e,{placement:I,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),H=z?F?k:S:F?O:w;x[N]>_[N]&&(H=Q(H));var $=Q(H),U=[];if(o&&U.push(B[R]<=0),a&&U.push(B[H]<=0,B[$]<=0),U.every((function(t){return t}))){C=I,T=!1;break}L.set(I,U)}if(T)for(var q=function(t){var e=v.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return C=e,"break"},Y=p?3:1;Y>0;Y--){if("break"===q(Y))break}e.placement!==C&&(e.modifiersData[n]._skip=!0,e.placement=C,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,m=void 0===p?0:p,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),y=W(e.placement),v=V(e.placement),x=!v,M=H(y),E="x"===M?"y":"x",L=e.modifiersData.popperOffsets,T=e.rects.reference,C=e.rects.popper,D="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A={x:0,y:0};if(L){if(o||a){var j="y"===M?w:S,I="y"===M?O:k,R="y"===M?"height":"width",F=L[M],z=L[M]+b[j],N=L[M]-b[I],B=f?-C[R]/2:0,$=v===P?T[R]:C[R],U=v===P?-C[R]:-T[R],X=e.elements.arrow,G=f&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[j],Z=K[I],Q=ct(0,T[R],G[R]),tt=x?T[R]/2-B-Q-J-D:$-Q-J-D,et=x?-T[R]/2+B+Q+Z+D:U+Q+Z+D,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===M?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][M]:0,ot=L[M]+tt-rt-nt,st=L[M]+et-rt;if(o){var at=ct(f?Y(z,ot):z,F,f?q(N,st):N);L[M]=at,A[M]=at-F}if(a){var ht="x"===M?w:S,ut="x"===M?O:k,dt=L[E],ft=dt+b[ht],pt=dt-b[ut],gt=ct(f?Y(ft,ot):ft,dt,f?q(pt,st):pt);L[E]=gt,A[E]=gt-dt}}e.modifiersData[n]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=W(i.placement),l=H(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,E))}(r.padding,i),u=g(o),d="y"===l?w:S,f="y"===l?O:k,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),y=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,v=p/2-m/2,x=h[d],M=y-u[c]-h[f],P=y/2-u[c]/2+v,L=ct(x,P,M),T=l;i.modifiersData[n]=((e={})[T]=L,e.centerOffset=L-P,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),ft="tippy-content",pt="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function yt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function vt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function Ot(t,e){-1===t.indexOf(e)&&t.push(e)}function kt(t){return t.split("-")[0]}function St(t){return[].slice.call(t)}function Mt(){return document.createElement("div")}function Et(t){return["Element","Fragment"].some((function(e){return vt(t,e)}))}function Pt(t){return vt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Tt(t){return Et(t)?[t]:function(t){return vt(t,"NodeList")}(t)?St(t):Array.isArray(t)?t:St(document.querySelectorAll(t))}function Ct(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Dt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function At(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function jt(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var It={isTouch:!1},Rt=0;function Ft(){It.isTouch||(It.isTouch=!0,window.performance&&document.addEventListener("mousemove",zt))}function zt(){var t=performance.now();t-Rt<20&&(It.isTouch=!1,document.removeEventListener("mousemove",zt)),Rt=t}function Nt(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Bt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Wt=/MSIE |Trident\//.test(Bt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ht=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),$t=Object.keys(Ht);function Ut(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function qt(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Ut(Object.assign({},Ht,{plugins:e}))):$t).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Ht.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Yt(t,e){t.innerHTML=e}function Xt(t){var e=Mt();return!0===t?e.className=gt:(e.className=mt,Et(t)?e.appendChild(t):Yt(e,t)),e}function Gt(t,e){Et(e.content)?(Yt(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Yt(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=St(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(ft)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(pt)}))}}function Jt(t){var e=Mt(),i=Mt();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Mt();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Gt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=ft,n.setAttribute("data-state","hidden"),Gt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=qt(t,Object.assign({},Ht,{},Ut((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,f=!1,p=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),y=Zt++,v=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:y,reference:t,popper:Mt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;j("onBeforeUpdate",[x,e]),q();var i=x.props,n=qt(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,U(),i.interactiveDebounce!==n.interactiveDebounce&&(F(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),A(),O&&O(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));j("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=It.isTouch&&!x.props.touch,r=yt(x.props.duration,0,Ht.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(j("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,P()&&(w.style.visibility="visible");A(),W(),x.state.isMounted||(w.style.transition="none");if(P()){var o=C(),s=o.box,a=o.content;Ct([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,P()&&x.props.animation){var e=C(),i=e.box,n=e.content;Ct([i,n],r),Dt([i,n],"visible")}I(),R(),Ot(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,j("onMount",[x]),x.props.animation&&P()&&function(t,e){H(t,e)}(r,(function(){x.state.isShown=!0,j("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Ht.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=yt(x.props.duration,1,Ht.duration);if(t||e||i)return;if(j("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,P()&&(w.style.visibility="hidden");if(F(),V(),A(),P()){var r=C(),o=r.box,s=r.content;x.props.animation&&(Ct([o,s],n),Dt([o,s],"hidden"))}I(),R(),x.props.animation?P()&&function(t,e){H(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",b),Ot(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,j("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),q(),delete t._tippy,x.state.isDestroyed=!0,j("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,O=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var k=v.map((function(t){return t.fn(x)})),S=t.hasAttribute("aria-expanded");return U(),R(),A(),j("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(T().addEventListener("mousemove",b),b(t))})),x;function M(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function E(){return"hold"===M()[0]}function P(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function T(){var t=L().parentNode;return t?At(t):document}function C(){return Kt(w)}function D(t){return x.state.isMounted&&!x.state.isVisible||It.isTouch||s&&"focus"===s.type?0:yt(x.props.delay,t?0:1,Ht.delay)}function A(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function j(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function I(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function R(){!S&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function F(){T().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function z(t){if(!(It.isTouch&&(p||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(It.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||V())}}function N(){p=!0}function B(){p=!1}function W(){var t=T();t.addEventListener("mousedown",z,!0),t.addEventListener("touchend",z,bt),t.addEventListener("touchstart",B,bt),t.addEventListener("touchmove",N,bt)}function V(){var t=T();t.removeEventListener("mousedown",z,!0),t.removeEventListener("touchend",z,bt),t.removeEventListener("touchstart",B,bt),t.removeEventListener("touchmove",N,bt)}function H(t,e){var i=C().box;function n(t){t.target===i&&(jt(i,"remove",n),e())}if(0===t)return e();jt(i,"remove",a),jt(i,"add",n),a=n}function $(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function U(){var t;E()&&($("touchstart",Y,{passive:!0}),$("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch($(t,Y),t){case"mouseenter":$("mouseleave",G);break;case"focus":$(Wt?"focusout":"blur",K);break;case"focusin":$("focusout",K)}}))}function q(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function Y(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!f){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,R(),!x.state.isVisible&&Pt(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=kt(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(F(),it(t))}function G(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!It.isTouch&&E()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=P()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(P()){var i=C().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];P()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return St(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&j("onTrigger",[x,t]),W();var e=D(!0),i=M(),r=i[0],o=i[1];It.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),j("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=D(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Ht.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Ft,bt),window.addEventListener("blur",Nt);var n=Object.assign({},e,{plugins:i}),r=Tt(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Et(t)?r[0]:r}ie.defaultProps=Ht,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Ht[e]=t[e]}))},ie.currentInput=It;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=y(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function y(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=y(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=y,f.Scale=c,f})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Ut},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return k},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return T},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return O},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return y},easeOutBack:function(){return L},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return A},swingFromTo:function(){return D},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Nt},beforeTween:function(){return zt},doesApply:function(){return Rt},tweenCreated:function(){return Ft}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},y=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},O=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},T=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:G,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||G;return i},ft=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(Y=t._previous,X=t._next,Y._next=X,X._previous=Y),t._previous=t._next=null},pt="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;B(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=pt,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,y=this._targetState;for(var v in f)m[v]=f[v];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,y[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return $({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,ft(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,ft(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=$({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&W(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}U(gt,"now",(function(){return q})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){q=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,yt,vt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,yt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(yt).concat(bt).concat(yt).concat(bt,"\\)"),"g")),Ot=/^.*\(/,kt=/#([0-9]|[a-f]){3,6}/gi,St="VAL",Mt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Et(t){return parseInt(t,16)}var Pt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Et(e.substr(0,2)),Et(e.substr(2,2)),Et(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,St);return n&&n.forEach((function(t){return r=r.replace(St,i(t))})),r},Tt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(kt)&&(t[e]=Lt(kt,i,Pt))}},Ct=function(t){var e=t.match(_t).map(Math.floor),i=t.match(Ot)[0];return"".concat(i).concat(e.join(","),")")},Dt=function(t){return t.match(_t)},At=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},jt=function(t,e){return e.map((function(e){return t[e]}))},It=function(t,e){return e.forEach((function(e){return t=t.replace(St,+e.toFixed(4))})),t},Rt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ft(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Tt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(vt))&&i.unshift(""):i=["",""],i.join(St)),chunkNames:Mt(Dt(o),r)})}return n}(e)}function zt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Dt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Nt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=It(o,jt(At(t,r),r));t[i]=Lt(wt,s,Ct)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Wt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Wt({},t),s=dt(t,n);for(var a in Ht._filters.length=0,Ht.set({}),Ht._currentState=o,Ht._originalState=t,Ht._targetState=e,Ht._easing=s,$t)$t[a].doesApply(Ht)&&Ht._filters.push($t[a]);Ht._applyFilter("tweenCreated"),Ht._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Ht._applyFilter("afterTween"),l};function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=f(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,f,p,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},,,,,,,,,,,,function(t,e,i){"use strict";i.r(e),i.d(e,"cloudinary",(function(){return js}));i(27),i(28);var n=i(22),r=i.n(n);const o={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"dog",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const y=t=>"start"===t?"left":"end"===t?"right":"center",v=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function O(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function k(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const S=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function M(t,e){return S(t)?t:e}function E(t,e){return void 0===t?e:t}const P=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function T(t,e,i,n){let r,o,s;if(O(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=z(e,i);return t}function B(t){return t.charAt(0).toUpperCase()+t.slice(1)}const W=t=>void 0!==t,V=t=>"function"==typeof t,H=Math.PI,$=2*H,U=$+H,q=Number.POSITIVE_INFINITY,Y=H/180,X=H/2,G=H/4,K=2*H/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*$/i),ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*$/i)+1,pt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(H*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-pt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*pt.easeInBounce(2*t):.5*pt.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],yt=t=>mt[(240&t)>>4]+mt[15&t],vt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return vt(t.r)&&vt(t.g)&&vt(t.b)&&vt(t.a)}(t)?bt:yt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function Ot(t){return wt(_t(2.55*t),0,255)}function kt(t){return wt(_t(255*t),0,255)}function St(t){return wt(_t(t/2.55)/100,0,1)}function Mt(t){return wt(_t(100*t),0,100)}const Et=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Pt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Tt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Ct(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Dt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Wt(t,e,i){if(t){let n=Dt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=jt(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Ht(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=kt(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=kt(e.a),e}function $t(t){return"r"===t.charAt(0)?function(t){const e=Et.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?Ot(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ot(i):i),n=255&(e[4]?Ot(n):n),r=255&(e[6]?Ot(r):r),{r:i,g:n,b:r,a:o}}}(t):Rt(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ht(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||Bt(t)||$t(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=St(t.a)),t}set rgb(t){this._rgb=Ht(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${St(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Dt(t),i=e[0],n=Mt(e[1]),r=Mt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${St(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=kt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Wt(this._rgb,2,t),this}darken(t){return Wt(this._rgb,2,-t),this}saturate(t){return Wt(this._rgb,1,t),this}desaturate(t){return Wt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Dt(t);i[0]=It(i[0]+e),i=jt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}const Yt=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Yt(t)?t:qt(t)}function Gt(t){return Yt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Gt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Gt(e.borderColor),this.hoverColor=(t,e)=>Gt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return k(t)?Object.assign({},e,t):E(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lE(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ye(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ve(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ye(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=E(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=E(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:E(t.family,e.family),lineHeight:me(E(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:E(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Se=(t,e,i)=>ke(t,i,(n=>t[n][e]ke(t,i,(n=>t[n][e]>=i));const Ee=["push","pop","shift","splice","unshift"];function Pe(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Ee.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){W(n)||(n=We("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Te([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Ie(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=We(Ae(o,t),i),W(r))return je(t,r)?Ne(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Ce(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:De(t,n),setContext:e=>Ce(t,e,i,n),override:r=>Ce(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),k(e)&&(e=Ne(r._scopes,r,t,e));return e}(e,a,t,i));O(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(W(o.index)&&n(t))e=e[o.index%e.length];else if(k(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Ne(n,r,t,l);e.push(Ce(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));je(e,a)&&(a=Ce(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function De(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const Ae=(t,e)=>t?t+B(e):e,je=(t,e)=>k(e)&&"adapters"!==t;function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Re(t,e,i){return V(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?N(e,t):void 0;function ze(t,e,i,n){for(const r of e){const e=Fe(i,r);if(e){t.add(e);const r=Re(e._fallback,i,e);if(W(r)&&r!==i&&r!==n)return r}else if(!1===e&&W(n)&&i!==n)return null}return!1}function Ne(t,e,i,n){const r=e._rootScopes,o=Re(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Be(a,s,i,o||i);return null!==l&&((!W(o)||o===i||(l=Be(a,s,o,l),null!==l))&&Te(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(O(r)&&k(i))return i;return r}(e,i,n))))}function Be(t,e,i,n){for(;i;)i=ze(t,e,i,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(W(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const He=Number.EPSILON||1e-14,$e=(t,e)=>e"x"===t?"y":"x";function qe(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ye(t,e="x"){const i=Ue(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=$e(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ye(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||q,a=Ze(r.maxHeight,t,"clientHeight")||q,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||q,maxHeight:r||q}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function fi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function pi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function yi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;cy||l(r,b,g)&&0!==a(r,b),_=()=>!y||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(y=l(g,r,o),null===v&&x()&&(v=0===a(g,r)?t:i),null!==v&&_()&&(p.push(bi({start:v,end:t,loop:d,count:s,style:f})),v=null),i=t,b=g));return null!==v&&p.push(bi({start:v,end:u,loop:d,count:s,style:f})),p}function vi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const ki="transparent",Si={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||ki),r=n.valid&&Xt(e||ki);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Mi{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Si[t.type||typeof o],this._easing=pt[t.easing]||pt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!k(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!k(n))return;const r={};for(const t of Ei)r[t]=n[t];(O(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Mi(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Oi.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ti(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Fi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const zi=t=>"reset"===t||"none"===t,Ni=(t,e)=>e?t:Object.assign({},t);class Bi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Di(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=E(i.xAxisID,Ri(t,"x")),o=e.yAxisID=E(i.yAxisID,Ri(t,"y")),s=e.rAxisID=E(i.rAxisID,Ri(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Pe(this._data,this),t._stacked&&Fi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(k(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+B(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Di(e.vScale,e),e.stack!==i.stack&&(n=!0,Fi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ii(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=O(n[t])?this.parseArrayData(i,n,t,e):k(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ti(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!S(d[t.axis])||c>e||h=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Ni(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Pi(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||zi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){zi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!zi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(W(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Hi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=E(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends Bi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(k(i[t])){const{key:t="value"}=this._parsing;s=e=>+N(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(X,h,d),b=p(H,c,u),y=p(H+X,h,d);n=(g-b)/2,r=(m-y)/2,o=-(g+b)/2,s=-(m+y)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,y=(i.height-o)/p,v=Math.max(Math.min(b,y)/2,0),x=P(this.options.radius,v),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/$)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),p=this.getSharedOptions(f),g=this.includeOptions(n,p);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?$*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return O(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends Bi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Se(a,s.axis,c).lo,i?n:Se(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Se(a,s.axis,h).hi+1,i?0:Se(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=tt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-y[d]>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends Bi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*H;let d,f=u;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends Bi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Gi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Me:Se;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var pn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",fn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",fn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function yn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function vn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function kn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=yn(mn(e,"left"),!0),r=yn(mn(e,"right")),o=yn(mn(e,"top"),!0),s=yn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;T(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=vn(l.concat(c),u);kn(a.fullSize,f,u,p),kn(l,f,u,p),kn(c,f,u,p)&&kn(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Mn(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Mn(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},T(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Pn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends Pn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Tn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cn=t=>null===t||""===t;const Dn=!!si&&{passive:!0};function An(t,e,i){t.canvas.removeEventListener(e,i,Dn)}function jn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function In(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const Rn=new Map;let Fn=0;function zn(){const t=window.devicePixelRatio;t!==Fn&&(Fn=t,Rn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Nn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){Rn.size||window.addEventListener("resize",zn),Rn.set(t,e)}(t,o),s}function Bn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Rn.delete(t),Rn.size||window.removeEventListener("resize",zn)}(t)}function Wn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Tn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Dn)}(n,e,r),r}class Vn extends Pn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Cn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Cn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:jn,detach:In,resize:Nn}[e]||Wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Bn,detach:Bn,resize:Bn}[e]||An)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Hn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Hn.defaults={},Hn.defaultRoutes=void 0;const $n={values:t=>O(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?$n.numeric.call(this,t,e,i):""}};var Un={formatters:$n};function qn(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Yn(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Un.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Gn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(O(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=y(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Hn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=M(t,Number.POSITIVE_INFINITY),e=M(e,Number.NEGATIVE_INFINITY),i=M(i,Number.POSITIVE_INFINITY),n=M(n,Number.NEGATIVE_INFINITY),{min:M(t,i),max:M(e,n),minDefined:S(t),maxDefined:S(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:M(i,M(n,i)),max:M(n,M(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=P(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(v),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return ne(i,t,d)};let g,m,b,y,v,x,_,w,O,S,M,P;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,S=p(t.top)+f,P=t.bottom;else if("bottom"===o)g=p(this.top),S=t.top,P=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),v=this.right-c,_=g-f,O=p(t.left)+f,M=t.right;else if("right"===o)g=p(this.left),O=t.left,M=p(t.right)-f,v=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}S=t.top,P=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(k(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}v=g-f,_=v-c,O=t.left,M=t.right}const L=E(n.ticks.maxTicksLimit,l),T=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(Bi,"datasets",!0),this.elements=new er(Hn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):T(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=B(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=E(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!k(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=R(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),R(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];R(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const fr=(t,e,i)=>{const n=N(e,i);void 0!==n&&t.add(n)};class pr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>fr(a,t,e)))),e.forEach((t=>fr(a,n,t))),e.forEach((t=>fr(a,Kt[r]||{},t))),e.forEach((t=>fr(a,te,t))),e.forEach((t=>fr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=De(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&O(s))return!0}return!1}(o,e)){r.$shared=!1;a=Ce(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return k(e)?Ce(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Te(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>k(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function yr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function vr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Or={},kr=t=>{const e=wr(t);return Object.values(Or).filter((t=>t.canvas===e)).pop()};class Sr{constructor(t,e){const i=this.config=new pr(e),n=wr(t),r=kr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),Or[this.id]=this,s&&a?(Oi.listen(this,"complete",xr),Oi.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return Oi.stop(this),this}resize(t,e){Oi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){T(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),T(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=E(r.type,e.dtype);void 0!==r.position&&yr(r.position,s)===yr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),T(n,((t,e)=>{t||delete i[e]})),T(i,(t=>{En.configure(this,t,t.options),En.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());T(this.scales,(t=>{En.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(vr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;En.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],T(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=pn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Oe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);W(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oi.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};T(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){T(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},T(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!C(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!C(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Mr=()=>T(Sr.instances,(t=>t._plugins.invalidate())),Er=!0;function Pr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Tr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Cr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const f=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const p=(f-Math.max(.001,f*h-i/H)/h)/2,g=a+p+d,m=r-p-d,{outerStart:b,outerEnd:y,innerStart:v,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-y,O=g+b/_,k=m-y/w,S=u+v,M=u+x,E=g+v/S,P=m-x/M;if(t.beginPath(),t.arc(o,s,h,O,k),y>0){const e=Tr(w,k,o,s);t.arc(e.x,e.y,y,k,m+X)}const L=Tr(M,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Tr(M,P,o,s);t.arc(e.x,e.y,x,m+X,P+Math.PI)}if(t.arc(o,s,u,m-x/u,g+v/u,!0),v>0){const e=Tr(S,E,o,s);t.arc(e.x,e.y,v,E+Math.PI,g-X)}const T=Tr(_,g,o,s);if(t.lineTo(T.x,T.y),b>0){const e=Tr(_,O,o,s);t.arc(e.x,e.y,b,g-X,O)}t.closePath()}function Dr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Pr(t,e,o+$),t.beginPath(),t.arc(n,r,c,o+$,o,!0),h=0;h{ir.add(...t),Mr()}},unregister:{enumerable:Er,value:(...t)=>{ir.remove(...t),Mr()}}});class Ar extends Hn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*H&&(o+=$),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=$||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>$?Math.floor(i/$):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=H&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Cr(t,e,i,n,o+$);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,v=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[y(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[y(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ip&&(p=i),m=(b*m+e)/++b):(v(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}v()}function Nr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?zr:Fr}Ar.id="arc",Ar.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Ar.defaultRoutes={backgroundColor:"backgroundColor"};const Br="function"==typeof Path2D;function Wr(t,e,i,n){Br&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),jr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Nr(e);for(const a of r)jr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Hn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ge(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class $r extends Hn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Gr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}$r.id="point",$r.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},$r.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Hn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Yr(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?fe:Gr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Ar,LineElement:Vr,PointElement:$r,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Se(e,o.axis,s).lo,0,i-1)),n=c?ht(Se(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;hd&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,y=t[e].x,v=t[b].x-y;for(r=e;rf&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=E(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(k(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return S(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:$},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:k(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(S(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!S(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function fo(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function po(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=fo(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=vi(e,l);for(const e of c){const n=fo(i,o[e.start],o[e.end],e.loop),a=yi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:po(l,n,"start",Math.max)},end:{[i]:po(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&fo(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||mo(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function yo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var vo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&yo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&yo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&yo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Hn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=fi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=v(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=v(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=v(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=fi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),y=this._computeTitleHeight();f=b?{x:v(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:v(r,this.top+y+h,this.bottom-e[0].height),line:0},pi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const O=n.measureText(_.text).width,k=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),S=p+d+O;let M=f.x,P=f.y;a.setWidth(this.width),b?w>0&&M+S+h>this.right&&(P=f.y+=x,f.line++,M=f.x=v(r,this.left+h,this.right-i[f.line])):w>0&&P+x>this.bottom&&(M=f.x=M+e[f.line].width+h,f.line++,P=f.y=v(r,this.top+y+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=E(i.lineWidth,1);if(n.fillStyle=E(i.fillStyle,s),n.lineCap=E(i.lineCap,"butt"),n.lineDashOffset=E(i.lineDashOffset,0),n.lineJoin=E(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=E(i.strokeStyle,s),n.setLineDash(E(i.lineDash,[])),o.usePointStyle){const o={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,p/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=ve(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?fe(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(M),P,_),M=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,M+p+d,b?M+S:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(M),P,_),b?f.x+=S+h:f.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=fi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=v(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+v(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=v(s,h,h+u);o.textAlign=r.textAlign(y(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n)},stop(t){En.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;En.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Oo extends Hn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=O(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=v(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=v(s,n,e),h=-.5*H):(l=r-t,c=v(s,e,n),h=.5*H),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:y(e.align),textBaseline:"middle",translation:[r,o]})}}var ko={id:"title",_element:Oo,start(t,e,i){!function(t,e){const i=new Oo({ctx:t.ctx,options:e,chart:t});En.configure(t,i,e),En.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;En.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const So=new WeakMap;var Mo={id:"subtitle",start(t,e,i){const n=new Oo({ctx:t.ctx,options:i,chart:t});En.configure(t,n,i),En.addBox(t,n),So.set(t,n)},stop(t){En.removeBox(t,So.get(t)),So.delete(t)},beforeUpdate(t,e,i){const n=So.get(t);En.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Eo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function To(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function Co(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,f=n.length,p=xe(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=c.string,T(t.title,v),i.font=l.string,T(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?s+2+e.boxPadding:0,T(n,(t=>{T(t.before,v),T(t.lines,v),T(t.after,v)})),y=0,i.font=h.string,T(t.footer,v),i.restore(),m+=p.width,{width:m,height:g}}function Do(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Do(t,e,i,n),yAlign:n}}function jo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=ve(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+o:"right"===a&&(p+=Math.max(u,f)+o),{x:ht(p,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Io(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ro(t){return Po([],Lo(t))}function Fo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class zo extends Hn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Pi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,Oe(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}getBeforeBody(t,e){return Ro(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return T(t,(t=>{const e={before:[],lines:[],after:[]},r=Fo(i,t);Po(e.before,Lo(r.beforeLabel.call(this,t))),Po(e.lines,r.label.call(this,t)),Po(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Ro(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Po(s,Lo(n)),s=Po(s,Lo(r)),s=Po(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),T(l,(e=>{const i=Fo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Eo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Co(this,i),s=Object.assign({},t,e),a=Ao(this._chart,i,s),l=jo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ve(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,y,v,x;return"center"===r?(v=d+p/2,"left"===n?(g=u,m=g-o,y=v+o,x=v-o):(g=u+f,m=g+o,y=v-o,x=v+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(y=d,v=y-o,g=m-o,b=m+o):(y=d+p,v=y+o,g=m+o,b=m-o),x=y),{x1:g,x2:m,x3:b,y1:y,y2:v,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=fi(i.rtl,this.x,this.width);for(t.x=Io(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,fe(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fe(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const f=fi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,y,v,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Io(this,g,i),e.fillStyle=i.bodyColor,T(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,v=0,_=n.length;v<_;++v){for(m=n[v],b=this.labelTextColors[v],e.fillStyle=b,T(m.before,p),y=m.lines,s&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(h.lineHeight,a)),x=0,w=y.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Eo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Co(this,t),s=Object.assign({},i,this._size),a=Ao(e,t,s),l=jo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),pi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!C(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!C(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Eo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}zo.positioners=Eo;var No={id:"tooltip",_element:zo,positioners:Eo,afterInit(t,e,i){i&&(t.tooltip=new zo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Bo=Object.freeze({__proto__:null,Decimation:eo,Filler:vo,Legend:wo,SubTitle:Mo,Title:ko,Tooltip:No});function Wo(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Wo(i,t,E(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ho(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!w(o),b=!w(s),y=!w(l),v=(g-p)/(h+1);let x,_,O,k,S=Q((g-p)/f/d)*d;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Q(k*S/f/d)*d),w(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,O=Math.ceil(g/S)*S):(_=p,O=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,S/1e3)?(k=Math.round(Math.min((s-o)/S,c)),S=(s-o)/k,_=o,O=s):y?(_=m?o:_,O=b?s:O,k=l-1,S=(O-_)/k):(k=(O-_)/S,k=et(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ot(S),ot(_));x=Math.pow(10,w(a)?M:a),_=Math.round(_*x)/x,O=Math.round(O*x)/x;let E=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ho({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class qo extends Uo{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?t:0,this.max=S(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Yo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}qo.id="linear",qo.defaults={ticks:{callback:Un.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Uo.prototype.parse.apply(this,[t,e]);if(0!==i)return S(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=S(t)?Math.max(0,t):null,this.max=S(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=M(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Yo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=f),m.starte.b&&(e.b=m.end,i.b=f)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Go(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,$);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*($/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!w(f)){const t=xe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Un.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),S(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);R(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=S(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=S(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?L(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Se(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Se(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class fs extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),f.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),vs.init(t),_s.init(t),ws.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},ks=document.getElementById("cloudinary-settings-page");ks&&window.addEventListener("load",Os._init(ks));var Ss=Os;const Ms={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(ys.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(ys.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>Ms.init()));var Es=Ms;const Ps={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Ps._init()));var Ls=Ps;const Ts={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ts.init()));var Cs=Ts;const Ds={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Ds.init()));var As=Ds;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const js={UI:Ss,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Es,Storage:Ls,Extensions:Cs,Tabs:As}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=45)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_preview"),n=ks.createPicker(t,{attachTo:i});n.on("change",(({color:t})=>{i.value=t,i.style.backgroundColor=t,e.value=t,e.dispatchEvent(new Event("input"))})),n.hide(),i.addEventListener("click",(()=>{"hidden"===e.type?this.showPicker(n,e):this.hidePicker(n,e)})),e.addEventListener("input",(t=>{n.setColor(t.target.value,!0)})),document.addEventListener("mousedown",(r=>{-1===r.path.indexOf(t)&&-1===r.path.indexOf(i)&&r.path.indexOf(e)&&this.hidePicker(n,e)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(n,e)}))}))},showPicker(t,e){"text"!==e.type&&(e.type="text",t.show())},hidePicker(t,e){"hidden"!==e.type&&(e.type="hidden",t.hide())},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1b4821339..f6b65c769 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "@wordpress/scripts": "^16.0.0", "@wordpress/server-side-render": "^1.19.1", "@wordpress/url": "^2.19.0", + "a-color-picker": "^1.2.1", "accessible-autocomplete": "^2.0.3", "acorn": "^8.2.4", "autoprefixer": "^10.0.1", @@ -101,6 +102,7 @@ "rtlcss": "^2.6.1", "rtlcss-webpack-plugin": "^4.0.4", "semver": "^7.3.2", + "sortablejs": "^1.14.0", "source-map-loader": "^1.1.2", "svg-inline-loader": "^0.8.2", "terser-webpack-plugin": "^4.2.3", @@ -8595,6 +8597,15 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "node_modules/a-color-picker": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/a-color-picker/-/a-color-picker-1.2.1.tgz", + "integrity": "sha512-aMCUKd2zTDWK2YWnjz0k3YhFc9XL0jZlPIywF6XkP6i3wdq2iHTEnl1BFPZkOVDV89M12t+zeZ8m23cfzn57/Q==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + } + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -32765,6 +32776,12 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "node_modules/sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==", + "dev": true + }, "node_modules/source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", @@ -44626,6 +44643,15 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "a-color-picker": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/a-color-picker/-/a-color-picker-1.2.1.tgz", + "integrity": "sha512-aMCUKd2zTDWK2YWnjz0k3YhFc9XL0jZlPIywF6XkP6i3wdq2iHTEnl1BFPZkOVDV89M12t+zeZ8m23cfzn57/Q==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -63418,6 +63444,12 @@ "kind-of": "^3.2.0" } }, + "sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==", + "dev": true + }, "source-list-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", diff --git a/package.json b/package.json index 39ddd0de4..957377beb 100644 --- a/package.json +++ b/package.json @@ -148,7 +148,8 @@ "webpack": "^4.44.2", "webpack-cli": "^4.2.0", "webpackbar": "^4.0.0", - "sortablejs": "^1.14.0" + "sortablejs": "^1.14.0", + "a-color-picker": "^1.2.1" }, "version": "3.0.0" } diff --git a/php/ui/component/class-color.php b/php/ui/component/class-color.php index 7c82d3e25..71e18c2a8 100644 --- a/php/ui/component/class-color.php +++ b/php/ui/component/class-color.php @@ -7,8 +7,6 @@ namespace Cloudinary\UI\Component; -use function Cloudinary\get_plugin_instance; - /** * Class Color Component * @@ -17,57 +15,68 @@ class Color extends Text { /** - * Enqueue scripts. + * Holds the components build blueprint. + * + * @var string + */ + protected $blueprint = 'wrap|icon/|div|label|title|link/|/title|extra_title/|/label|/div|prefix/|preview/|input/|picker/|suffix/|description/|tooltip/|/wrap'; + + /** + * Filter the picker parts structure. + * + * @param array $struct The array structure. + * + * @return array */ - public function enqueue_scripts() { - parent::enqueue_scripts(); - $instance = get_plugin_instance(); - wp_enqueue_style( 'wp-color-picker' ); - wp_enqueue_script( 'wp-color-picker-alpha', $instance->dir_url . 'js/wp-color-picker-alpha.js', array( 'wp-color-picker' ), $instance->version, true ); + protected function picker( $struct ) { + $struct['element'] = 'div'; + $struct['attributes']['class'][] = 'cld-input-color-picker'; + + $struct['attributes']['acp-color'] = $this->setting->get_value(); + $struct['attributes']['acp-show-rgb'] = 'no'; + $struct['attributes']['acp-show-hsl'] = 'no'; + $struct['attributes']['acp-show-hex'] = 'no'; + $struct['attributes']['acp-show-alpha'] = 'yes'; + $struct['attributes']['data-id'] = $this->get_id(); + $struct['render'] = true; + + return $struct; } /** - * Filter the input parts structure. + * Filter the preview parts structure. * * @param array $struct The array structure. * * @return array */ - protected function input( $struct ) { - $struct = parent::input( $struct ); - $struct['attributes']['type'] = 'text'; - $struct['attributes']['class'][] = str_replace( '.', '-', $this->get_id() ); - $struct['attributes']['data-alpha-enabled'] = true; - $struct['attributes']['data-default-color'] = $this->setting->get_param( 'default' ); + protected function preview( $struct ) { + $struct['element'] = 'span'; + $struct['attributes']['class'][] = 'cld-input-color-preview'; + + $struct['attributes']['style'] = 'background-color:' . $this->setting->get_value(); + $struct['attributes']['id'] = $this->get_id() . '_preview'; + $struct['render'] = true; return $struct; } /** - * Render the component. + * Filter the input parts structure. * - * @param false $echo Flag to echo out or return. + * @param array $struct The array structure. * - * @return string|null + * @return array */ - public function render( $echo = false ) { - $return = parent::render( $echo ); - ?> - - setting->get_param( 'default' ); + + return $struct; } /** @@ -80,6 +89,7 @@ public function render( $echo = false ) { protected function description( $struct ) { $struct = parent::description( $struct ); $struct['element'] = 'div'; + return $struct; } } diff --git a/src/css/components/ui/_input.scss b/src/css/components/ui/_input.scss index c382c43d3..786368067 100644 --- a/src/css/components/ui/_input.scss +++ b/src/css/components/ui/_input.scss @@ -40,6 +40,7 @@ @import "controls/icon-toggle"; @import "controls/excluded_types"; @import "controls/input-tags"; + @import "controls/color"; .prefixed { width: 40%; diff --git a/src/css/components/ui/controls/_color.scss b/src/css/components/ui/controls/_color.scss new file mode 100644 index 000000000..ae00e4138 --- /dev/null +++ b/src/css/components/ui/controls/_color.scss @@ -0,0 +1,18 @@ +// Color +&-color{ + &-picker{ + position: absolute; + z-index: 100; + } + &-preview{ + display: inline-block; + height: 40px; + width: 70px; + border: 3px solid $color-cld-grey-blue; + box-shadow: 0 0 3px rgba(0,0,0,0.5) inset; + cursor: pointer; + vertical-align: middle; + margin: 0 0 6px; + border-radius: 4px; + } +} diff --git a/src/js/components/color-picker.js b/src/js/components/color-picker.js new file mode 100644 index 000000000..126eadd64 --- /dev/null +++ b/src/js/components/color-picker.js @@ -0,0 +1,63 @@ +/* eslint-disable prettier/prettier */ +const AColorPicker = require( 'a-color-picker' ); + +const ColorPicker = { + pickers: null, + _init( context ) { + this.pickers = context.getElementsByClassName( 'cld-input-color-picker' ); + [ ...this.pickers ].forEach( ( picker ) => { + const input = document.getElementById( picker.dataset.id ); + const preview = document.getElementById( picker.dataset.id + '_preview' ); + + const pickerInstance = AColorPicker.createPicker( picker, { attachTo: preview } ); + pickerInstance.on( 'change', ( { color } ) => { + preview.value = color; + preview.style.backgroundColor = color; + input.value = color; + input.dispatchEvent( new Event( 'input' ) ); + } ); + pickerInstance.hide(); + + preview.addEventListener( 'click', () => { + if ( 'hidden' === input.type ) { + this.showPicker( pickerInstance, input ); + } else { + this.hidePicker( pickerInstance, input ); + } + } ); + input.addEventListener( 'input', ( ev ) => { + pickerInstance.setColor( ev.target.value, true ); + } ); + document.addEventListener( 'mousedown', ( ev ) => { + if ( -1 === ev.path.indexOf( picker ) && -1 === ev.path.indexOf( preview ) && ev.path.indexOf( input ) ) { + this.hidePicker( pickerInstance, input ); + } + } ); + window.addEventListener( 'keydown', ( ev ) => { + if ( 'Escape' === ev.key ) { + this.hidePicker( pickerInstance, input ); + } + } ); + } ); + + }, + showPicker( pickerInstance, input ) { + if ( 'text' !== input.type ) { + input.type = 'text'; + pickerInstance.show(); + } + }, + hidePicker( pickerInstance, input ) { + if ( 'hidden' !== input.type ) { + input.type = 'hidden'; + pickerInstance.hide(); + } + }, + setColor( color ) { + this.color.value = color; + this.colorPreview.style.backgroundColor = color; + this.color.dispatchEvent( new Event( 'input' ) ); + }, +}; + +export default ColorPicker; diff --git a/src/js/components/ui.js b/src/js/components/ui.js index e6f754fea..0df7ca63d 100644 --- a/src/js/components/ui.js +++ b/src/js/components/ui.js @@ -7,6 +7,7 @@ import Progress from './progress'; import States from './states'; import RestrictedTypes from './restricted-types'; import TagsInput from './tags-input'; +import ColorPicker from './color-picker'; const UI = { bindings: {}, @@ -62,6 +63,7 @@ const UI = { Progress.init( context ); RestrictedTypes.init( context ); TagsInput.init( context ); + ColorPicker._init( context ); }, _autoSuffix( input ) { const suffixes = input.dataset.autoSuffix; From 571df9d07a6536765d296a3383c4077d4d95d2ce Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 08:52:56 +0200 Subject: [PATCH 07/19] alignment --- php/ui/component/class-color.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/ui/component/class-color.php b/php/ui/component/class-color.php index 71e18c2a8..f1cca3afb 100644 --- a/php/ui/component/class-color.php +++ b/php/ui/component/class-color.php @@ -37,7 +37,7 @@ protected function picker( $struct ) { $struct['attributes']['acp-show-hsl'] = 'no'; $struct['attributes']['acp-show-hex'] = 'no'; $struct['attributes']['acp-show-alpha'] = 'yes'; - $struct['attributes']['data-id'] = $this->get_id(); + $struct['attributes']['data-id'] = $this->get_id(); $struct['render'] = true; return $struct; From bd1903b23134077af730f7381c2e880d076379bf Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 08:56:28 +0200 Subject: [PATCH 08/19] rebuild assets --- src/js/wp-color-picker-alpha.js | 635 -------------------------------- 1 file changed, 635 deletions(-) delete mode 100644 src/js/wp-color-picker-alpha.js diff --git a/src/js/wp-color-picker-alpha.js b/src/js/wp-color-picker-alpha.js deleted file mode 100644 index bd407429b..000000000 --- a/src/js/wp-color-picker-alpha.js +++ /dev/null @@ -1,635 +0,0 @@ -/**! - * wp-color-picker-alpha - * - * Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker - * Only run in input and is defined data alpha in true - * - * Version: 3.0.0 - * https://github.com/kallookoo/wp-color-picker-alpha - * Licensed under the GPLv2 license or later. - */ - -( function( $, undef ) { - - var wpColorPickerAlpha = { - 'version' : 300 - }; - - // Always try to use the last version of this script. - if ( 'wpColorPickerAlpha' in window && 'version' in window.wpColorPickerAlpha ) { - var version = parseInt( window.wpColorPickerAlpha.version, 10 ); - if ( ! isNaN( version ) && version >= wpColorPickerAlpha.version ) { - return; - } - } - - // Prevent multiple initiations - if ( Color.fn.hasOwnProperty( 'to_s' ) ) { - return; - } - - // Create new method to replace the `Color.toString()` inside the scripts. - Color.fn.to_s = function( type ) { - type = ( type || 'hex' ); - // Change hex to rgba to return the correct color. - if ( 'hex' === type && this._alpha < 1 ) { - type = 'rgba'; - } - - var color = ''; - if ( 'hex' === type ) { - color = this.toString(); - } else if ( ! this.error ) { - color = this.toCSS( type ).replace( /\(\s+/, '(' ).replace( /\s+\)/, ')' ); - } - return color; - } - - // Register the global variable. - window.wpColorPickerAlpha = wpColorPickerAlpha; - - // Background image encoded - var backgroundImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg=='; - - /** - * Iris - */ - $.widget( 'a8c.iris', $.a8c.iris, { - /** - * Alpha options - * - * @since 3.0.0 - * - * @type {Object} - */ - alphaOptions: { - alphaEnabled: false, - }, - /** - * Get the current color or the new color. - * - * @since 3.0.0 - * @access private - * - * @param {Object|*} The color instance if not defined return the cuurent color. - * - * @return {string} The element's color. - */ - _getColor: function( color ) { - if ( color === undef ) { - color = this._color; - } - - if ( this.alphaOptions.alphaEnabled ) { - color = color.to_s( this.alphaOptions.alphaColorType ); - if ( ! this.alphaOptions.alphaColorWithSpace ) { - color = color.replace( /\s+/g, '' ); - } - return color; - } - return color.toString(); - }, - /** - * Create widget - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _create: function() { - try { - // Try to get the wpColorPicker alpha options. - this.alphaOptions = this.element.wpColorPicker( 'instance' ).alphaOptions; - } catch( e ) {} - - // We make sure there are all options - $.extend( {}, this.alphaOptions, { - alphaEnabled: false, - alphaCustomWidth: 130, - alphaReset: false, - alphaColorType: 'hex', - alphaColorWithSpace: false, - } ); - - this._super(); - }, - /** - * Binds event listeners to the Iris. - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _addInputListeners: function( input ) { - var self = this, - debounceTimeout = 100, - callback = function( event ){ - var val = input.val(), - color = new Color( val ), - val = val.replace( /^(#|(rgb|hsl)a?)/, '' ), - type = self.alphaOptions.alphaColorType; - - input.removeClass( 'iris-error' ); - - if ( ! color.error ) { - // let's not do this on keyup for hex shortcodes - if ( 'hex' !== type || ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { - // Compare color ( #AARRGGBB ) - if ( color.toIEOctoHex() !== self._color.toIEOctoHex() ) { - self._setOption( 'color', self._getColor( color ) ); - } - } - } else if ( val !== '' ) { - input.addClass( 'iris-error' ); - } - }; - - input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); - - // If we initialized hidden, show on first focus. The rest is up to you. - if ( self.options.hide ) { - input.one( 'focus', function() { - self.show(); - }); - } - }, - /** - * Init Controls - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _initControls: function() { - this._super(); - - if ( this.alphaOptions.alphaEnabled ) { - // Create Alpha controls - var self = this, - stripAlpha = self.controls.strip.clone(false, false), - stripAlphaSlider = stripAlpha.find( '.iris-slider-offset' ), - controls = { - stripAlpha : stripAlpha, - stripAlphaSlider : stripAlphaSlider - }; - - stripAlpha.addClass( 'iris-strip-alpha' ); - stripAlphaSlider.addClass( 'iris-slider-offset-alpha' ); - stripAlpha.appendTo( self.picker.find( '.iris-picker-inner' ) ); - - // Push new controls - $.each( controls, function( k, v ) { - self.controls[k] = v; - } ); - - // Create slider - self.controls.stripAlphaSlider.slider( { - orientation : 'vertical', - min : 0, - max : 100, - step : 1, - value : parseInt( self._color._alpha * 100 ), - slide : function( event, ui ) { - self.active = 'strip'; - // Update alpha value - self._color._alpha = parseFloat( ui.value / 100 ); - self._change.apply( self, arguments ); - } - } ); - } - }, - /** - * Create the controls sizes - * - * @since 3.0.0 - * @access private - * - * @param {bool} reset Set to True for recreate the controls sizes. - * - * @return {void} - */ - _dimensions: function( reset ) { - this._super( reset ); - - if ( this.alphaOptions.alphaEnabled ) { - var self = this, - opts = self.options, - controls = self.controls, - square = controls.square, - strip = self.picker.find( '.iris-strip' ), - innerWidth, squareWidth, stripWidth, stripMargin, totalWidth; - - /** - * I use Math.round() to avoid possible size errors, - * this function returns the value of a number rounded - * to the nearest integer. - * - * The width to append all widgets, - * if border is enabled, 22 is subtracted. - * 20 for css left and right property - * 2 for css border - */ - innerWidth = Math.round( self.picker.outerWidth( true ) - ( opts.border ? 22 : 0 ) ); - // The width of the draggable, aka square. - squareWidth = Math.round( square.outerWidth() ); - // The width for the sliders - stripWidth = Math.round( ( innerWidth - squareWidth ) / 2 ); - // The margin for the sliders - stripMargin = Math.round( stripWidth / 2 ); - // The total width of the elements. - totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) ); - - // Check and change if necessary. - while ( totalWidth > innerWidth ) { - stripWidth = Math.round( stripWidth - 2 ); - stripMargin = Math.round( stripMargin - 1 ); - totalWidth = Math.round( squareWidth + ( stripWidth * 2 ) + ( stripMargin * 2 ) ); - } - - - square.css( 'margin', '0' ); - strip.width( stripWidth ).css( 'margin-left', stripMargin + 'px' ); - } - }, - /** - * Callback to update the controls and the current color. - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _change: function() { - var self = this, - active = self.active; - - self._super(); - - if ( self.alphaOptions.alphaEnabled ) { - var controls = self.controls, - alpha = parseInt( self._color._alpha * 100 ), - color = self._color.toRgb(), - gradient = [ - 'rgb(' + color.r + ',' + color.g + ',' + color.b + ') 0%', - 'rgba(' + color.r + ',' + color.g + ',' + color.b + ', 0) 100%' - ], - target = self.picker.closest( '.wp-picker-container' ).find( '.wp-color-result' ); - - self.options.color = self._getColor(); - // Generate background slider alpha, only for CSS3. - controls.stripAlpha.css( { 'background' : 'linear-gradient(to bottom, ' + gradient.join( ', ' ) + '), url(' + backgroundImage + ')' } ); - // Update alpha value - if ( active ) { - controls.stripAlphaSlider.slider( 'value', alpha ); - } - - if ( ! self._color.error ) { - self.element.removeClass( 'iris-error' ).val( self.options.color ); - } - - self.picker.find( '.iris-palette-container' ).on( 'click.palette', '.iris-palette', function() { - var color = $( this ).data( 'color' ); - if ( self.alphaOptions.alphaReset ) { - self._color._alpha = 1; - color = self._getColor(); - } - self._setOption( 'color', color ); - } ); - } - }, - /** - * Paint dimensions. - * - * @since 3.0.0 - * @access private - * - * @param {string} origin Origin (position). - * @param {string} control Type of the control, - * - * @return {void} - */ - _paintDimension: function( origin, control ) { - var self = this, - color = false; - - // Fix for slider hue opacity. - if ( self.alphaOptions.alphaEnabled && 'strip' === control ) { - color = self._color; - self._color = new Color( color.toString() ); - self.hue = self._color.h(); - } - - self._super( origin, control ); - - // Restore the color after paint. - if ( color ) { - self._color = color; - } - }, - /** - * To update the options, see original source to view the available options. - * - * @since 3.0.0 - * - * @param {string} key The Option name. - * @param {mixed} value The Option value to update. - * - * @return {void} - */ - _setOption: function( key, value ) { - var self = this; - if ( 'color' === key && self.alphaOptions.alphaEnabled ) { - // cast to string in case we have a number - value = '' + value; - newColor = new Color( value ).setHSpace( self.options.mode ); - // Check if error && Check the color to prevent callbacks with the same color. - if ( ! newColor.error && self._getColor( newColor ) !== self._getColor() ) { - self._color = newColor; - self.options.color = self._getColor(); - self.active = 'external'; - self._change(); - } - } else { - return self._super( key, value ); - } - }, - /** - * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color. - * - * @param newColor {string|*} The new color to use. Can be undefined. - * - * @since 3.0.0 - * - * @return {string} The element's color. - */ - color: function( newColor ) { - if ( newColor === true ) { - return this._color.clone(); - } - if ( newColor === undef ) { - return this._getColor(); - } - this.option( 'color', newColor ); - }, - } ); - - /** - * wpColorPicker - */ - $.widget( 'wp.wpColorPicker', $.wp.wpColorPicker, { - /** - * Alpha options - * - * @since 3.0.0 - * - * @type {Object} - */ - alphaOptions: { - alphaEnabled: false, - }, - /** - * Get the alpha options. - * - * @since 3.0.0 - * @access private - * - * @return {object} The current alpha options. - */ - _getAlphaOptions: function() { - var el = this.element, - type = ( el.data( 'type' ) || this.options.type ), - color = ( el.data( 'defaultColor' ) || el.val() ), - options = { - alphaEnabled: ( el.data( 'alphaEnabled' ) || false ), - alphaCustomWidth: 130, - alphaReset: false, - alphaColorType: 'rgb', - alphaColorWithSpace: false, - }; - - if ( options.alphaEnabled ) { - options.alphaEnabled = ( el.is( 'input' ) && 'full' === type ); - } - - if ( ! options.alphaEnabled ) { - return options; - } - - options.alphaColorWithSpace = ( color && color.match( /\s/ ) ); - - $.each( options, function( name, defaultValue ) { - var value = ( el.data( name ) || defaultValue ); - switch ( name ) { - case 'alphaCustomWidth': - value = ( value ? parseInt( value, 10 ) : 0 ); - value = ( isNaN( value ) ? defaultValue : value ); - break; - case 'alphaColorType': - if ( ! value.match( /^(hex|(rgb|hsl)a?)$/ ) ) { - if ( color && color.match( /^#/ ) ) { - value = 'hex'; - } else if ( color && color.match( /^hsla?/ ) ) { - value = 'hsl'; - } else { - value = defaultValue; - } - } - break; - default: - value = !!value; - break; - } - options[name] = value; - } ); - - return options; - }, - /** - * Create widget - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _create: function() { - // Return early if Iris support is missing. - if ( ! $.support.iris ) { - return; - } - - // Set the alpha options for the current instance. - this.alphaOptions = this._getAlphaOptions(); - - // Create widget. - this._super(); - }, - /** - * Binds event listeners to the color picker and create options, etc... - * - * @since 3.0.0 - * @access private - * - * @return {void} - */ - _addListeners: function() { - if ( ! this.alphaOptions.alphaEnabled ) { - return this._super(); - } - - var self = this, - el = self.element, - isDeprecated = self.toggler.is( 'a' ); - - this.alphaOptions.defaultWidth = el.width(); - if ( this.alphaOptions.alphaCustomWidth ) { - el.width( parseInt( this.alphaOptions.defaultWidth + this.alphaOptions.alphaCustomWidth, 10 ) ); - } - - self.toggler.css( { - 'position': 'relative', - 'background-image' : 'url(' + backgroundImage + ')' - } ); - - if ( isDeprecated ) { - self.toggler.html( '' ); - } else { - self.toggler.append( '' ); - } - - self.colorAlpha = self.toggler.find( 'span.color-alpha' ).css( { - 'width' : '30px', - 'height' : '100%', - 'position' : 'absolute', - 'top' : 0, - 'background-color' : el.val(), - } ); - - // Define the correct position for ltr or rtl direction. - if ( 'ltr' === self.colorAlpha.css( 'direction' ) ) { - self.colorAlpha.css( { - 'border-bottom-left-radius' : '2px', - 'border-top-left-radius' : '2px', - 'left' : 0 - } ); - } else { - self.colorAlpha.css( { - 'border-bottom-right-radius' : '2px', - 'border-top-right-radius' : '2px', - 'right' : 0 - } ); - } - - - el.iris( { - /** - * @summary Handles the onChange event if one has been defined in the options. - * - * Handles the onChange event if one has been defined in the options and additionally - * sets the background color for the toggler element. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * @param {HTMLElement} ui The HTMLElement containing the color picker. - * - * @returns {void} - */ - change: function( event, ui ) { - self.colorAlpha.css( { 'background-color': ui.color.to_s( self.alphaOptions.alphaColorType ) } ); - - // fire change callback if we have one - if ( $.isFunction( self.options.change ) ) { - self.options.change.call( this, event, ui ); - } - } - } ); - - - /** - * Prevent any clicks inside this widget from leaking to the top and closing it. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - self.wrap.on( 'click.wpcolorpicker', function( event ) { - event.stopPropagation(); - }); - - /** - * Open or close the color picker depending on the class. - * - * @since 3.0.0 - */ - self.toggler.click( function() { - if ( self.toggler.hasClass( 'wp-picker-open' ) ) { - self.close(); - } else { - self.open(); - } - }); - - /** - * Checks if value is empty when changing the color in the color picker. - * If so, the background color is cleared. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - el.change( function( event ) { - var val = $( this ).val(); - - if ( el.hasClass( 'iris-error' ) || val === '' || val.match( /^(#|(rgb|hsl)a?)$/ ) ) { - if ( isDeprecated ) { - self.toggler.removeAttr( 'style' ); - } - - self.colorAlpha.css( 'background-color', '' ); - - // fire clear callback if we have one - if ( $.isFunction( self.options.clear ) ) { - self.options.clear.call( this, event ); - } - } - } ); - - /** - * Enables the user to either clear the color in the color picker or revert back to the default color. - * - * @since 3.0.0 - * - * @param {Event} event The event that's being called. - * - * @return {void} - */ - self.button.click( function( event ) { - if ( $( this ).hasClass( 'wp-picker-default' ) ) { - el.val( self.options.defaultColor ).change(); - } else if ( $( this ).hasClass( 'wp-picker-clear' ) ) { - el.val( '' ); - if ( isDeprecated ) { - self.toggler.removeAttr( 'style' ); - } - - self.colorAlpha.css( 'background-color', '' ); - - // fire clear callback if we have one - if ( $.isFunction( self.options.clear ) ) { - self.options.clear.call( this, event ); - } - - el.trigger( 'change' ); - } - } ); - }, - } ); -} ( jQuery ) ); From 2a5eae16b5a91b1b14cf098c3f3de4f8947d9fda Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 08:59:30 +0200 Subject: [PATCH 09/19] rebuild assets --- js/cloudinary.js | 2 +- js/wp-color-picker-alpha.js | 1 - webpack.config.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 js/wp-color-picker-alpha.js diff --git a/js/cloudinary.js b/js/cloudinary.js index 477e9c239..d447d4931 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=45)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_preview"),n=ks.createPicker(t,{attachTo:i});n.on("change",(({color:t})=>{i.value=t,i.style.backgroundColor=t,e.value=t,e.dispatchEvent(new Event("input"))})),n.hide(),i.addEventListener("click",(()=>{"hidden"===e.type?this.showPicker(n,e):this.hidePicker(n,e)})),e.addEventListener("input",(t=>{n.setColor(t.target.value,!0)})),document.addEventListener("mousedown",(r=>{-1===r.path.indexOf(t)&&-1===r.path.indexOf(i)&&r.path.indexOf(e)&&this.hidePicker(n,e)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(n,e)}))}))},showPicker(t,e){"text"!==e.type&&(e.type="text",t.show())},hidePicker(t,e){"hidden"!==e.type&&(e.type="hidden",t.hide())},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_preview"),n=ks.createPicker(t,{attachTo:i});n.on("change",(({color:t})=>{i.value=t,i.style.backgroundColor=t,e.value=t,e.dispatchEvent(new Event("input"))})),n.hide(),i.addEventListener("click",(()=>{"hidden"===e.type?this.showPicker(n,e):this.hidePicker(n,e)})),e.addEventListener("input",(t=>{n.setColor(t.target.value,!0)})),document.addEventListener("mousedown",(r=>{-1===r.path.indexOf(t)&&-1===r.path.indexOf(i)&&r.path.indexOf(e)&&this.hidePicker(n,e)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(n,e)}))}))},showPicker(t,e){"text"!==e.type&&(e.type="text",t.show())},hidePicker(t,e){"hidden"!==e.type&&(e.type="hidden",t.hide())},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file diff --git a/js/wp-color-picker-alpha.js b/js/wp-color-picker-alpha.js deleted file mode 100644 index bb590c5c4..000000000 --- a/js/wp-color-picker-alpha.js +++ /dev/null @@ -1 +0,0 @@ -!function(o){var t={};function a(r){if(t[r])return t[r].exports;var e=t[r]={i:r,l:!1,exports:{}};return o[r].call(e.exports,e,e.exports,a),e.l=!0,e.exports}a.m=o,a.c=t,a.d=function(o,t,r){a.o(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:r})},a.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,t){if(1&t&&(o=a(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var e in o)a.d(r,e,function(t){return o[t]}.bind(null,e));return r},a.n=function(o){var t=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(t,"a",t),t},a.o=function(o,t){return Object.prototype.hasOwnProperty.call(o,t)},a.p="",a(a.s=34)}({34:function(o,t){!function(o,t){var a={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=a.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var t="";return"hex"===o?t=this.toString():this.error||(t=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),t},window.wpColorPickerAlpha=a;var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===t&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var t=this,a=function(a){var r=o.val(),e=new Color(r),i=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),t.alphaOptions.alphaColorType);o.removeClass("iris-error"),e.error?""!==r&&o.addClass("iris-error"):"hex"===i&&"keyup"===a.type&&r.match(/^[0-9a-fA-F]{3}$/)||e.toIEOctoHex()!==t._color.toIEOctoHex()&&t._setOption("color",t._getColor(e))};o.on("change",a).on("keyup",t._debounce(a,100)),t.options.hide&&o.one("focus",(function(){t.show()}))},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var t=this,a=t.controls.strip.clone(!1,!1),r=a.find(".iris-slider-offset"),e={stripAlpha:a,stripAlphaSlider:r};a.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),a.appendTo(t.picker.find(".iris-picker-inner")),o.each(e,(function(o,a){t.controls[o]=a})),t.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,a){t.active="strip",t._color._alpha=parseFloat(a.value/100),t._change.apply(t,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var t,a,r,e,i,l=this,n=l.options,s=l.controls.square,p=l.picker.find(".iris-strip");for(t=Math.round(l.picker.outerWidth(!0)-(n.border?22:0)),a=Math.round(s.outerWidth()),r=Math.round((t-a)/2),e=Math.round(r/2),i=Math.round(a+2*r+2*e);i>t;)r=Math.round(r-2),e=Math.round(e-1),i=Math.round(a+2*r+2*e);s.css("margin","0"),p.width(r).css("margin-left",e+"px")}},_change:function(){var t=this,a=t.active;if(t._super(),t.alphaOptions.alphaEnabled){var r=t.controls,i=parseInt(100*t._color._alpha),l=t._color.toRgb(),n=["rgb("+l.r+","+l.g+","+l.b+") 0%","rgba("+l.r+","+l.g+","+l.b+", 0) 100%"];t.picker.closest(".wp-picker-container").find(".wp-color-result");t.options.color=t._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+e+")"}),a&&r.stripAlphaSlider.slider("value",i),t._color.error||t.element.removeClass("iris-error").val(t.options.color),t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",(function(){var a=o(this).data("color");t.alphaOptions.alphaReset&&(t._color._alpha=1,a=t._getColor()),t._setOption("color",a)}))}},_paintDimension:function(o,t){var a=this,r=!1;a.alphaOptions.alphaEnabled&&"strip"===t&&(r=a._color,a._color=new Color(r.toString()),a.hue=a._color.h()),a._super(o,t),r&&(a._color=r)},_setOption:function(o,t){var a=this;if("color"!==o||!a.alphaOptions.alphaEnabled)return a._super(o,t);t=""+t,newColor=new Color(t).setHSpace(a.options.mode),newColor.error||a._getColor(newColor)===a._getColor()||(a._color=newColor,a.options.color=a._getColor(),a.active="external",a._change())},color:function(o){return!0===o?this._color.clone():o===t?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var t=this.element,a=t.data("type")||this.options.type,r=t.data("defaultColor")||t.val(),e={alphaEnabled:t.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return e.alphaEnabled&&(e.alphaEnabled=t.is("input")&&"full"===a),e.alphaEnabled?(e.alphaColorWithSpace=r&&r.match(/\s/),o.each(e,(function(o,a){var i=t.data(o)||a;switch(o){case"alphaCustomWidth":i=i?parseInt(i,10):0,i=isNaN(i)?a:i;break;case"alphaColorType":i.match(/^(hex|(rgb|hsl)a?)$/)||(i=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":a);break;default:i=!!i}e[o]=i})),e):e},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var t=this,a=t.element,r=t.toggler.is("a");this.alphaOptions.defaultWidth=a.width(),this.alphaOptions.alphaCustomWidth&&a.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),t.toggler.css({position:"relative","background-image":"url("+e+")"}),r?t.toggler.html(''):t.toggler.append(''),t.colorAlpha=t.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":a.val()}),"ltr"===t.colorAlpha.css("direction")?t.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):t.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),a.iris({change:function(a,r){t.colorAlpha.css({"background-color":r.color.to_s(t.alphaOptions.alphaColorType)}),o.isFunction(t.options.change)&&t.options.change.call(this,a,r)}}),t.wrap.on("click.wpcolorpicker",(function(o){o.stopPropagation()})),t.toggler.click((function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()})),a.change((function(e){var i=o(this).val();(a.hasClass("iris-error")||""===i||i.match(/^(#|(rgb|hsl)a?)$/))&&(r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e))})),t.button.click((function(e){o(this).hasClass("wp-picker-default")?a.val(t.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(a.val(""),r&&t.toggler.removeAttr("style"),t.colorAlpha.css("background-color",""),o.isFunction(t.options.clear)&&t.options.clear.call(this,e),a.trigger("change"))}))}})}}(jQuery)}}); \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index b4982881a..3dd48cb87 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -75,7 +75,6 @@ const cldCore = { entry: { cloudinary: './src/js/main.js', video: './src/css/video.scss', - 'wp-color-picker-alpha': './src/js/wp-color-picker-alpha.js', 'front-overlay': './src/js/front-overlay.js', 'breakpoints-preview': './src/js/breakpoints-preview.js', 'lazyload-preview': './src/js/lazyload-preview.js', From a4bf69718636d41a3e55bf08e55c38efe782e762 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 11:16:38 +0200 Subject: [PATCH 10/19] update styling --- css/cloudinary.css | 2 +- js/cloudinary.js | 2 +- php/ui/component/class-color.php | 46 ++++++++++-- src/css/_variables.scss | 2 + src/css/components/ui/controls/_color.scss | 81 +++++++++++++++++++--- src/js/components/color-picker.js | 53 ++++++++------ 6 files changed, 143 insertions(+), 43 deletions(-) diff --git a/css/cloudinary.css b/css/cloudinary.css index 60fe3d571..862be6caf 100644 --- a/css/cloudinary.css +++ b/css/cloudinary.css @@ -1 +1 @@ -.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.dashicons-cloudinary:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:""}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:""}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:""}.dashicons-cloudinary.syncing:before{content:""}.dashicons-cloudinary.media:before{content:""}.dashicons-cloudinary.dam:before{content:""}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-settings{margin-left:-20px}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-info-box,.cld-panel,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db;margin-top:13px;padding:23px 24px}.cld-panel.full-width,.full-width.cld-info-box,.full-width.cld-panel-short{max-width:100%}.cld-panel.has-heading,.has-heading.cld-info-box,.has-heading.cld-panel-short{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86.3%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-info-box hr,.cld-panel-short hr,.cld-panel hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-info-box ul,.cld-panel-short ul,.cld-panel ul{list-style:initial;padding:0 3em}.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-bottom:none}.cld-info-box .stat-boxes .box .cld-ui-icon,.cld-panel-short .stat-boxes .box .cld-ui-icon,.cld-panel .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-info-box .stat-boxes .icon,.cld-panel-short .stat-boxes .icon,.cld-panel .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-info-box .stat-boxes h3,.cld-panel-short .stat-boxes h3,.cld-panel .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-info-box .stat-boxes .limit,.cld-panel-short .stat-boxes .limit,.cld-panel .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-info-box .stat-boxes .usage,.cld-panel-short .stat-boxes .usage,.cld-panel .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{font-size:1.2em}}.cld-info-box .img-connection-string,.cld-panel-short .img-connection-string,.cld-panel .img-connection-string{max-width:607px;width:100%}.cld-info-box .media-status-box,.cld-info-box .stat-boxes,.cld-panel-short .media-status-box,.cld-panel-short .stat-boxes,.cld-panel .media-status-box,.cld-panel .stat-boxes{border:1px solid #e5e5e5}.cld-info-box .media-status-box,.cld-panel-short .media-status-box,.cld-panel .media-status-box{padding:2rem;text-align:center}.cld-info-box .media-status-box .status,.cld-panel-short .media-status-box .status,.cld-panel .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-info-box .media-status-box .cld-ui-icon,.cld-panel-short .media-status-box .cld-ui-icon,.cld-panel .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-info-box .notification,.cld-panel-short .notification,.cld-panel .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-info-box .notification-success,.cld-panel-short .notification-success,.cld-panel .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-info-box .notification-success:before,.cld-panel-short .notification-success:before,.cld-panel .notification-success:before{color:#20b832}.cld-info-box .notification-syncing,.cld-panel-short .notification-syncing,.cld-panel .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-info-box .notification-syncing:before,.cld-panel-short .notification-syncing:before,.cld-panel .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-info-box .notification:before,.cld-panel-short .notification:before,.cld-panel .notification:before{margin-right:.5em}.cld-info-box .help-wrap,.cld-panel-short .help-wrap,.cld-panel .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}.cld-info-box .help-wrap .help-box .large-button,.cld-panel-short .help-wrap .help-box .large-button,.cld-panel .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-info-box .help-wrap .help-box .large-button:hover,.cld-panel-short .help-wrap .help-box .large-button:hover,.cld-panel .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-info-box .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel-short .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-info-box .help-wrap .help-box img,.cld-panel-short .help-wrap .help-box img,.cld-panel .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-info-box .help-wrap .help-box div,.cld-info-box .help-wrap .help-box h4,.cld-panel-short .help-wrap .help-box div,.cld-panel-short .help-wrap .help-box h4,.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4{padding:0 12px}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud,.closed.cld-info-box+.cld-submit,.closed.cld-info-box+.cld-switch-cloud,.closed.cld-panel-short+.cld-submit,.closed.cld-panel-short+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-input-color-picker{position:absolute;z-index:100}.cld-input-color-preview{border:3px solid #c6d1db;border-radius:4px;box-shadow:inset 0 0 3px rgba(0,0,0,.5);cursor:pointer;display:inline-block;height:40px;margin:0 0 6px;vertical-align:middle;width:70px}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button{background-color:#e9ecf9;border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-info-box,.cld-ui-sidebar .cld-panel,.cld-ui-sidebar .cld-panel-short{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{align-items:center;display:flex;justify-content:space-between;margin-top:50px}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em} \ No newline at end of file +.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.dashicons-cloudinary:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:""}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:""}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:""}.dashicons-cloudinary.syncing:before{content:""}.dashicons-cloudinary.media:before{content:""}.dashicons-cloudinary.dam:before{content:""}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-settings{margin-left:-20px}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-info-box,.cld-panel,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db;margin-top:13px;padding:23px 24px}.cld-panel.full-width,.full-width.cld-info-box,.full-width.cld-panel-short{max-width:100%}.cld-panel.has-heading,.has-heading.cld-info-box,.has-heading.cld-panel-short{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86.3%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-info-box hr,.cld-panel-short hr,.cld-panel hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-info-box ul,.cld-panel-short ul,.cld-panel ul{list-style:initial;padding:0 3em}.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-bottom:none}.cld-info-box .stat-boxes .box .cld-ui-icon,.cld-panel-short .stat-boxes .box .cld-ui-icon,.cld-panel .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-info-box .stat-boxes .icon,.cld-panel-short .stat-boxes .icon,.cld-panel .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-info-box .stat-boxes h3,.cld-panel-short .stat-boxes h3,.cld-panel .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-info-box .stat-boxes .limit,.cld-panel-short .stat-boxes .limit,.cld-panel .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-info-box .stat-boxes .usage,.cld-panel-short .stat-boxes .usage,.cld-panel .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-info-box .stat-boxes .box,.cld-panel-short .stat-boxes .box,.cld-panel .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-info-box .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-info-box .stat-boxes,.cld-panel-short .stat-boxes,.cld-panel .stat-boxes{font-size:1.2em}}.cld-info-box .img-connection-string,.cld-panel-short .img-connection-string,.cld-panel .img-connection-string{max-width:607px;width:100%}.cld-info-box .media-status-box,.cld-info-box .stat-boxes,.cld-panel-short .media-status-box,.cld-panel-short .stat-boxes,.cld-panel .media-status-box,.cld-panel .stat-boxes{border:1px solid #e5e5e5}.cld-info-box .media-status-box,.cld-panel-short .media-status-box,.cld-panel .media-status-box{padding:2rem;text-align:center}.cld-info-box .media-status-box .status,.cld-panel-short .media-status-box .status,.cld-panel .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-info-box .media-status-box .cld-ui-icon,.cld-panel-short .media-status-box .cld-ui-icon,.cld-panel .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-info-box .notification,.cld-panel-short .notification,.cld-panel .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-info-box .notification-success,.cld-panel-short .notification-success,.cld-panel .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-info-box .notification-success:before,.cld-panel-short .notification-success:before,.cld-panel .notification-success:before{color:#20b832}.cld-info-box .notification-syncing,.cld-panel-short .notification-syncing,.cld-panel .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-info-box .notification-syncing:before,.cld-panel-short .notification-syncing:before,.cld-panel .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-info-box .notification:before,.cld-panel-short .notification:before,.cld-panel .notification:before{margin-right:.5em}.cld-info-box .help-wrap,.cld-panel-short .help-wrap,.cld-panel .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}.cld-info-box .help-wrap .help-box .large-button,.cld-panel-short .help-wrap .help-box .large-button,.cld-panel .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-info-box .help-wrap .help-box .large-button:hover,.cld-panel-short .help-wrap .help-box .large-button:hover,.cld-panel .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-info-box .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel-short .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-info-box .help-wrap .help-box img,.cld-panel-short .help-wrap .help-box img,.cld-panel .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-info-box .help-wrap .help-box div,.cld-info-box .help-wrap .help-box h4,.cld-panel-short .help-wrap .help-box div,.cld-panel-short .help-wrap .help-box h4,.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4{padding:0 12px}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud,.closed.cld-info-box+.cld-submit,.closed.cld-info-box+.cld-switch-cloud,.closed.cld-panel-short+.cld-submit,.closed.cld-panel-short+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-input-color input{display:none;font-family:monospace;font-size:12px;line-height:2.33333333;margin:0;min-height:30px;padding:0 5px;vertical-align:top;width:194px}.cld-input-color .button.button-small{display:none;margin:2px 0 0 6px}.cld-input-color.focus .button.button-small,.cld-input-color.focus input{display:inline-block}.cld-input-color-picker{border:1px solid #dcdcdc;border-radius:3px;position:absolute;z-index:100}.cld-input-color-grid{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==");border:1px solid #c3c4c7;border-radius:3px;display:inline-block;margin:0 6px 6px 0;min-height:28px;padding:0 0 0 30px;position:relative;text-align:center;vertical-align:top}.cld-input-color-grid:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5;outline:2px solid transparent;outline-offset:0}.cld-input-color-preview{border-radius:3px 0 0 3px;cursor:pointer;display:inline-block;height:100%;left:0;position:absolute;top:0;width:30px}.cld-input-color-text{background-color:#f6f7f7;border-left:1px solid #c3c4c7;border-radius:0 2px 2px 0;cursor:pointer;display:inline-block;font-size:11px;line-height:2.54545455;padding:0 6px}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button{background-color:#e9ecf9;border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-info-box,.cld-ui-sidebar .cld-panel,.cld-ui-sidebar .cld-panel-short{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{align-items:center;display:flex;justify-content:space-between;margin-top:50px}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em} \ No newline at end of file diff --git a/js/cloudinary.js b/js/cloudinary.js index d447d4931..ba8183d2f 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_preview"),n=ks.createPicker(t,{attachTo:i});n.on("change",(({color:t})=>{i.value=t,i.style.backgroundColor=t,e.value=t,e.dispatchEvent(new Event("input"))})),n.hide(),i.addEventListener("click",(()=>{"hidden"===e.type?this.showPicker(n,e):this.hidePicker(n,e)})),e.addEventListener("input",(t=>{n.setColor(t.target.value,!0)})),document.addEventListener("mousedown",(r=>{-1===r.path.indexOf(t)&&-1===r.path.indexOf(i)&&r.path.indexOf(e)&&this.hidePicker(n,e)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(n,e)}))}))},showPicker(t,e){"text"!==e.type&&(e.type="text",t.show())},hidePicker(t,e){"hidden"!==e.type&&(e.type="hidden",t.hide())},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_container"),n=document.getElementById(t.dataset.id+"_preview"),r=document.getElementById(t.dataset.id+"_default"),o={attachTo:n},s=ks.createPicker(t,o);s.on("change",(({color:t})=>{const i=ks.parseColor(t,"rgbcss4");n.style.backgroundColor=i,e.value=i,e.dispatchEvent(new Event("input"))})),s.hide(),i.addEventListener("click",(()=>{this.togglePicker(s,i)})),e.addEventListener("input",(t=>{n.style.backgroundColor=t.target.value,s.setColor(t.target.value,!0)})),r.addEventListener("click",(()=>{s.setColor(r.dataset.defaultColor)})),document.addEventListener("mousedown",(n=>{-1===n.path.indexOf(t)&&-1===n.path.indexOf(i)&&-1===n.path.indexOf(e)&&-1===n.path.indexOf(r)&&this.hidePicker(s,i)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(s,i)}))}))},togglePicker(t,e){e.parentNode.classList.contains("focus")?this.hidePicker(t,e):this.showPicker(t,e)},showPicker(t,e){e.parentNode.classList.add("focus"),t.show()},hidePicker(t,e){e.parentNode.classList.remove("focus"),t.hide()},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file diff --git a/php/ui/component/class-color.php b/php/ui/component/class-color.php index f1cca3afb..4dc1fed97 100644 --- a/php/ui/component/class-color.php +++ b/php/ui/component/class-color.php @@ -19,7 +19,7 @@ class Color extends Text { * * @var string */ - protected $blueprint = 'wrap|icon/|div|label|title|link/|/title|extra_title/|/label|/div|prefix/|preview/|input/|picker/|suffix/|description/|tooltip/|/wrap'; + protected $blueprint = 'wrap|icon/|div|label|title|link/|/title|extra_title/|/label|/div|prefix/|preview/|input/|reset/|picker/|suffix/|description/|tooltip/|/wrap'; /** * Filter the picker parts structure. @@ -51,12 +51,23 @@ protected function picker( $struct ) { * @return array */ protected function preview( $struct ) { - $struct['element'] = 'span'; - $struct['attributes']['class'][] = 'cld-input-color-preview'; + $struct['element'] = 'button'; + $struct['attributes']['class'][] = 'cld-input-color-grid'; + $struct['attributes']['type'] = 'button'; + $struct['attributes']['id'] = $this->get_id() . '_container'; - $struct['attributes']['style'] = 'background-color:' . $this->setting->get_value(); - $struct['attributes']['id'] = $this->get_id() . '_preview'; - $struct['render'] = true; + $preview = $this->get_part( 'span' ); + $preview['attributes']['class'][] = 'cld-input-color-preview'; + + $preview['attributes']['style'] = 'background-color:' . $this->setting->get_value(); + $preview['attributes']['id'] = $this->get_id() . '_preview'; + $preview['render'] = true; + + $text = $this->get_part( 'span' ); + $text['attributes']['class'][] = 'cld-input-color-text'; + $text['content'] = __( 'Select Color', 'cloudinary' ); + $struct['children']['text'] = $text; + $struct['children']['preview'] = $preview; return $struct; } @@ -71,7 +82,7 @@ protected function preview( $struct ) { protected function input( $struct ) { $struct = parent::input( $struct ); - $struct['attributes']['type'] = 'hidden'; + $struct['attributes']['type'] = 'text'; $struct['attributes']['class'][] = 'cld-input-color'; $struct['attributes']['data-alpha-enabled'] = true; $struct['attributes']['data-default-color'] = $this->setting->get_param( 'default' ); @@ -79,6 +90,27 @@ protected function input( $struct ) { return $struct; } + /** + * Filter the input reset parts structure. + * + * @param array $struct The array structure. + * + * @return array + */ + protected function reset( $struct ) { + + $struct['element'] = 'button'; + $struct['attributes']['type'] = 'button'; + $struct['attributes']['id'] = $this->get_id() . '_default'; + $struct['attributes']['class'][] = 'button'; + $struct['attributes']['class'][] = 'button-small'; + $struct['attributes']['data-default-color'] = $this->setting->get_param( 'default' ); + + $struct['content'] = __( 'Default', 'cloudinary' ); + + return $struct; + } + /** * Filter the description parts structure. * diff --git a/src/css/_variables.scss b/src/css/_variables.scss index fb1944065..142e32089 100644 --- a/src/css/_variables.scss +++ b/src/css/_variables.scss @@ -17,6 +17,8 @@ $color-cld-light-grey: #eaecfa; $color-cld-description: rgba(0, 0, 1, 0.5); $color-cld-dark-description: rgba(0, 0, 1, 0.75); $color-grey-background: #f1f1f1; +$color-wp-borders: #c3c4c7; +$color-wp-grey: #f6f7f7; /** Sizes */ $content-width: 870px; diff --git a/src/css/components/ui/controls/_color.scss b/src/css/components/ui/controls/_color.scss index ae00e4138..da0674024 100644 --- a/src/css/components/ui/controls/_color.scss +++ b/src/css/components/ui/controls/_color.scss @@ -1,18 +1,77 @@ -// Color -&-color{ - &-picker{ +// Color picker. +&-color { + input { + display: none; + font-size: 12px; + font-family: monospace; + line-height: 2.33333333; + margin: 0; + padding: 0 5px; + vertical-align: top; + min-height: 30px; + width: 194px; + } + + .button.button-small { + display: none; + margin: 2px 0 0 6px; + } + + &.focus { + input { + display: inline-block; + } + + .button.button-small { + display: inline-block; + } + } + + &-picker { position: absolute; z-index: 100; + border-radius: 3px; + border: 1px solid #dcdcdc; + } + + &-grid { + vertical-align: top; + margin: 0 6px 6px 0; + border-radius: 3px; + min-height: 28px; + border: 1px solid $color-wp-borders; + display: inline-block; + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg=="); + padding: 0 0 0 30px; + text-align: center; + position: relative; + + &:focus { + box-shadow: 0 0 0 1px #fff, 0 0 0 3px #3448c5; + outline: 2px solid transparent; + outline-offset: 0; + } + } + + &-preview { + border-radius: 3px 0 0 3px; + display: inline-block; + height: 100%; + cursor: pointer; + position: absolute; + width: 30px; + left: 0; + top: 0; } - &-preview{ + + &-text { + border-radius: 0 2px 2px 0; display: inline-block; - height: 40px; - width: 70px; - border: 3px solid $color-cld-grey-blue; - box-shadow: 0 0 3px rgba(0,0,0,0.5) inset; + font-size: 11px; cursor: pointer; - vertical-align: middle; - margin: 0 0 6px; - border-radius: 4px; + padding: 0 6px; + background-color: $color-wp-grey; + line-height: 2.54545455; + border-left: 1px solid $color-wp-borders; } } diff --git a/src/js/components/color-picker.js b/src/js/components/color-picker.js index 126eadd64..db396746d 100644 --- a/src/js/components/color-picker.js +++ b/src/js/components/color-picker.js @@ -7,51 +7,58 @@ const ColorPicker = { this.pickers = context.getElementsByClassName( 'cld-input-color-picker' ); [ ...this.pickers ].forEach( ( picker ) => { const input = document.getElementById( picker.dataset.id ); + const container = document.getElementById( picker.dataset.id + '_container' ); const preview = document.getElementById( picker.dataset.id + '_preview' ); + const defaultButton = document.getElementById( picker.dataset.id + '_default' ); + const options = { + attachTo: preview, + }; - const pickerInstance = AColorPicker.createPicker( picker, { attachTo: preview } ); + const pickerInstance = AColorPicker.createPicker( picker, options ); pickerInstance.on( 'change', ( { color } ) => { - preview.value = color; - preview.style.backgroundColor = color; - input.value = color; + const rgba = AColorPicker.parseColor( color, "rgbcss4") + preview.style.backgroundColor = rgba; + input.value = rgba; input.dispatchEvent( new Event( 'input' ) ); } ); pickerInstance.hide(); - preview.addEventListener( 'click', () => { - if ( 'hidden' === input.type ) { - this.showPicker( pickerInstance, input ); - } else { - this.hidePicker( pickerInstance, input ); - } + container.addEventListener( 'click', () => { + this.togglePicker( pickerInstance, container ); } ); input.addEventListener( 'input', ( ev ) => { + preview.style.backgroundColor = ev.target.value; pickerInstance.setColor( ev.target.value, true ); } ); + defaultButton.addEventListener( 'click', () => { + pickerInstance.setColor( defaultButton.dataset.defaultColor ); + } ); document.addEventListener( 'mousedown', ( ev ) => { - if ( -1 === ev.path.indexOf( picker ) && -1 === ev.path.indexOf( preview ) && ev.path.indexOf( input ) ) { - this.hidePicker( pickerInstance, input ); + if ( -1 === ev.path.indexOf( picker ) && -1 === ev.path.indexOf( container ) && -1 === ev.path.indexOf( input ) && -1 === ev.path.indexOf( defaultButton ) ) { + this.hidePicker( pickerInstance, container ); } } ); window.addEventListener( 'keydown', ( ev ) => { if ( 'Escape' === ev.key ) { - this.hidePicker( pickerInstance, input ); + this.hidePicker( pickerInstance, container ); } } ); } ); - }, - showPicker( pickerInstance, input ) { - if ( 'text' !== input.type ) { - input.type = 'text'; - pickerInstance.show(); + togglePicker( pickerInstance, container ) { + if ( ! container.parentNode.classList.contains( 'focus' ) ) { + this.showPicker( pickerInstance, container ); + } else { + this.hidePicker( pickerInstance, container ); } }, - hidePicker( pickerInstance, input ) { - if ( 'hidden' !== input.type ) { - input.type = 'hidden'; - pickerInstance.hide(); - } + showPicker( pickerInstance, container ) { + container.parentNode.classList.add( 'focus' ); + pickerInstance.show(); + }, + hidePicker( pickerInstance, container ) { + container.parentNode.classList.remove( 'focus' ); + pickerInstance.hide(); }, setColor( color ) { this.color.value = color; From e74ff2f877f9e0c7774460ae7756e0faace764b8 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 11:19:22 +0200 Subject: [PATCH 11/19] remove jquery and $ from globals --- .eslintrc.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0cebfd461..90afb9a3d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,8 +4,6 @@ }, "globals": { "cloudinary": "readonly", - "jQuery": "readonly", - "$": "readonly", "CLDN": "readonly", "CLDLB": "readonly", "CLD_GLOBAL_TRANSFORMATIONS": "readonly", From 3f182dfabf125a4556268e6249e9d24ced44abe5 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 17:26:35 +0200 Subject: [PATCH 12/19] WIP refactor of classic-editor script to reuse the TermsInspector code --- js/block-editor.js | 2 +- js/classic-editor.js | 2 +- php/media/class-global-transformations.php | 31 +++ src/js/blocks.js | 1 + src/js/classic-editor.js | 233 +++++++-------------- src/js/components/terms-inspector.js | 70 ++++--- 6 files changed, 145 insertions(+), 194 deletions(-) diff --git a/js/block-editor.js b/js/block-editor.js index 86827ae11..f38ef8964 100644 --- a/js/block-editor.js +++ b/js/block-editor.js @@ -1 +1 @@ -!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=162)}({0:function(t,e){t.exports=window.React},1:function(t,e){t.exports=window.wp.i18n},11:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var H=L(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=L(/Edge/i),z=L(/firefox/i),V=L(/safari/i)&&!L(/chrome/i)&&!L(/android/i),q=L(/iP(ad|od|hone)/i),G=L(/chrome/i)&&L(/android/i),U={capture:!1,passive:!1};function $(t,e,n){t.addEventListener(e,n,!H&&U)}function Z(t,e,n){t.removeEventListener(e,n,!H&&U)}function K(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function J(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&K(t,e):K(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var tt,et=/\s+/g;function nt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(et," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(et," ")}}function ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===at())break;o=pt(o,!1)}return!1}function ct(t,e,n,o){for(var r=0,i=0,a=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=F(n,St);xt.pluginEvent.bind(me)(t,e,R({dragEl:Tt,parentEl:Ct,ghostEl:Mt,rootEl:Pt,nextEl:At,lastDownEl:It,cloneEl:Nt,cloneHidden:jt,dragStarted:Gt,putSortable:Ft,activeSortable:me.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt,hideGhostForTarget:pe,unhideGhostForTarget:he,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){Et(R({putSortable:Ft,cloneEl:Nt,targetEl:Tt,rootEl:Pt,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt},t))}var Tt,Ct,Mt,Pt,At,It,Nt,jt,kt,Rt,Yt,Xt,Bt,Ft,Lt,Ht,Wt,zt,Vt,qt,Gt,Ut,$t,Zt,Kt,Qt=!1,Jt=!1,te=[],ee=!1,ne=!1,oe=[],re=!1,ie=[],ae="undefined"!=typeof document,le=q,se=W||H?"cssFloat":"float",ce=ae&&!G&&!q&&"draggable"in document.createElement("div"),ue=function(){if(ae){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),de=function(t,e){var n=ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ct(t,0,e),i=ct(t,1,e),a=r&&ot(r),l=i&&ot(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[se]||i&&"none"===n[se]&&s+c>o)?"vertical":"horizontal"},fe=function(t){function e(t,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pe=function(){!ue&&Mt&&ot(Mt,"display","none")},he=function(){!ue&&Mt&&ot(Mt,"display","")};ae&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ve=function(t){if(Tt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,te.some((function(t){var e=t[bt].options.emptyInsertThreshold;if(e&&!ut(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,l=i>=n.top-e&&i<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[bt]._onDragOver(n)}}var r,i,a},ge=function(t){Tt&&Tt.parentNode[bt]._isOutsideThisEl(t.target)};function me(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=B({},e),t[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return de(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==me.supportPointer&&"PointerEvent"in window&&!V,emptyInsertThreshold:5};for(var o in xt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in fe(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(t,"pointerdown",this._onTapStart):($(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),te.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),B(this,yt())}function be(t,e,n,o,r,i,a,l){var s,c,u=t[bt],d=u.options.onMove;return!window.CustomEvent||H||W?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ye(t){t.draggable=!1}function we(){re=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function xe(t){return setTimeout(t,0)}function Ee(t){return clearTimeout(t)}me.prototype={constructor:me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){ie.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&ie.push(o)}}(n),!Tt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!V||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=J(l,o.draggable,n,!1))&&l.animated||It===l)){if(kt=dt(l),Yt=dt(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Dt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ot("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=J(s,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ot("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!J(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Tt&&n.parentNode===i){var s=lt(n);if(Pt=i,Ct=(Tt=n).parentNode,At=Tt.nextSibling,It=n,Bt=a.group,me.dragged=Tt,Lt={target:Tt,clientX:(e||t).clientX,clientY:(e||t).clientY},Vt=Lt.clientX-s.left,qt=Lt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Tt.style["will-change"]="all",o=function(){Ot("delayEnded",r,{evt:t}),me.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!z&&r.nativeDraggable&&(Tt.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),nt(Tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){it(Tt,t.trim(),ye)})),$(l,"dragover",ve),$(l,"mousemove",ve),$(l,"touchmove",ve),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),z&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Tt.draggable=!0),Ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(W||H))o();else{if(me.eventCanceled)return void this._onDrop();$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Tt&&ye(Tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):$(document,e?"touchmove":"mousemove",this._onTouchMove):($(Tt,"dragend",this),$(Pt,"dragstart",this._onDragStart));try{document.selection?xe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Qt=!1,Pt&&Tt){Ot("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",ge);var n=this.options;!t&&nt(Tt,n.dragClass,!1),nt(Tt,n.ghostClass,!0),me.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,pe();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY))!==e;)e=t;if(Tt.parentNode[bt]._isOutsideThisEl(t),e)do{if(e[bt]){if(e[bt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Mt&&rt(Mt,!0),a=Mt&&i&&i.a,l=Mt&&i&&i.d,s=le&&Kt&&ft(Kt),c=(r.clientX-Lt.clientX+o.x)/(a||1)+(s?s[0]-oe[0]:0)/(a||1),u=(r.clientY-Lt.clientY+o.y)/(l||1)+(s?s[1]-oe[1]:0)/(l||1);if(!me.active&&!Qt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}(t,r,this)&&!v.animated){if(v===Tt)return A(!1);if(v&&i===t.target&&(a=v),a&&(n=lt(a)),!1!==be(Pt,i,Tt,e,a,n,t,!!a))return P(),i.appendChild(Tt),Ct=i,I(),A(!0)}else if(v&&function(t,e,n){var o=lt(ct(n.el,0,n.options,!0)),r=10;return e?t.clientXu+c*i/2:sd-Zt)return-$t}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(t,a,n,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ne,Ut===a))){var O=dt(Tt);do{O-=m,y=Ct.children[O]}while(y&&("none"===ot(y,"display")||y===Mt))}if(0===m||y===a)return A(!1);Ut=a,$t=m;var D=a.nextElementSibling,T=!1,C=be(Pt,i,Tt,e,a,n,t,T=1===m);if(!1!==C)return 1!==C&&-1!==C||(T=1===C),re=!0,setTimeout(we,30),P(),T&&!D?i.appendChild(Tt):a.parentNode.insertBefore(Tt,T?D:a),E&>(E,0,S-E.scrollTop),Ct=Tt.parentNode,void 0===b||ne||(Zt=Math.abs(b-lt(a)[x])),I(),A(!0)}if(i.contains(Tt))return A(!1)}return!1}function M(l,s){Ot(l,p,R({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:A,onMove:function(n,o){return be(Pt,i,Tt,e,n,lt(n),t,o)},changed:I},s))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==f&&(nt(Tt,Ft?Ft.options.ghostClass:c.options.ghostClass,!1),nt(Tt,l.ghostClass,!0)),Ft!==p&&p!==me.active?Ft=p:p===me.active&&Ft&&(Ft=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Tt&&!Tt.animated||a===i&&!a.animated)&&(Ut=null),l.dragoverBubble||t.rootEl||a===document||(Tt.parentNode[bt]._isOutsideThisEl(t.target),!e&&ve(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function I(){Rt=dt(Tt),Xt=dt(Tt,l.draggable),Dt({sortable:p,name:"change",toEl:i,newIndex:Rt,newDraggableIndex:Xt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",ve),Z(document,"mousemove",ve),Z(document,"touchmove",ve)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Rt=dt(Tt),Xt=dt(Tt,n.draggable),Ot("drop",this,{evt:t}),Ct=Tt&&Tt.parentNode,Rt=dt(Tt),Xt=dt(Tt,n.draggable),me.eventCanceled||(Qt=!1,ne=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ee(this.cloneId),Ee(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),V&&ot(document.body,"user-select",""),ot(Tt,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),(Pt===Ct||Ft&&"clone"!==Ft.lastPutMode)&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),Tt&&(this.nativeDraggable&&Z(Tt,"dragend",this),ye(Tt),Tt.style["will-change"]="",Gt&&!Qt&&nt(Tt,Ft?Ft.options.ghostClass:this.options.ghostClass,!1),nt(Tt,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:Ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==Ct?(Rt>=0&&(Dt({rootEl:Ct,name:"add",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:Ct,originalEvent:t}),Dt({rootEl:Ct,name:"sort",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),Ft&&Ft.save()):Rt!==kt&&Rt>=0&&(Dt({sortable:this,name:"update",toEl:Ct,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),me.active&&(null!=Rt&&-1!==Rt||(Rt=kt,Xt=Yt),Dt({sortable:this,name:"end",toEl:Ct,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ot("nulling",this),Pt=Tt=Ct=Mt=At=Nt=It=jt=Lt=Ht=Gt=Rt=Xt=kt=Yt=Ut=$t=Ft=Bt=me.dragged=me.ghost=me.clone=me.active=null,ie.forEach((function(t){t.checked=!0})),ie.length=Wt=zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var H=L(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=L(/Edge/i),z=L(/firefox/i),V=L(/safari/i)&&!L(/chrome/i)&&!L(/android/i),q=L(/iP(ad|od|hone)/i),G=L(/chrome/i)&&L(/android/i),U={capture:!1,passive:!1};function $(t,e,n){t.addEventListener(e,n,!H&&U)}function Z(t,e,n){t.removeEventListener(e,n,!H&&U)}function K(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function J(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&K(t,e):K(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var tt,et=/\s+/g;function nt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(et," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(et," ")}}function ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===at())break;o=pt(o,!1)}return!1}function ct(t,e,n,o){for(var r=0,i=0,a=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=F(n,St);xt.pluginEvent.bind(me)(t,e,R({dragEl:Tt,parentEl:Ct,ghostEl:Mt,rootEl:Pt,nextEl:At,lastDownEl:It,cloneEl:Nt,cloneHidden:jt,dragStarted:Gt,putSortable:Ft,activeSortable:me.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt,hideGhostForTarget:pe,unhideGhostForTarget:he,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){Et(R({putSortable:Ft,cloneEl:Nt,targetEl:Tt,rootEl:Pt,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt},t))}var Tt,Ct,Mt,Pt,At,It,Nt,jt,kt,Rt,Yt,Xt,Bt,Ft,Lt,Ht,Wt,zt,Vt,qt,Gt,Ut,$t,Zt,Kt,Qt=!1,Jt=!1,te=[],ee=!1,ne=!1,oe=[],re=!1,ie=[],ae="undefined"!=typeof document,le=q,se=W||H?"cssFloat":"float",ce=ae&&!G&&!q&&"draggable"in document.createElement("div"),ue=function(){if(ae){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),de=function(t,e){var n=ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ct(t,0,e),i=ct(t,1,e),a=r&&ot(r),l=i&&ot(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[se]||i&&"none"===n[se]&&s+c>o)?"vertical":"horizontal"},fe=function(t){function e(t,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pe=function(){!ue&&Mt&&ot(Mt,"display","none")},he=function(){!ue&&Mt&&ot(Mt,"display","")};ae&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ve=function(t){if(Tt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,te.some((function(t){var e=t[bt].options.emptyInsertThreshold;if(e&&!ut(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,l=i>=n.top-e&&i<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[bt]._onDragOver(n)}}var r,i,a},ge=function(t){Tt&&Tt.parentNode[bt]._isOutsideThisEl(t.target)};function me(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=B({},e),t[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return de(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==me.supportPointer&&"PointerEvent"in window&&!V,emptyInsertThreshold:5};for(var o in xt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in fe(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(t,"pointerdown",this._onTapStart):($(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),te.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),B(this,yt())}function be(t,e,n,o,r,i,a,l){var s,c,u=t[bt],d=u.options.onMove;return!window.CustomEvent||H||W?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ye(t){t.draggable=!1}function we(){re=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function xe(t){return setTimeout(t,0)}function Ee(t){return clearTimeout(t)}me.prototype={constructor:me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){ie.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&ie.push(o)}}(n),!Tt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!V||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=J(l,o.draggable,n,!1))&&l.animated||It===l)){if(kt=dt(l),Yt=dt(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Dt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ot("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=J(s,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ot("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!J(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Tt&&n.parentNode===i){var s=lt(n);if(Pt=i,Ct=(Tt=n).parentNode,At=Tt.nextSibling,It=n,Bt=a.group,me.dragged=Tt,Lt={target:Tt,clientX:(e||t).clientX,clientY:(e||t).clientY},Vt=Lt.clientX-s.left,qt=Lt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Tt.style["will-change"]="all",o=function(){Ot("delayEnded",r,{evt:t}),me.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!z&&r.nativeDraggable&&(Tt.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),nt(Tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){it(Tt,t.trim(),ye)})),$(l,"dragover",ve),$(l,"mousemove",ve),$(l,"touchmove",ve),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),z&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Tt.draggable=!0),Ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(W||H))o();else{if(me.eventCanceled)return void this._onDrop();$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Tt&&ye(Tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):$(document,e?"touchmove":"mousemove",this._onTouchMove):($(Tt,"dragend",this),$(Pt,"dragstart",this._onDragStart));try{document.selection?xe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Qt=!1,Pt&&Tt){Ot("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",ge);var n=this.options;!t&&nt(Tt,n.dragClass,!1),nt(Tt,n.ghostClass,!0),me.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,pe();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY))!==e;)e=t;if(Tt.parentNode[bt]._isOutsideThisEl(t),e)do{if(e[bt]){if(e[bt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Mt&&rt(Mt,!0),a=Mt&&i&&i.a,l=Mt&&i&&i.d,s=le&&Kt&&ft(Kt),c=(r.clientX-Lt.clientX+o.x)/(a||1)+(s?s[0]-oe[0]:0)/(a||1),u=(r.clientY-Lt.clientY+o.y)/(l||1)+(s?s[1]-oe[1]:0)/(l||1);if(!me.active&&!Qt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}(t,r,this)&&!v.animated){if(v===Tt)return A(!1);if(v&&i===t.target&&(a=v),a&&(n=lt(a)),!1!==be(Pt,i,Tt,e,a,n,t,!!a))return P(),i.appendChild(Tt),Ct=i,I(),A(!0)}else if(v&&function(t,e,n){var o=lt(ct(n.el,0,n.options,!0)),r=10;return e?t.clientXu+c*i/2:sd-Zt)return-$t}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(t,a,n,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ne,Ut===a))){var O=dt(Tt);do{O-=m,y=Ct.children[O]}while(y&&("none"===ot(y,"display")||y===Mt))}if(0===m||y===a)return A(!1);Ut=a,$t=m;var D=a.nextElementSibling,T=!1,C=be(Pt,i,Tt,e,a,n,t,T=1===m);if(!1!==C)return 1!==C&&-1!==C||(T=1===C),re=!0,setTimeout(we,30),P(),T&&!D?i.appendChild(Tt):a.parentNode.insertBefore(Tt,T?D:a),E&>(E,0,S-E.scrollTop),Ct=Tt.parentNode,void 0===b||ne||(Zt=Math.abs(b-lt(a)[x])),I(),A(!0)}if(i.contains(Tt))return A(!1)}return!1}function M(l,s){Ot(l,p,R({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:A,onMove:function(n,o){return be(Pt,i,Tt,e,n,lt(n),t,o)},changed:I},s))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==f&&(nt(Tt,Ft?Ft.options.ghostClass:c.options.ghostClass,!1),nt(Tt,l.ghostClass,!0)),Ft!==p&&p!==me.active?Ft=p:p===me.active&&Ft&&(Ft=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Tt&&!Tt.animated||a===i&&!a.animated)&&(Ut=null),l.dragoverBubble||t.rootEl||a===document||(Tt.parentNode[bt]._isOutsideThisEl(t.target),!e&&ve(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function I(){Rt=dt(Tt),Xt=dt(Tt,l.draggable),Dt({sortable:p,name:"change",toEl:i,newIndex:Rt,newDraggableIndex:Xt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",ve),Z(document,"mousemove",ve),Z(document,"touchmove",ve)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Rt=dt(Tt),Xt=dt(Tt,n.draggable),Ot("drop",this,{evt:t}),Ct=Tt&&Tt.parentNode,Rt=dt(Tt),Xt=dt(Tt,n.draggable),me.eventCanceled||(Qt=!1,ne=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ee(this.cloneId),Ee(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),V&&ot(document.body,"user-select",""),ot(Tt,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),(Pt===Ct||Ft&&"clone"!==Ft.lastPutMode)&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),Tt&&(this.nativeDraggable&&Z(Tt,"dragend",this),ye(Tt),Tt.style["will-change"]="",Gt&&!Qt&&nt(Tt,Ft?Ft.options.ghostClass:this.options.ghostClass,!1),nt(Tt,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:Ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==Ct?(Rt>=0&&(Dt({rootEl:Ct,name:"add",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:Ct,originalEvent:t}),Dt({rootEl:Ct,name:"sort",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),Ft&&Ft.save()):Rt!==kt&&Rt>=0&&(Dt({sortable:this,name:"update",toEl:Ct,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),me.active&&(null!=Rt&&-1!==Rt||(Rt=kt,Xt=Yt),Dt({sortable:this,name:"end",toEl:Ct,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ot("nulling",this),Pt=Tt=Ct=Mt=At=Nt=It=jt=Lt=Ht=Gt=Rt=Xt=kt=Yt=Ut=$t=Ft=Bt=me.dragged=me.ghost=me.clone=me.active=null,ie.forEach((function(t){t.checked=!0})),ie.length=Wt=zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n{const n=!!a.length&&jQuery('[data-item="'+r+":"+a[0].id+'"]');n.length?n.remove():(jQuery(`.cld-tax-order-list-item:contains(${o})`).remove(),--e.startId),this.processTags(t)}))}),jQuery("body").on("change",".selectit input",(function(){const t=jQuery(this),a=t.val(),n=t.is(":checked"),r=t.parent().text().trim();!0===n?e.tags.find(`[data-item="category:${a}"]`).length||e._pushItem(`category:${a}`,r):e.tags.find(`[data-item="category:${a}"]`).remove()}))},_createItem(e,t){const a=jQuery("
  • "),n=jQuery(""),r=jQuery("");return a.addClass("cld-tax-order-list-item").attr("data-item",e),r.addClass("cld-tax-order-list-item-input").attr("type","hidden").attr("name","cld_tax_order[]").val(e),n.addClass("dashicons dashicons-menu cld-tax-order-list-item-handle"),a.append(n).append(t).append(r),a},_pushItem(e,t){const a=this._createItem(e,t);this.tags.append(a)},_sortable(){jQuery(".cld-tax-order-list").sortable({connectWith:".cld-tax-order",axis:"y",handle:".cld-tax-order-list-item-handle",placeholder:"cld-tax-order-list-item-placeholder",forcePlaceholderSize:!0,helper:"clone"})}};void 0!==window.CLDN&&(n._init(),jQuery("[data-wp-lists] .selectit input[checked]").each(((e,t)=>{jQuery(t).trigger("change")}))),t.default=n}}); \ No newline at end of file +!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=70)}([function(t,n,e){"use strict";function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"a",(function(){return r}))},,,function(t,n,e){(function(t,r){var o;(function(){var i,u="Expected a function",a="__lodash_hash_undefined__",c="__lodash_placeholder__",l=16,f=32,s=64,h=128,p=256,v=1/0,d=9007199254740991,g=NaN,y=4294967295,b=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",f],["partialRight",s],["rearg",p]],_="[object Arguments]",m="[object Array]",w="[object Boolean]",O="[object Date]",E="[object Error]",j="[object Function]",S="[object GeneratorFunction]",x="[object Map]",A="[object Number]",T="[object Object]",D="[object Promise]",I="[object RegExp]",R="[object Set]",k="[object String]",P="[object Symbol]",C="[object WeakMap]",N="[object ArrayBuffer]",L="[object DataView]",M="[object Float32Array]",F="[object Float64Array]",z="[object Int8Array]",B="[object Int16Array]",U="[object Int32Array]",W="[object Uint8Array]",X="[object Uint8ClampedArray]",Y="[object Uint16Array]",$="[object Uint32Array]",G=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Z=RegExp(q.source),J=RegExp(K.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ft=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,vt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,jt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",Dt="\\ufe0e\\ufe0f",It="\\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",Rt="['’]",kt="[\\ud800-\\udfff]",Pt="["+It+"]",Ct="["+St+"]",Nt="\\d+",Lt="[\\u2700-\\u27bf]",Mt="["+At+"]",Ft="[^\\ud800-\\udfff"+It+Nt+xt+At+Tt+"]",zt="\\ud83c[\\udffb-\\udfff]",Bt="[^\\ud800-\\udfff]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Wt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+Tt+"]",Yt="(?:"+Mt+"|"+Ft+")",$t="(?:"+Xt+"|"+Ft+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+Ct+"|"+zt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Kt=qt+Ht+("(?:\\u200d(?:"+[Bt,Ut,Wt].join("|")+")"+qt+Ht+")*"),Zt="(?:"+[Lt,Ut,Wt].join("|")+")"+Kt,Jt="(?:"+[Bt+Ct+"?",Ct,Ut,Wt,kt].join("|")+")",Qt=RegExp(Rt,"g"),tn=RegExp(Ct,"g"),nn=RegExp(zt+"(?="+zt+")|"+Jt+Kt,"g"),en=RegExp([Xt+"?"+Mt+"+"+Gt+"(?="+[Pt,Xt,"$"].join("|")+")",$t+"+"+Vt+"(?="+[Pt,Xt+Yt,"$"].join("|")+")",Xt+"?"+Yt+"+"+Gt,Xt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Zt].join("|"),"g"),rn=RegExp("[\\u200d\\ud800-\\udfff"+St+Dt+"]"),on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,un=["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"],an=-1,cn={};cn[M]=cn[F]=cn[z]=cn[B]=cn[U]=cn[W]=cn[X]=cn[Y]=cn[$]=!0,cn[_]=cn[m]=cn[N]=cn[w]=cn[L]=cn[O]=cn[E]=cn[j]=cn[x]=cn[A]=cn[T]=cn[I]=cn[R]=cn[k]=cn[C]=!1;var ln={};ln[_]=ln[m]=ln[N]=ln[L]=ln[w]=ln[O]=ln[M]=ln[F]=ln[z]=ln[B]=ln[U]=ln[x]=ln[A]=ln[T]=ln[I]=ln[R]=ln[k]=ln[P]=ln[W]=ln[X]=ln[Y]=ln[$]=!0,ln[E]=ln[j]=ln[C]=!1;var fn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sn=parseFloat,hn=parseInt,pn="object"==typeof t&&t&&t.Object===Object&&t,vn="object"==typeof self&&self&&self.Object===Object&&self,dn=pn||vn||Function("return this")(),gn=n&&!n.nodeType&&n,yn=gn&&"object"==typeof r&&r&&!r.nodeType&&r,bn=yn&&yn.exports===gn,_n=bn&&pn.process,mn=function(){try{var t=yn&&yn.require&&yn.require("util").types;return t||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),wn=mn&&mn.isArrayBuffer,On=mn&&mn.isDate,En=mn&&mn.isMap,jn=mn&&mn.isRegExp,Sn=mn&&mn.isSet,xn=mn&&mn.isTypedArray;function An(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function Tn(t,n,e,r){for(var o=-1,i=null==t?0:t.length;++o-1}function Cn(t,n,e){for(var r=-1,o=null==t?0:t.length;++r-1;);return e}function re(t,n){for(var e=t.length;e--&&Xn(n,t[e],0)>-1;);return e}function oe(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var ie=Hn({"À":"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"}),ue=Hn({"&":"&","<":"<",">":">",'"':""","'":"'"});function ae(t){return"\\"+fn[t]}function ce(t){return rn.test(t)}function le(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function fe(t,n){return function(e){return t(n(e))}}function se(t,n){for(var e=-1,r=t.length,o=0,i=[];++e",""":'"',"'":"'"});var be=function t(n){var e,r=(n=null==n?dn:be.defaults(dn.Object(),n,be.pick(dn,un))).Array,o=n.Date,ct=n.Error,St=n.Function,xt=n.Math,At=n.Object,Tt=n.RegExp,Dt=n.String,It=n.TypeError,Rt=r.prototype,kt=St.prototype,Pt=At.prototype,Ct=n["__core-js_shared__"],Nt=kt.toString,Lt=Pt.hasOwnProperty,Mt=0,Ft=(e=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",zt=Pt.toString,Bt=Nt.call(At),Ut=dn._,Wt=Tt("^"+Nt.call(Lt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=bn?n.Buffer:i,Yt=n.Symbol,$t=n.Uint8Array,Gt=Xt?Xt.allocUnsafe:i,Vt=fe(At.getPrototypeOf,At),Ht=At.create,qt=Pt.propertyIsEnumerable,Kt=Rt.splice,Zt=Yt?Yt.isConcatSpreadable:i,Jt=Yt?Yt.iterator:i,nn=Yt?Yt.toStringTag:i,rn=function(){try{var t=vi(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),fn=n.clearTimeout!==dn.clearTimeout&&n.clearTimeout,pn=o&&o.now!==dn.Date.now&&o.now,vn=n.setTimeout!==dn.setTimeout&&n.setTimeout,gn=xt.ceil,yn=xt.floor,_n=At.getOwnPropertySymbols,mn=Xt?Xt.isBuffer:i,Bn=n.isFinite,Hn=Rt.join,_e=fe(At.keys,At),me=xt.max,we=xt.min,Oe=o.now,Ee=n.parseInt,je=xt.random,Se=Rt.reverse,xe=vi(n,"DataView"),Ae=vi(n,"Map"),Te=vi(n,"Promise"),De=vi(n,"Set"),Ie=vi(n,"WeakMap"),Re=vi(At,"create"),ke=Ie&&new Ie,Pe={},Ce=Ui(xe),Ne=Ui(Ae),Le=Ui(Te),Me=Ui(De),Fe=Ui(Ie),ze=Yt?Yt.prototype:i,Be=ze?ze.valueOf:i,Ue=ze?ze.toString:i;function We(t){if(oa(t)&&!Vu(t)&&!(t instanceof Ge)){if(t instanceof $e)return t;if(Lt.call(t,"__wrapped__"))return Wi(t)}return new $e(t)}var Xe=function(){function t(){}return function(n){if(!ra(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=i,e}}();function Ye(){}function $e(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=i}function Ge(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function fr(t,n,e,r,o,u){var a,c=1&n,l=2&n,f=4&n;if(e&&(a=o?e(t,r,o,u):e(t)),a!==i)return a;if(!ra(t))return t;var s=Vu(t);if(s){if(a=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Lt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!c)return ko(t,a)}else{var h=yi(t),p=h==j||h==S;if(Zu(t))return xo(t,c);if(h==T||h==_||p&&!o){if(a=l||p?{}:_i(t),!c)return l?function(t,n){return Po(t,gi(t),n)}(t,function(t,n){return t&&Po(n,Na(n),t)}(a,t)):function(t,n){return Po(t,di(t),n)}(t,ur(a,t))}else{if(!ln[h])return o?t:{};a=function(t,n,e){var r=t.constructor;switch(n){case N:return Ao(t);case w:case O:return new r(+t);case L:return function(t,n){var e=n?Ao(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case M:case F:case z:case B:case U:case W:case X:case Y:case $:return To(t,e);case x:return new r;case A:case k:return new r(t);case I:return function(t){var n=new t.constructor(t.source,gt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case R:return new r;case P:return o=t,Be?At(Be.call(o)):{}}var o}(t,h,c)}}u||(u=new Ze);var v=u.get(t);if(v)return v;u.set(t,a),la(t)?t.forEach((function(r){a.add(fr(r,n,e,r,t,u))})):ia(t)&&t.forEach((function(r,o){a.set(o,fr(r,n,e,o,t,u))}));var d=s?i:(f?l?ai:ui:l?Na:Ca)(t);return Dn(d||t,(function(r,o){d&&(r=t[o=r]),rr(a,o,fr(r,n,e,o,t,u))})),a}function sr(t,n,e){var r=e.length;if(null==t)return!r;for(t=At(t);r--;){var o=e[r],u=n[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function hr(t,n,e){if("function"!=typeof t)throw new It(u);return Ci((function(){t.apply(i,e)}),n)}function pr(t,n,e,r){var o=-1,i=Pn,u=!0,a=t.length,c=[],l=n.length;if(!a)return c;e&&(n=Nn(n,Qn(e))),r?(i=Cn,u=!1):n.length>=200&&(i=ne,u=!1,n=new Ke(n));t:for(;++o-1},He.prototype.set=function(t,n){var e=this.__data__,r=or(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ve,map:new(Ae||He),string:new Ve}},qe.prototype.delete=function(t){var n=hi(this,t).delete(t);return this.size-=n?1:0,n},qe.prototype.get=function(t){return hi(this,t).get(t)},qe.prototype.has=function(t){return hi(this,t).has(t)},qe.prototype.set=function(t,n){var e=hi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ke.prototype.add=Ke.prototype.push=function(t){return this.__data__.set(t,a),this},Ke.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new He,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof He){var r=e.__data__;if(!Ae||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new qe(r)}return e.set(t,n),this.size=e.size,this};var vr=Lo(Or),dr=Lo(Er,!0);function gr(t,n){var e=!0;return vr(t,(function(t,r,o){return e=!!n(t,r,o)})),e}function yr(t,n,e){for(var r=-1,o=t.length;++r0&&e(a)?n>1?_r(a,n-1,e,r,o):Ln(o,a):r||(o[o.length]=a)}return o}var mr=Mo(),wr=Mo(!0);function Or(t,n){return t&&mr(t,n,Ca)}function Er(t,n){return t&&wr(t,n,Ca)}function jr(t,n){return kn(n,(function(n){return ta(t[n])}))}function Sr(t,n){for(var e=0,r=(n=Oo(n,t)).length;null!=t&&en}function Dr(t,n){return null!=t&&Lt.call(t,n)}function Ir(t,n){return null!=t&&n in At(t)}function Rr(t,n,e){for(var o=e?Cn:Pn,u=t[0].length,a=t.length,c=a,l=r(a),f=1/0,s=[];c--;){var h=t[c];c&&n&&(h=Nn(h,Qn(n))),f=we(h.length,f),l[c]=!e&&(n||u>=120&&h.length>=120)?new Ke(c&&h):i}h=t[0];var p=-1,v=l[0];t:for(;++p=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Vr(t,n,e){for(var r=-1,o=n.length,i={};++r-1;)a!==t&&Kt.call(a,c,1),Kt.call(t,c,1);return t}function qr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var o=n[e];if(e==r||o!==i){var i=o;wi(o)?Kt.call(t,o,1):po(t,o)}}return t}function Kr(t,n){return t+yn(je()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>d)return e;do{n%2&&(e+=t),(n=yn(n/2))&&(t+=t)}while(n);return e}function Jr(t,n){return Ni(Di(t,n,uc),t+"")}function Qr(t){return Qe(Xa(t))}function to(t,n){var e=Xa(t);return Fi(e,lr(n,0,e.length))}function no(t,n,e,r){if(!ra(t))return t;for(var o=-1,u=(n=Oo(n,t)).length,a=u-1,c=t;null!=c&&++oi?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var u=r(i);++o>>1,u=t[i];null!==u&&!sa(u)&&(e?u<=n:u=200){var l=n?null:Jo(t);if(l)return he(l);u=!1,o=ne,c=new Ke}else c=n?[]:a;t:for(;++r=r?t:io(t,n,e)}var So=fn||function(t){return dn.clearTimeout(t)};function xo(t,n){if(n)return t.slice();var e=t.length,r=Gt?Gt(e):new t.constructor(e);return t.copy(r),r}function Ao(t){var n=new t.constructor(t.byteLength);return new $t(n).set(new $t(t)),n}function To(t,n){var e=n?Ao(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Do(t,n){if(t!==n){var e=t!==i,r=null===t,o=t==t,u=sa(t),a=n!==i,c=null===n,l=n==n,f=sa(n);if(!c&&!f&&!u&&t>n||u&&a&&l&&!c&&!f||r&&a&&l||!e&&l||!o)return 1;if(!r&&!u&&!f&&t1?e[o-1]:i,a=o>2?e[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&Oi(e[0],e[1],a)&&(u=o<3?i:u,o=1),n=At(n);++r-1?o[u?n[a]:a]:i}}function Wo(t){return ii((function(n){var e=n.length,r=e,o=$e.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new It(u);if(o&&!c&&"wrapper"==li(a))var c=new $e([],!0)}for(r=c?r:e;++r1&&_.reverse(),p&&fc))return!1;var f=u.get(t),s=u.get(n);if(f&&s)return f==n&&s==t;var h=-1,p=!0,v=2&e?new Ke:i;for(u.set(t,n),u.set(n,t);++h-1&&t%1==0&&t1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return Dn(b,(function(e){var r="_."+e[0];n&e[1]&&!Pn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ft);return n?n[1].split(st):[]}(r),e)))}function Mi(t){var n=0,e=0;return function(){var r=Oe(),o=16-(r-e);if(e=r,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(i,arguments)}}function Fi(t,n){var e=-1,r=t.length,o=r-1;for(n=n===i?r:n;++e1?t[n-1]:i;return e="function"==typeof e?(t.pop(),e):i,cu(t,e)}));function du(t){var n=We(t);return n.__chain__=!0,n}function gu(t,n){return n(t)}var yu=ii((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,o=function(n){return cr(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Ge&&wi(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:gu,args:[o],thisArg:i}),new $e(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(i),t}))):this.thru(o)}));var bu=Co((function(t,n,e){Lt.call(t,e)?++t[e]:ar(t,e,1)}));var _u=Uo(Gi),mu=Uo(Vi);function wu(t,n){return(Vu(t)?Dn:vr)(t,si(n,3))}function Ou(t,n){return(Vu(t)?In:dr)(t,si(n,3))}var Eu=Co((function(t,n,e){Lt.call(t,e)?t[e].push(n):ar(t,e,[n])}));var ju=Jr((function(t,n,e){var o=-1,i="function"==typeof n,u=qu(t)?r(t.length):[];return vr(t,(function(t){u[++o]=i?An(n,t,e):kr(t,n,e)})),u})),Su=Co((function(t,n,e){ar(t,e,n)}));function xu(t,n){return(Vu(t)?Nn:Ur)(t,si(n,3))}var Au=Co((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var Tu=Jr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&Oi(t,n[0],n[1])?n=[]:e>2&&Oi(n[0],n[1],n[2])&&(n=[n[0]]),Gr(t,_r(n,1),[])})),Du=pn||function(){return dn.Date.now()};function Iu(t,n,e){return n=e?i:n,n=t&&null==n?t.length:n,ti(t,h,i,i,i,i,n)}function Ru(t,n){var e;if("function"!=typeof n)throw new It(u);return t=ya(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=i),e}}var ku=Jr((function(t,n,e){var r=1;if(e.length){var o=se(e,fi(ku));r|=f}return ti(t,r,n,e,o)})),Pu=Jr((function(t,n,e){var r=3;if(e.length){var o=se(e,fi(Pu));r|=f}return ti(n,r,t,e,o)}));function Cu(t,n,e){var r,o,a,c,l,f,s=0,h=!1,p=!1,v=!0;if("function"!=typeof t)throw new It(u);function d(n){var e=r,u=o;return r=o=i,s=n,c=t.apply(u,e)}function g(t){return s=t,l=Ci(b,n),h?d(t):c}function y(t){var e=t-f;return f===i||e>=n||e<0||p&&t-s>=a}function b(){var t=Du();if(y(t))return _(t);l=Ci(b,function(t){var e=n-(t-f);return p?we(e,a-(t-s)):e}(t))}function _(t){return l=i,v&&r?d(t):(r=o=i,c)}function m(){var t=Du(),e=y(t);if(r=arguments,o=this,f=t,e){if(l===i)return g(f);if(p)return So(l),l=Ci(b,n),d(f)}return l===i&&(l=Ci(b,n)),c}return n=_a(n)||0,ra(e)&&(h=!!e.leading,a=(p="maxWait"in e)?me(_a(e.maxWait)||0,n):a,v="trailing"in e?!!e.trailing:v),m.cancel=function(){l!==i&&So(l),s=0,r=f=o=l=i},m.flush=function(){return l===i?c:_(Du())},m}var Nu=Jr((function(t,n){return hr(t,1,n)})),Lu=Jr((function(t,n,e){return hr(t,_a(n)||0,e)}));function Mu(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new It(u);var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return e.cache=i.set(o,u)||i,u};return e.cache=new(Mu.Cache||qe),e}function Fu(t){if("function"!=typeof t)throw new It(u);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Mu.Cache=qe;var zu=Eo((function(t,n){var e=(n=1==n.length&&Vu(n[0])?Nn(n[0],Qn(si())):Nn(_r(n,1),Qn(si()))).length;return Jr((function(r){for(var o=-1,i=we(r.length,e);++o=n})),Gu=Pr(function(){return arguments}())?Pr:function(t){return oa(t)&&Lt.call(t,"callee")&&!qt.call(t,"callee")},Vu=r.isArray,Hu=wn?Qn(wn):function(t){return oa(t)&&Ar(t)==N};function qu(t){return null!=t&&ea(t.length)&&!ta(t)}function Ku(t){return oa(t)&&qu(t)}var Zu=mn||_c,Ju=On?Qn(On):function(t){return oa(t)&&Ar(t)==O};function Qu(t){if(!oa(t))return!1;var n=Ar(t);return n==E||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var n=Ar(t);return n==j||n==S||"[object AsyncFunction]"==n||"[object Proxy]"==n}function na(t){return"number"==typeof t&&t==ya(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function ra(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function oa(t){return null!=t&&"object"==typeof t}var ia=En?Qn(En):function(t){return oa(t)&&yi(t)==x};function ua(t){return"number"==typeof t||oa(t)&&Ar(t)==A}function aa(t){if(!oa(t)||Ar(t)!=T)return!1;var n=Vt(t);if(null===n)return!0;var e=Lt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nt.call(e)==Bt}var ca=jn?Qn(jn):function(t){return oa(t)&&Ar(t)==I};var la=Sn?Qn(Sn):function(t){return oa(t)&&yi(t)==R};function fa(t){return"string"==typeof t||!Vu(t)&&oa(t)&&Ar(t)==k}function sa(t){return"symbol"==typeof t||oa(t)&&Ar(t)==P}var ha=xn?Qn(xn):function(t){return oa(t)&&ea(t.length)&&!!cn[Ar(t)]};var pa=qo(Br),va=qo((function(t,n){return t<=n}));function da(t){if(!t)return[];if(qu(t))return fa(t)?de(t):ko(t);if(Jt&&t[Jt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Jt]());var n=yi(t);return(n==x?le:n==R?he:Xa)(t)}function ga(t){return t?(t=_a(t))===v||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var n=ga(t),e=n%1;return n==n?e?n-e:n:0}function ba(t){return t?lr(ya(t),0,y):0}function _a(t){if("number"==typeof t)return t;if(sa(t))return g;if(ra(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ra(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Jn(t);var e=bt.test(t);return e||mt.test(t)?hn(t.slice(2),e?2:8):yt.test(t)?g:+t}function ma(t){return Po(t,Na(t))}function wa(t){return null==t?"":so(t)}var Oa=No((function(t,n){if(xi(n)||qu(n))Po(n,Ca(n),t);else for(var e in n)Lt.call(n,e)&&rr(t,e,n[e])})),Ea=No((function(t,n){Po(n,Na(n),t)})),ja=No((function(t,n,e,r){Po(n,Na(n),t,r)})),Sa=No((function(t,n,e,r){Po(n,Ca(n),t,r)})),xa=ii(cr);var Aa=Jr((function(t,n){t=At(t);var e=-1,r=n.length,o=r>2?n[2]:i;for(o&&Oi(n[0],n[1],o)&&(r=1);++e1),n})),Po(t,ai(t),e),r&&(e=fr(e,7,ri));for(var o=n.length;o--;)po(e,n[o]);return e}));var za=ii((function(t,n){return null==t?{}:function(t,n){return Vr(t,n,(function(n,e){return Ia(t,e)}))}(t,n)}));function Ba(t,n){if(null==t)return{};var e=Nn(ai(t),(function(t){return[t]}));return n=si(n),Vr(t,e,(function(t,e){return n(t,e[0])}))}var Ua=Qo(Ca),Wa=Qo(Na);function Xa(t){return null==t?[]:te(t,Ca(t))}var Ya=zo((function(t,n,e){return n=n.toLowerCase(),t+(e?$a(n):n)}));function $a(t){return Qa(wa(t).toLowerCase())}function Ga(t){return(t=wa(t))&&t.replace(Ot,ie).replace(tn,"")}var Va=zo((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Ha=zo((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),qa=Fo("toLowerCase");var Ka=zo((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Za=zo((function(t,n,e){return t+(e?" ":"")+Qa(n)}));var Ja=zo((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Qa=Fo("toUpperCase");function tc(t,n,e){return t=wa(t),(n=e?i:n)===i?function(t){return on.test(t)}(t)?function(t){return t.match(en)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(n)||[]}var nc=Jr((function(t,n){try{return An(t,i,n)}catch(t){return Qu(t)?t:new ct(t)}})),ec=ii((function(t,n){return Dn(n,(function(n){n=Bi(n),ar(t,n,ku(t[n],t))})),t}));function rc(t){return function(){return t}}var oc=Wo(),ic=Wo(!0);function uc(t){return t}function ac(t){return Mr("function"==typeof t?t:fr(t,1))}var cc=Jr((function(t,n){return function(e){return kr(e,t,n)}})),lc=Jr((function(t,n){return function(e){return kr(t,e,n)}}));function fc(t,n,e){var r=Ca(n),o=jr(n,r);null!=e||ra(n)&&(o.length||!r.length)||(e=n,n=t,t=this,o=jr(n,Ca(n)));var i=!(ra(e)&&"chain"in e&&!e.chain),u=ta(t);return Dn(o,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__),o=e.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Ln([this.value()],arguments))})})),t}function sc(){}var hc=Go(Nn),pc=Go(Rn),vc=Go(zn);function dc(t){return Ei(t)?Vn(Bi(t)):function(t){return function(n){return Sr(n,t)}}(t)}var gc=Ho(),yc=Ho(!0);function bc(){return[]}function _c(){return!1}var mc=$o((function(t,n){return t+n}),0),wc=Zo("ceil"),Oc=$o((function(t,n){return t/n}),1),Ec=Zo("floor");var jc,Sc=$o((function(t,n){return t*n}),1),xc=Zo("round"),Ac=$o((function(t,n){return t-n}),0);return We.after=function(t,n){if("function"!=typeof n)throw new It(u);return t=ya(t),function(){if(--t<1)return n.apply(this,arguments)}},We.ary=Iu,We.assign=Oa,We.assignIn=Ea,We.assignInWith=ja,We.assignWith=Sa,We.at=xa,We.before=Ru,We.bind=ku,We.bindAll=ec,We.bindKey=Pu,We.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vu(t)?t:[t]},We.chain=du,We.chunk=function(t,n,e){n=(e?Oi(t,n,e):n===i)?1:me(ya(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var u=0,a=0,c=r(gn(o/n));uo?0:o+e),(r=r===i||r>o?o:ya(r))<0&&(r+=o),r=e>r?0:ba(r);e>>0)?(t=wa(t))&&("string"==typeof n||null!=n&&!ca(n))&&!(n=so(n))&&ce(t)?jo(de(t),0,e):t.split(n,e):[]},We.spread=function(t,n){if("function"!=typeof t)throw new It(u);return n=null==n?0:me(ya(n),0),Jr((function(e){var r=e[n],o=jo(e,0,n);return r&&Ln(o,r),An(t,this,o)}))},We.tail=function(t){var n=null==t?0:t.length;return n?io(t,1,n):[]},We.take=function(t,n,e){return t&&t.length?io(t,0,(n=e||n===i?1:ya(n))<0?0:n):[]},We.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?io(t,(n=r-(n=e||n===i?1:ya(n)))<0?0:n,r):[]},We.takeRightWhile=function(t,n){return t&&t.length?go(t,si(n,3),!1,!0):[]},We.takeWhile=function(t,n){return t&&t.length?go(t,si(n,3)):[]},We.tap=function(t,n){return n(t),t},We.throttle=function(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new It(u);return ra(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),Cu(t,n,{leading:r,maxWait:n,trailing:o})},We.thru=gu,We.toArray=da,We.toPairs=Ua,We.toPairsIn=Wa,We.toPath=function(t){return Vu(t)?Nn(t,Bi):sa(t)?[t]:ko(zi(wa(t)))},We.toPlainObject=ma,We.transform=function(t,n,e){var r=Vu(t),o=r||Zu(t)||ha(t);if(n=si(n,4),null==e){var i=t&&t.constructor;e=o?r?new i:[]:ra(t)&&ta(i)?Xe(Vt(t)):{}}return(o?Dn:Or)(t,(function(t,r,o){return n(e,t,r,o)})),e},We.unary=function(t){return Iu(t,1)},We.union=ou,We.unionBy=iu,We.unionWith=uu,We.uniq=function(t){return t&&t.length?ho(t):[]},We.uniqBy=function(t,n){return t&&t.length?ho(t,si(n,2)):[]},We.uniqWith=function(t,n){return n="function"==typeof n?n:i,t&&t.length?ho(t,i,n):[]},We.unset=function(t,n){return null==t||po(t,n)},We.unzip=au,We.unzipWith=cu,We.update=function(t,n,e){return null==t?t:vo(t,n,wo(e))},We.updateWith=function(t,n,e,r){return r="function"==typeof r?r:i,null==t?t:vo(t,n,wo(e),r)},We.values=Xa,We.valuesIn=function(t){return null==t?[]:te(t,Na(t))},We.without=lu,We.words=tc,We.wrap=function(t,n){return Bu(wo(n),t)},We.xor=fu,We.xorBy=su,We.xorWith=hu,We.zip=pu,We.zipObject=function(t,n){return _o(t||[],n||[],rr)},We.zipObjectDeep=function(t,n){return _o(t||[],n||[],no)},We.zipWith=vu,We.entries=Ua,We.entriesIn=Wa,We.extend=Ea,We.extendWith=ja,fc(We,We),We.add=mc,We.attempt=nc,We.camelCase=Ya,We.capitalize=$a,We.ceil=wc,We.clamp=function(t,n,e){return e===i&&(e=n,n=i),e!==i&&(e=(e=_a(e))==e?e:0),n!==i&&(n=(n=_a(n))==n?n:0),lr(_a(t),n,e)},We.clone=function(t){return fr(t,4)},We.cloneDeep=function(t){return fr(t,5)},We.cloneDeepWith=function(t,n){return fr(t,5,n="function"==typeof n?n:i)},We.cloneWith=function(t,n){return fr(t,4,n="function"==typeof n?n:i)},We.conformsTo=function(t,n){return null==n||sr(t,n,Ca(n))},We.deburr=Ga,We.defaultTo=function(t,n){return null==t||t!=t?n:t},We.divide=Oc,We.endsWith=function(t,n,e){t=wa(t),n=so(n);var r=t.length,o=e=e===i?r:lr(ya(e),0,r);return(e-=n.length)>=0&&t.slice(e,o)==n},We.eq=Xu,We.escape=function(t){return(t=wa(t))&&J.test(t)?t.replace(K,ue):t},We.escapeRegExp=function(t){return(t=wa(t))&&ut.test(t)?t.replace(it,"\\$&"):t},We.every=function(t,n,e){var r=Vu(t)?Rn:gr;return e&&Oi(t,n,e)&&(n=i),r(t,si(n,3))},We.find=_u,We.findIndex=Gi,We.findKey=function(t,n){return Un(t,si(n,3),Or)},We.findLast=mu,We.findLastIndex=Vi,We.findLastKey=function(t,n){return Un(t,si(n,3),Er)},We.floor=Ec,We.forEach=wu,We.forEachRight=Ou,We.forIn=function(t,n){return null==t?t:mr(t,si(n,3),Na)},We.forInRight=function(t,n){return null==t?t:wr(t,si(n,3),Na)},We.forOwn=function(t,n){return t&&Or(t,si(n,3))},We.forOwnRight=function(t,n){return t&&Er(t,si(n,3))},We.get=Da,We.gt=Yu,We.gte=$u,We.has=function(t,n){return null!=t&&bi(t,n,Dr)},We.hasIn=Ia,We.head=qi,We.identity=uc,We.includes=function(t,n,e,r){t=qu(t)?t:Xa(t),e=e&&!r?ya(e):0;var o=t.length;return e<0&&(e=me(o+e,0)),fa(t)?e<=o&&t.indexOf(n,e)>-1:!!o&&Xn(t,n,e)>-1},We.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=null==e?0:ya(e);return o<0&&(o=me(r+o,0)),Xn(t,n,o)},We.inRange=function(t,n,e){return n=ga(n),e===i?(e=n,n=0):e=ga(e),function(t,n,e){return t>=we(n,e)&&t=-9007199254740991&&t<=d},We.isSet=la,We.isString=fa,We.isSymbol=sa,We.isTypedArray=ha,We.isUndefined=function(t){return t===i},We.isWeakMap=function(t){return oa(t)&&yi(t)==C},We.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Ar(t)},We.join=function(t,n){return null==t?"":Hn.call(t,n)},We.kebabCase=Va,We.last=Qi,We.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=r;return e!==i&&(o=(o=ya(e))<0?me(r+o,0):we(o,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,o):Wn(t,$n,o,!0)},We.lowerCase=Ha,We.lowerFirst=qa,We.lt=pa,We.lte=va,We.max=function(t){return t&&t.length?yr(t,uc,Tr):i},We.maxBy=function(t,n){return t&&t.length?yr(t,si(n,2),Tr):i},We.mean=function(t){return Gn(t,uc)},We.meanBy=function(t,n){return Gn(t,si(n,2))},We.min=function(t){return t&&t.length?yr(t,uc,Br):i},We.minBy=function(t,n){return t&&t.length?yr(t,si(n,2),Br):i},We.stubArray=bc,We.stubFalse=_c,We.stubObject=function(){return{}},We.stubString=function(){return""},We.stubTrue=function(){return!0},We.multiply=Sc,We.nth=function(t,n){return t&&t.length?$r(t,ya(n)):i},We.noConflict=function(){return dn._===this&&(dn._=Ut),this},We.noop=sc,We.now=Du,We.pad=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;if(!n||r>=n)return t;var o=(n-r)/2;return Vo(yn(o),e)+t+Vo(gn(o),e)},We.padEnd=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;return n&&rn){var r=t;t=n,n=r}if(e||t%1||n%1){var o=je();return we(t+o*(n-t+sn("1e-"+((o+"").length-1))),n)}return Kr(t,n)},We.reduce=function(t,n,e){var r=Vu(t)?Mn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,vr)},We.reduceRight=function(t,n,e){var r=Vu(t)?Fn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,dr)},We.repeat=function(t,n,e){return n=(e?Oi(t,n,e):n===i)?1:ya(n),Zr(wa(t),n)},We.replace=function(){var t=arguments,n=wa(t[0]);return t.length<3?n:n.replace(t[1],t[2])},We.result=function(t,n,e){var r=-1,o=(n=Oo(n,t)).length;for(o||(o=1,t=i);++rd)return[];var e=y,r=we(t,y);n=si(n),t-=y;for(var o=Zn(r,n);++e=u)return t;var c=e-ve(r);if(c<1)return r;var l=a?jo(a,0,c).join(""):t.slice(0,c);if(o===i)return l+r;if(a&&(c+=l.length-c),ca(o)){if(t.slice(c).search(o)){var f,s=l;for(o.global||(o=Tt(o.source,wa(gt.exec(o))+"g")),o.lastIndex=0;f=o.exec(s);)var h=f.index;l=l.slice(0,h===i?c:h)}}else if(t.indexOf(so(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r},We.unescape=function(t){return(t=wa(t))&&Z.test(t)?t.replace(q,ye):t},We.uniqueId=function(t){var n=++Mt;return wa(t)+n},We.upperCase=Ja,We.upperFirst=Qa,We.each=wu,We.eachRight=Ou,We.first=qi,fc(We,(jc={},Or(We,(function(t,n){Lt.call(We.prototype,n)||(jc[n]=t)})),jc),{chain:!1}),We.VERSION="4.17.21",Dn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){We[t].placeholder=We})),Dn(["drop","take"],(function(t,n){Ge.prototype[t]=function(e){e=e===i?1:me(ya(e),0);var r=this.__filtered__&&!n?new Ge(this):this.clone();return r.__filtered__?r.__takeCount__=we(e,r.__takeCount__):r.__views__.push({size:we(e,y),type:t+(r.__dir__<0?"Right":"")}),r},Ge.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),Dn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Ge.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:si(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),Dn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Ge.prototype[t]=function(){return this[e](1).value()[0]}})),Dn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Ge.prototype[t]=function(){return this.__filtered__?new Ge(this):this[e](1)}})),Ge.prototype.compact=function(){return this.filter(uc)},Ge.prototype.find=function(t){return this.filter(t).head()},Ge.prototype.findLast=function(t){return this.reverse().find(t)},Ge.prototype.invokeMap=Jr((function(t,n){return"function"==typeof t?new Ge(this):this.map((function(e){return kr(e,t,n)}))})),Ge.prototype.reject=function(t){return this.filter(Fu(si(t)))},Ge.prototype.slice=function(t,n){t=ya(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Ge(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==i&&(e=(n=ya(n))<0?e.dropRight(-n):e.take(n-t)),e)},Ge.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ge.prototype.toArray=function(){return this.take(y)},Or(Ge.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),o=We[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);o&&(We.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof Ge,l=a[0],f=c||Vu(n),s=function(t){var n=o.apply(We,Ln([t],a));return r&&h?n[0]:n};f&&e&&"function"==typeof l&&1!=l.length&&(c=f=!1);var h=this.__chain__,p=!!this.__actions__.length,v=u&&!h,d=c&&!p;if(!u&&f){n=d?n:new Ge(this);var g=t.apply(n,a);return g.__actions__.push({func:gu,args:[s],thisArg:i}),new $e(g,h)}return v&&d?t.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Dn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Rt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);We.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return n.apply(Vu(o)?o:[],t)}return this[e]((function(e){return n.apply(Vu(e)?e:[],t)}))}})),Or(Ge.prototype,(function(t,n){var e=We[n];if(e){var r=e.name+"";Lt.call(Pe,r)||(Pe[r]=[]),Pe[r].push({name:n,func:e})}})),Pe[Xo(i,2).name]=[{name:"wrapper",func:i}],Ge.prototype.clone=function(){var t=new Ge(this.__wrapped__);return t.__actions__=ko(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ko(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ko(this.__views__),t},Ge.prototype.reverse=function(){if(this.__filtered__){var t=new Ge(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ge.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Vu(t),r=n<0,o=e?t.length:0,i=function(t,n,e){var r=-1,o=e.length;for(;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},We.prototype.plant=function(t){for(var n,e=this;e instanceof Ye;){var r=Wi(e);r.__index__=0,r.__values__=i,n?o.__wrapped__=r:n=r;var o=r;e=e.__wrapped__}return o.__wrapped__=t,n},We.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ge){var n=t;return this.__actions__.length&&(n=new Ge(this)),(n=n.reverse()).__actions__.push({func:gu,args:[ru],thisArg:i}),new $e(n,this.__chain__)}return this.thru(ru)},We.prototype.toJSON=We.prototype.valueOf=We.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},We.prototype.first=We.prototype.head,Jt&&(We.prototype[Jt]=function(){return this}),We}();dn._=be,(o=function(){return be}.call(n,e,n,r))===i||(r.exports=o)}).call(this)}).call(this,e(62),e(63)(t))},,,,function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),l=r.call(u,"finallyLoc");if(c&&l){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),d}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;A(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:D(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},,,,function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===r(i)&&(o=o[1]),t.call(e,o,i,n)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(n.prototype,e),u&&o(n,u),t}();t.exports=u},,,,,function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=e(34),u=(r=i)&&r.__esModule?r:{default:r};var a={obj:function(t){return"object"===(void 0===t?"undefined":o(t))&&!!t},all:function(t){return a.obj(t)&&t.type===u.default.all},error:function(t){return a.obj(t)&&t.type===u.default.error},array:Array.isArray,func:function(t){return"function"==typeof t},promise:function(t){return t&&a.func(t.then)},iterator:function(t){return t&&a.func(t.next)&&a.func(t.throw)},fork:function(t){return a.obj(t)&&t.type===u.default.fork},join:function(t){return a.obj(t)&&t.type===u.default.join},race:function(t){return a.obj(t)&&t.type===u.default.race},call:function(t){return a.obj(t)&&t.type===u.default.call},cps:function(t){return a.obj(t)&&t.type===u.default.cps},subscribe:function(t){return a.obj(t)&&t.type===u.default.subscribe},channel:function(t){return a.obj(t)&&a.func(t.subscribe)}};n.default=a},function(t,n){t.exports=function(t){var n,e=Object.keys(t);return n=function(){var t,n,r;for(t="return {",n=0;n1?n-1:0),r=1;r1?n-1:0),r=1;r2?e-2:0),o=2;o1?n-1:0),r=1;r=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}e.r(o),e.d(o,"startResolution",(function(){return re})),e.d(o,"finishResolution",(function(){return oe})),e.d(o,"invalidateResolution",(function(){return ie})),e.d(o,"invalidateResolutionForStore",(function(){return ue})),e.d(o,"invalidateResolutionForStoreSelector",(function(){return ae}));function s(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var h=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=s(/Edge/i),v=s(/firefox/i),d=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),g=s(/iP(ad|od|hone)/i),y=s(/chrome/i)&&s(/android/i),b={capture:!1,passive:!1};function _(t,n,e){t.addEventListener(n,e,!h&&b)}function m(t,n,e){t.removeEventListener(n,e,!h&&b)}function w(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function O(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function E(t,n,e,r){if(t){e=e||document;do{if(null!=n&&(">"===n[0]?t.parentNode===e&&w(t,n):w(t,n))||r&&t===e)return t;if(t===e)break}while(t=O(t))}return null}var j,S=/\s+/g;function x(t,n,e){if(t&&n)if(t.classList)t.classList[e?"add":"remove"](n);else{var r=(" "+t.className+" ").replace(S," ").replace(" "+n+" "," ");t.className=(r+(e?" "+n:"")).replace(S," ")}}function A(t,n,e){var r=t&&t.style;if(r){if(void 0===e)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(e=t.currentStyle),void 0===n?e:e[n];n in r||-1!==n.indexOf("webkit")||(n="-webkit-"+n),r[n]=e+("string"==typeof e?"":"px")}}function T(t,n){var e="";if("string"==typeof t)e=t;else do{var r=A(t,"transform");r&&"none"!==r&&(e=r+" "+e)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function D(t,n,e){if(t){var r=t.getElementsByTagName(n),o=0,i=r.length;if(e)for(;o=i:o<=i))return r;if(r===I())break;r=M(r,!1)}return!1}function P(t,n,e,r){for(var o=0,i=0,u=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=e.evt,o=f(e,H);G.pluginEvent.bind(Ut)(t,n,u({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:tt,nextEl:nt,lastDownEl:et,cloneEl:rt,cloneHidden:ot,dragStarted:yt,putSortable:ft,activeSortable:Ut.active,originalEvent:r,oldIndex:it,oldDraggableIndex:at,newIndex:ut,newDraggableIndex:ct,hideGhostForTarget:Mt,unhideGhostForTarget:Ft,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){K({sortable:n,name:t,originalEvent:r})}},o))};function K(t){V(u({putSortable:ft,cloneEl:rt,targetEl:Z,rootEl:tt,oldIndex:it,oldDraggableIndex:at,newIndex:ut,newDraggableIndex:ct},t))}var Z,J,Q,tt,nt,et,rt,ot,it,ut,at,ct,lt,ft,st,ht,pt,vt,dt,gt,yt,bt,_t,mt,wt,Ot=!1,Et=!1,jt=[],St=!1,xt=!1,At=[],Tt=!1,Dt=[],It="undefined"!=typeof document,Rt=g,kt=p||h?"cssFloat":"float",Pt=It&&!y&&!g&&"draggable"in document.createElement("div"),Ct=function(){if(It){if(h)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Nt=function(t,n){var e=A(t),r=parseInt(e.width)-parseInt(e.paddingLeft)-parseInt(e.paddingRight)-parseInt(e.borderLeftWidth)-parseInt(e.borderRightWidth),o=P(t,0,n),i=P(t,1,n),u=o&&A(o),a=i&&A(i),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+R(o).width,l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+R(i).width;if("flex"===e.display)return"column"===e.flexDirection||"column-reverse"===e.flexDirection?"vertical":"horizontal";if("grid"===e.display)return e.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&u.float&&"none"!==u.float){var f="left"===u.float?"left":"right";return!i||"both"!==a.clear&&a.clear!==f?"horizontal":"vertical"}return o&&("block"===u.display||"flex"===u.display||"table"===u.display||"grid"===u.display||c>=r&&"none"===e[kt]||i&&"none"===e[kt]&&c+l>r)?"vertical":"horizontal"},Lt=function(t){function n(t,e){return function(r,o,i,u){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(e||a))return!0;if(null==t||!1===t)return!1;if(e&&"clone"===t)return t;if("function"==typeof t)return n(t(r,o,i,u),e)(r,o,i,u);var c=(e?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var e={},r=t.group;r&&"object"==a(r)||(r={name:r}),e.name=r.name,e.checkPull=n(r.pull,!0),e.checkPut=n(r.put),e.revertClone=r.revertClone,t.group=e},Mt=function(){!Ct&&Q&&A(Q,"display","none")},Ft=function(){!Ct&&Q&&A(Q,"display","")};It&&document.addEventListener("click",(function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1,!1}),!0);var zt=function(t){if(Z){t=t.touches?t.touches[0]:t;var n=(o=t.clientX,i=t.clientY,jt.some((function(t){var n=t[W].options.emptyInsertThreshold;if(n&&!C(t)){var e=R(t),r=o>=e.left-n&&o<=e.right+n,a=i>=e.top-n&&i<=e.bottom+n;return r&&a?u=t:void 0}})),u);if(n){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.target=e.rootEl=n,e.preventDefault=void 0,e.stopPropagation=void 0,n[W]._onDragOver(e)}}var o,i,u},Bt=function(t){Z&&Z.parentNode[W]._isOutsideThisEl(t.target)};function Ut(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=l({},n),t[W]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ut.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(var r in G.initializePlugins(this,t,e),e)!(r in n)&&(n[r]=e[r]);for(var o in Lt(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?_(t,"pointerdown",this._onTapStart):(_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),jt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),l(this,X())}function Wt(t,n,e,r,o,i,u,a){var c,l,f=t[W],s=f.options.onMove;return!window.CustomEvent||h||p?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=n,c.from=t,c.dragged=e,c.draggedRect=r,c.related=o||n,c.relatedRect=i||R(n),c.willInsertAfter=a,c.originalEvent=u,t.dispatchEvent(c),s&&(l=s.call(f,c,u)),l}function Xt(t){t.draggable=!1}function Yt(){Tt=!1}function $t(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,e=n.length,r=0;e--;)r+=n.charCodeAt(e);return r.toString(36)}function Gt(t){return setTimeout(t,0)}function Vt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,Z):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,e=this.el,r=this.options,o=r.preventOnFilter,i=t.type,u=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(u||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,l=r.filter;if(function(t){Dt.length=0;var n=t.getElementsByTagName("input"),e=n.length;for(;e--;){var r=n[e];r.checked&&Dt.push(r)}}(e),!Z&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!d||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=E(a,r.draggable,e,!1))&&a.animated||et===a)){if(it=N(a),at=N(a,r.draggable),"function"==typeof l){if(l.call(this,t,a,this))return K({sortable:n,rootEl:c,name:"filter",targetEl:a,toEl:e,fromEl:e}),q("filter",n,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=E(c,r.trim(),e,!1))return K({sortable:n,rootEl:r,name:"filter",targetEl:a,fromEl:e,toEl:e}),q("filter",n,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!E(c,r.handle,e,!1)||this._prepareDragStart(t,u,a)}}},_prepareDragStart:function(t,n,e){var r,o=this,i=o.el,u=o.options,a=i.ownerDocument;if(e&&!Z&&e.parentNode===i){var c=R(e);if(tt=i,J=(Z=e).parentNode,nt=Z.nextSibling,et=e,lt=u.group,Ut.dragged=Z,st={target:Z,clientX:(n||t).clientX,clientY:(n||t).clientY},dt=st.clientX-c.left,gt=st.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Z.style["will-change"]="all",r=function(){q("delayEnded",o,{evt:t}),Ut.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!v&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(t,n),K({sortable:o,name:"choose",originalEvent:t}),x(Z,u.chosenClass,!0))},u.ignore.split(",").forEach((function(t){D(Z,t.trim(),Xt)})),_(a,"dragover",zt),_(a,"mousemove",zt),_(a,"touchmove",zt),_(a,"mouseup",o._onDrop),_(a,"touchend",o._onDrop),_(a,"touchcancel",o._onDrop),v&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),q("delayStart",this,{evt:t}),!u.delay||u.delayOnTouchOnly&&!n||this.nativeDraggable&&(p||h))r();else{if(Ut.eventCanceled)return void this._onDrop();_(a,"mouseup",o._disableDelayedDrag),_(a,"touchend",o._disableDelayedDrag),_(a,"touchcancel",o._disableDelayedDrag),_(a,"mousemove",o._delayedDragTouchMoveHandler),_(a,"touchmove",o._delayedDragTouchMoveHandler),u.supportPointer&&_(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,u.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Xt(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?this.options.supportPointer?_(document,"pointermove",this._onTouchMove):_(document,n?"touchmove":"mousemove",this._onTouchMove):(_(Z,"dragend",this),_(tt,"dragstart",this._onDragStart));try{document.selection?Gt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(Ot=!1,tt&&Z){q("dragStarted",this,{evt:n}),this.nativeDraggable&&_(document,"dragover",Bt);var e=this.options;!t&&x(Z,e.dragClass,!1),x(Z,e.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Mt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==n;)n=t;if(Z.parentNode[W]._isOutsideThisEl(t),n)do{if(n[W]){if(n[W]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Ft()}},_onTouchMove:function(t){if(st){var n=this.options,e=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,i=Q&&T(Q,!0),u=Q&&i&&i.a,a=Q&&i&&i.d,c=Rt&&wt&&L(wt),l=(o.clientX-st.clientX+r.x)/(u||1)+(c?c[0]-At[0]:0)/(u||1),f=(o.clientY-st.clientY+r.y)/(a||1)+(c?c[1]-At[1]:0)/(a||1);if(!Ut.active&&!Ot){if(e&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!g.animated){if(g===Z)return U(!1);if(g&&i===t.target&&(a=g),a&&(e=R(a)),!1!==Wt(tt,i,Z,n,a,e,t,!!a))return z(),i.appendChild(Z),J=i,X(),U(!0)}else if(g&&function(t,n,e){var r=R(P(e.el,0,e.options,!0)),o=10;return n?t.clientXf+l*i/2:cs-mt)return-_t}else if(c>f+l*(1-o)/2&&cs-l*i/2))return c>f+l/2?1:-1;return 0}(t,a,e,o,O?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,xt,bt===a))){var D=N(Z);do{D-=b,m=J.children[D]}while(m&&("none"===A(m,"display")||m===Q))}if(0===b||m===a)return U(!1);bt=a,_t=b;var I=a.nextElementSibling,L=!1,M=Wt(tt,i,Z,n,a,e,t,L=1===b);if(!1!==M)return 1!==M&&-1!==M||(L=1===M),Tt=!0,setTimeout(Yt,30),z(),L&&!I?i.appendChild(Z):a.parentNode.insertBefore(Z,L?I:a),S&&B(S,0,T-S.scrollTop),J=Z.parentNode,void 0===_||xt||(mt=Math.abs(_-R(a)[j])),X(),U(!0)}if(i.contains(Z))return U(!1)}return!1}function F(c,l){q(c,v,u({evt:t,isOwner:s,axis:o?"vertical":"horizontal",revert:r,dragRect:n,targetRect:e,canSort:h,fromSortable:p,target:a,completed:U,onMove:function(e,r){return Wt(tt,i,Z,n,e,R(e),t,r)},changed:X},l))}function z(){F("dragOverAnimationCapture"),v.captureAnimationState(),v!==p&&p.captureAnimationState()}function U(n){return F("dragOverCompleted",{insertion:n}),n&&(s?f._hideClone():f._showClone(v),v!==p&&(x(Z,ft?ft.options.ghostClass:f.options.ghostClass,!1),x(Z,c.ghostClass,!0)),ft!==v&&v!==Ut.active?ft=v:v===Ut.active&&ft&&(ft=null),p===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){F("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===Z&&!Z.animated||a===i&&!a.animated)&&(bt=null),c.dragoverBubble||t.rootEl||a===document||(Z.parentNode[W]._isOutsideThisEl(t.target),!n&&zt(t)),!c.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function X(){ut=N(Z),ct=N(Z,c.draggable),K({sortable:v,name:"change",toEl:i,newIndex:ut,newDraggableIndex:ct,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",zt),m(document,"mousemove",zt),m(document,"touchmove",zt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var n=this.el,e=this.options;ut=N(Z),ct=N(Z,e.draggable),q("drop",this,{evt:t}),J=Z&&Z.parentNode,ut=N(Z),ct=N(Z,e.draggable),Ut.eventCanceled||(Ot=!1,xt=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vt(this.cloneId),Vt(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&A(document.body,"user-select",""),A(Z,"transform",""),t&&(yt&&(t.cancelable&&t.preventDefault(),!e.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(tt===J||ft&&"clone"!==ft.lastPutMode)&&rt&&rt.parentNode&&rt.parentNode.removeChild(rt),Z&&(this.nativeDraggable&&m(Z,"dragend",this),Xt(Z),Z.style["will-change"]="",yt&&!Ot&&x(Z,ft?ft.options.ghostClass:this.options.ghostClass,!1),x(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==J?(ut>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:tt,originalEvent:t}),K({sortable:this,name:"remove",toEl:J,originalEvent:t}),K({rootEl:J,name:"sort",toEl:J,fromEl:tt,originalEvent:t}),K({sortable:this,name:"sort",toEl:J,originalEvent:t})),ft&&ft.save()):ut!==it&&ut>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:t}),K({sortable:this,name:"sort",toEl:J,originalEvent:t})),Ut.active&&(null!=ut&&-1!==ut||(ut=it,ct=at),K({sortable:this,name:"end",toEl:J,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),tt=Z=J=Q=nt=rt=et=ot=st=ht=yt=ut=ct=it=at=bt=_t=ft=lt=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null,Dt.forEach((function(t){t.checked=!0})),Dt.length=pt=vt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],e=this.el.children,r=0,o=e.length,i=this.options;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=Object(vn.map)(t,(function(t,n){return function(e,r,o,i,u){if(!Nn(e,n))return!1;var a=t(e);return Pn()(a)?a.then(i,u):i(a),!0}})),r=function(t,e){return!!Cn(t)&&(n(t),e(),!0)};e.push(r);var o=Object(Rn.create)(e);return function(t){return new Promise((function(e,r){return o(t,(function(t){Cn(t)&&n(t),e(t)}),r)}))}}function Mn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var e=Ln(t,n.dispatch);return function(t){return function(n){return In(n)?e(n):t(n)}}}}var Fn,zn=e(12);function Bn(t){return t.isRegistryControl=!0,t}var Un="@@data/SELECT",Wn="@@data/RESOLVE_SELECT",Xn="@@data/DISPATCH";var Yn=(Fn={},Object(pn.a)(Fn,Un,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args;return(e=t.select(r))[o].apply(e,Object(zn.a)(i))}}))),Object(pn.a)(Fn,Wn,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args,u=t.select(r)[o].hasResolver?"resolveSelect":"select";return(e=t[u](r))[o].apply(e,Object(zn.a)(i))}}))),Object(pn.a)(Fn,Xn,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.actionName,i=n.args;return(e=t.dispatch(r))[o].apply(e,Object(zn.a)(i))}}))),Fn),$n=function(){return function(t){return function(n){return Pn()(n)?n.then((function(n){if(n)return t(n)})):t(n)}}},Gn=function(t,n){return function(){return function(e){return function(r){var o=t.select("core/data").getCachedResolvers(n);return Object.entries(o).forEach((function(e){var o=Object(hn.a)(e,2),i=o[0],u=o[1],a=Object(vn.get)(t.stores,[n,"resolvers",i]);a&&a.shouldInvalidate&&u.forEach((function(e,o){!1===e&&a.shouldInvalidate.apply(a,[r].concat(Object(zn.a)(o)))&&t.dispatch("core/data").invalidateResolution(n,i,o)}))})),e(r)}}}};function Vn(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Hn(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e[qn];if(void 0===r)return n;var o=t(n[r],e);return o===n[r]?n:Hn(Hn({},n),{},Object(pn.a)({},r,o))}})((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Dn.a,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var e="START_RESOLUTION"===n.type,r=new Dn.a(t);return r.set(n.args,e),r;case"INVALIDATE_RESOLUTION":var o=new Dn.a(t);return o.delete(n.args),o}return t})),Zn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(vn.has)(t,[n.selectorName])?Object(vn.omit)(t,[n.selectorName]):t;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return Kn(t,n)}return t};function Jn(t,n,e){var r=Object(vn.get)(t,[n]);if(r)return r.get(e)}function Qn(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==Jn(t,n,e)}function te(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===Jn(t,n,e)}function ne(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===Jn(t,n,e)}function ee(t){return t}function re(t,n){return{type:"START_RESOLUTION",selectorName:t,args:n}}function oe(t,n){return{type:"FINISH_RESOLUTION",selectorName:t,args:n}}function ie(t,n){return{type:"INVALIDATE_RESOLUTION",selectorName:t,args:n}}function ue(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function ae(t){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:t}}function ce(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function le(t){for(var n=1;n1?e-1:0),o=1;o1?e-1:0),o=1;o3?i-3:0),a=3;a1?o-1:0),u=1;u1?o-1:0),u=1;u0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e={},r=[],o=new Set;function i(){r.forEach((function(t){return t()}))}var u=function(t){return r.push(t),function(){r=Object(vn.without)(r,t)}};function a(t){var r=Object(vn.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getSelectors():n&&n.select(r)}function c(t,n){o.clear();var e=t.call(this);return n.current=Array.from(o),e}function l(t){var r=Object(vn.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getResolveSelectors():n&&n.resolveSelect(r)}function f(t){var r=Object(vn.isObject)(t)?t.name:t,o=e[r];return o?o.getActions():n&&n.dispatch(r)}function s(t){return Object(vn.mapValues)(t,(function(t,n){return"function"!=typeof t?t:function(){return d[n].apply(null,arguments)}}))}function h(t,n){if("function"!=typeof n.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof n.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof n.subscribe)throw new TypeError("config.subscribe must be a function");e[t]=n,n.subscribe(i)}function p(t){h(t.name,t.instantiate(d))}function v(t,r){return t in e?e[t].subscribe(r):n?n.__experimentalSubscribeStore(t,r):u(r)}var d={registerGenericStore:h,stores:e,namespaces:e,subscribe:u,select:a,resolveSelect:l,dispatch:f,use:g,register:p,__experimentalMarkListeningStores:c,__experimentalSubscribeStore:v};function g(t,n){return d=ye(ye({},d),t(d,n))}return d.registerStore=function(t,n){if(!n.reducer)throw new TypeError("Must specify store reducer");var e=fe(t,n).instantiate(d);return h(t,e),e.store},h("core/data",de(d)),Object.entries(t).forEach((function(t){var n=Object(hn.a)(t,2),e=n[0],r=n[1];return d.registerStore(e,r)})),n&&n.subscribe(i),s(d)}(),_e=be.select,me=(be.resolveSelect,be.dispatch,be.subscribe);be.registerGenericStore,be.registerStore,be.use,be.register;const we={...{wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},_init(){this.wrapper=document.getElementById("cld-tax-items"),setTimeout((()=>{this._init_listeners()}),3e3),new ln(this.wrapper,{handle:".dashicons-menu",animation:150})},_init_listeners(){this.getTaxonomies().forEach((t=>{t.rest_base&&t.visibility.public&&this.addTaxonomyListener(t)}))},getTaxonomies:()=>_e("core").getTaxonomies(),addTaxonomyListener(t){me((()=>{const n=t.slug,e=t.hierarchical,{isResolving:r}=_e("core/data"),o=["taxonomy",n,this.query];this.available[n]=null,e&&(this.available[n]=_e("core").getEntityRecords("taxonomy",n,this.query)),r("core","getEntityRecords",o)||this.event(t)}))},getSelection:t=>_e("core/editor").getEditedPostAttribute(t.rest_base),getTerm:(t,n)=>_e("core").getEntityRecord("taxonomy",t.slug,n),event(t){const n=this.getSelection(t);if(!n)return;const e=[...n],r=Array.from(this.wrapper.querySelectorAll(`[data-item*="${t.slug}"]`));[...e].forEach((n=>{const e=this.wrapper.querySelector(`[data-item="${t.slug}:${n}"]`);r.splice(r.indexOf(e),1),null===e&&this.createItem(this.getItem(t,n))})),r.forEach((t=>{t.parentNode.removeChild(t)}))},createItem(t){if(!t||!t.id)return;const n=document.createElement("li"),e=document.createElement("span"),r=document.createElement("input"),o=document.createTextNode(t.name);n.classList.add("cld-tax-order-list-item"),n.dataset.item=`${t.taxonomy}:${t.id}`,r.classList.add("cld-tax-order-list-item-input"),r.type="hidden",r.name="cld_tax_order[]",r.value=`${t.taxonomy}:${t.id}`,e.className="dashicons dashicons-menu cld-tax-order-list-item-handle",n.appendChild(e),n.appendChild(r),n.appendChild(o),this.wrapper.appendChild(n)},getItem(t,n){let e={};if(null===this.available[t.slug])e=this.getTerm(t,n);else for(const r of this.available[t.slug])if(r.id===n){e=r,e.taxonomy=t.slug;break}return e}},selection:{},tagDelimiter:wp.i18n._x(",","tag delimiter")||",",getTaxonomies:()=>cldData.taxonomies,addTaxonomyListener(t){const n=document.querySelectorAll(`#taxonomy-${t.slug} .selectit input[type="checkbox"],textarea[name=tax_input\\[${t.slug}\\]]`);this.available[t.slug]=Object.values(t.terms),this.selection[t.slug]=[],n.forEach((n=>{let e=parseInt(n.value);if(Object.is(e,NaN)&&(e=n.value),"checkbox"===n.type)n.checked&&-1===this.selection[t.slug].indexOf(e)&&this.selection[t.slug].push(e);else if("textarea"===n.type){e.split(this.tagDelimiter).forEach((n=>{const e=n.trim();-1===this.selection[t.slug].indexOf(e)&&this.selection[t.slug].push(e)}))}n.addEventListener("change",(()=>{const r=this.selection[t.slug].indexOf(e);n.checked?this.selection[t.slug].push(e):-1media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true ); } + $taxonomies = get_object_taxonomies( $post, 'objects' ); + $data = array(); + foreach ( $taxonomies as $taxonomy ) { + + $args = array( + 'taxonomy' => $taxonomy->name, + 'hide_empty' => false, + ); + $terms = get_terms( $args ); + + $data[] = array( + 'slug' => $taxonomy->name, + 'hierarchical' => $taxonomy->hierarchical, + 'rest_base' => $taxonomy->rest_base, + 'visibility' => array( + 'public' => $taxonomy->public, + ), + 'terms' => array_map( + function ( $item ) { + return array( + 'id' => $item->term_id, + 'name' => $item->name, + 'taxonomy' => $item->taxonomy, + ); + }, + $terms + ), + ); + } + $this->media->plugin->add_script_data( 'taxonomies', $data ); + return implode( $out ); } diff --git a/src/js/blocks.js b/src/js/blocks.js index 87fa03637..1f4c0e77d 100644 --- a/src/js/blocks.js +++ b/src/js/blocks.js @@ -5,6 +5,7 @@ import Video from './components/video'; import Featured from './components/featured-image'; import Terms from './components/terms-inspector'; +window.addEventListener( 'load', () => Terms._init() ); // Global Constants export const cloudinaryBlocks = { Video, diff --git a/src/js/classic-editor.js b/src/js/classic-editor.js index 4a7e1e5eb..3f5bfcde8 100644 --- a/src/js/classic-editor.js +++ b/src/js/classic-editor.js @@ -1,179 +1,88 @@ /* global wpAjax */ +import Sortable from 'sortablejs'; +import TermsInspector from './components/terms-inspector'; const ClassicEditor = { - template: '', - tags: jQuery( '#cld-tax-items' ), - tagDelimiter: - ( window.tagsSuggestL10n && window.tagsSuggestL10n.tagDelimiter ) || - ',', - startId: null, - _init() { - // Check that we found the tax-items. - if ( ! this.tags.length ) { - return; - } - - const self = this; - this._sortable(); - - // Setup ajax overrides. - if ( typeof wpAjax !== 'undefined' ) { - wpAjax.procesParseAjaxResponse = wpAjax.parseAjaxResponse; - wpAjax.parseAjaxResponse = function ( - response, - settingsResponse, - element - ) { - const newResponse = wpAjax.procesParseAjaxResponse( - response, - settingsResponse, - element - ); - if ( ! newResponse.errors && newResponse.responses[ 0 ] ) { - if ( - jQuery( - '[data-taxonomy="' + - newResponse.responses[ 0 ].what + - '"]' - ).length - ) { - const data = jQuery( newResponse.responses[ 0 ].data ); - const text = data.find( 'label' ).last().text().trim(); - self._pushItem( newResponse.responses[ 0 ].what, text ); - } + ...TermsInspector, + selection: {}, + tagDelimiter: wp.i18n._x( ',', 'tag delimiter' ) || ',', + getTaxonomies() { + return cldData.taxonomies; + }, + addTaxonomyListener( taxonomy ) { + const inputs = document.querySelectorAll( `#taxonomy-${ taxonomy.slug } .selectit input[type="checkbox"],textarea[name=tax_input\\[${ taxonomy.slug }\\]]` ); + + this.available[ taxonomy.slug ] = Object.values( taxonomy.terms ); + this.selection[ taxonomy.slug ] = []; + inputs.forEach( input => { + let value = parseInt( input.value ); + if ( Object.is( value, NaN ) ) { + value = input.value; + } + if ( 'checkbox' === input.type ) { + if ( input.checked && -1 === this.selection[ taxonomy.slug ].indexOf( value ) ) { + this.selection[ taxonomy.slug ].push( value ); } - - return newResponse; - }; - } - - if ( typeof window.tagBox !== 'undefined' ) { - window.tagBox.processflushTags = window.tagBox.flushTags; - window.tagBox.flushTags = function ( el, a, f ) { - if ( typeof f === 'undefined' ) { - const taxonomy = el.prop( 'id' ); - const newTag = jQuery( 'input.newtag', el ); - - a = a || false; - - const text = a ? jQuery( a ).text() : newTag.val(); - const list = window.tagBox - .clean( text ) - .split( self.tagDelimiter ); - - for ( const i in list ) { - const tag = taxonomy + ':' + list[ i ]; - if ( ! jQuery( '[data-item="' + tag + '"]' ).length ) { - self._pushItem( tag, list[ i ] ); - } + } else if ( 'textarea' === input.type ) { + const keys = value.split( this.tagDelimiter ); + keys.forEach( ( tag ) => { + const tagValue = tag.trim(); + if ( -1 === this.selection[ taxonomy.slug ].indexOf( tagValue ) ) { + this.selection[ taxonomy.slug ].push( tagValue ); } + } ); + } + input.addEventListener( 'change', () => { + const index = this.selection[ taxonomy.slug ].indexOf( value ); + if ( input.checked ) { + this.selection[ taxonomy.slug ].push( value ); + } else if ( -1 < index ) { + this.selection[ taxonomy.slug ].splice( index, 1 ); } - return this.processflushTags( el, a, f ); - }; - - window.tagBox.processTags = window.tagBox.parseTags; - - window.tagBox.parseTags = function ( el ) { - const id = el.id; - const num = id.split( '-check-num-' )[ 1 ]; - const taxonomy = id.split( '-check-num-' )[ 0 ]; - const taxBox = jQuery( el ).closest( '.tagsdiv' ); - const tagsTextarea = taxBox.find( '.the-tags' ); - const tagToRemove = window.tagBox - .clean( tagsTextarea.val() ) - .split( self.tagDelimiter )[ num ]; - - new wp.api.collections.Tags() - .fetch( { data: { slug: tagToRemove } } ) - .done( ( tag ) => { - const tagFromDatabase = tag.length - ? jQuery( - '[data-item="' + - taxonomy + - ':' + - tag[ 0 ].id + - '"]' - ) - : false; - - if ( tagFromDatabase.length ) { - tagFromDatabase.remove(); - } else { - jQuery( - `.cld-tax-order-list-item:contains(${ tagToRemove })` - ).remove(); - --self.startId; - } - this.processTags( el ); - } ); - }; - } - - jQuery( 'body' ).on( 'change', '.selectit input', function () { - const clickedItem = jQuery( this ); - const id = clickedItem.val(); - const checked = clickedItem.is( ':checked' ); - const text = clickedItem.parent().text().trim(); - - if ( true === checked ) { - if ( - ! self.tags.find( `[data-item="category:${ id }"]` ).length - ) { - self._pushItem( `category:${ id }`, text ); - } - } else { - self.tags.find( `[data-item="category:${ id }"]` ).remove(); - } + this.event( taxonomy ); + } ); } ); + this.event( taxonomy ); }, - _createItem( id, name ) { - const li = jQuery( '
  • ' ); - const icon = jQuery( '' ); - const input = jQuery( '' ); + getSelection( taxonomy ) { + return this.selection[ taxonomy.slug ]; + } +}; - li.addClass( 'cld-tax-order-list-item' ).attr( 'data-item', id ); - input - .addClass( 'cld-tax-order-list-item-input' ) - .attr( 'type', 'hidden' ) - .attr( 'name', 'cld_tax_order[]' ) - .val( id ); - icon.addClass( - 'dashicons dashicons-menu cld-tax-order-list-item-handle' +// Setup ajax overrides. +if ( typeof wpAjax !== 'undefined' ) { + wpAjax.procesParseAjaxResponse = wpAjax.parseAjaxResponse; + wpAjax.parseAjaxResponse = function( + response, + settingsResponse, + element + ) { + const newResponse = wpAjax.procesParseAjaxResponse( + response, + settingsResponse, + element ); + if ( ! newResponse.errors && newResponse.responses[ 0 ] ) { + console.log( newResponse ); + /*if ( + jQuery( + '[data-taxonomy="' + + newResponse.responses[ 0 ].what + + '"]' + ).length + ) { + const data = jQuery( newResponse.responses[ 0 ].data ); + const text = data.find( 'label' ).last().text().trim(); + self._pushItem( newResponse.responses[ 0 ].what, text ); + }*/ + } - li.append( icon ).append( name ).append( input ); // phpcs:ignore - // WordPressVIPMinimum.JS.HTMLExecutingFunctions.append - - return li; - }, - _pushItem( id, text ) { - const item = this._createItem( id, text ); - this.tags.append( item ); // phpcs:ignore - // WordPressVIPMinimum.JS.HTMLExecutingFunctions.append - }, - _sortable() { - const items = jQuery( '.cld-tax-order-list' ); - - items.sortable( { - connectWith: '.cld-tax-order', - axis: 'y', - handle: '.cld-tax-order-list-item-handle', - placeholder: 'cld-tax-order-list-item-placeholder', - forcePlaceholderSize: true, - helper: 'clone', - } ); - }, -}; - + return newResponse; + }; +} if ( typeof window.CLDN !== 'undefined' ) { ClassicEditor._init(); - // Init checked categories. - jQuery( '[data-wp-lists] .selectit input[checked]' ).each( - ( ord, check ) => { - jQuery( check ).trigger( 'change' ); - } - ); } export default ClassicEditor; diff --git a/src/js/components/terms-inspector.js b/src/js/components/terms-inspector.js index fed0c4bd3..7ac1250e0 100644 --- a/src/js/components/terms-inspector.js +++ b/src/js/components/terms-inspector.js @@ -4,7 +4,7 @@ import { select, subscribe } from '@wordpress/data'; import Sortable from 'sortablejs'; -const Terms = { +const TermsInspector = { wrapper: null, /** * Leverage the existing Gutenberg query to get the taxonomies. @@ -33,34 +33,51 @@ const Terms = { } ); }, _init_listeners() { - const taxonomies = select( 'core' ).getTaxonomies(); + const taxonomies = this.getTaxonomies(); + taxonomies.forEach( ( taxonomy ) => { if ( ! taxonomy.rest_base || ! taxonomy.visibility.public ) { return; } - subscribe( () => { - const slug = taxonomy.slug; - const hierarchical = taxonomy.hierarchical; - const { isResolving } = select( 'core/data' ); - const args = [ 'taxonomy', slug, this.query ]; - this.available[ slug ] = null; - if ( hierarchical ) { - this.available[ slug ] = select( 'core' ).getEntityRecords( - 'taxonomy', - slug, - this.query - ); - } - if ( ! isResolving( 'core', 'getEntityRecords', args ) ) { - this.event( taxonomy ); - } - } ); + this.addTaxonomyListener( taxonomy ); } ); }, - event( taxonomy ) { - const hasSelection = select( 'core/editor' ).getEditedPostAttribute( + getTaxonomies() { + return select( 'core' ).getTaxonomies(); + }, + addTaxonomyListener( taxonomy ) { + subscribe( () => { + const slug = taxonomy.slug; + const hierarchical = taxonomy.hierarchical; + const { isResolving } = select( 'core/data' ); + const args = [ 'taxonomy', slug, this.query ]; + this.available[ slug ] = null; + if ( hierarchical ) { + this.available[ slug ] = select( 'core' ).getEntityRecords( + 'taxonomy', + slug, + this.query + ); + } + if ( ! isResolving( 'core', 'getEntityRecords', args ) ) { + this.event( taxonomy ); + } + } ); + }, + getSelection( taxonomy ) { + return select( 'core/editor' ).getEditedPostAttribute( taxonomy.rest_base ); + }, + getTerm( taxonomy, id ) { + return select( 'core' ).getEntityRecord( + 'taxonomy', + taxonomy.slug, + id + ); + }, + event( taxonomy ) { + const hasSelection = this.getSelection( taxonomy ); if ( ! hasSelection ) { return; } @@ -69,7 +86,6 @@ const Terms = { const selected = Array.from( this.wrapper.querySelectorAll( `[data-item*="${ taxonomy.slug }"]` ) ); - // Go over the selection and add new items it doesn't have. [ ...selection ].forEach( ( item ) => { const element = this.wrapper.querySelector( @@ -118,11 +134,7 @@ const Terms = { let term = {}; if ( null === this.available[ taxonomy.slug ] ) { // Get term from data. - term = select( 'core' ).getEntityRecord( - 'taxonomy', - taxonomy.slug, - id - ); + term = this.getTerm( taxonomy, id ); } else { for ( const item of this.available[ taxonomy.slug ] ) { if ( item.id === id ) { @@ -136,6 +148,4 @@ const Terms = { }, }; -window.addEventListener( 'load', () => Terms._init() ); - -export default Terms; +export default TermsInspector; From a7a4455af73a3bc36560364375292334b5ea4c49 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 17:29:07 +0200 Subject: [PATCH 13/19] remove old code --- src/js/classic-editor.js | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/js/classic-editor.js b/src/js/classic-editor.js index 3f5bfcde8..52281679e 100644 --- a/src/js/classic-editor.js +++ b/src/js/classic-editor.js @@ -49,38 +49,6 @@ const ClassicEditor = { return this.selection[ taxonomy.slug ]; } }; - -// Setup ajax overrides. -if ( typeof wpAjax !== 'undefined' ) { - wpAjax.procesParseAjaxResponse = wpAjax.parseAjaxResponse; - wpAjax.parseAjaxResponse = function( - response, - settingsResponse, - element - ) { - const newResponse = wpAjax.procesParseAjaxResponse( - response, - settingsResponse, - element - ); - if ( ! newResponse.errors && newResponse.responses[ 0 ] ) { - console.log( newResponse ); - /*if ( - jQuery( - '[data-taxonomy="' + - newResponse.responses[ 0 ].what + - '"]' - ).length - ) { - const data = jQuery( newResponse.responses[ 0 ].data ); - const text = data.find( 'label' ).last().text().trim(); - self._pushItem( newResponse.responses[ 0 ].what, text ); - }*/ - } - - return newResponse; - }; -} if ( typeof window.CLDN !== 'undefined' ) { ClassicEditor._init(); } From 427e187b03ff3aaa4df48d394b9b0fae791d607b Mon Sep 17 00:00:00 2001 From: David Cramer Date: Fri, 28 Jan 2022 17:35:16 +0200 Subject: [PATCH 14/19] remove unused include --- src/js/classic-editor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/classic-editor.js b/src/js/classic-editor.js index 52281679e..ec34221a6 100644 --- a/src/js/classic-editor.js +++ b/src/js/classic-editor.js @@ -1,5 +1,4 @@ -/* global wpAjax */ -import Sortable from 'sortablejs'; +/* global */ import TermsInspector from './components/terms-inspector'; const ClassicEditor = { From 4be49cf360a1c4f4b52edc38834abe8689d0f84f Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 30 Jan 2022 10:26:22 +0200 Subject: [PATCH 15/19] rethink the classic editor by using a watcher rather than using a lot of data. --- js/block-editor.asset.php | 2 +- js/block-editor.js | 2 +- js/classic-editor.js | 2 +- js/cloudinary.js | 2 +- php/media/class-global-transformations.php | 28 ++----- src/js/classic-editor.js | 93 ++++++++++++++-------- src/js/components/terms-inspector.js | 10 ++- 7 files changed, 82 insertions(+), 57 deletions(-) diff --git a/js/block-editor.asset.php b/js/block-editor.asset.php index 2edf3ab58..f92329353 100644 --- a/js/block-editor.asset.php +++ b/js/block-editor.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'adbf2289a1278713b6070098fccddfde'); \ No newline at end of file + array('react', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'f24894e6dbe292c277df07aad963d1fa'); \ No newline at end of file diff --git a/js/block-editor.js b/js/block-editor.js index f38ef8964..fe61341bd 100644 --- a/js/block-editor.js +++ b/js/block-editor.js @@ -1 +1 @@ -!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=162)}({0:function(t,e){t.exports=window.React},1:function(t,e){t.exports=window.wp.i18n},11:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var H=L(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=L(/Edge/i),z=L(/firefox/i),V=L(/safari/i)&&!L(/chrome/i)&&!L(/android/i),q=L(/iP(ad|od|hone)/i),G=L(/chrome/i)&&L(/android/i),U={capture:!1,passive:!1};function $(t,e,n){t.addEventListener(e,n,!H&&U)}function Z(t,e,n){t.removeEventListener(e,n,!H&&U)}function K(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function J(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&K(t,e):K(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var tt,et=/\s+/g;function nt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(et," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(et," ")}}function ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===at())break;o=pt(o,!1)}return!1}function ct(t,e,n,o){for(var r=0,i=0,a=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=F(n,St);xt.pluginEvent.bind(me)(t,e,R({dragEl:Tt,parentEl:Ct,ghostEl:Mt,rootEl:Pt,nextEl:At,lastDownEl:It,cloneEl:Nt,cloneHidden:jt,dragStarted:Gt,putSortable:Ft,activeSortable:me.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt,hideGhostForTarget:pe,unhideGhostForTarget:he,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){Et(R({putSortable:Ft,cloneEl:Nt,targetEl:Tt,rootEl:Pt,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt},t))}var Tt,Ct,Mt,Pt,At,It,Nt,jt,kt,Rt,Yt,Xt,Bt,Ft,Lt,Ht,Wt,zt,Vt,qt,Gt,Ut,$t,Zt,Kt,Qt=!1,Jt=!1,te=[],ee=!1,ne=!1,oe=[],re=!1,ie=[],ae="undefined"!=typeof document,le=q,se=W||H?"cssFloat":"float",ce=ae&&!G&&!q&&"draggable"in document.createElement("div"),ue=function(){if(ae){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),de=function(t,e){var n=ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ct(t,0,e),i=ct(t,1,e),a=r&&ot(r),l=i&&ot(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[se]||i&&"none"===n[se]&&s+c>o)?"vertical":"horizontal"},fe=function(t){function e(t,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pe=function(){!ue&&Mt&&ot(Mt,"display","none")},he=function(){!ue&&Mt&&ot(Mt,"display","")};ae&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ve=function(t){if(Tt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,te.some((function(t){var e=t[bt].options.emptyInsertThreshold;if(e&&!ut(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,l=i>=n.top-e&&i<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[bt]._onDragOver(n)}}var r,i,a},ge=function(t){Tt&&Tt.parentNode[bt]._isOutsideThisEl(t.target)};function me(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=B({},e),t[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return de(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==me.supportPointer&&"PointerEvent"in window&&!V,emptyInsertThreshold:5};for(var o in xt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in fe(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(t,"pointerdown",this._onTapStart):($(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),te.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),B(this,yt())}function be(t,e,n,o,r,i,a,l){var s,c,u=t[bt],d=u.options.onMove;return!window.CustomEvent||H||W?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ye(t){t.draggable=!1}function we(){re=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function xe(t){return setTimeout(t,0)}function Ee(t){return clearTimeout(t)}me.prototype={constructor:me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){ie.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&ie.push(o)}}(n),!Tt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!V||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=J(l,o.draggable,n,!1))&&l.animated||It===l)){if(kt=dt(l),Yt=dt(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Dt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ot("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=J(s,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ot("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!J(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Tt&&n.parentNode===i){var s=lt(n);if(Pt=i,Ct=(Tt=n).parentNode,At=Tt.nextSibling,It=n,Bt=a.group,me.dragged=Tt,Lt={target:Tt,clientX:(e||t).clientX,clientY:(e||t).clientY},Vt=Lt.clientX-s.left,qt=Lt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Tt.style["will-change"]="all",o=function(){Ot("delayEnded",r,{evt:t}),me.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!z&&r.nativeDraggable&&(Tt.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),nt(Tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){it(Tt,t.trim(),ye)})),$(l,"dragover",ve),$(l,"mousemove",ve),$(l,"touchmove",ve),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),z&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Tt.draggable=!0),Ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(W||H))o();else{if(me.eventCanceled)return void this._onDrop();$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Tt&&ye(Tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):$(document,e?"touchmove":"mousemove",this._onTouchMove):($(Tt,"dragend",this),$(Pt,"dragstart",this._onDragStart));try{document.selection?xe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Qt=!1,Pt&&Tt){Ot("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",ge);var n=this.options;!t&&nt(Tt,n.dragClass,!1),nt(Tt,n.ghostClass,!0),me.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,pe();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY))!==e;)e=t;if(Tt.parentNode[bt]._isOutsideThisEl(t),e)do{if(e[bt]){if(e[bt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Mt&&rt(Mt,!0),a=Mt&&i&&i.a,l=Mt&&i&&i.d,s=le&&Kt&&ft(Kt),c=(r.clientX-Lt.clientX+o.x)/(a||1)+(s?s[0]-oe[0]:0)/(a||1),u=(r.clientY-Lt.clientY+o.y)/(l||1)+(s?s[1]-oe[1]:0)/(l||1);if(!me.active&&!Qt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}(t,r,this)&&!v.animated){if(v===Tt)return A(!1);if(v&&i===t.target&&(a=v),a&&(n=lt(a)),!1!==be(Pt,i,Tt,e,a,n,t,!!a))return P(),i.appendChild(Tt),Ct=i,I(),A(!0)}else if(v&&function(t,e,n){var o=lt(ct(n.el,0,n.options,!0)),r=10;return e?t.clientXu+c*i/2:sd-Zt)return-$t}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(t,a,n,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ne,Ut===a))){var O=dt(Tt);do{O-=m,y=Ct.children[O]}while(y&&("none"===ot(y,"display")||y===Mt))}if(0===m||y===a)return A(!1);Ut=a,$t=m;var D=a.nextElementSibling,T=!1,C=be(Pt,i,Tt,e,a,n,t,T=1===m);if(!1!==C)return 1!==C&&-1!==C||(T=1===C),re=!0,setTimeout(we,30),P(),T&&!D?i.appendChild(Tt):a.parentNode.insertBefore(Tt,T?D:a),E&>(E,0,S-E.scrollTop),Ct=Tt.parentNode,void 0===b||ne||(Zt=Math.abs(b-lt(a)[x])),I(),A(!0)}if(i.contains(Tt))return A(!1)}return!1}function M(l,s){Ot(l,p,R({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:A,onMove:function(n,o){return be(Pt,i,Tt,e,n,lt(n),t,o)},changed:I},s))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==f&&(nt(Tt,Ft?Ft.options.ghostClass:c.options.ghostClass,!1),nt(Tt,l.ghostClass,!0)),Ft!==p&&p!==me.active?Ft=p:p===me.active&&Ft&&(Ft=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Tt&&!Tt.animated||a===i&&!a.animated)&&(Ut=null),l.dragoverBubble||t.rootEl||a===document||(Tt.parentNode[bt]._isOutsideThisEl(t.target),!e&&ve(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function I(){Rt=dt(Tt),Xt=dt(Tt,l.draggable),Dt({sortable:p,name:"change",toEl:i,newIndex:Rt,newDraggableIndex:Xt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",ve),Z(document,"mousemove",ve),Z(document,"touchmove",ve)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Rt=dt(Tt),Xt=dt(Tt,n.draggable),Ot("drop",this,{evt:t}),Ct=Tt&&Tt.parentNode,Rt=dt(Tt),Xt=dt(Tt,n.draggable),me.eventCanceled||(Qt=!1,ne=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ee(this.cloneId),Ee(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),V&&ot(document.body,"user-select",""),ot(Tt,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),(Pt===Ct||Ft&&"clone"!==Ft.lastPutMode)&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),Tt&&(this.nativeDraggable&&Z(Tt,"dragend",this),ye(Tt),Tt.style["will-change"]="",Gt&&!Qt&&nt(Tt,Ft?Ft.options.ghostClass:this.options.ghostClass,!1),nt(Tt,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:Ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==Ct?(Rt>=0&&(Dt({rootEl:Ct,name:"add",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:Ct,originalEvent:t}),Dt({rootEl:Ct,name:"sort",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),Ft&&Ft.save()):Rt!==kt&&Rt>=0&&(Dt({sortable:this,name:"update",toEl:Ct,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),me.active&&(null!=Rt&&-1!==Rt||(Rt=kt,Xt=Yt),Dt({sortable:this,name:"end",toEl:Ct,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ot("nulling",this),Pt=Tt=Ct=Mt=At=Nt=It=jt=Lt=Ht=Gt=Rt=Xt=kt=Yt=Ut=$t=Ft=Bt=me.dragged=me.ghost=me.clone=me.active=null,ie.forEach((function(t){t.checked=!0})),ie.length=Wt=zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);nt.length)&&(e=t.length);for(var n=0,o=new Array(e);n=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function L(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var H=L(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),W=L(/Edge/i),z=L(/firefox/i),V=L(/safari/i)&&!L(/chrome/i)&&!L(/android/i),q=L(/iP(ad|od|hone)/i),G=L(/chrome/i)&&L(/android/i),U={capture:!1,passive:!1};function $(t,e,n){t.addEventListener(e,n,!H&&U)}function Z(t,e,n){t.removeEventListener(e,n,!H&&U)}function K(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function Q(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function J(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&K(t,e):K(t,e))||o&&t===n)return t;if(t===n)break}while(t=Q(t))}return null}var tt,et=/\s+/g;function nt(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(et," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(et," ")}}function ot(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function rt(t,e){var n="";if("string"==typeof t)n=t;else do{var o=ot(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function it(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r=i:r<=i))return o;if(o===at())break;o=pt(o,!1)}return!1}function ct(t,e,n,o){for(var r=0,i=0,a=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=F(n,St);xt.pluginEvent.bind(me)(t,e,R({dragEl:Tt,parentEl:Ct,ghostEl:Mt,rootEl:Pt,nextEl:At,lastDownEl:It,cloneEl:Nt,cloneHidden:jt,dragStarted:Gt,putSortable:Ft,activeSortable:me.active,originalEvent:o,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt,hideGhostForTarget:pe,unhideGhostForTarget:he,cloneNowHidden:function(){jt=!0},cloneNowShown:function(){jt=!1},dispatchSortableEvent:function(t){Dt({sortable:e,name:t,originalEvent:o})}},r))};function Dt(t){Et(R({putSortable:Ft,cloneEl:Nt,targetEl:Tt,rootEl:Pt,oldIndex:kt,oldDraggableIndex:Yt,newIndex:Rt,newDraggableIndex:Xt},t))}var Tt,Ct,Mt,Pt,At,It,Nt,jt,kt,Rt,Yt,Xt,Bt,Ft,Lt,Ht,Wt,zt,Vt,qt,Gt,Ut,$t,Zt,Kt,Qt=!1,Jt=!1,te=[],ee=!1,ne=!1,oe=[],re=!1,ie=[],ae="undefined"!=typeof document,le=q,se=W||H?"cssFloat":"float",ce=ae&&!G&&!q&&"draggable"in document.createElement("div"),ue=function(){if(ae){if(H)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),de=function(t,e){var n=ot(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=ct(t,0,e),i=ct(t,1,e),a=r&&ot(r),l=i&&ot(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+lt(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+lt(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[se]||i&&"none"===n[se]&&s+c>o)?"vertical":"horizontal"},fe=function(t){function e(t,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.options.group.name;if(null==t&&(n||l))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===t||"string"==typeof t&&t===s||t.join&&t.indexOf(s)>-1}}var n={},o=t.group;o&&"object"==Y(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},pe=function(){!ue&&Mt&&ot(Mt,"display","none")},he=function(){!ue&&Mt&&ot(Mt,"display","")};ae&&document.addEventListener("click",(function(t){if(Jt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Jt=!1,!1}),!0);var ve=function(t){if(Tt){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,i=t.clientY,te.some((function(t){var e=t[bt].options.emptyInsertThreshold;if(e&&!ut(t)){var n=lt(t),o=r>=n.left-e&&r<=n.right+e,l=i>=n.top-e&&i<=n.bottom+e;return o&&l?a=t:void 0}})),a);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[bt]._onDragOver(n)}}var r,i,a},ge=function(t){Tt&&Tt.parentNode[bt]._isOutsideThisEl(t.target)};function me(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=B({},e),t[bt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return de(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==me.supportPointer&&"PointerEvent"in window&&!V,emptyInsertThreshold:5};for(var o in xt.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var r in fe(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&ce,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?$(t,"pointerdown",this._onTapStart):($(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart)),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),te.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),B(this,yt())}function be(t,e,n,o,r,i,a,l){var s,c,u=t[bt],d=u.options.onMove;return!window.CustomEvent||H||W?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=r||e,s.relatedRect=i||lt(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function ye(t){t.draggable=!1}function we(){re=!1}function _e(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function xe(t){return setTimeout(t,0)}function Ee(t){return clearTimeout(t)}me.prototype={constructor:me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Ut=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Tt):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,r=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,l=(a||t).target,s=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(function(t){ie.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&ie.push(o)}}(n),!Tt&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!V||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=J(l,o.draggable,n,!1))&&l.animated||It===l)){if(kt=dt(l),Yt=dt(l,o.draggable),"function"==typeof c){if(c.call(this,t,l,this))return Dt({sortable:e,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),Ot("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=J(s,o.trim(),n,!1))return Dt({sortable:e,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),Ot("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());o.handle&&!J(s,o.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!Tt&&n.parentNode===i){var s=lt(n);if(Pt=i,Ct=(Tt=n).parentNode,At=Tt.nextSibling,It=n,Bt=a.group,me.dragged=Tt,Lt={target:Tt,clientX:(e||t).clientX,clientY:(e||t).clientY},Vt=Lt.clientX-s.left,qt=Lt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Tt.style["will-change"]="all",o=function(){Ot("delayEnded",r,{evt:t}),me.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!z&&r.nativeDraggable&&(Tt.draggable=!0),r._triggerDragStart(t,e),Dt({sortable:r,name:"choose",originalEvent:t}),nt(Tt,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){it(Tt,t.trim(),ye)})),$(l,"dragover",ve),$(l,"mousemove",ve),$(l,"touchmove",ve),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),z&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Tt.draggable=!0),Ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(W||H))o();else{if(me.eventCanceled)return void this._onDrop();$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Tt&&ye(Tt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._disableDelayedDrag),Z(t,"touchend",this._disableDelayedDrag),Z(t,"touchcancel",this._disableDelayedDrag),Z(t,"mousemove",this._delayedDragTouchMoveHandler),Z(t,"touchmove",this._delayedDragTouchMoveHandler),Z(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):$(document,e?"touchmove":"mousemove",this._onTouchMove):($(Tt,"dragend",this),$(Pt,"dragstart",this._onDragStart));try{document.selection?xe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(Qt=!1,Pt&&Tt){Ot("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",ge);var n=this.options;!t&&nt(Tt,n.dragClass,!1),nt(Tt,n.ghostClass,!0),me.active=this,t&&this._appendGhost(),Dt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Ht){this._lastX=Ht.clientX,this._lastY=Ht.clientY,pe();for(var t=document.elementFromPoint(Ht.clientX,Ht.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Ht.clientX,Ht.clientY))!==e;)e=t;if(Tt.parentNode[bt]._isOutsideThisEl(t),e)do{if(e[bt]){if(e[bt]._onDragOver({clientX:Ht.clientX,clientY:Ht.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);he()}},_onTouchMove:function(t){if(Lt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,i=Mt&&rt(Mt,!0),a=Mt&&i&&i.a,l=Mt&&i&&i.d,s=le&&Kt&&ft(Kt),c=(r.clientX-Lt.clientX+o.x)/(a||1)+(s?s[0]-oe[0]:0)/(a||1),u=(r.clientY-Lt.clientY+o.y)/(l||1)+(s?s[1]-oe[1]:0)/(l||1);if(!me.active&&!Qt){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}(t,r,this)&&!v.animated){if(v===Tt)return A(!1);if(v&&i===t.target&&(a=v),a&&(n=lt(a)),!1!==be(Pt,i,Tt,e,a,n,t,!!a))return P(),i.appendChild(Tt),Ct=i,I(),A(!0)}else if(v&&function(t,e,n){var o=lt(ct(n.el,0,n.options,!0)),r=10;return e?t.clientXu+c*i/2:sd-Zt)return-$t}else if(s>u+c*(1-r)/2&&sd-c*i/2))return s>u+c/2?1:-1;return 0}(t,a,n,r,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ne,Ut===a))){var O=dt(Tt);do{O-=m,y=Ct.children[O]}while(y&&("none"===ot(y,"display")||y===Mt))}if(0===m||y===a)return A(!1);Ut=a,$t=m;var D=a.nextElementSibling,T=!1,C=be(Pt,i,Tt,e,a,n,t,T=1===m);if(!1!==C)return 1!==C&&-1!==C||(T=1===C),re=!0,setTimeout(we,30),P(),T&&!D?i.appendChild(Tt):a.parentNode.insertBefore(Tt,T?D:a),E&>(E,0,S-E.scrollTop),Ct=Tt.parentNode,void 0===b||ne||(Zt=Math.abs(b-lt(a)[x])),I(),A(!0)}if(i.contains(Tt))return A(!1)}return!1}function M(l,s){Ot(l,p,R({evt:t,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:d,fromSortable:f,target:a,completed:A,onMove:function(n,o){return be(Pt,i,Tt,e,n,lt(n),t,o)},changed:I},s))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function A(e){return M("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(p),p!==f&&(nt(Tt,Ft?Ft.options.ghostClass:c.options.ghostClass,!1),nt(Tt,l.ghostClass,!0)),Ft!==p&&p!==me.active?Ft=p:p===me.active&&Ft&&(Ft=null),f===p&&(p._ignoreWhileAnimating=a),p.animateAll((function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(a===Tt&&!Tt.animated||a===i&&!a.animated)&&(Ut=null),l.dragoverBubble||t.rootEl||a===document||(Tt.parentNode[bt]._isOutsideThisEl(t.target),!e&&ve(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function I(){Rt=dt(Tt),Xt=dt(Tt,l.draggable),Dt({sortable:p,name:"change",toEl:i,newIndex:Rt,newDraggableIndex:Xt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Z(document,"mousemove",this._onTouchMove),Z(document,"touchmove",this._onTouchMove),Z(document,"pointermove",this._onTouchMove),Z(document,"dragover",ve),Z(document,"mousemove",ve),Z(document,"touchmove",ve)},_offUpEvents:function(){var t=this.el.ownerDocument;Z(t,"mouseup",this._onDrop),Z(t,"touchend",this._onDrop),Z(t,"pointerup",this._onDrop),Z(t,"touchcancel",this._onDrop),Z(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;Rt=dt(Tt),Xt=dt(Tt,n.draggable),Ot("drop",this,{evt:t}),Ct=Tt&&Tt.parentNode,Rt=dt(Tt),Xt=dt(Tt,n.draggable),me.eventCanceled||(Qt=!1,ne=!1,ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ee(this.cloneId),Ee(this._dragStartId),this.nativeDraggable&&(Z(document,"drop",this),Z(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),V&&ot(document.body,"user-select",""),ot(Tt,"transform",""),t&&(Gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Mt&&Mt.parentNode&&Mt.parentNode.removeChild(Mt),(Pt===Ct||Ft&&"clone"!==Ft.lastPutMode)&&Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),Tt&&(this.nativeDraggable&&Z(Tt,"dragend",this),ye(Tt),Tt.style["will-change"]="",Gt&&!Qt&&nt(Tt,Ft?Ft.options.ghostClass:this.options.ghostClass,!1),nt(Tt,this.options.chosenClass,!1),Dt({sortable:this,name:"unchoose",toEl:Ct,newIndex:null,newDraggableIndex:null,originalEvent:t}),Pt!==Ct?(Rt>=0&&(Dt({rootEl:Ct,name:"add",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"remove",toEl:Ct,originalEvent:t}),Dt({rootEl:Ct,name:"sort",toEl:Ct,fromEl:Pt,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),Ft&&Ft.save()):Rt!==kt&&Rt>=0&&(Dt({sortable:this,name:"update",toEl:Ct,originalEvent:t}),Dt({sortable:this,name:"sort",toEl:Ct,originalEvent:t})),me.active&&(null!=Rt&&-1!==Rt||(Rt=kt,Xt=Yt),Dt({sortable:this,name:"end",toEl:Ct,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Ot("nulling",this),Pt=Tt=Ct=Mt=At=Nt=It=jt=Lt=Ht=Gt=Rt=Xt=kt=Yt=Ut=$t=Ft=Bt=me.dragged=me.ghost=me.clone=me.active=null,ie.forEach((function(t){t.checked=!0})),ie.length=Wt=zt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Tt&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,r=n.length,i=this.options;o=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}function Fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n"']/g,Z=RegExp(q.source),J=RegExp(K.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ft=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,vt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,jt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",Dt="\\ufe0e\\ufe0f",It="\\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",Rt="['’]",kt="[\\ud800-\\udfff]",Pt="["+It+"]",Ct="["+St+"]",Nt="\\d+",Lt="[\\u2700-\\u27bf]",Mt="["+At+"]",Ft="[^\\ud800-\\udfff"+It+Nt+xt+At+Tt+"]",zt="\\ud83c[\\udffb-\\udfff]",Bt="[^\\ud800-\\udfff]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Wt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+Tt+"]",Yt="(?:"+Mt+"|"+Ft+")",$t="(?:"+Xt+"|"+Ft+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+Ct+"|"+zt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Kt=qt+Ht+("(?:\\u200d(?:"+[Bt,Ut,Wt].join("|")+")"+qt+Ht+")*"),Zt="(?:"+[Lt,Ut,Wt].join("|")+")"+Kt,Jt="(?:"+[Bt+Ct+"?",Ct,Ut,Wt,kt].join("|")+")",Qt=RegExp(Rt,"g"),tn=RegExp(Ct,"g"),nn=RegExp(zt+"(?="+zt+")|"+Jt+Kt,"g"),en=RegExp([Xt+"?"+Mt+"+"+Gt+"(?="+[Pt,Xt,"$"].join("|")+")",$t+"+"+Vt+"(?="+[Pt,Xt+Yt,"$"].join("|")+")",Xt+"?"+Yt+"+"+Gt,Xt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Zt].join("|"),"g"),rn=RegExp("[\\u200d\\ud800-\\udfff"+St+Dt+"]"),on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,un=["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"],an=-1,cn={};cn[M]=cn[F]=cn[z]=cn[B]=cn[U]=cn[W]=cn[X]=cn[Y]=cn[$]=!0,cn[_]=cn[m]=cn[N]=cn[w]=cn[L]=cn[O]=cn[E]=cn[j]=cn[x]=cn[A]=cn[T]=cn[I]=cn[R]=cn[k]=cn[C]=!1;var ln={};ln[_]=ln[m]=ln[N]=ln[L]=ln[w]=ln[O]=ln[M]=ln[F]=ln[z]=ln[B]=ln[U]=ln[x]=ln[A]=ln[T]=ln[I]=ln[R]=ln[k]=ln[P]=ln[W]=ln[X]=ln[Y]=ln[$]=!0,ln[E]=ln[j]=ln[C]=!1;var fn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sn=parseFloat,hn=parseInt,pn="object"==typeof t&&t&&t.Object===Object&&t,vn="object"==typeof self&&self&&self.Object===Object&&self,dn=pn||vn||Function("return this")(),gn=n&&!n.nodeType&&n,yn=gn&&"object"==typeof r&&r&&!r.nodeType&&r,bn=yn&&yn.exports===gn,_n=bn&&pn.process,mn=function(){try{var t=yn&&yn.require&&yn.require("util").types;return t||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),wn=mn&&mn.isArrayBuffer,On=mn&&mn.isDate,En=mn&&mn.isMap,jn=mn&&mn.isRegExp,Sn=mn&&mn.isSet,xn=mn&&mn.isTypedArray;function An(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function Tn(t,n,e,r){for(var o=-1,i=null==t?0:t.length;++o-1}function Cn(t,n,e){for(var r=-1,o=null==t?0:t.length;++r-1;);return e}function re(t,n){for(var e=t.length;e--&&Xn(n,t[e],0)>-1;);return e}function oe(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var ie=Hn({"À":"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"}),ue=Hn({"&":"&","<":"<",">":">",'"':""","'":"'"});function ae(t){return"\\"+fn[t]}function ce(t){return rn.test(t)}function le(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function fe(t,n){return function(e){return t(n(e))}}function se(t,n){for(var e=-1,r=t.length,o=0,i=[];++e",""":'"',"'":"'"});var be=function t(n){var e,r=(n=null==n?dn:be.defaults(dn.Object(),n,be.pick(dn,un))).Array,o=n.Date,ct=n.Error,St=n.Function,xt=n.Math,At=n.Object,Tt=n.RegExp,Dt=n.String,It=n.TypeError,Rt=r.prototype,kt=St.prototype,Pt=At.prototype,Ct=n["__core-js_shared__"],Nt=kt.toString,Lt=Pt.hasOwnProperty,Mt=0,Ft=(e=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",zt=Pt.toString,Bt=Nt.call(At),Ut=dn._,Wt=Tt("^"+Nt.call(Lt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=bn?n.Buffer:i,Yt=n.Symbol,$t=n.Uint8Array,Gt=Xt?Xt.allocUnsafe:i,Vt=fe(At.getPrototypeOf,At),Ht=At.create,qt=Pt.propertyIsEnumerable,Kt=Rt.splice,Zt=Yt?Yt.isConcatSpreadable:i,Jt=Yt?Yt.iterator:i,nn=Yt?Yt.toStringTag:i,rn=function(){try{var t=vi(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),fn=n.clearTimeout!==dn.clearTimeout&&n.clearTimeout,pn=o&&o.now!==dn.Date.now&&o.now,vn=n.setTimeout!==dn.setTimeout&&n.setTimeout,gn=xt.ceil,yn=xt.floor,_n=At.getOwnPropertySymbols,mn=Xt?Xt.isBuffer:i,Bn=n.isFinite,Hn=Rt.join,_e=fe(At.keys,At),me=xt.max,we=xt.min,Oe=o.now,Ee=n.parseInt,je=xt.random,Se=Rt.reverse,xe=vi(n,"DataView"),Ae=vi(n,"Map"),Te=vi(n,"Promise"),De=vi(n,"Set"),Ie=vi(n,"WeakMap"),Re=vi(At,"create"),ke=Ie&&new Ie,Pe={},Ce=Ui(xe),Ne=Ui(Ae),Le=Ui(Te),Me=Ui(De),Fe=Ui(Ie),ze=Yt?Yt.prototype:i,Be=ze?ze.valueOf:i,Ue=ze?ze.toString:i;function We(t){if(oa(t)&&!Vu(t)&&!(t instanceof Ge)){if(t instanceof $e)return t;if(Lt.call(t,"__wrapped__"))return Wi(t)}return new $e(t)}var Xe=function(){function t(){}return function(n){if(!ra(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=i,e}}();function Ye(){}function $e(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=i}function Ge(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function fr(t,n,e,r,o,u){var a,c=1&n,l=2&n,f=4&n;if(e&&(a=o?e(t,r,o,u):e(t)),a!==i)return a;if(!ra(t))return t;var s=Vu(t);if(s){if(a=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Lt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!c)return ko(t,a)}else{var h=yi(t),p=h==j||h==S;if(Zu(t))return xo(t,c);if(h==T||h==_||p&&!o){if(a=l||p?{}:_i(t),!c)return l?function(t,n){return Po(t,gi(t),n)}(t,function(t,n){return t&&Po(n,Na(n),t)}(a,t)):function(t,n){return Po(t,di(t),n)}(t,ur(a,t))}else{if(!ln[h])return o?t:{};a=function(t,n,e){var r=t.constructor;switch(n){case N:return Ao(t);case w:case O:return new r(+t);case L:return function(t,n){var e=n?Ao(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case M:case F:case z:case B:case U:case W:case X:case Y:case $:return To(t,e);case x:return new r;case A:case k:return new r(t);case I:return function(t){var n=new t.constructor(t.source,gt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case R:return new r;case P:return o=t,Be?At(Be.call(o)):{}}var o}(t,h,c)}}u||(u=new Ze);var v=u.get(t);if(v)return v;u.set(t,a),la(t)?t.forEach((function(r){a.add(fr(r,n,e,r,t,u))})):ia(t)&&t.forEach((function(r,o){a.set(o,fr(r,n,e,o,t,u))}));var d=s?i:(f?l?ai:ui:l?Na:Ca)(t);return Dn(d||t,(function(r,o){d&&(r=t[o=r]),rr(a,o,fr(r,n,e,o,t,u))})),a}function sr(t,n,e){var r=e.length;if(null==t)return!r;for(t=At(t);r--;){var o=e[r],u=n[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function hr(t,n,e){if("function"!=typeof t)throw new It(u);return Ci((function(){t.apply(i,e)}),n)}function pr(t,n,e,r){var o=-1,i=Pn,u=!0,a=t.length,c=[],l=n.length;if(!a)return c;e&&(n=Nn(n,Qn(e))),r?(i=Cn,u=!1):n.length>=200&&(i=ne,u=!1,n=new Ke(n));t:for(;++o-1},He.prototype.set=function(t,n){var e=this.__data__,r=or(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ve,map:new(Ae||He),string:new Ve}},qe.prototype.delete=function(t){var n=hi(this,t).delete(t);return this.size-=n?1:0,n},qe.prototype.get=function(t){return hi(this,t).get(t)},qe.prototype.has=function(t){return hi(this,t).has(t)},qe.prototype.set=function(t,n){var e=hi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ke.prototype.add=Ke.prototype.push=function(t){return this.__data__.set(t,a),this},Ke.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new He,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof He){var r=e.__data__;if(!Ae||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new qe(r)}return e.set(t,n),this.size=e.size,this};var vr=Lo(Or),dr=Lo(Er,!0);function gr(t,n){var e=!0;return vr(t,(function(t,r,o){return e=!!n(t,r,o)})),e}function yr(t,n,e){for(var r=-1,o=t.length;++r0&&e(a)?n>1?_r(a,n-1,e,r,o):Ln(o,a):r||(o[o.length]=a)}return o}var mr=Mo(),wr=Mo(!0);function Or(t,n){return t&&mr(t,n,Ca)}function Er(t,n){return t&&wr(t,n,Ca)}function jr(t,n){return kn(n,(function(n){return ta(t[n])}))}function Sr(t,n){for(var e=0,r=(n=Oo(n,t)).length;null!=t&&en}function Dr(t,n){return null!=t&&Lt.call(t,n)}function Ir(t,n){return null!=t&&n in At(t)}function Rr(t,n,e){for(var o=e?Cn:Pn,u=t[0].length,a=t.length,c=a,l=r(a),f=1/0,s=[];c--;){var h=t[c];c&&n&&(h=Nn(h,Qn(n))),f=we(h.length,f),l[c]=!e&&(n||u>=120&&h.length>=120)?new Ke(c&&h):i}h=t[0];var p=-1,v=l[0];t:for(;++p=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Vr(t,n,e){for(var r=-1,o=n.length,i={};++r-1;)a!==t&&Kt.call(a,c,1),Kt.call(t,c,1);return t}function qr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var o=n[e];if(e==r||o!==i){var i=o;wi(o)?Kt.call(t,o,1):po(t,o)}}return t}function Kr(t,n){return t+yn(je()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>d)return e;do{n%2&&(e+=t),(n=yn(n/2))&&(t+=t)}while(n);return e}function Jr(t,n){return Ni(Di(t,n,uc),t+"")}function Qr(t){return Qe(Xa(t))}function to(t,n){var e=Xa(t);return Fi(e,lr(n,0,e.length))}function no(t,n,e,r){if(!ra(t))return t;for(var o=-1,u=(n=Oo(n,t)).length,a=u-1,c=t;null!=c&&++oi?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var u=r(i);++o>>1,u=t[i];null!==u&&!sa(u)&&(e?u<=n:u=200){var l=n?null:Jo(t);if(l)return he(l);u=!1,o=ne,c=new Ke}else c=n?[]:a;t:for(;++r=r?t:io(t,n,e)}var So=fn||function(t){return dn.clearTimeout(t)};function xo(t,n){if(n)return t.slice();var e=t.length,r=Gt?Gt(e):new t.constructor(e);return t.copy(r),r}function Ao(t){var n=new t.constructor(t.byteLength);return new $t(n).set(new $t(t)),n}function To(t,n){var e=n?Ao(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Do(t,n){if(t!==n){var e=t!==i,r=null===t,o=t==t,u=sa(t),a=n!==i,c=null===n,l=n==n,f=sa(n);if(!c&&!f&&!u&&t>n||u&&a&&l&&!c&&!f||r&&a&&l||!e&&l||!o)return 1;if(!r&&!u&&!f&&t1?e[o-1]:i,a=o>2?e[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&Oi(e[0],e[1],a)&&(u=o<3?i:u,o=1),n=At(n);++r-1?o[u?n[a]:a]:i}}function Wo(t){return ii((function(n){var e=n.length,r=e,o=$e.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new It(u);if(o&&!c&&"wrapper"==li(a))var c=new $e([],!0)}for(r=c?r:e;++r1&&_.reverse(),p&&fc))return!1;var f=u.get(t),s=u.get(n);if(f&&s)return f==n&&s==t;var h=-1,p=!0,v=2&e?new Ke:i;for(u.set(t,n),u.set(n,t);++h-1&&t%1==0&&t1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return Dn(b,(function(e){var r="_."+e[0];n&e[1]&&!Pn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ft);return n?n[1].split(st):[]}(r),e)))}function Mi(t){var n=0,e=0;return function(){var r=Oe(),o=16-(r-e);if(e=r,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(i,arguments)}}function Fi(t,n){var e=-1,r=t.length,o=r-1;for(n=n===i?r:n;++e1?t[n-1]:i;return e="function"==typeof e?(t.pop(),e):i,cu(t,e)}));function du(t){var n=We(t);return n.__chain__=!0,n}function gu(t,n){return n(t)}var yu=ii((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,o=function(n){return cr(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Ge&&wi(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:gu,args:[o],thisArg:i}),new $e(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(i),t}))):this.thru(o)}));var bu=Co((function(t,n,e){Lt.call(t,e)?++t[e]:ar(t,e,1)}));var _u=Uo(Gi),mu=Uo(Vi);function wu(t,n){return(Vu(t)?Dn:vr)(t,si(n,3))}function Ou(t,n){return(Vu(t)?In:dr)(t,si(n,3))}var Eu=Co((function(t,n,e){Lt.call(t,e)?t[e].push(n):ar(t,e,[n])}));var ju=Jr((function(t,n,e){var o=-1,i="function"==typeof n,u=qu(t)?r(t.length):[];return vr(t,(function(t){u[++o]=i?An(n,t,e):kr(t,n,e)})),u})),Su=Co((function(t,n,e){ar(t,e,n)}));function xu(t,n){return(Vu(t)?Nn:Ur)(t,si(n,3))}var Au=Co((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var Tu=Jr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&Oi(t,n[0],n[1])?n=[]:e>2&&Oi(n[0],n[1],n[2])&&(n=[n[0]]),Gr(t,_r(n,1),[])})),Du=pn||function(){return dn.Date.now()};function Iu(t,n,e){return n=e?i:n,n=t&&null==n?t.length:n,ti(t,h,i,i,i,i,n)}function Ru(t,n){var e;if("function"!=typeof n)throw new It(u);return t=ya(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=i),e}}var ku=Jr((function(t,n,e){var r=1;if(e.length){var o=se(e,fi(ku));r|=f}return ti(t,r,n,e,o)})),Pu=Jr((function(t,n,e){var r=3;if(e.length){var o=se(e,fi(Pu));r|=f}return ti(n,r,t,e,o)}));function Cu(t,n,e){var r,o,a,c,l,f,s=0,h=!1,p=!1,v=!0;if("function"!=typeof t)throw new It(u);function d(n){var e=r,u=o;return r=o=i,s=n,c=t.apply(u,e)}function g(t){return s=t,l=Ci(b,n),h?d(t):c}function y(t){var e=t-f;return f===i||e>=n||e<0||p&&t-s>=a}function b(){var t=Du();if(y(t))return _(t);l=Ci(b,function(t){var e=n-(t-f);return p?we(e,a-(t-s)):e}(t))}function _(t){return l=i,v&&r?d(t):(r=o=i,c)}function m(){var t=Du(),e=y(t);if(r=arguments,o=this,f=t,e){if(l===i)return g(f);if(p)return So(l),l=Ci(b,n),d(f)}return l===i&&(l=Ci(b,n)),c}return n=_a(n)||0,ra(e)&&(h=!!e.leading,a=(p="maxWait"in e)?me(_a(e.maxWait)||0,n):a,v="trailing"in e?!!e.trailing:v),m.cancel=function(){l!==i&&So(l),s=0,r=f=o=l=i},m.flush=function(){return l===i?c:_(Du())},m}var Nu=Jr((function(t,n){return hr(t,1,n)})),Lu=Jr((function(t,n,e){return hr(t,_a(n)||0,e)}));function Mu(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new It(u);var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return e.cache=i.set(o,u)||i,u};return e.cache=new(Mu.Cache||qe),e}function Fu(t){if("function"!=typeof t)throw new It(u);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Mu.Cache=qe;var zu=Eo((function(t,n){var e=(n=1==n.length&&Vu(n[0])?Nn(n[0],Qn(si())):Nn(_r(n,1),Qn(si()))).length;return Jr((function(r){for(var o=-1,i=we(r.length,e);++o=n})),Gu=Pr(function(){return arguments}())?Pr:function(t){return oa(t)&&Lt.call(t,"callee")&&!qt.call(t,"callee")},Vu=r.isArray,Hu=wn?Qn(wn):function(t){return oa(t)&&Ar(t)==N};function qu(t){return null!=t&&ea(t.length)&&!ta(t)}function Ku(t){return oa(t)&&qu(t)}var Zu=mn||_c,Ju=On?Qn(On):function(t){return oa(t)&&Ar(t)==O};function Qu(t){if(!oa(t))return!1;var n=Ar(t);return n==E||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var n=Ar(t);return n==j||n==S||"[object AsyncFunction]"==n||"[object Proxy]"==n}function na(t){return"number"==typeof t&&t==ya(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function ra(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function oa(t){return null!=t&&"object"==typeof t}var ia=En?Qn(En):function(t){return oa(t)&&yi(t)==x};function ua(t){return"number"==typeof t||oa(t)&&Ar(t)==A}function aa(t){if(!oa(t)||Ar(t)!=T)return!1;var n=Vt(t);if(null===n)return!0;var e=Lt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nt.call(e)==Bt}var ca=jn?Qn(jn):function(t){return oa(t)&&Ar(t)==I};var la=Sn?Qn(Sn):function(t){return oa(t)&&yi(t)==R};function fa(t){return"string"==typeof t||!Vu(t)&&oa(t)&&Ar(t)==k}function sa(t){return"symbol"==typeof t||oa(t)&&Ar(t)==P}var ha=xn?Qn(xn):function(t){return oa(t)&&ea(t.length)&&!!cn[Ar(t)]};var pa=qo(Br),va=qo((function(t,n){return t<=n}));function da(t){if(!t)return[];if(qu(t))return fa(t)?de(t):ko(t);if(Jt&&t[Jt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Jt]());var n=yi(t);return(n==x?le:n==R?he:Xa)(t)}function ga(t){return t?(t=_a(t))===v||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var n=ga(t),e=n%1;return n==n?e?n-e:n:0}function ba(t){return t?lr(ya(t),0,y):0}function _a(t){if("number"==typeof t)return t;if(sa(t))return g;if(ra(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ra(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Jn(t);var e=bt.test(t);return e||mt.test(t)?hn(t.slice(2),e?2:8):yt.test(t)?g:+t}function ma(t){return Po(t,Na(t))}function wa(t){return null==t?"":so(t)}var Oa=No((function(t,n){if(xi(n)||qu(n))Po(n,Ca(n),t);else for(var e in n)Lt.call(n,e)&&rr(t,e,n[e])})),Ea=No((function(t,n){Po(n,Na(n),t)})),ja=No((function(t,n,e,r){Po(n,Na(n),t,r)})),Sa=No((function(t,n,e,r){Po(n,Ca(n),t,r)})),xa=ii(cr);var Aa=Jr((function(t,n){t=At(t);var e=-1,r=n.length,o=r>2?n[2]:i;for(o&&Oi(n[0],n[1],o)&&(r=1);++e1),n})),Po(t,ai(t),e),r&&(e=fr(e,7,ri));for(var o=n.length;o--;)po(e,n[o]);return e}));var za=ii((function(t,n){return null==t?{}:function(t,n){return Vr(t,n,(function(n,e){return Ia(t,e)}))}(t,n)}));function Ba(t,n){if(null==t)return{};var e=Nn(ai(t),(function(t){return[t]}));return n=si(n),Vr(t,e,(function(t,e){return n(t,e[0])}))}var Ua=Qo(Ca),Wa=Qo(Na);function Xa(t){return null==t?[]:te(t,Ca(t))}var Ya=zo((function(t,n,e){return n=n.toLowerCase(),t+(e?$a(n):n)}));function $a(t){return Qa(wa(t).toLowerCase())}function Ga(t){return(t=wa(t))&&t.replace(Ot,ie).replace(tn,"")}var Va=zo((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Ha=zo((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),qa=Fo("toLowerCase");var Ka=zo((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Za=zo((function(t,n,e){return t+(e?" ":"")+Qa(n)}));var Ja=zo((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Qa=Fo("toUpperCase");function tc(t,n,e){return t=wa(t),(n=e?i:n)===i?function(t){return on.test(t)}(t)?function(t){return t.match(en)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(n)||[]}var nc=Jr((function(t,n){try{return An(t,i,n)}catch(t){return Qu(t)?t:new ct(t)}})),ec=ii((function(t,n){return Dn(n,(function(n){n=Bi(n),ar(t,n,ku(t[n],t))})),t}));function rc(t){return function(){return t}}var oc=Wo(),ic=Wo(!0);function uc(t){return t}function ac(t){return Mr("function"==typeof t?t:fr(t,1))}var cc=Jr((function(t,n){return function(e){return kr(e,t,n)}})),lc=Jr((function(t,n){return function(e){return kr(t,e,n)}}));function fc(t,n,e){var r=Ca(n),o=jr(n,r);null!=e||ra(n)&&(o.length||!r.length)||(e=n,n=t,t=this,o=jr(n,Ca(n)));var i=!(ra(e)&&"chain"in e&&!e.chain),u=ta(t);return Dn(o,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__),o=e.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Ln([this.value()],arguments))})})),t}function sc(){}var hc=Go(Nn),pc=Go(Rn),vc=Go(zn);function dc(t){return Ei(t)?Vn(Bi(t)):function(t){return function(n){return Sr(n,t)}}(t)}var gc=Ho(),yc=Ho(!0);function bc(){return[]}function _c(){return!1}var mc=$o((function(t,n){return t+n}),0),wc=Zo("ceil"),Oc=$o((function(t,n){return t/n}),1),Ec=Zo("floor");var jc,Sc=$o((function(t,n){return t*n}),1),xc=Zo("round"),Ac=$o((function(t,n){return t-n}),0);return We.after=function(t,n){if("function"!=typeof n)throw new It(u);return t=ya(t),function(){if(--t<1)return n.apply(this,arguments)}},We.ary=Iu,We.assign=Oa,We.assignIn=Ea,We.assignInWith=ja,We.assignWith=Sa,We.at=xa,We.before=Ru,We.bind=ku,We.bindAll=ec,We.bindKey=Pu,We.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vu(t)?t:[t]},We.chain=du,We.chunk=function(t,n,e){n=(e?Oi(t,n,e):n===i)?1:me(ya(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var u=0,a=0,c=r(gn(o/n));uo?0:o+e),(r=r===i||r>o?o:ya(r))<0&&(r+=o),r=e>r?0:ba(r);e>>0)?(t=wa(t))&&("string"==typeof n||null!=n&&!ca(n))&&!(n=so(n))&&ce(t)?jo(de(t),0,e):t.split(n,e):[]},We.spread=function(t,n){if("function"!=typeof t)throw new It(u);return n=null==n?0:me(ya(n),0),Jr((function(e){var r=e[n],o=jo(e,0,n);return r&&Ln(o,r),An(t,this,o)}))},We.tail=function(t){var n=null==t?0:t.length;return n?io(t,1,n):[]},We.take=function(t,n,e){return t&&t.length?io(t,0,(n=e||n===i?1:ya(n))<0?0:n):[]},We.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?io(t,(n=r-(n=e||n===i?1:ya(n)))<0?0:n,r):[]},We.takeRightWhile=function(t,n){return t&&t.length?go(t,si(n,3),!1,!0):[]},We.takeWhile=function(t,n){return t&&t.length?go(t,si(n,3)):[]},We.tap=function(t,n){return n(t),t},We.throttle=function(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new It(u);return ra(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),Cu(t,n,{leading:r,maxWait:n,trailing:o})},We.thru=gu,We.toArray=da,We.toPairs=Ua,We.toPairsIn=Wa,We.toPath=function(t){return Vu(t)?Nn(t,Bi):sa(t)?[t]:ko(zi(wa(t)))},We.toPlainObject=ma,We.transform=function(t,n,e){var r=Vu(t),o=r||Zu(t)||ha(t);if(n=si(n,4),null==e){var i=t&&t.constructor;e=o?r?new i:[]:ra(t)&&ta(i)?Xe(Vt(t)):{}}return(o?Dn:Or)(t,(function(t,r,o){return n(e,t,r,o)})),e},We.unary=function(t){return Iu(t,1)},We.union=ou,We.unionBy=iu,We.unionWith=uu,We.uniq=function(t){return t&&t.length?ho(t):[]},We.uniqBy=function(t,n){return t&&t.length?ho(t,si(n,2)):[]},We.uniqWith=function(t,n){return n="function"==typeof n?n:i,t&&t.length?ho(t,i,n):[]},We.unset=function(t,n){return null==t||po(t,n)},We.unzip=au,We.unzipWith=cu,We.update=function(t,n,e){return null==t?t:vo(t,n,wo(e))},We.updateWith=function(t,n,e,r){return r="function"==typeof r?r:i,null==t?t:vo(t,n,wo(e),r)},We.values=Xa,We.valuesIn=function(t){return null==t?[]:te(t,Na(t))},We.without=lu,We.words=tc,We.wrap=function(t,n){return Bu(wo(n),t)},We.xor=fu,We.xorBy=su,We.xorWith=hu,We.zip=pu,We.zipObject=function(t,n){return _o(t||[],n||[],rr)},We.zipObjectDeep=function(t,n){return _o(t||[],n||[],no)},We.zipWith=vu,We.entries=Ua,We.entriesIn=Wa,We.extend=Ea,We.extendWith=ja,fc(We,We),We.add=mc,We.attempt=nc,We.camelCase=Ya,We.capitalize=$a,We.ceil=wc,We.clamp=function(t,n,e){return e===i&&(e=n,n=i),e!==i&&(e=(e=_a(e))==e?e:0),n!==i&&(n=(n=_a(n))==n?n:0),lr(_a(t),n,e)},We.clone=function(t){return fr(t,4)},We.cloneDeep=function(t){return fr(t,5)},We.cloneDeepWith=function(t,n){return fr(t,5,n="function"==typeof n?n:i)},We.cloneWith=function(t,n){return fr(t,4,n="function"==typeof n?n:i)},We.conformsTo=function(t,n){return null==n||sr(t,n,Ca(n))},We.deburr=Ga,We.defaultTo=function(t,n){return null==t||t!=t?n:t},We.divide=Oc,We.endsWith=function(t,n,e){t=wa(t),n=so(n);var r=t.length,o=e=e===i?r:lr(ya(e),0,r);return(e-=n.length)>=0&&t.slice(e,o)==n},We.eq=Xu,We.escape=function(t){return(t=wa(t))&&J.test(t)?t.replace(K,ue):t},We.escapeRegExp=function(t){return(t=wa(t))&&ut.test(t)?t.replace(it,"\\$&"):t},We.every=function(t,n,e){var r=Vu(t)?Rn:gr;return e&&Oi(t,n,e)&&(n=i),r(t,si(n,3))},We.find=_u,We.findIndex=Gi,We.findKey=function(t,n){return Un(t,si(n,3),Or)},We.findLast=mu,We.findLastIndex=Vi,We.findLastKey=function(t,n){return Un(t,si(n,3),Er)},We.floor=Ec,We.forEach=wu,We.forEachRight=Ou,We.forIn=function(t,n){return null==t?t:mr(t,si(n,3),Na)},We.forInRight=function(t,n){return null==t?t:wr(t,si(n,3),Na)},We.forOwn=function(t,n){return t&&Or(t,si(n,3))},We.forOwnRight=function(t,n){return t&&Er(t,si(n,3))},We.get=Da,We.gt=Yu,We.gte=$u,We.has=function(t,n){return null!=t&&bi(t,n,Dr)},We.hasIn=Ia,We.head=qi,We.identity=uc,We.includes=function(t,n,e,r){t=qu(t)?t:Xa(t),e=e&&!r?ya(e):0;var o=t.length;return e<0&&(e=me(o+e,0)),fa(t)?e<=o&&t.indexOf(n,e)>-1:!!o&&Xn(t,n,e)>-1},We.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=null==e?0:ya(e);return o<0&&(o=me(r+o,0)),Xn(t,n,o)},We.inRange=function(t,n,e){return n=ga(n),e===i?(e=n,n=0):e=ga(e),function(t,n,e){return t>=we(n,e)&&t=-9007199254740991&&t<=d},We.isSet=la,We.isString=fa,We.isSymbol=sa,We.isTypedArray=ha,We.isUndefined=function(t){return t===i},We.isWeakMap=function(t){return oa(t)&&yi(t)==C},We.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Ar(t)},We.join=function(t,n){return null==t?"":Hn.call(t,n)},We.kebabCase=Va,We.last=Qi,We.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=r;return e!==i&&(o=(o=ya(e))<0?me(r+o,0):we(o,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,o):Wn(t,$n,o,!0)},We.lowerCase=Ha,We.lowerFirst=qa,We.lt=pa,We.lte=va,We.max=function(t){return t&&t.length?yr(t,uc,Tr):i},We.maxBy=function(t,n){return t&&t.length?yr(t,si(n,2),Tr):i},We.mean=function(t){return Gn(t,uc)},We.meanBy=function(t,n){return Gn(t,si(n,2))},We.min=function(t){return t&&t.length?yr(t,uc,Br):i},We.minBy=function(t,n){return t&&t.length?yr(t,si(n,2),Br):i},We.stubArray=bc,We.stubFalse=_c,We.stubObject=function(){return{}},We.stubString=function(){return""},We.stubTrue=function(){return!0},We.multiply=Sc,We.nth=function(t,n){return t&&t.length?$r(t,ya(n)):i},We.noConflict=function(){return dn._===this&&(dn._=Ut),this},We.noop=sc,We.now=Du,We.pad=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;if(!n||r>=n)return t;var o=(n-r)/2;return Vo(yn(o),e)+t+Vo(gn(o),e)},We.padEnd=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;return n&&rn){var r=t;t=n,n=r}if(e||t%1||n%1){var o=je();return we(t+o*(n-t+sn("1e-"+((o+"").length-1))),n)}return Kr(t,n)},We.reduce=function(t,n,e){var r=Vu(t)?Mn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,vr)},We.reduceRight=function(t,n,e){var r=Vu(t)?Fn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,dr)},We.repeat=function(t,n,e){return n=(e?Oi(t,n,e):n===i)?1:ya(n),Zr(wa(t),n)},We.replace=function(){var t=arguments,n=wa(t[0]);return t.length<3?n:n.replace(t[1],t[2])},We.result=function(t,n,e){var r=-1,o=(n=Oo(n,t)).length;for(o||(o=1,t=i);++rd)return[];var e=y,r=we(t,y);n=si(n),t-=y;for(var o=Zn(r,n);++e=u)return t;var c=e-ve(r);if(c<1)return r;var l=a?jo(a,0,c).join(""):t.slice(0,c);if(o===i)return l+r;if(a&&(c+=l.length-c),ca(o)){if(t.slice(c).search(o)){var f,s=l;for(o.global||(o=Tt(o.source,wa(gt.exec(o))+"g")),o.lastIndex=0;f=o.exec(s);)var h=f.index;l=l.slice(0,h===i?c:h)}}else if(t.indexOf(so(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r},We.unescape=function(t){return(t=wa(t))&&Z.test(t)?t.replace(q,ye):t},We.uniqueId=function(t){var n=++Mt;return wa(t)+n},We.upperCase=Ja,We.upperFirst=Qa,We.each=wu,We.eachRight=Ou,We.first=qi,fc(We,(jc={},Or(We,(function(t,n){Lt.call(We.prototype,n)||(jc[n]=t)})),jc),{chain:!1}),We.VERSION="4.17.21",Dn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){We[t].placeholder=We})),Dn(["drop","take"],(function(t,n){Ge.prototype[t]=function(e){e=e===i?1:me(ya(e),0);var r=this.__filtered__&&!n?new Ge(this):this.clone();return r.__filtered__?r.__takeCount__=we(e,r.__takeCount__):r.__views__.push({size:we(e,y),type:t+(r.__dir__<0?"Right":"")}),r},Ge.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),Dn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Ge.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:si(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),Dn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Ge.prototype[t]=function(){return this[e](1).value()[0]}})),Dn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Ge.prototype[t]=function(){return this.__filtered__?new Ge(this):this[e](1)}})),Ge.prototype.compact=function(){return this.filter(uc)},Ge.prototype.find=function(t){return this.filter(t).head()},Ge.prototype.findLast=function(t){return this.reverse().find(t)},Ge.prototype.invokeMap=Jr((function(t,n){return"function"==typeof t?new Ge(this):this.map((function(e){return kr(e,t,n)}))})),Ge.prototype.reject=function(t){return this.filter(Fu(si(t)))},Ge.prototype.slice=function(t,n){t=ya(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Ge(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==i&&(e=(n=ya(n))<0?e.dropRight(-n):e.take(n-t)),e)},Ge.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ge.prototype.toArray=function(){return this.take(y)},Or(Ge.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),o=We[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);o&&(We.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof Ge,l=a[0],f=c||Vu(n),s=function(t){var n=o.apply(We,Ln([t],a));return r&&h?n[0]:n};f&&e&&"function"==typeof l&&1!=l.length&&(c=f=!1);var h=this.__chain__,p=!!this.__actions__.length,v=u&&!h,d=c&&!p;if(!u&&f){n=d?n:new Ge(this);var g=t.apply(n,a);return g.__actions__.push({func:gu,args:[s],thisArg:i}),new $e(g,h)}return v&&d?t.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Dn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Rt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);We.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return n.apply(Vu(o)?o:[],t)}return this[e]((function(e){return n.apply(Vu(e)?e:[],t)}))}})),Or(Ge.prototype,(function(t,n){var e=We[n];if(e){var r=e.name+"";Lt.call(Pe,r)||(Pe[r]=[]),Pe[r].push({name:n,func:e})}})),Pe[Xo(i,2).name]=[{name:"wrapper",func:i}],Ge.prototype.clone=function(){var t=new Ge(this.__wrapped__);return t.__actions__=ko(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ko(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ko(this.__views__),t},Ge.prototype.reverse=function(){if(this.__filtered__){var t=new Ge(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ge.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Vu(t),r=n<0,o=e?t.length:0,i=function(t,n,e){var r=-1,o=e.length;for(;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},We.prototype.plant=function(t){for(var n,e=this;e instanceof Ye;){var r=Wi(e);r.__index__=0,r.__values__=i,n?o.__wrapped__=r:n=r;var o=r;e=e.__wrapped__}return o.__wrapped__=t,n},We.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ge){var n=t;return this.__actions__.length&&(n=new Ge(this)),(n=n.reverse()).__actions__.push({func:gu,args:[ru],thisArg:i}),new $e(n,this.__chain__)}return this.thru(ru)},We.prototype.toJSON=We.prototype.valueOf=We.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},We.prototype.first=We.prototype.head,Jt&&(We.prototype[Jt]=function(){return this}),We}();dn._=be,(o=function(){return be}.call(n,e,n,r))===i||(r.exports=o)}).call(this)}).call(this,e(62),e(63)(t))},,,,function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),l=r.call(u,"finallyLoc");if(c&&l){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),d}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;A(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:D(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},,,,function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===r(i)&&(o=o[1]),t.call(e,o,i,n)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(n.prototype,e),u&&o(n,u),t}();t.exports=u},,,,,function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=e(34),u=(r=i)&&r.__esModule?r:{default:r};var a={obj:function(t){return"object"===(void 0===t?"undefined":o(t))&&!!t},all:function(t){return a.obj(t)&&t.type===u.default.all},error:function(t){return a.obj(t)&&t.type===u.default.error},array:Array.isArray,func:function(t){return"function"==typeof t},promise:function(t){return t&&a.func(t.then)},iterator:function(t){return t&&a.func(t.next)&&a.func(t.throw)},fork:function(t){return a.obj(t)&&t.type===u.default.fork},join:function(t){return a.obj(t)&&t.type===u.default.join},race:function(t){return a.obj(t)&&t.type===u.default.race},call:function(t){return a.obj(t)&&t.type===u.default.call},cps:function(t){return a.obj(t)&&t.type===u.default.cps},subscribe:function(t){return a.obj(t)&&t.type===u.default.subscribe},channel:function(t){return a.obj(t)&&a.func(t.subscribe)}};n.default=a},function(t,n){t.exports=function(t){var n,e=Object.keys(t);return n=function(){var t,n,r;for(t="return {",n=0;n1?n-1:0),r=1;r1?n-1:0),r=1;r2?e-2:0),o=2;o1?n-1:0),r=1;r=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}e.r(o),e.d(o,"startResolution",(function(){return re})),e.d(o,"finishResolution",(function(){return oe})),e.d(o,"invalidateResolution",(function(){return ie})),e.d(o,"invalidateResolutionForStore",(function(){return ue})),e.d(o,"invalidateResolutionForStoreSelector",(function(){return ae}));function s(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var h=s(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=s(/Edge/i),v=s(/firefox/i),d=s(/safari/i)&&!s(/chrome/i)&&!s(/android/i),g=s(/iP(ad|od|hone)/i),y=s(/chrome/i)&&s(/android/i),b={capture:!1,passive:!1};function _(t,n,e){t.addEventListener(n,e,!h&&b)}function m(t,n,e){t.removeEventListener(n,e,!h&&b)}function w(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function O(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function E(t,n,e,r){if(t){e=e||document;do{if(null!=n&&(">"===n[0]?t.parentNode===e&&w(t,n):w(t,n))||r&&t===e)return t;if(t===e)break}while(t=O(t))}return null}var j,S=/\s+/g;function x(t,n,e){if(t&&n)if(t.classList)t.classList[e?"add":"remove"](n);else{var r=(" "+t.className+" ").replace(S," ").replace(" "+n+" "," ");t.className=(r+(e?" "+n:"")).replace(S," ")}}function A(t,n,e){var r=t&&t.style;if(r){if(void 0===e)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(e=t.currentStyle),void 0===n?e:e[n];n in r||-1!==n.indexOf("webkit")||(n="-webkit-"+n),r[n]=e+("string"==typeof e?"":"px")}}function T(t,n){var e="";if("string"==typeof t)e=t;else do{var r=A(t,"transform");r&&"none"!==r&&(e=r+" "+e)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function D(t,n,e){if(t){var r=t.getElementsByTagName(n),o=0,i=r.length;if(e)for(;o=i:o<=i))return r;if(r===I())break;r=M(r,!1)}return!1}function P(t,n,e,r){for(var o=0,i=0,u=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=e.evt,o=f(e,H);G.pluginEvent.bind(Ut)(t,n,u({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:tt,nextEl:nt,lastDownEl:et,cloneEl:rt,cloneHidden:ot,dragStarted:yt,putSortable:ft,activeSortable:Ut.active,originalEvent:r,oldIndex:it,oldDraggableIndex:at,newIndex:ut,newDraggableIndex:ct,hideGhostForTarget:Mt,unhideGhostForTarget:Ft,cloneNowHidden:function(){ot=!0},cloneNowShown:function(){ot=!1},dispatchSortableEvent:function(t){K({sortable:n,name:t,originalEvent:r})}},o))};function K(t){V(u({putSortable:ft,cloneEl:rt,targetEl:Z,rootEl:tt,oldIndex:it,oldDraggableIndex:at,newIndex:ut,newDraggableIndex:ct},t))}var Z,J,Q,tt,nt,et,rt,ot,it,ut,at,ct,lt,ft,st,ht,pt,vt,dt,gt,yt,bt,_t,mt,wt,Ot=!1,Et=!1,jt=[],St=!1,xt=!1,At=[],Tt=!1,Dt=[],It="undefined"!=typeof document,Rt=g,kt=p||h?"cssFloat":"float",Pt=It&&!y&&!g&&"draggable"in document.createElement("div"),Ct=function(){if(It){if(h)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Nt=function(t,n){var e=A(t),r=parseInt(e.width)-parseInt(e.paddingLeft)-parseInt(e.paddingRight)-parseInt(e.borderLeftWidth)-parseInt(e.borderRightWidth),o=P(t,0,n),i=P(t,1,n),u=o&&A(o),a=i&&A(i),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+R(o).width,l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+R(i).width;if("flex"===e.display)return"column"===e.flexDirection||"column-reverse"===e.flexDirection?"vertical":"horizontal";if("grid"===e.display)return e.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&u.float&&"none"!==u.float){var f="left"===u.float?"left":"right";return!i||"both"!==a.clear&&a.clear!==f?"horizontal":"vertical"}return o&&("block"===u.display||"flex"===u.display||"table"===u.display||"grid"===u.display||c>=r&&"none"===e[kt]||i&&"none"===e[kt]&&c+l>r)?"vertical":"horizontal"},Lt=function(t){function n(t,e){return function(r,o,i,u){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(e||a))return!0;if(null==t||!1===t)return!1;if(e&&"clone"===t)return t;if("function"==typeof t)return n(t(r,o,i,u),e)(r,o,i,u);var c=(e?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var e={},r=t.group;r&&"object"==a(r)||(r={name:r}),e.name=r.name,e.checkPull=n(r.pull,!0),e.checkPut=n(r.put),e.revertClone=r.revertClone,t.group=e},Mt=function(){!Ct&&Q&&A(Q,"display","none")},Ft=function(){!Ct&&Q&&A(Q,"display","")};It&&document.addEventListener("click",(function(t){if(Et)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Et=!1,!1}),!0);var zt=function(t){if(Z){t=t.touches?t.touches[0]:t;var n=(o=t.clientX,i=t.clientY,jt.some((function(t){var n=t[W].options.emptyInsertThreshold;if(n&&!C(t)){var e=R(t),r=o>=e.left-n&&o<=e.right+n,a=i>=e.top-n&&i<=e.bottom+n;return r&&a?u=t:void 0}})),u);if(n){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.target=e.rootEl=n,e.preventDefault=void 0,e.stopPropagation=void 0,n[W]._onDragOver(e)}}var o,i,u},Bt=function(t){Z&&Z.parentNode[W]._isOutsideThisEl(t.target)};function Ut(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=l({},n),t[W]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Nt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ut.supportPointer&&"PointerEvent"in window&&!d,emptyInsertThreshold:5};for(var r in G.initializePlugins(this,t,e),e)!(r in n)&&(n[r]=e[r]);for(var o in Lt(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&Pt,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?_(t,"pointerdown",this._onTapStart):(_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),jt.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),l(this,X())}function Wt(t,n,e,r,o,i,u,a){var c,l,f=t[W],s=f.options.onMove;return!window.CustomEvent||h||p?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=n,c.from=t,c.dragged=e,c.draggedRect=r,c.related=o||n,c.relatedRect=i||R(n),c.willInsertAfter=a,c.originalEvent=u,t.dispatchEvent(c),s&&(l=s.call(f,c,u)),l}function Xt(t){t.draggable=!1}function Yt(){Tt=!1}function $t(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,e=n.length,r=0;e--;)r+=n.charCodeAt(e);return r.toString(36)}function Gt(t){return setTimeout(t,0)}function Vt(t){return clearTimeout(t)}Ut.prototype={constructor:Ut,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,Z):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,e=this.el,r=this.options,o=r.preventOnFilter,i=t.type,u=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(u||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,l=r.filter;if(function(t){Dt.length=0;var n=t.getElementsByTagName("input"),e=n.length;for(;e--;){var r=n[e];r.checked&&Dt.push(r)}}(e),!Z&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!d||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=E(a,r.draggable,e,!1))&&a.animated||et===a)){if(it=N(a),at=N(a,r.draggable),"function"==typeof l){if(l.call(this,t,a,this))return K({sortable:n,rootEl:c,name:"filter",targetEl:a,toEl:e,fromEl:e}),q("filter",n,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=E(c,r.trim(),e,!1))return K({sortable:n,rootEl:r,name:"filter",targetEl:a,fromEl:e,toEl:e}),q("filter",n,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!E(c,r.handle,e,!1)||this._prepareDragStart(t,u,a)}}},_prepareDragStart:function(t,n,e){var r,o=this,i=o.el,u=o.options,a=i.ownerDocument;if(e&&!Z&&e.parentNode===i){var c=R(e);if(tt=i,J=(Z=e).parentNode,nt=Z.nextSibling,et=e,lt=u.group,Ut.dragged=Z,st={target:Z,clientX:(n||t).clientX,clientY:(n||t).clientY},dt=st.clientX-c.left,gt=st.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Z.style["will-change"]="all",r=function(){q("delayEnded",o,{evt:t}),Ut.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!v&&o.nativeDraggable&&(Z.draggable=!0),o._triggerDragStart(t,n),K({sortable:o,name:"choose",originalEvent:t}),x(Z,u.chosenClass,!0))},u.ignore.split(",").forEach((function(t){D(Z,t.trim(),Xt)})),_(a,"dragover",zt),_(a,"mousemove",zt),_(a,"touchmove",zt),_(a,"mouseup",o._onDrop),_(a,"touchend",o._onDrop),_(a,"touchcancel",o._onDrop),v&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),q("delayStart",this,{evt:t}),!u.delay||u.delayOnTouchOnly&&!n||this.nativeDraggable&&(p||h))r();else{if(Ut.eventCanceled)return void this._onDrop();_(a,"mouseup",o._disableDelayedDrag),_(a,"touchend",o._disableDelayedDrag),_(a,"touchcancel",o._disableDelayedDrag),_(a,"mousemove",o._delayedDragTouchMoveHandler),_(a,"touchmove",o._delayedDragTouchMoveHandler),u.supportPointer&&_(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,u.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Z&&Xt(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._disableDelayedDrag),m(t,"touchend",this._disableDelayedDrag),m(t,"touchcancel",this._disableDelayedDrag),m(t,"mousemove",this._delayedDragTouchMoveHandler),m(t,"touchmove",this._delayedDragTouchMoveHandler),m(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?this.options.supportPointer?_(document,"pointermove",this._onTouchMove):_(document,n?"touchmove":"mousemove",this._onTouchMove):(_(Z,"dragend",this),_(tt,"dragstart",this._onDragStart));try{document.selection?Gt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(Ot=!1,tt&&Z){q("dragStarted",this,{evt:n}),this.nativeDraggable&&_(document,"dragover",Bt);var e=this.options;!t&&x(Z,e.dragClass,!1),x(Z,e.ghostClass,!0),Ut.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,Mt();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY))!==n;)n=t;if(Z.parentNode[W]._isOutsideThisEl(t),n)do{if(n[W]){if(n[W]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Ft()}},_onTouchMove:function(t){if(st){var n=this.options,e=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,i=Q&&T(Q,!0),u=Q&&i&&i.a,a=Q&&i&&i.d,c=Rt&&wt&&L(wt),l=(o.clientX-st.clientX+r.x)/(u||1)+(c?c[0]-At[0]:0)/(u||1),f=(o.clientY-st.clientY+r.y)/(a||1)+(c?c[1]-At[1]:0)/(a||1);if(!Ut.active&&!Ot){if(e&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!g.animated){if(g===Z)return U(!1);if(g&&i===t.target&&(a=g),a&&(e=R(a)),!1!==Wt(tt,i,Z,n,a,e,t,!!a))return z(),i.appendChild(Z),J=i,X(),U(!0)}else if(g&&function(t,n,e){var r=R(P(e.el,0,e.options,!0)),o=10;return n?t.clientXf+l*i/2:cs-mt)return-_t}else if(c>f+l*(1-o)/2&&cs-l*i/2))return c>f+l/2?1:-1;return 0}(t,a,e,o,O?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,xt,bt===a))){var D=N(Z);do{D-=b,m=J.children[D]}while(m&&("none"===A(m,"display")||m===Q))}if(0===b||m===a)return U(!1);bt=a,_t=b;var I=a.nextElementSibling,L=!1,M=Wt(tt,i,Z,n,a,e,t,L=1===b);if(!1!==M)return 1!==M&&-1!==M||(L=1===M),Tt=!0,setTimeout(Yt,30),z(),L&&!I?i.appendChild(Z):a.parentNode.insertBefore(Z,L?I:a),S&&B(S,0,T-S.scrollTop),J=Z.parentNode,void 0===_||xt||(mt=Math.abs(_-R(a)[j])),X(),U(!0)}if(i.contains(Z))return U(!1)}return!1}function F(c,l){q(c,v,u({evt:t,isOwner:s,axis:o?"vertical":"horizontal",revert:r,dragRect:n,targetRect:e,canSort:h,fromSortable:p,target:a,completed:U,onMove:function(e,r){return Wt(tt,i,Z,n,e,R(e),t,r)},changed:X},l))}function z(){F("dragOverAnimationCapture"),v.captureAnimationState(),v!==p&&p.captureAnimationState()}function U(n){return F("dragOverCompleted",{insertion:n}),n&&(s?f._hideClone():f._showClone(v),v!==p&&(x(Z,ft?ft.options.ghostClass:f.options.ghostClass,!1),x(Z,c.ghostClass,!0)),ft!==v&&v!==Ut.active?ft=v:v===Ut.active&&ft&&(ft=null),p===v&&(v._ignoreWhileAnimating=a),v.animateAll((function(){F("dragOverAnimationComplete"),v._ignoreWhileAnimating=null})),v!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(a===Z&&!Z.animated||a===i&&!a.animated)&&(bt=null),c.dragoverBubble||t.rootEl||a===document||(Z.parentNode[W]._isOutsideThisEl(t.target),!n&&zt(t)),!c.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function X(){ut=N(Z),ct=N(Z,c.draggable),K({sortable:v,name:"change",toEl:i,newIndex:ut,newDraggableIndex:ct,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){m(document,"mousemove",this._onTouchMove),m(document,"touchmove",this._onTouchMove),m(document,"pointermove",this._onTouchMove),m(document,"dragover",zt),m(document,"mousemove",zt),m(document,"touchmove",zt)},_offUpEvents:function(){var t=this.el.ownerDocument;m(t,"mouseup",this._onDrop),m(t,"touchend",this._onDrop),m(t,"pointerup",this._onDrop),m(t,"touchcancel",this._onDrop),m(document,"selectstart",this)},_onDrop:function(t){var n=this.el,e=this.options;ut=N(Z),ct=N(Z,e.draggable),q("drop",this,{evt:t}),J=Z&&Z.parentNode,ut=N(Z),ct=N(Z,e.draggable),Ut.eventCanceled||(Ot=!1,xt=!1,St=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Vt(this.cloneId),Vt(this._dragStartId),this.nativeDraggable&&(m(document,"drop",this),m(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),d&&A(document.body,"user-select",""),A(Z,"transform",""),t&&(yt&&(t.cancelable&&t.preventDefault(),!e.dropBubble&&t.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(tt===J||ft&&"clone"!==ft.lastPutMode)&&rt&&rt.parentNode&&rt.parentNode.removeChild(rt),Z&&(this.nativeDraggable&&m(Z,"dragend",this),Xt(Z),Z.style["will-change"]="",yt&&!Ot&&x(Z,ft?ft.options.ghostClass:this.options.ghostClass,!1),x(Z,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==J?(ut>=0&&(K({rootEl:J,name:"add",toEl:J,fromEl:tt,originalEvent:t}),K({sortable:this,name:"remove",toEl:J,originalEvent:t}),K({rootEl:J,name:"sort",toEl:J,fromEl:tt,originalEvent:t}),K({sortable:this,name:"sort",toEl:J,originalEvent:t})),ft&&ft.save()):ut!==it&&ut>=0&&(K({sortable:this,name:"update",toEl:J,originalEvent:t}),K({sortable:this,name:"sort",toEl:J,originalEvent:t})),Ut.active&&(null!=ut&&-1!==ut||(ut=it,ct=at),K({sortable:this,name:"end",toEl:J,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),tt=Z=J=Q=nt=rt=et=ot=st=ht=yt=ut=ct=it=at=bt=_t=ft=lt=Ut.dragged=Ut.ghost=Ut.clone=Ut.active=null,Dt.forEach((function(t){t.checked=!0})),Dt.length=pt=vt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],e=this.el.children,r=0,o=e.length,i=this.options;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=Object(vn.map)(t,(function(t,n){return function(e,r,o,i,u){if(!Nn(e,n))return!1;var a=t(e);return Pn()(a)?a.then(i,u):i(a),!0}})),r=function(t,e){return!!Cn(t)&&(n(t),e(),!0)};e.push(r);var o=Object(Rn.create)(e);return function(t){return new Promise((function(e,r){return o(t,(function(t){Cn(t)&&n(t),e(t)}),r)}))}}function Mn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var e=Ln(t,n.dispatch);return function(t){return function(n){return In(n)?e(n):t(n)}}}}var Fn,zn=e(12);function Bn(t){return t.isRegistryControl=!0,t}var Un="@@data/SELECT",Wn="@@data/RESOLVE_SELECT",Xn="@@data/DISPATCH";var Yn=(Fn={},Object(pn.a)(Fn,Un,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args;return(e=t.select(r))[o].apply(e,Object(zn.a)(i))}}))),Object(pn.a)(Fn,Wn,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args,u=t.select(r)[o].hasResolver?"resolveSelect":"select";return(e=t[u](r))[o].apply(e,Object(zn.a)(i))}}))),Object(pn.a)(Fn,Xn,Bn((function(t){return function(n){var e,r=n.storeKey,o=n.actionName,i=n.args;return(e=t.dispatch(r))[o].apply(e,Object(zn.a)(i))}}))),Fn),$n=function(){return function(t){return function(n){return Pn()(n)?n.then((function(n){if(n)return t(n)})):t(n)}}},Gn=function(t,n){return function(){return function(e){return function(r){var o=t.select("core/data").getCachedResolvers(n);return Object.entries(o).forEach((function(e){var o=Object(hn.a)(e,2),i=o[0],u=o[1],a=Object(vn.get)(t.stores,[n,"resolvers",i]);a&&a.shouldInvalidate&&u.forEach((function(e,o){!1===e&&a.shouldInvalidate.apply(a,[r].concat(Object(zn.a)(o)))&&t.dispatch("core/data").invalidateResolution(n,i,o)}))})),e(r)}}}};function Vn(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Hn(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e[qn];if(void 0===r)return n;var o=t(n[r],e);return o===n[r]?n:Hn(Hn({},n),{},Object(pn.a)({},r,o))}})((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Dn.a,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var e="START_RESOLUTION"===n.type,r=new Dn.a(t);return r.set(n.args,e),r;case"INVALIDATE_RESOLUTION":var o=new Dn.a(t);return o.delete(n.args),o}return t})),Zn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(vn.has)(t,[n.selectorName])?Object(vn.omit)(t,[n.selectorName]):t;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return Kn(t,n)}return t};function Jn(t,n,e){var r=Object(vn.get)(t,[n]);if(r)return r.get(e)}function Qn(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==Jn(t,n,e)}function te(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===Jn(t,n,e)}function ne(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===Jn(t,n,e)}function ee(t){return t}function re(t,n){return{type:"START_RESOLUTION",selectorName:t,args:n}}function oe(t,n){return{type:"FINISH_RESOLUTION",selectorName:t,args:n}}function ie(t,n){return{type:"INVALIDATE_RESOLUTION",selectorName:t,args:n}}function ue(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function ae(t){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:t}}function ce(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function le(t){for(var n=1;n1?e-1:0),o=1;o1?e-1:0),o=1;o3?i-3:0),a=3;a1?o-1:0),u=1;u1?o-1:0),u=1;u0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e={},r=[],o=new Set;function i(){r.forEach((function(t){return t()}))}var u=function(t){return r.push(t),function(){r=Object(vn.without)(r,t)}};function a(t){var r=Object(vn.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getSelectors():n&&n.select(r)}function c(t,n){o.clear();var e=t.call(this);return n.current=Array.from(o),e}function l(t){var r=Object(vn.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getResolveSelectors():n&&n.resolveSelect(r)}function f(t){var r=Object(vn.isObject)(t)?t.name:t,o=e[r];return o?o.getActions():n&&n.dispatch(r)}function s(t){return Object(vn.mapValues)(t,(function(t,n){return"function"!=typeof t?t:function(){return d[n].apply(null,arguments)}}))}function h(t,n){if("function"!=typeof n.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof n.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof n.subscribe)throw new TypeError("config.subscribe must be a function");e[t]=n,n.subscribe(i)}function p(t){h(t.name,t.instantiate(d))}function v(t,r){return t in e?e[t].subscribe(r):n?n.__experimentalSubscribeStore(t,r):u(r)}var d={registerGenericStore:h,stores:e,namespaces:e,subscribe:u,select:a,resolveSelect:l,dispatch:f,use:g,register:p,__experimentalMarkListeningStores:c,__experimentalSubscribeStore:v};function g(t,n){return d=ye(ye({},d),t(d,n))}return d.registerStore=function(t,n){if(!n.reducer)throw new TypeError("Must specify store reducer");var e=fe(t,n).instantiate(d);return h(t,e),e.store},h("core/data",de(d)),Object.entries(t).forEach((function(t){var n=Object(hn.a)(t,2),e=n[0],r=n[1];return d.registerStore(e,r)})),n&&n.subscribe(i),s(d)}(),_e=be.select,me=(be.resolveSelect,be.dispatch,be.subscribe);be.registerGenericStore,be.registerStore,be.use,be.register;const we={...{wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},_init(){this.wrapper=document.getElementById("cld-tax-items"),setTimeout((()=>{this._init_listeners()}),3e3),new ln(this.wrapper,{handle:".dashicons-menu",animation:150})},_init_listeners(){this.getTaxonomies().forEach((t=>{t.rest_base&&t.visibility.public&&this.addTaxonomyListener(t)}))},getTaxonomies:()=>_e("core").getTaxonomies(),addTaxonomyListener(t){me((()=>{const n=t.slug,e=t.hierarchical,{isResolving:r}=_e("core/data"),o=["taxonomy",n,this.query];this.available[n]=null,e&&(this.available[n]=_e("core").getEntityRecords("taxonomy",n,this.query)),r("core","getEntityRecords",o)||this.event(t)}))},getSelection:t=>_e("core/editor").getEditedPostAttribute(t.rest_base),getTerm:(t,n)=>_e("core").getEntityRecord("taxonomy",t.slug,n),event(t){const n=this.getSelection(t);if(!n)return;const e=[...n],r=Array.from(this.wrapper.querySelectorAll(`[data-item*="${t.slug}"]`));[...e].forEach((n=>{const e=this.wrapper.querySelector(`[data-item="${t.slug}:${n}"]`);r.splice(r.indexOf(e),1),null===e&&this.createItem(this.getItem(t,n))})),r.forEach((t=>{t.parentNode.removeChild(t)}))},createItem(t){if(!t||!t.id)return;const n=document.createElement("li"),e=document.createElement("span"),r=document.createElement("input"),o=document.createTextNode(t.name);n.classList.add("cld-tax-order-list-item"),n.dataset.item=`${t.taxonomy}:${t.id}`,r.classList.add("cld-tax-order-list-item-input"),r.type="hidden",r.name="cld_tax_order[]",r.value=`${t.taxonomy}:${t.id}`,e.className="dashicons dashicons-menu cld-tax-order-list-item-handle",n.appendChild(e),n.appendChild(r),n.appendChild(o),this.wrapper.appendChild(n)},getItem(t,n){let e={};if(null===this.available[t.slug])e=this.getTerm(t,n);else for(const r of this.available[t.slug])if(r.id===n){e=r,e.taxonomy=t.slug;break}return e}},selection:{},tagDelimiter:wp.i18n._x(",","tag delimiter")||",",getTaxonomies:()=>cldData.taxonomies,addTaxonomyListener(t){const n=document.querySelectorAll(`#taxonomy-${t.slug} .selectit input[type="checkbox"],textarea[name=tax_input\\[${t.slug}\\]]`);this.available[t.slug]=Object.values(t.terms),this.selection[t.slug]=[],n.forEach((n=>{let e=parseInt(n.value);if(Object.is(e,NaN)&&(e=n.value),"checkbox"===n.type)n.checked&&-1===this.selection[t.slug].indexOf(e)&&this.selection[t.slug].push(e);else if("textarea"===n.type){e.split(this.tagDelimiter).forEach((n=>{const e=n.trim();-1===this.selection[t.slug].indexOf(e)&&this.selection[t.slug].push(e)}))}n.addEventListener("change",(()=>{const r=this.selection[t.slug].indexOf(e);n.checked?this.selection[t.slug].push(e):-1"']/g,Z=RegExp(q.source),J=RegExp(K.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,nt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,lt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ft=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,vt=/\\(\\)?/g,dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,St=/['\n\r\u2028\u2029\\]/g,jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",Tt="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",Dt="\\ufe0e\\ufe0f",It="\\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",Rt="['’]",kt="[\\ud800-\\udfff]",Ct="["+It+"]",Pt="["+jt+"]",Nt="\\d+",Lt="[\\u2700-\\u27bf]",Mt="["+Tt+"]",Ft="[^\\ud800-\\udfff"+It+Nt+xt+Tt+At+"]",Bt="\\ud83c[\\udffb-\\udfff]",zt="[^\\ud800-\\udfff]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",Wt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+At+"]",Yt="(?:"+Mt+"|"+Ft+")",$t="(?:"+Xt+"|"+Ft+")",Gt="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ht="(?:"+Pt+"|"+Bt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Kt=qt+Ht+("(?:\\u200d(?:"+[zt,Ut,Wt].join("|")+")"+qt+Ht+")*"),Zt="(?:"+[Lt,Ut,Wt].join("|")+")"+Kt,Jt="(?:"+[zt+Pt+"?",Pt,Ut,Wt,kt].join("|")+")",Qt=RegExp(Rt,"g"),tn=RegExp(Pt,"g"),nn=RegExp(Bt+"(?="+Bt+")|"+Jt+Kt,"g"),en=RegExp([Xt+"?"+Mt+"+"+Gt+"(?="+[Ct,Xt,"$"].join("|")+")",$t+"+"+Vt+"(?="+[Ct,Xt+Yt,"$"].join("|")+")",Xt+"?"+Yt+"+"+Gt,Xt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Zt].join("|"),"g"),rn=RegExp("[\\u200d\\ud800-\\udfff"+jt+Dt+"]"),on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,un=["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"],an=-1,cn={};cn[M]=cn[F]=cn[B]=cn[z]=cn[U]=cn[W]=cn[X]=cn[Y]=cn[$]=!0,cn[b]=cn[_]=cn[N]=cn[w]=cn[L]=cn[O]=cn[E]=cn[S]=cn[x]=cn[T]=cn[A]=cn[I]=cn[R]=cn[k]=cn[P]=!1;var ln={};ln[b]=ln[_]=ln[N]=ln[L]=ln[w]=ln[O]=ln[M]=ln[F]=ln[B]=ln[z]=ln[U]=ln[x]=ln[T]=ln[A]=ln[I]=ln[R]=ln[k]=ln[C]=ln[W]=ln[X]=ln[Y]=ln[$]=!0,ln[E]=ln[S]=ln[P]=!1;var fn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},sn=parseFloat,hn=parseInt,pn="object"==typeof t&&t&&t.Object===Object&&t,vn="object"==typeof self&&self&&self.Object===Object&&self,dn=pn||vn||Function("return this")(),gn=n&&!n.nodeType&&n,yn=gn&&"object"==typeof r&&r&&!r.nodeType&&r,mn=yn&&yn.exports===gn,bn=mn&&pn.process,_n=function(){try{var t=yn&&yn.require&&yn.require("util").types;return t||bn&&bn.binding&&bn.binding("util")}catch(t){}}(),wn=_n&&_n.isArrayBuffer,On=_n&&_n.isDate,En=_n&&_n.isMap,Sn=_n&&_n.isRegExp,jn=_n&&_n.isSet,xn=_n&&_n.isTypedArray;function Tn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function An(t,n,e,r){for(var o=-1,i=null==t?0:t.length;++o-1}function Pn(t,n,e){for(var r=-1,o=null==t?0:t.length;++r-1;);return e}function re(t,n){for(var e=t.length;e--&&Xn(n,t[e],0)>-1;);return e}function oe(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var ie=Hn({"À":"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"}),ue=Hn({"&":"&","<":"<",">":">",'"':""","'":"'"});function ae(t){return"\\"+fn[t]}function ce(t){return rn.test(t)}function le(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function fe(t,n){return function(e){return t(n(e))}}function se(t,n){for(var e=-1,r=t.length,o=0,i=[];++e",""":'"',"'":"'"});var me=function t(n){var e,r=(n=null==n?dn:me.defaults(dn.Object(),n,me.pick(dn,un))).Array,o=n.Date,ct=n.Error,jt=n.Function,xt=n.Math,Tt=n.Object,At=n.RegExp,Dt=n.String,It=n.TypeError,Rt=r.prototype,kt=jt.prototype,Ct=Tt.prototype,Pt=n["__core-js_shared__"],Nt=kt.toString,Lt=Ct.hasOwnProperty,Mt=0,Ft=(e=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",Bt=Ct.toString,zt=Nt.call(Tt),Ut=dn._,Wt=At("^"+Nt.call(Lt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=mn?n.Buffer:i,Yt=n.Symbol,$t=n.Uint8Array,Gt=Xt?Xt.allocUnsafe:i,Vt=fe(Tt.getPrototypeOf,Tt),Ht=Tt.create,qt=Ct.propertyIsEnumerable,Kt=Rt.splice,Zt=Yt?Yt.isConcatSpreadable:i,Jt=Yt?Yt.iterator:i,nn=Yt?Yt.toStringTag:i,rn=function(){try{var t=vi(Tt,"defineProperty");return t({},"",{}),t}catch(t){}}(),fn=n.clearTimeout!==dn.clearTimeout&&n.clearTimeout,pn=o&&o.now!==dn.Date.now&&o.now,vn=n.setTimeout!==dn.setTimeout&&n.setTimeout,gn=xt.ceil,yn=xt.floor,bn=Tt.getOwnPropertySymbols,_n=Xt?Xt.isBuffer:i,zn=n.isFinite,Hn=Rt.join,be=fe(Tt.keys,Tt),_e=xt.max,we=xt.min,Oe=o.now,Ee=n.parseInt,Se=xt.random,je=Rt.reverse,xe=vi(n,"DataView"),Te=vi(n,"Map"),Ae=vi(n,"Promise"),De=vi(n,"Set"),Ie=vi(n,"WeakMap"),Re=vi(Tt,"create"),ke=Ie&&new Ie,Ce={},Pe=Ui(xe),Ne=Ui(Te),Le=Ui(Ae),Me=Ui(De),Fe=Ui(Ie),Be=Yt?Yt.prototype:i,ze=Be?Be.valueOf:i,Ue=Be?Be.toString:i;function We(t){if(oa(t)&&!Vu(t)&&!(t instanceof Ge)){if(t instanceof $e)return t;if(Lt.call(t,"__wrapped__"))return Wi(t)}return new $e(t)}var Xe=function(){function t(){}return function(n){if(!ra(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=i,e}}();function Ye(){}function $e(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=i}function Ge(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function fr(t,n,e,r,o,u){var a,c=1&n,l=2&n,f=4&n;if(e&&(a=o?e(t,r,o,u):e(t)),a!==i)return a;if(!ra(t))return t;var s=Vu(t);if(s){if(a=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Lt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!c)return ko(t,a)}else{var h=yi(t),p=h==S||h==j;if(Zu(t))return xo(t,c);if(h==A||h==b||p&&!o){if(a=l||p?{}:bi(t),!c)return l?function(t,n){return Co(t,gi(t),n)}(t,function(t,n){return t&&Co(n,Na(n),t)}(a,t)):function(t,n){return Co(t,di(t),n)}(t,ur(a,t))}else{if(!ln[h])return o?t:{};a=function(t,n,e){var r=t.constructor;switch(n){case N:return To(t);case w:case O:return new r(+t);case L:return function(t,n){var e=n?To(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case M:case F:case B:case z:case U:case W:case X:case Y:case $:return Ao(t,e);case x:return new r;case T:case k:return new r(t);case I:return function(t){var n=new t.constructor(t.source,gt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case R:return new r;case C:return o=t,ze?Tt(ze.call(o)):{}}var o}(t,h,c)}}u||(u=new Ze);var v=u.get(t);if(v)return v;u.set(t,a),la(t)?t.forEach((function(r){a.add(fr(r,n,e,r,t,u))})):ia(t)&&t.forEach((function(r,o){a.set(o,fr(r,n,e,o,t,u))}));var d=s?i:(f?l?ai:ui:l?Na:Pa)(t);return Dn(d||t,(function(r,o){d&&(r=t[o=r]),rr(a,o,fr(r,n,e,o,t,u))})),a}function sr(t,n,e){var r=e.length;if(null==t)return!r;for(t=Tt(t);r--;){var o=e[r],u=n[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function hr(t,n,e){if("function"!=typeof t)throw new It(u);return Pi((function(){t.apply(i,e)}),n)}function pr(t,n,e,r){var o=-1,i=Cn,u=!0,a=t.length,c=[],l=n.length;if(!a)return c;e&&(n=Nn(n,Qn(e))),r?(i=Pn,u=!1):n.length>=200&&(i=ne,u=!1,n=new Ke(n));t:for(;++o-1},He.prototype.set=function(t,n){var e=this.__data__,r=or(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ve,map:new(Te||He),string:new Ve}},qe.prototype.delete=function(t){var n=hi(this,t).delete(t);return this.size-=n?1:0,n},qe.prototype.get=function(t){return hi(this,t).get(t)},qe.prototype.has=function(t){return hi(this,t).has(t)},qe.prototype.set=function(t,n){var e=hi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ke.prototype.add=Ke.prototype.push=function(t){return this.__data__.set(t,a),this},Ke.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new He,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof He){var r=e.__data__;if(!Te||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new qe(r)}return e.set(t,n),this.size=e.size,this};var vr=Lo(Or),dr=Lo(Er,!0);function gr(t,n){var e=!0;return vr(t,(function(t,r,o){return e=!!n(t,r,o)})),e}function yr(t,n,e){for(var r=-1,o=t.length;++r0&&e(a)?n>1?br(a,n-1,e,r,o):Ln(o,a):r||(o[o.length]=a)}return o}var _r=Mo(),wr=Mo(!0);function Or(t,n){return t&&_r(t,n,Pa)}function Er(t,n){return t&&wr(t,n,Pa)}function Sr(t,n){return kn(n,(function(n){return ta(t[n])}))}function jr(t,n){for(var e=0,r=(n=Oo(n,t)).length;null!=t&&en}function Dr(t,n){return null!=t&&Lt.call(t,n)}function Ir(t,n){return null!=t&&n in Tt(t)}function Rr(t,n,e){for(var o=e?Pn:Cn,u=t[0].length,a=t.length,c=a,l=r(a),f=1/0,s=[];c--;){var h=t[c];c&&n&&(h=Nn(h,Qn(n))),f=we(h.length,f),l[c]=!e&&(n||u>=120&&h.length>=120)?new Ke(c&&h):i}h=t[0];var p=-1,v=l[0];t:for(;++p=a?c:c*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Vr(t,n,e){for(var r=-1,o=n.length,i={};++r-1;)a!==t&&Kt.call(a,c,1),Kt.call(t,c,1);return t}function qr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var o=n[e];if(e==r||o!==i){var i=o;wi(o)?Kt.call(t,o,1):po(t,o)}}return t}function Kr(t,n){return t+yn(Se()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>d)return e;do{n%2&&(e+=t),(n=yn(n/2))&&(t+=t)}while(n);return e}function Jr(t,n){return Ni(Di(t,n,uc),t+"")}function Qr(t){return Qe(Xa(t))}function to(t,n){var e=Xa(t);return Fi(e,lr(n,0,e.length))}function no(t,n,e,r){if(!ra(t))return t;for(var o=-1,u=(n=Oo(n,t)).length,a=u-1,c=t;null!=c&&++oi?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var u=r(i);++o>>1,u=t[i];null!==u&&!sa(u)&&(e?u<=n:u=200){var l=n?null:Jo(t);if(l)return he(l);u=!1,o=ne,c=new Ke}else c=n?[]:a;t:for(;++r=r?t:io(t,n,e)}var jo=fn||function(t){return dn.clearTimeout(t)};function xo(t,n){if(n)return t.slice();var e=t.length,r=Gt?Gt(e):new t.constructor(e);return t.copy(r),r}function To(t){var n=new t.constructor(t.byteLength);return new $t(n).set(new $t(t)),n}function Ao(t,n){var e=n?To(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Do(t,n){if(t!==n){var e=t!==i,r=null===t,o=t==t,u=sa(t),a=n!==i,c=null===n,l=n==n,f=sa(n);if(!c&&!f&&!u&&t>n||u&&a&&l&&!c&&!f||r&&a&&l||!e&&l||!o)return 1;if(!r&&!u&&!f&&t1?e[o-1]:i,a=o>2?e[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&Oi(e[0],e[1],a)&&(u=o<3?i:u,o=1),n=Tt(n);++r-1?o[u?n[a]:a]:i}}function Wo(t){return ii((function(n){var e=n.length,r=e,o=$e.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new It(u);if(o&&!c&&"wrapper"==li(a))var c=new $e([],!0)}for(r=c?r:e;++r1&&b.reverse(),p&&fc))return!1;var f=u.get(t),s=u.get(n);if(f&&s)return f==n&&s==t;var h=-1,p=!0,v=2&e?new Ke:i;for(u.set(t,n),u.set(n,t);++h-1&&t%1==0&&t1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(lt,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return Dn(m,(function(e){var r="_."+e[0];n&e[1]&&!Cn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ft);return n?n[1].split(st):[]}(r),e)))}function Mi(t){var n=0,e=0;return function(){var r=Oe(),o=16-(r-e);if(e=r,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(i,arguments)}}function Fi(t,n){var e=-1,r=t.length,o=r-1;for(n=n===i?r:n;++e1?t[n-1]:i;return e="function"==typeof e?(t.pop(),e):i,cu(t,e)}));function du(t){var n=We(t);return n.__chain__=!0,n}function gu(t,n){return n(t)}var yu=ii((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,o=function(n){return cr(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Ge&&wi(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:gu,args:[o],thisArg:i}),new $e(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(i),t}))):this.thru(o)}));var mu=Po((function(t,n,e){Lt.call(t,e)?++t[e]:ar(t,e,1)}));var bu=Uo(Gi),_u=Uo(Vi);function wu(t,n){return(Vu(t)?Dn:vr)(t,si(n,3))}function Ou(t,n){return(Vu(t)?In:dr)(t,si(n,3))}var Eu=Po((function(t,n,e){Lt.call(t,e)?t[e].push(n):ar(t,e,[n])}));var Su=Jr((function(t,n,e){var o=-1,i="function"==typeof n,u=qu(t)?r(t.length):[];return vr(t,(function(t){u[++o]=i?Tn(n,t,e):kr(t,n,e)})),u})),ju=Po((function(t,n,e){ar(t,e,n)}));function xu(t,n){return(Vu(t)?Nn:Ur)(t,si(n,3))}var Tu=Po((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var Au=Jr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&Oi(t,n[0],n[1])?n=[]:e>2&&Oi(n[0],n[1],n[2])&&(n=[n[0]]),Gr(t,br(n,1),[])})),Du=pn||function(){return dn.Date.now()};function Iu(t,n,e){return n=e?i:n,n=t&&null==n?t.length:n,ti(t,h,i,i,i,i,n)}function Ru(t,n){var e;if("function"!=typeof n)throw new It(u);return t=ya(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=i),e}}var ku=Jr((function(t,n,e){var r=1;if(e.length){var o=se(e,fi(ku));r|=f}return ti(t,r,n,e,o)})),Cu=Jr((function(t,n,e){var r=3;if(e.length){var o=se(e,fi(Cu));r|=f}return ti(n,r,t,e,o)}));function Pu(t,n,e){var r,o,a,c,l,f,s=0,h=!1,p=!1,v=!0;if("function"!=typeof t)throw new It(u);function d(n){var e=r,u=o;return r=o=i,s=n,c=t.apply(u,e)}function g(t){return s=t,l=Pi(m,n),h?d(t):c}function y(t){var e=t-f;return f===i||e>=n||e<0||p&&t-s>=a}function m(){var t=Du();if(y(t))return b(t);l=Pi(m,function(t){var e=n-(t-f);return p?we(e,a-(t-s)):e}(t))}function b(t){return l=i,v&&r?d(t):(r=o=i,c)}function _(){var t=Du(),e=y(t);if(r=arguments,o=this,f=t,e){if(l===i)return g(f);if(p)return jo(l),l=Pi(m,n),d(f)}return l===i&&(l=Pi(m,n)),c}return n=ba(n)||0,ra(e)&&(h=!!e.leading,a=(p="maxWait"in e)?_e(ba(e.maxWait)||0,n):a,v="trailing"in e?!!e.trailing:v),_.cancel=function(){l!==i&&jo(l),s=0,r=f=o=l=i},_.flush=function(){return l===i?c:b(Du())},_}var Nu=Jr((function(t,n){return hr(t,1,n)})),Lu=Jr((function(t,n,e){return hr(t,ba(n)||0,e)}));function Mu(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new It(u);var e=function(){var r=arguments,o=n?n.apply(this,r):r[0],i=e.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return e.cache=i.set(o,u)||i,u};return e.cache=new(Mu.Cache||qe),e}function Fu(t){if("function"!=typeof t)throw new It(u);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Mu.Cache=qe;var Bu=Eo((function(t,n){var e=(n=1==n.length&&Vu(n[0])?Nn(n[0],Qn(si())):Nn(br(n,1),Qn(si()))).length;return Jr((function(r){for(var o=-1,i=we(r.length,e);++o=n})),Gu=Cr(function(){return arguments}())?Cr:function(t){return oa(t)&&Lt.call(t,"callee")&&!qt.call(t,"callee")},Vu=r.isArray,Hu=wn?Qn(wn):function(t){return oa(t)&&Tr(t)==N};function qu(t){return null!=t&&ea(t.length)&&!ta(t)}function Ku(t){return oa(t)&&qu(t)}var Zu=_n||bc,Ju=On?Qn(On):function(t){return oa(t)&&Tr(t)==O};function Qu(t){if(!oa(t))return!1;var n=Tr(t);return n==E||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var n=Tr(t);return n==S||n==j||"[object AsyncFunction]"==n||"[object Proxy]"==n}function na(t){return"number"==typeof t&&t==ya(t)}function ea(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=d}function ra(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function oa(t){return null!=t&&"object"==typeof t}var ia=En?Qn(En):function(t){return oa(t)&&yi(t)==x};function ua(t){return"number"==typeof t||oa(t)&&Tr(t)==T}function aa(t){if(!oa(t)||Tr(t)!=A)return!1;var n=Vt(t);if(null===n)return!0;var e=Lt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Nt.call(e)==zt}var ca=Sn?Qn(Sn):function(t){return oa(t)&&Tr(t)==I};var la=jn?Qn(jn):function(t){return oa(t)&&yi(t)==R};function fa(t){return"string"==typeof t||!Vu(t)&&oa(t)&&Tr(t)==k}function sa(t){return"symbol"==typeof t||oa(t)&&Tr(t)==C}var ha=xn?Qn(xn):function(t){return oa(t)&&ea(t.length)&&!!cn[Tr(t)]};var pa=qo(zr),va=qo((function(t,n){return t<=n}));function da(t){if(!t)return[];if(qu(t))return fa(t)?de(t):ko(t);if(Jt&&t[Jt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Jt]());var n=yi(t);return(n==x?le:n==R?he:Xa)(t)}function ga(t){return t?(t=ba(t))===v||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var n=ga(t),e=n%1;return n==n?e?n-e:n:0}function ma(t){return t?lr(ya(t),0,y):0}function ba(t){if("number"==typeof t)return t;if(sa(t))return g;if(ra(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ra(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Jn(t);var e=mt.test(t);return e||_t.test(t)?hn(t.slice(2),e?2:8):yt.test(t)?g:+t}function _a(t){return Co(t,Na(t))}function wa(t){return null==t?"":so(t)}var Oa=No((function(t,n){if(xi(n)||qu(n))Co(n,Pa(n),t);else for(var e in n)Lt.call(n,e)&&rr(t,e,n[e])})),Ea=No((function(t,n){Co(n,Na(n),t)})),Sa=No((function(t,n,e,r){Co(n,Na(n),t,r)})),ja=No((function(t,n,e,r){Co(n,Pa(n),t,r)})),xa=ii(cr);var Ta=Jr((function(t,n){t=Tt(t);var e=-1,r=n.length,o=r>2?n[2]:i;for(o&&Oi(n[0],n[1],o)&&(r=1);++e1),n})),Co(t,ai(t),e),r&&(e=fr(e,7,ri));for(var o=n.length;o--;)po(e,n[o]);return e}));var Ba=ii((function(t,n){return null==t?{}:function(t,n){return Vr(t,n,(function(n,e){return Ia(t,e)}))}(t,n)}));function za(t,n){if(null==t)return{};var e=Nn(ai(t),(function(t){return[t]}));return n=si(n),Vr(t,e,(function(t,e){return n(t,e[0])}))}var Ua=Qo(Pa),Wa=Qo(Na);function Xa(t){return null==t?[]:te(t,Pa(t))}var Ya=Bo((function(t,n,e){return n=n.toLowerCase(),t+(e?$a(n):n)}));function $a(t){return Qa(wa(t).toLowerCase())}function Ga(t){return(t=wa(t))&&t.replace(Ot,ie).replace(tn,"")}var Va=Bo((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Ha=Bo((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),qa=Fo("toLowerCase");var Ka=Bo((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Za=Bo((function(t,n,e){return t+(e?" ":"")+Qa(n)}));var Ja=Bo((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Qa=Fo("toUpperCase");function tc(t,n,e){return t=wa(t),(n=e?i:n)===i?function(t){return on.test(t)}(t)?function(t){return t.match(en)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(n)||[]}var nc=Jr((function(t,n){try{return Tn(t,i,n)}catch(t){return Qu(t)?t:new ct(t)}})),ec=ii((function(t,n){return Dn(n,(function(n){n=zi(n),ar(t,n,ku(t[n],t))})),t}));function rc(t){return function(){return t}}var oc=Wo(),ic=Wo(!0);function uc(t){return t}function ac(t){return Mr("function"==typeof t?t:fr(t,1))}var cc=Jr((function(t,n){return function(e){return kr(e,t,n)}})),lc=Jr((function(t,n){return function(e){return kr(t,e,n)}}));function fc(t,n,e){var r=Pa(n),o=Sr(n,r);null!=e||ra(n)&&(o.length||!r.length)||(e=n,n=t,t=this,o=Sr(n,Pa(n)));var i=!(ra(e)&&"chain"in e&&!e.chain),u=ta(t);return Dn(o,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(i||n){var e=t(this.__wrapped__),o=e.__actions__=ko(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Ln([this.value()],arguments))})})),t}function sc(){}var hc=Go(Nn),pc=Go(Rn),vc=Go(Bn);function dc(t){return Ei(t)?Vn(zi(t)):function(t){return function(n){return jr(n,t)}}(t)}var gc=Ho(),yc=Ho(!0);function mc(){return[]}function bc(){return!1}var _c=$o((function(t,n){return t+n}),0),wc=Zo("ceil"),Oc=$o((function(t,n){return t/n}),1),Ec=Zo("floor");var Sc,jc=$o((function(t,n){return t*n}),1),xc=Zo("round"),Tc=$o((function(t,n){return t-n}),0);return We.after=function(t,n){if("function"!=typeof n)throw new It(u);return t=ya(t),function(){if(--t<1)return n.apply(this,arguments)}},We.ary=Iu,We.assign=Oa,We.assignIn=Ea,We.assignInWith=Sa,We.assignWith=ja,We.at=xa,We.before=Ru,We.bind=ku,We.bindAll=ec,We.bindKey=Cu,We.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Vu(t)?t:[t]},We.chain=du,We.chunk=function(t,n,e){n=(e?Oi(t,n,e):n===i)?1:_e(ya(n),0);var o=null==t?0:t.length;if(!o||n<1)return[];for(var u=0,a=0,c=r(gn(o/n));uo?0:o+e),(r=r===i||r>o?o:ya(r))<0&&(r+=o),r=e>r?0:ma(r);e>>0)?(t=wa(t))&&("string"==typeof n||null!=n&&!ca(n))&&!(n=so(n))&&ce(t)?So(de(t),0,e):t.split(n,e):[]},We.spread=function(t,n){if("function"!=typeof t)throw new It(u);return n=null==n?0:_e(ya(n),0),Jr((function(e){var r=e[n],o=So(e,0,n);return r&&Ln(o,r),Tn(t,this,o)}))},We.tail=function(t){var n=null==t?0:t.length;return n?io(t,1,n):[]},We.take=function(t,n,e){return t&&t.length?io(t,0,(n=e||n===i?1:ya(n))<0?0:n):[]},We.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?io(t,(n=r-(n=e||n===i?1:ya(n)))<0?0:n,r):[]},We.takeRightWhile=function(t,n){return t&&t.length?go(t,si(n,3),!1,!0):[]},We.takeWhile=function(t,n){return t&&t.length?go(t,si(n,3)):[]},We.tap=function(t,n){return n(t),t},We.throttle=function(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new It(u);return ra(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),Pu(t,n,{leading:r,maxWait:n,trailing:o})},We.thru=gu,We.toArray=da,We.toPairs=Ua,We.toPairsIn=Wa,We.toPath=function(t){return Vu(t)?Nn(t,zi):sa(t)?[t]:ko(Bi(wa(t)))},We.toPlainObject=_a,We.transform=function(t,n,e){var r=Vu(t),o=r||Zu(t)||ha(t);if(n=si(n,4),null==e){var i=t&&t.constructor;e=o?r?new i:[]:ra(t)&&ta(i)?Xe(Vt(t)):{}}return(o?Dn:Or)(t,(function(t,r,o){return n(e,t,r,o)})),e},We.unary=function(t){return Iu(t,1)},We.union=ou,We.unionBy=iu,We.unionWith=uu,We.uniq=function(t){return t&&t.length?ho(t):[]},We.uniqBy=function(t,n){return t&&t.length?ho(t,si(n,2)):[]},We.uniqWith=function(t,n){return n="function"==typeof n?n:i,t&&t.length?ho(t,i,n):[]},We.unset=function(t,n){return null==t||po(t,n)},We.unzip=au,We.unzipWith=cu,We.update=function(t,n,e){return null==t?t:vo(t,n,wo(e))},We.updateWith=function(t,n,e,r){return r="function"==typeof r?r:i,null==t?t:vo(t,n,wo(e),r)},We.values=Xa,We.valuesIn=function(t){return null==t?[]:te(t,Na(t))},We.without=lu,We.words=tc,We.wrap=function(t,n){return zu(wo(n),t)},We.xor=fu,We.xorBy=su,We.xorWith=hu,We.zip=pu,We.zipObject=function(t,n){return bo(t||[],n||[],rr)},We.zipObjectDeep=function(t,n){return bo(t||[],n||[],no)},We.zipWith=vu,We.entries=Ua,We.entriesIn=Wa,We.extend=Ea,We.extendWith=Sa,fc(We,We),We.add=_c,We.attempt=nc,We.camelCase=Ya,We.capitalize=$a,We.ceil=wc,We.clamp=function(t,n,e){return e===i&&(e=n,n=i),e!==i&&(e=(e=ba(e))==e?e:0),n!==i&&(n=(n=ba(n))==n?n:0),lr(ba(t),n,e)},We.clone=function(t){return fr(t,4)},We.cloneDeep=function(t){return fr(t,5)},We.cloneDeepWith=function(t,n){return fr(t,5,n="function"==typeof n?n:i)},We.cloneWith=function(t,n){return fr(t,4,n="function"==typeof n?n:i)},We.conformsTo=function(t,n){return null==n||sr(t,n,Pa(n))},We.deburr=Ga,We.defaultTo=function(t,n){return null==t||t!=t?n:t},We.divide=Oc,We.endsWith=function(t,n,e){t=wa(t),n=so(n);var r=t.length,o=e=e===i?r:lr(ya(e),0,r);return(e-=n.length)>=0&&t.slice(e,o)==n},We.eq=Xu,We.escape=function(t){return(t=wa(t))&&J.test(t)?t.replace(K,ue):t},We.escapeRegExp=function(t){return(t=wa(t))&&ut.test(t)?t.replace(it,"\\$&"):t},We.every=function(t,n,e){var r=Vu(t)?Rn:gr;return e&&Oi(t,n,e)&&(n=i),r(t,si(n,3))},We.find=bu,We.findIndex=Gi,We.findKey=function(t,n){return Un(t,si(n,3),Or)},We.findLast=_u,We.findLastIndex=Vi,We.findLastKey=function(t,n){return Un(t,si(n,3),Er)},We.floor=Ec,We.forEach=wu,We.forEachRight=Ou,We.forIn=function(t,n){return null==t?t:_r(t,si(n,3),Na)},We.forInRight=function(t,n){return null==t?t:wr(t,si(n,3),Na)},We.forOwn=function(t,n){return t&&Or(t,si(n,3))},We.forOwnRight=function(t,n){return t&&Er(t,si(n,3))},We.get=Da,We.gt=Yu,We.gte=$u,We.has=function(t,n){return null!=t&&mi(t,n,Dr)},We.hasIn=Ia,We.head=qi,We.identity=uc,We.includes=function(t,n,e,r){t=qu(t)?t:Xa(t),e=e&&!r?ya(e):0;var o=t.length;return e<0&&(e=_e(o+e,0)),fa(t)?e<=o&&t.indexOf(n,e)>-1:!!o&&Xn(t,n,e)>-1},We.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=null==e?0:ya(e);return o<0&&(o=_e(r+o,0)),Xn(t,n,o)},We.inRange=function(t,n,e){return n=ga(n),e===i?(e=n,n=0):e=ga(e),function(t,n,e){return t>=we(n,e)&&t<_e(n,e)}(t=ba(t),n,e)},We.invoke=Ca,We.isArguments=Gu,We.isArray=Vu,We.isArrayBuffer=Hu,We.isArrayLike=qu,We.isArrayLikeObject=Ku,We.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Tr(t)==w},We.isBuffer=Zu,We.isDate=Ju,We.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},We.isEmpty=function(t){if(null==t)return!0;if(qu(t)&&(Vu(t)||"string"==typeof t||"function"==typeof t.splice||Zu(t)||ha(t)||Gu(t)))return!t.length;var n=yi(t);if(n==x||n==R)return!t.size;if(xi(t))return!Fr(t).length;for(var e in t)if(Lt.call(t,e))return!1;return!0},We.isEqual=function(t,n){return Pr(t,n)},We.isEqualWith=function(t,n,e){var r=(e="function"==typeof e?e:i)?e(t,n):i;return r===i?Pr(t,n,i,e):!!r},We.isError=Qu,We.isFinite=function(t){return"number"==typeof t&&zn(t)},We.isFunction=ta,We.isInteger=na,We.isLength=ea,We.isMap=ia,We.isMatch=function(t,n){return t===n||Nr(t,n,pi(n))},We.isMatchWith=function(t,n,e){return e="function"==typeof e?e:i,Nr(t,n,pi(n),e)},We.isNaN=function(t){return ua(t)&&t!=+t},We.isNative=function(t){if(ji(t))throw new ct("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},We.isNil=function(t){return null==t},We.isNull=function(t){return null===t},We.isNumber=ua,We.isObject=ra,We.isObjectLike=oa,We.isPlainObject=aa,We.isRegExp=ca,We.isSafeInteger=function(t){return na(t)&&t>=-9007199254740991&&t<=d},We.isSet=la,We.isString=fa,We.isSymbol=sa,We.isTypedArray=ha,We.isUndefined=function(t){return t===i},We.isWeakMap=function(t){return oa(t)&&yi(t)==P},We.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Tr(t)},We.join=function(t,n){return null==t?"":Hn.call(t,n)},We.kebabCase=Va,We.last=Qi,We.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var o=r;return e!==i&&(o=(o=ya(e))<0?_e(r+o,0):we(o,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,o):Wn(t,$n,o,!0)},We.lowerCase=Ha,We.lowerFirst=qa,We.lt=pa,We.lte=va,We.max=function(t){return t&&t.length?yr(t,uc,Ar):i},We.maxBy=function(t,n){return t&&t.length?yr(t,si(n,2),Ar):i},We.mean=function(t){return Gn(t,uc)},We.meanBy=function(t,n){return Gn(t,si(n,2))},We.min=function(t){return t&&t.length?yr(t,uc,zr):i},We.minBy=function(t,n){return t&&t.length?yr(t,si(n,2),zr):i},We.stubArray=mc,We.stubFalse=bc,We.stubObject=function(){return{}},We.stubString=function(){return""},We.stubTrue=function(){return!0},We.multiply=jc,We.nth=function(t,n){return t&&t.length?$r(t,ya(n)):i},We.noConflict=function(){return dn._===this&&(dn._=Ut),this},We.noop=sc,We.now=Du,We.pad=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;if(!n||r>=n)return t;var o=(n-r)/2;return Vo(yn(o),e)+t+Vo(gn(o),e)},We.padEnd=function(t,n,e){t=wa(t);var r=(n=ya(n))?ve(t):0;return n&&rn){var r=t;t=n,n=r}if(e||t%1||n%1){var o=Se();return we(t+o*(n-t+sn("1e-"+((o+"").length-1))),n)}return Kr(t,n)},We.reduce=function(t,n,e){var r=Vu(t)?Mn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,vr)},We.reduceRight=function(t,n,e){var r=Vu(t)?Fn:qn,o=arguments.length<3;return r(t,si(n,4),e,o,dr)},We.repeat=function(t,n,e){return n=(e?Oi(t,n,e):n===i)?1:ya(n),Zr(wa(t),n)},We.replace=function(){var t=arguments,n=wa(t[0]);return t.length<3?n:n.replace(t[1],t[2])},We.result=function(t,n,e){var r=-1,o=(n=Oo(n,t)).length;for(o||(o=1,t=i);++rd)return[];var e=y,r=we(t,y);n=si(n),t-=y;for(var o=Zn(r,n);++e=u)return t;var c=e-ve(r);if(c<1)return r;var l=a?So(a,0,c).join(""):t.slice(0,c);if(o===i)return l+r;if(a&&(c+=l.length-c),ca(o)){if(t.slice(c).search(o)){var f,s=l;for(o.global||(o=At(o.source,wa(gt.exec(o))+"g")),o.lastIndex=0;f=o.exec(s);)var h=f.index;l=l.slice(0,h===i?c:h)}}else if(t.indexOf(so(o),c)!=c){var p=l.lastIndexOf(o);p>-1&&(l=l.slice(0,p))}return l+r},We.unescape=function(t){return(t=wa(t))&&Z.test(t)?t.replace(q,ye):t},We.uniqueId=function(t){var n=++Mt;return wa(t)+n},We.upperCase=Ja,We.upperFirst=Qa,We.each=wu,We.eachRight=Ou,We.first=qi,fc(We,(Sc={},Or(We,(function(t,n){Lt.call(We.prototype,n)||(Sc[n]=t)})),Sc),{chain:!1}),We.VERSION="4.17.21",Dn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){We[t].placeholder=We})),Dn(["drop","take"],(function(t,n){Ge.prototype[t]=function(e){e=e===i?1:_e(ya(e),0);var r=this.__filtered__&&!n?new Ge(this):this.clone();return r.__filtered__?r.__takeCount__=we(e,r.__takeCount__):r.__views__.push({size:we(e,y),type:t+(r.__dir__<0?"Right":"")}),r},Ge.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),Dn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Ge.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:si(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),Dn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Ge.prototype[t]=function(){return this[e](1).value()[0]}})),Dn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Ge.prototype[t]=function(){return this.__filtered__?new Ge(this):this[e](1)}})),Ge.prototype.compact=function(){return this.filter(uc)},Ge.prototype.find=function(t){return this.filter(t).head()},Ge.prototype.findLast=function(t){return this.reverse().find(t)},Ge.prototype.invokeMap=Jr((function(t,n){return"function"==typeof t?new Ge(this):this.map((function(e){return kr(e,t,n)}))})),Ge.prototype.reject=function(t){return this.filter(Fu(si(t)))},Ge.prototype.slice=function(t,n){t=ya(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Ge(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==i&&(e=(n=ya(n))<0?e.dropRight(-n):e.take(n-t)),e)},Ge.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ge.prototype.toArray=function(){return this.take(y)},Or(Ge.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),o=We[r?"take"+("last"==n?"Right":""):n],u=r||/^find/.test(n);o&&(We.prototype[n]=function(){var n=this.__wrapped__,a=r?[1]:arguments,c=n instanceof Ge,l=a[0],f=c||Vu(n),s=function(t){var n=o.apply(We,Ln([t],a));return r&&h?n[0]:n};f&&e&&"function"==typeof l&&1!=l.length&&(c=f=!1);var h=this.__chain__,p=!!this.__actions__.length,v=u&&!h,d=c&&!p;if(!u&&f){n=d?n:new Ge(this);var g=t.apply(n,a);return g.__actions__.push({func:gu,args:[s],thisArg:i}),new $e(g,h)}return v&&d?t.apply(this,a):(g=this.thru(s),v?r?g.value()[0]:g.value():g)})})),Dn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Rt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);We.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return n.apply(Vu(o)?o:[],t)}return this[e]((function(e){return n.apply(Vu(e)?e:[],t)}))}})),Or(Ge.prototype,(function(t,n){var e=We[n];if(e){var r=e.name+"";Lt.call(Ce,r)||(Ce[r]=[]),Ce[r].push({name:n,func:e})}})),Ce[Xo(i,2).name]=[{name:"wrapper",func:i}],Ge.prototype.clone=function(){var t=new Ge(this.__wrapped__);return t.__actions__=ko(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ko(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ko(this.__views__),t},Ge.prototype.reverse=function(){if(this.__filtered__){var t=new Ge(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ge.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Vu(t),r=n<0,o=e?t.length:0,i=function(t,n,e){var r=-1,o=e.length;for(;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},We.prototype.plant=function(t){for(var n,e=this;e instanceof Ye;){var r=Wi(e);r.__index__=0,r.__values__=i,n?o.__wrapped__=r:n=r;var o=r;e=e.__wrapped__}return o.__wrapped__=t,n},We.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Ge){var n=t;return this.__actions__.length&&(n=new Ge(this)),(n=n.reverse()).__actions__.push({func:gu,args:[ru],thisArg:i}),new $e(n,this.__chain__)}return this.thru(ru)},We.prototype.toJSON=We.prototype.valueOf=We.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},We.prototype.first=We.prototype.head,Jt&&(We.prototype[Jt]=function(){return this}),We}();dn._=me,(o=function(){return me}.call(n,e,n,r))===i||(r.exports=o)}).call(this)}).call(this,e(62),e(63)(t))},,,,function(t,n,e){"use strict";function r(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0;--i){var u=this.tryEntries[i],a=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=r.call(u,"catchLoc"),l=r.call(u,"finallyLoc");if(c&&l){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),d}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;T(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:D(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},,,,function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===r(i)&&(o=o[1]),t.call(e,o,i,n)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(n.prototype,e),u&&o(n,u),t}();t.exports=u},,,,,function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=e(34),u=(r=i)&&r.__esModule?r:{default:r};var a={obj:function(t){return"object"===(void 0===t?"undefined":o(t))&&!!t},all:function(t){return a.obj(t)&&t.type===u.default.all},error:function(t){return a.obj(t)&&t.type===u.default.error},array:Array.isArray,func:function(t){return"function"==typeof t},promise:function(t){return t&&a.func(t.then)},iterator:function(t){return t&&a.func(t.next)&&a.func(t.throw)},fork:function(t){return a.obj(t)&&t.type===u.default.fork},join:function(t){return a.obj(t)&&t.type===u.default.join},race:function(t){return a.obj(t)&&t.type===u.default.race},call:function(t){return a.obj(t)&&t.type===u.default.call},cps:function(t){return a.obj(t)&&t.type===u.default.cps},subscribe:function(t){return a.obj(t)&&t.type===u.default.subscribe},channel:function(t){return a.obj(t)&&a.func(t.subscribe)}};n.default=a},function(t,n){t.exports=function(t){var n,e=Object.keys(t);return n=function(){var t,n,r;for(t="return {",n=0;n1?n-1:0),r=1;r1?n-1:0),r=1;r2?e-2:0),o=2;o1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,e=Object(l.map)(t,(function(t,n){return function(e,r,o,i,u){if(!I(e,n))return!1;var a=t(e);return A()(a)?a.then(i,u):i(a),!0}})),r=function(t,e){return!!D(t)&&(n(t),e(),!0)};e.push(r);var o=Object(x.create)(e);return function(t){return new Promise((function(e,r){return o(t,(function(t){D(t)&&n(t),e(t)}),r)}))}}function k(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var e=R(t,n.dispatch);return function(t){return function(n){return j(n)?e(n):t(n)}}}}var C,P=e(12);function N(t){return t.isRegistryControl=!0,t}var L="@@data/SELECT",M="@@data/RESOLVE_SELECT",F="@@data/DISPATCH";var B=(C={},Object(c.a)(C,L,N((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args;return(e=t.select(r))[o].apply(e,Object(P.a)(i))}}))),Object(c.a)(C,M,N((function(t){return function(n){var e,r=n.storeKey,o=n.selectorName,i=n.args,u=t.select(r)[o].hasResolver?"resolveSelect":"select";return(e=t[u](r))[o].apply(e,Object(P.a)(i))}}))),Object(c.a)(C,F,N((function(t){return function(n){var e,r=n.storeKey,o=n.actionName,i=n.args;return(e=t.dispatch(r))[o].apply(e,Object(P.a)(i))}}))),C),z=function(){return function(t){return function(n){return A()(n)?n.then((function(n){if(n)return t(n)})):t(n)}}},U=function(t,n){return function(){return function(e){return function(r){var o=t.select("core/data").getCachedResolvers(n);return Object.entries(o).forEach((function(e){var o=Object(a.a)(e,2),i=o[0],u=o[1],c=Object(l.get)(t.stores,[n,"resolvers",i]);c&&c.shouldInvalidate&&u.forEach((function(e,o){!1===e&&c.shouldInvalidate.apply(c,[r].concat(Object(P.a)(o)))&&t.dispatch("core/data").invalidateResolution(n,i,o)}))})),e(r)}}}};function W(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function X(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=e[Y];if(void 0===r)return n;var o=t(n[r],e);return o===n[r]?n:X(X({},n),{},Object(c.a)({},r,o))}})((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new S.a,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"START_RESOLUTION":case"FINISH_RESOLUTION":var e="START_RESOLUTION"===n.type,r=new S.a(t);return r.set(n.args,e),r;case"INVALIDATE_RESOLUTION":var o=new S.a(t);return o.delete(n.args),o}return t})),G=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INVALIDATE_RESOLUTION_FOR_STORE":return{};case"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR":return Object(l.has)(t,[n.selectorName])?Object(l.omit)(t,[n.selectorName]):t;case"START_RESOLUTION":case"FINISH_RESOLUTION":case"INVALIDATE_RESOLUTION":return $(t,n)}return t};function V(t,n,e){var r=Object(l.get)(t,[n]);if(r)return r.get(e)}function H(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return void 0!==V(t,n,e)}function q(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!1===V(t,n,e)}function K(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!0===V(t,n,e)}function Z(t){return t}function J(t,n){return{type:"START_RESOLUTION",selectorName:t,args:n}}function Q(t,n){return{type:"FINISH_RESOLUTION",selectorName:t,args:n}}function tt(t,n){return{type:"INVALIDATE_RESOLUTION",selectorName:t,args:n}}function nt(){return{type:"INVALIDATE_RESOLUTION_FOR_STORE"}}function et(t){return{type:"INVALIDATE_RESOLUTION_FOR_STORE_SELECTOR",selectorName:t}}function rt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function ot(t){for(var n=1;n1?e-1:0),o=1;o1?e-1:0),o=1;o3?i-3:0),a=3;a1?o-1:0),u=1;u1?o-1:0),u=1;u0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,e={},r=[],o=new Set;function i(){r.forEach((function(t){return t()}))}var u=function(t){return r.push(t),function(){r=Object(l.without)(r,t)}};function c(t){var r=Object(l.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getSelectors():n&&n.select(r)}function f(t,n){o.clear();var e=t.call(this);return n.current=Array.from(o),e}function s(t){var r=Object(l.isObject)(t)?t.name:t;o.add(r);var i=e[r];return i?i.getResolveSelectors():n&&n.resolveSelect(r)}function h(t){var r=Object(l.isObject)(t)?t.name:t,o=e[r];return o?o.getActions():n&&n.dispatch(r)}function p(t){return Object(l.mapValues)(t,(function(t,n){return"function"!=typeof t?t:function(){return y[n].apply(null,arguments)}}))}function v(t,n){if("function"!=typeof n.getSelectors)throw new TypeError("config.getSelectors must be a function");if("function"!=typeof n.getActions)throw new TypeError("config.getActions must be a function");if("function"!=typeof n.subscribe)throw new TypeError("config.subscribe must be a function");e[t]=n,n.subscribe(i)}function d(t){v(t.name,t.instantiate(y))}function g(t,r){return t in e?e[t].subscribe(r):n?n.__experimentalSubscribeStore(t,r):u(r)}var y={registerGenericStore:v,stores:e,namespaces:e,subscribe:u,select:c,resolveSelect:s,dispatch:h,use:m,register:d,__experimentalMarkListeningStores:f,__experimentalSubscribeStore:g};function m(t,n){return y=ht(ht({},y),t(y,n))}return y.registerStore=function(t,n){if(!n.reducer)throw new TypeError("Must specify store reducer");var e=it(t,n).instantiate(y);return v(t,e),e.store},v("core/data",ft(y)),Object.entries(t).forEach((function(t){var n=Object(a.a)(t,2),e=n[0],r=n[1];return y.registerStore(e,r)})),n&&n.subscribe(i),p(y)}(),vt=pt.select,dt=(pt.resolveSelect,pt.dispatch,pt.subscribe);pt.registerGenericStore,pt.registerStore,pt.use,pt.register;function gt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function yt(t){for(var n=1;n=0||(o[e]=t[e]);return o}(t,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}function Ot(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Et=Ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),St=Ot(/Edge/i),jt=Ot(/firefox/i),xt=Ot(/safari/i)&&!Ot(/chrome/i)&&!Ot(/android/i),Tt=Ot(/iP(ad|od|hone)/i),At=Ot(/chrome/i)&&Ot(/android/i),Dt={capture:!1,passive:!1};function It(t,n,e){t.addEventListener(n,e,!Et&&Dt)}function Rt(t,n,e){t.removeEventListener(n,e,!Et&&Dt)}function kt(t,n){if(n){if(">"===n[0]&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(t){return!1}return!1}}function Ct(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Pt(t,n,e,r){if(t){e=e||document;do{if(null!=n&&(">"===n[0]?t.parentNode===e&&kt(t,n):kt(t,n))||r&&t===e)return t;if(t===e)break}while(t=Ct(t))}return null}var Nt,Lt=/\s+/g;function Mt(t,n,e){if(t&&n)if(t.classList)t.classList[e?"add":"remove"](n);else{var r=(" "+t.className+" ").replace(Lt," ").replace(" "+n+" "," ");t.className=(r+(e?" "+n:"")).replace(Lt," ")}}function Ft(t,n,e){var r=t&&t.style;if(r){if(void 0===e)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(e=t.currentStyle),void 0===n?e:e[n];n in r||-1!==n.indexOf("webkit")||(n="-webkit-"+n),r[n]=e+("string"==typeof e?"":"px")}}function Bt(t,n){var e="";if("string"==typeof t)e=t;else do{var r=Ft(t,"transform");r&&"none"!==r&&(e=r+" "+e)}while(!n&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function zt(t,n,e){if(t){var r=t.getElementsByTagName(n),o=0,i=r.length;if(e)for(;o=i:o<=i))return r;if(r===Ut())break;r=Ht(r,!1)}return!1}function Yt(t,n,e,r){for(var o=0,i=0,u=t.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=e.evt,o=wt(e,un);rn.pluginEvent.bind(Qn)(t,n,yt({dragEl:ln,parentEl:fn,ghostEl:sn,rootEl:hn,nextEl:pn,lastDownEl:vn,cloneEl:dn,cloneHidden:gn,dragStarted:Dn,putSortable:On,activeSortable:Qn.active,originalEvent:r,oldIndex:yn,oldDraggableIndex:bn,newIndex:mn,newDraggableIndex:_n,hideGhostForTarget:qn,unhideGhostForTarget:Kn,cloneNowHidden:function(){gn=!0},cloneNowShown:function(){gn=!1},dispatchSortableEvent:function(t){cn({sortable:n,name:t,originalEvent:r})}},o))};function cn(t){on(yt({putSortable:On,cloneEl:dn,targetEl:ln,rootEl:hn,oldIndex:yn,oldDraggableIndex:bn,newIndex:mn,newDraggableIndex:_n},t))}var ln,fn,sn,hn,pn,vn,dn,gn,yn,mn,bn,_n,wn,On,En,Sn,jn,xn,Tn,An,Dn,In,Rn,kn,Cn,Pn=!1,Nn=!1,Ln=[],Mn=!1,Fn=!1,Bn=[],zn=!1,Un=[],Wn="undefined"!=typeof document,Xn=Tt,Yn=St||Et?"cssFloat":"float",$n=Wn&&!At&&!Tt&&"draggable"in document.createElement("div"),Gn=function(){if(Wn){if(Et)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Vn=function(t,n){var e=Ft(t),r=parseInt(e.width)-parseInt(e.paddingLeft)-parseInt(e.paddingRight)-parseInt(e.borderLeftWidth)-parseInt(e.borderRightWidth),o=Yt(t,0,n),i=Yt(t,1,n),u=o&&Ft(o),a=i&&Ft(i),c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Wt(o).width,l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Wt(i).width;if("flex"===e.display)return"column"===e.flexDirection||"column-reverse"===e.flexDirection?"vertical":"horizontal";if("grid"===e.display)return e.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&u.float&&"none"!==u.float){var f="left"===u.float?"left":"right";return!i||"both"!==a.clear&&a.clear!==f?"horizontal":"vertical"}return o&&("block"===u.display||"flex"===u.display||"table"===u.display||"grid"===u.display||c>=r&&"none"===e[Yn]||i&&"none"===e[Yn]&&c+l>r)?"vertical":"horizontal"},Hn=function(t){function n(t,e){return function(r,o,i,u){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(e||a))return!0;if(null==t||!1===t)return!1;if(e&&"clone"===t)return t;if("function"==typeof t)return n(t(r,o,i,u),e)(r,o,i,u);var c=(e?r:o).options.group.name;return!0===t||"string"==typeof t&&t===c||t.join&&t.indexOf(c)>-1}}var e={},r=t.group;r&&"object"==mt(r)||(r={name:r}),e.name=r.name,e.checkPull=n(r.pull,!0),e.checkPut=n(r.put),e.revertClone=r.revertClone,t.group=e},qn=function(){!Gn&&sn&&Ft(sn,"display","none")},Kn=function(){!Gn&&sn&&Ft(sn,"display","")};Wn&&document.addEventListener("click",(function(t){if(Nn)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Nn=!1,!1}),!0);var Zn=function(t){if(ln){t=t.touches?t.touches[0]:t;var n=(o=t.clientX,i=t.clientY,Ln.some((function(t){var n=t[Qt].options.emptyInsertThreshold;if(n&&!$t(t)){var e=Wt(t),r=o>=e.left-n&&o<=e.right+n,a=i>=e.top-n&&i<=e.bottom+n;return r&&a?u=t:void 0}})),u);if(n){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.target=e.rootEl=n,e.preventDefault=void 0,e.stopPropagation=void 0,n[Qt]._onDragOver(e)}}var o,i,u},Jn=function(t){ln&&ln.parentNode[Qt]._isOutsideThisEl(t.target)};function Qn(t,n){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=n=_t({},n),t[Qt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Vn(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,n){t.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Qn.supportPointer&&"PointerEvent"in window&&!xt,emptyInsertThreshold:5};for(var r in rn.initializePlugins(this,t,e),e)!(r in n)&&(n[r]=e[r]);for(var o in Hn(n),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!n.forceFallback&&$n,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?It(t,"pointerdown",this._onTapStart):(It(t,"mousedown",this._onTapStart),It(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(It(t,"dragover",this),It(t,"dragenter",this)),Ln.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),_t(this,tn())}function te(t,n,e,r,o,i,u,a){var c,l,f=t[Qt],s=f.options.onMove;return!window.CustomEvent||Et||St?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=n,c.from=t,c.dragged=e,c.draggedRect=r,c.related=o||n,c.relatedRect=i||Wt(n),c.willInsertAfter=a,c.originalEvent=u,t.dispatchEvent(c),s&&(l=s.call(f,c,u)),l}function ne(t){t.draggable=!1}function ee(){zn=!1}function re(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,e=n.length,r=0;e--;)r+=n.charCodeAt(e);return r.toString(36)}function oe(t){return setTimeout(t,0)}function ie(t){return clearTimeout(t)}Qn.prototype={constructor:Qn,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(In=null)},_getDirection:function(t,n){return"function"==typeof this.options.direction?this.options.direction.call(this,t,n,ln):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,e=this.el,r=this.options,o=r.preventOnFilter,i=t.type,u=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(u||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,l=r.filter;if(function(t){Un.length=0;var n=t.getElementsByTagName("input"),e=n.length;for(;e--;){var r=n[e];r.checked&&Un.push(r)}}(e),!ln&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!xt||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=Pt(a,r.draggable,e,!1))&&a.animated||vn===a)){if(yn=Gt(a),bn=Gt(a,r.draggable),"function"==typeof l){if(l.call(this,t,a,this))return cn({sortable:n,rootEl:c,name:"filter",targetEl:a,toEl:e,fromEl:e}),an("filter",n,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(l&&(l=l.split(",").some((function(r){if(r=Pt(c,r.trim(),e,!1))return cn({sortable:n,rootEl:r,name:"filter",targetEl:a,fromEl:e,toEl:e}),an("filter",n,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!Pt(c,r.handle,e,!1)||this._prepareDragStart(t,u,a)}}},_prepareDragStart:function(t,n,e){var r,o=this,i=o.el,u=o.options,a=i.ownerDocument;if(e&&!ln&&e.parentNode===i){var c=Wt(e);if(hn=i,fn=(ln=e).parentNode,pn=ln.nextSibling,vn=e,wn=u.group,Qn.dragged=ln,En={target:ln,clientX:(n||t).clientX,clientY:(n||t).clientY},Tn=En.clientX-c.left,An=En.clientY-c.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,ln.style["will-change"]="all",r=function(){an("delayEnded",o,{evt:t}),Qn.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!jt&&o.nativeDraggable&&(ln.draggable=!0),o._triggerDragStart(t,n),cn({sortable:o,name:"choose",originalEvent:t}),Mt(ln,u.chosenClass,!0))},u.ignore.split(",").forEach((function(t){zt(ln,t.trim(),ne)})),It(a,"dragover",Zn),It(a,"mousemove",Zn),It(a,"touchmove",Zn),It(a,"mouseup",o._onDrop),It(a,"touchend",o._onDrop),It(a,"touchcancel",o._onDrop),jt&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ln.draggable=!0),an("delayStart",this,{evt:t}),!u.delay||u.delayOnTouchOnly&&!n||this.nativeDraggable&&(St||Et))r();else{if(Qn.eventCanceled)return void this._onDrop();It(a,"mouseup",o._disableDelayedDrag),It(a,"touchend",o._disableDelayedDrag),It(a,"touchcancel",o._disableDelayedDrag),It(a,"mousemove",o._delayedDragTouchMoveHandler),It(a,"touchmove",o._delayedDragTouchMoveHandler),u.supportPointer&&It(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,u.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ln&&ne(ln),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Rt(t,"mouseup",this._disableDelayedDrag),Rt(t,"touchend",this._disableDelayedDrag),Rt(t,"touchcancel",this._disableDelayedDrag),Rt(t,"mousemove",this._delayedDragTouchMoveHandler),Rt(t,"touchmove",this._delayedDragTouchMoveHandler),Rt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||"touch"==t.pointerType&&t,!this.nativeDraggable||n?this.options.supportPointer?It(document,"pointermove",this._onTouchMove):It(document,n?"touchmove":"mousemove",this._onTouchMove):(It(ln,"dragend",this),It(hn,"dragstart",this._onDragStart));try{document.selection?oe((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,n){if(Pn=!1,hn&&ln){an("dragStarted",this,{evt:n}),this.nativeDraggable&&It(document,"dragover",Jn);var e=this.options;!t&&Mt(ln,e.dragClass,!1),Mt(ln,e.ghostClass,!0),Qn.active=this,t&&this._appendGhost(),cn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Sn){this._lastX=Sn.clientX,this._lastY=Sn.clientY,qn();for(var t=document.elementFromPoint(Sn.clientX,Sn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Sn.clientX,Sn.clientY))!==n;)n=t;if(ln.parentNode[Qt]._isOutsideThisEl(t),n)do{if(n[Qt]){if(n[Qt]._onDragOver({clientX:Sn.clientX,clientY:Sn.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Kn()}},_onTouchMove:function(t){if(En){var n=this.options,e=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,i=sn&&Bt(sn,!0),u=sn&&i&&i.a,a=sn&&i&&i.d,c=Xn&&Cn&&Vt(Cn),l=(o.clientX-En.clientX+r.x)/(u||1)+(c?c[0]-Bn[0]:0)/(u||1),f=(o.clientY-En.clientY+r.y)/(a||1)+(c?c[1]-Bn[1]:0)/(a||1);if(!Qn.active&&!Pn){if(e&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!d.animated){if(d===ln)return R(!1);if(d&&i===t.target&&(u=d),u&&(e=Wt(u)),!1!==te(hn,i,ln,n,u,e,t,!!u))return I(),i.appendChild(ln),fn=i,k(),R(!0)}else if(d&&function(t,n,e){var r=Wt(Yt(e.el,0,e.options,!0)),o=10;return n?t.clientXf+l*i/2:cs-kn)return-Rn}else if(c>f+l*(1-o)/2&&cs-l*i/2))return c>f+l/2?1:-1;return 0}(t,u,e,o,w?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Fn,In===u))){var j=Gt(ln);do{j-=y,b=fn.children[j]}while(b&&("none"===Ft(b,"display")||b===sn))}if(0===y||b===u)return R(!1);In=u,Rn=y;var x=u.nextElementSibling,T=!1,A=te(hn,i,ln,n,u,e,t,T=1===y);if(!1!==A)return 1!==A&&-1!==A||(T=1===A),zn=!0,setTimeout(ee,30),I(),T&&!x?i.appendChild(ln):u.parentNode.insertBefore(ln,T?x:u),E&&Zt(E,0,S-E.scrollTop),fn=ln.parentNode,void 0===m||Fn||(kn=Math.abs(m-Wt(u)[O])),k(),R(!0)}if(i.contains(ln))return R(!1)}return!1}function D(a,c){an(a,p,yt({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:r,dragRect:n,targetRect:e,canSort:s,fromSortable:h,target:u,completed:R,onMove:function(e,r){return te(hn,i,ln,n,e,Wt(e),t,r)},changed:k},c))}function I(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==h&&h.captureAnimationState()}function R(n){return D("dragOverCompleted",{insertion:n}),n&&(f?l._hideClone():l._showClone(p),p!==h&&(Mt(ln,On?On.options.ghostClass:l.options.ghostClass,!1),Mt(ln,a.ghostClass,!0)),On!==p&&p!==Qn.active?On=p:p===Qn.active&&On&&(On=null),h===p&&(p._ignoreWhileAnimating=u),p.animateAll((function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(u===ln&&!ln.animated||u===i&&!u.animated)&&(In=null),a.dragoverBubble||t.rootEl||u===document||(ln.parentNode[Qt]._isOutsideThisEl(t.target),!n&&Zn(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function k(){mn=Gt(ln),_n=Gt(ln,a.draggable),cn({sortable:p,name:"change",toEl:i,newIndex:mn,newDraggableIndex:_n,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Rt(document,"mousemove",this._onTouchMove),Rt(document,"touchmove",this._onTouchMove),Rt(document,"pointermove",this._onTouchMove),Rt(document,"dragover",Zn),Rt(document,"mousemove",Zn),Rt(document,"touchmove",Zn)},_offUpEvents:function(){var t=this.el.ownerDocument;Rt(t,"mouseup",this._onDrop),Rt(t,"touchend",this._onDrop),Rt(t,"pointerup",this._onDrop),Rt(t,"touchcancel",this._onDrop),Rt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,e=this.options;mn=Gt(ln),_n=Gt(ln,e.draggable),an("drop",this,{evt:t}),fn=ln&&ln.parentNode,mn=Gt(ln),_n=Gt(ln,e.draggable),Qn.eventCanceled||(Pn=!1,Fn=!1,Mn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ie(this.cloneId),ie(this._dragStartId),this.nativeDraggable&&(Rt(document,"drop",this),Rt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),xt&&Ft(document.body,"user-select",""),Ft(ln,"transform",""),t&&(Dn&&(t.cancelable&&t.preventDefault(),!e.dropBubble&&t.stopPropagation()),sn&&sn.parentNode&&sn.parentNode.removeChild(sn),(hn===fn||On&&"clone"!==On.lastPutMode)&&dn&&dn.parentNode&&dn.parentNode.removeChild(dn),ln&&(this.nativeDraggable&&Rt(ln,"dragend",this),ne(ln),ln.style["will-change"]="",Dn&&!Pn&&Mt(ln,On?On.options.ghostClass:this.options.ghostClass,!1),Mt(ln,this.options.chosenClass,!1),cn({sortable:this,name:"unchoose",toEl:fn,newIndex:null,newDraggableIndex:null,originalEvent:t}),hn!==fn?(mn>=0&&(cn({rootEl:fn,name:"add",toEl:fn,fromEl:hn,originalEvent:t}),cn({sortable:this,name:"remove",toEl:fn,originalEvent:t}),cn({rootEl:fn,name:"sort",toEl:fn,fromEl:hn,originalEvent:t}),cn({sortable:this,name:"sort",toEl:fn,originalEvent:t})),On&&On.save()):mn!==yn&&mn>=0&&(cn({sortable:this,name:"update",toEl:fn,originalEvent:t}),cn({sortable:this,name:"sort",toEl:fn,originalEvent:t})),Qn.active&&(null!=mn&&-1!==mn||(mn=yn,_n=bn),cn({sortable:this,name:"end",toEl:fn,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){an("nulling",this),hn=ln=fn=sn=pn=dn=vn=gn=En=Sn=Dn=mn=_n=yn=bn=In=Rn=On=wn=Qn.dragged=Qn.ghost=Qn.clone=Qn.active=null,Un.forEach((function(t){t.checked=!0})),Un.length=jn=xn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ln&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],e=this.el.children,r=0,o=e.length,i=this.options;r{this._init_listeners()}),this.initTimeout),new _e(this.wrapper,{handle:".dashicons-menu",animation:150})},_init_listeners(){this.getTaxonomies().forEach((t=>{t.rest_base&&t.visibility.public&&this.addTaxonomyListener(t)}))},getTaxonomies:()=>vt("core").getTaxonomies(),addTaxonomyListener(t){dt((()=>{const n=t.slug,e=t.hierarchical,{isResolving:r}=vt("core/data"),o=["taxonomy",n,this.query];this.available[n]=null,e&&(this.available[n]=vt("core").getEntityRecords("taxonomy",n,this.query)),r("core","getEntityRecords",o)||this.event(t)}))},getSelection:t=>vt("core/editor").getEditedPostAttribute(t.rest_base),getTerm:(t,n)=>vt("core").getEntityRecord("taxonomy",t.slug,n),event(t){const n=this.getSelection(t);if(!n)return;const e=[...n],r=Array.from(this.wrapper.querySelectorAll(`[data-item*="${t.slug}"]`));[...e].forEach((n=>{const e=this.wrapper.querySelector(`[data-item="${t.slug}:${n}"]`);r.splice(r.indexOf(e),1),null===e&&this.createItem(this.getItem(t,n))})),r.forEach((t=>{t.parentNode.removeChild(t)}))},createItem(t){if(!t||!t.id)return;const n=document.createElement("li"),e=document.createElement("span"),r=document.createElement("input"),o=document.createTextNode(t.name);n.classList.add("cld-tax-order-list-item"),n.dataset.item=`${t.taxonomy}:${t.id}`,r.classList.add("cld-tax-order-list-item-input"),r.type="hidden",r.name="cld_tax_order[]",r.value=`${t.taxonomy}:${t.id}`,e.className="dashicons dashicons-menu cld-tax-order-list-item-handle",n.appendChild(e),n.appendChild(r),n.appendChild(o),this.wrapper.appendChild(n)},getItem(t,n){let e={id:n,name:n,taxonomy:t.slug};if(null===this.available[t.slug])e=this.getTerm(t,n);else for(const r of this.available[t.slug])if(r.id===n){e=r,e.taxonomy=t.slug;break}return e}},initTimeout:10,interval:100,selection:{},tagDelimiter:wp.i18n._x(",","tag delimiter")||",",getTaxonomies:()=>cldData.taxonomies,addTaxonomyListener(t){console.log("start");const n=document.getElementById(`taxonomy-${t.slug}`),e=document.getElementById(`tax-input-${t.slug}`);this.selection[t.slug]={items:0,selected:0},setInterval((()=>{n&&this.watchCatBox(n,t),e&&this.watchTagBox(e,t)}),this.interval)},watchCatBox(t,n){const e=t.querySelectorAll('input[type="checkbox"]'),r=Array.from(e).filter((t=>!0===t.checked));this.selection[n.slug].items===e.length&&this.selection[n.slug].selected===r.length||(e.forEach((t=>{const e=this.wrapper.querySelector(`[data-item="${n.slug}:${t.value}"]`);if(t.checked&&!e){const e={id:t.value,name:t.parentNode.innerText.trim(),taxonomy:n.slug};this.createItem(e)}else!t.checked&&e&&e.parentNode.removeChild(e)})),this.selection[n.slug].items=e.length,this.selection[n.slug].selected=r.length)},watchTagBox(t,n){const e=window.tagBox.clean(t.value);if(this.selection[n.slug].items!==e){const t=e.split(this.tagDelimiter);this.wrapper.querySelectorAll(`[data-item^=${n.slug}\\:]`).forEach((n=>{const e=n.dataset.item.split(":")[1],r=t.indexOf(e);-1===r?n.parentNode.removeChild(n):t.splice(r,1)})),t.length&&t.forEach((t=>{const e={id:t,name:t,taxonomy:n.slug};this.createItem(e)})),this.selection[n.slug].items=e}}};void 0!==window.CLDN&&we._init();n.default=we}]); \ No newline at end of file diff --git a/js/cloudinary.js b/js/cloudinary.js index ba8183d2f..48541cabb 100644 --- a/js/cloudinary.js +++ b/js/cloudinary.js @@ -1 +1 @@ -!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(4),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(5);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(4),s=i.n(o);i(2),s()(console.error);var a=i(5);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(p(i)&&d(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(p(n)&&(i||d(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var m=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,S)),E=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);function M(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function A(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(q(t),e),i=i.substr(0,n)),i+"?"+U(e)}function Y(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function K(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},Q=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},tt=function(){var t,e=(t=z.a.mark((function t(e,i){var n,o,s,a,l,c;return z.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(Q(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,xt(K(K({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,K(K({},r(h,["path","url"])),{},{url:p&&X(p,u),path:d&&X(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,J(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=Z(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,xt(K(K({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,J(l);case 22:c=t.sent,a=a.concat(c),s=Z(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){j(o,n,r,s,a,"next",t)}function a(t){j(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}();function et(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function it(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},st=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},at=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return lt(t,e)}))};function lt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return st(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ct(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ht(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):lt(e,t.parse)})).then((function(e){return at(e,t.parse)}))};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function pt(t){for(var e=1;e=200&&t.status<300)return t;throw t},vt=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=pt(pt({},ft),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,pt(pt(pt({},gt),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return lt(t,s)})).then((function(t){return at(t,s)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function yt(t){return mt.reduceRight((function(t,e){return function(i){return e(i,t)}}),vt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(yt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return yt.nonceMiddleware.nonce=e,yt(t)}))}))}yt.use=function(t){mt.unshift(t)},yt.setFetchHandler=function(t){vt=t},yt.createNonceMiddleware=L,yt.createPreloadingMiddleware=B,yt.createRootURLMiddleware=R,yt.fetchAllMiddleware=tt,yt.mediaUploadMiddleware=ut;var xt=e.a=yt},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,i){var n=i(20),r=i(8),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},t.exports=s},function(t,e,i){var n,r,o,s;s=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=j({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=j?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=j?B?S:O:B?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",B=L[E],j=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(j,ot):j,B,p?$(H,st):H);L[E]=at,D[E]=at-B}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function Bt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",jt))}function jt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",jt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(B(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(B(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function B(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function j(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",j,!0),t.addEventListener("touchend",j,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",j,!0),t.removeEventListener("touchend",j,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(B(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",Bt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,function(t,e,i){},function(t,e,i){t.exports={Line:i(29),Circle:i(21),SemiCircle:i(31),Square:i(32),Path:i(20),Shape:i(13),utils:i(8)}},function(t,e,i){var n=i(30),r=i(8),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return j},easeFromTo:function(){return B},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return jt},doesApply:function(){return It},tweenCreated:function(){return Bt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},B=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},j=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Bt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function jt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(13),r=i(21),o=i(8),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(13),r=i(8),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(3);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=j(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const Be=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function je(t,e,i,n){for(const r of e){const e=Be(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=je(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function Bi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ji=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&Bi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&Bi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,Bi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ji(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){ji(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ji(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let Bn=0;function jn(){const t=window.devicePixelRatio;t!==Bn&&(Bn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",jn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",jn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?jr:Br}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function Bo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class jo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=Bo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=Bo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}jo.positioners=Mo;var Ho={id:"tooltip",_element:jo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new jo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(7);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(33);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_container"),n=document.getElementById(t.dataset.id+"_preview"),r=document.getElementById(t.dataset.id+"_default"),o={attachTo:n},s=ks.createPicker(t,o);s.on("change",(({color:t})=>{const i=ks.parseColor(t,"rgbcss4");n.style.backgroundColor=i,e.value=i,e.dispatchEvent(new Event("input"))})),s.hide(),i.addEventListener("click",(()=>{this.togglePicker(s,i)})),e.addEventListener("input",(t=>{n.style.backgroundColor=t.target.value,s.setColor(t.target.value,!0)})),r.addEventListener("click",(()=>{s.setColor(r.dataset.defaultColor)})),document.addEventListener("mousedown",(n=>{-1===n.path.indexOf(t)&&-1===n.path.indexOf(i)&&-1===n.path.indexOf(e)&&-1===n.path.indexOf(r)&&this.hidePicker(s,i)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(s,i)}))}))},togglePicker(t,e){e.parentNode.classList.contains("focus")?this.hidePicker(t,e):this.showPicker(t,e)},showPicker(t,e){e.parentNode.classList.add("focus"),t.show()},hidePicker(t,e){e.parentNode.classList.remove("focus"),t.hide()},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file +!function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=69)}([function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i.d(e,"a",(function(){return n}))},function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i(5),r=i.n(n);i(2),r()(console.error);var o=i(0),s=i(6);function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";u.data[e]=l(l(l({},g),u.data[e]),t),u.data[e][""]=l(l({},g[""]),u.data[e][""])},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;return u.data[t]||d(void 0,t),u.dcnpgettext(t,e,i,n,r)},f=function(t,e,i){return p(i,e,t)},c&&d(c,h),{setLocaleData:d,__:function(t,e){return p(e,void 0,t)},_x:f,_n:function(t,e,i,n){return p(n,void 0,t,e,i)},_nx:function(t,e,i,n,r){return p(r,n,t,e,i)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),b=(m.setLocaleData.bind(m),m.__.bind(m));m._x.bind(m),m._n.bind(m),m._nx.bind(m),m.isRTL.bind(m)},function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return a(c(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}function a(t,e){var i,n,s,a,l,c,h,u,d,p=1,f=t.length,g="";for(n=0;n=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}var l=Object.create(null);function c(t){if(l[t])return l[t];for(var e,i=t,n=[],o=0;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],a=e[2],c=[];if(null===(c=r.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=r.key_access.exec(a)))s.push(c[1]);else{if(null===(c=r.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return l[t]=n}e.sprintf=o,e.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},,function(t,e,i){"use strict";var n=i(0);function r(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var o=i(5),s=i.n(o);i(2),s()(console.error);var a=i(6);function l(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=c(c(c({},h),n.data[e]),t),n.data[e][""]=c(c({},h[""]),n.data[e][""])},l=function(t,e){s(t,e),o()},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},f=function(t,e,n){var r=d(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+p(n),r,t,e,n)):r};if(t&&l(t,e),i){var g=function(t){u.test(t)&&o()};i.addAction("hookAdded","core/i18n",g),i.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:l,resetLocaleData:function(t,e){n.data={},n.pluralForms={},l(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=d(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+p(e),n,t,e)):n},_x:f,_n:function(t,e,n,r){var o=d(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+p(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=d(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+p(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+p(r),l,t,e,r)),l}}}(void 0,void 0,i(13).a),p=(d.getLocaleData.bind(d),d.setLocaleData.bind(d),d.resetLocaleData.bind(d),d.subscribe.bind(d),d.__.bind(d));d._x.bind(d),d._n.bind(d),d._nx.bind(d),d.isRTL.bind(d),d.hasTranslation.bind(d);function f(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function g(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(T(t),e),i=i.substr(0,n)),i+"?"+F(e)}function I(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function j(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},z=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},N=function(){var t=Object(O.a)(M.a.mark((function t(e,i){var n,o,s,a,l,c;return M.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(z(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,at(j(j({},(u={per_page:100},d=void 0,p=void 0,d=(h=e).path,p=h.url,j(j({},r(h,["path","url"])),{},{url:p&&R(p,u),path:d&&R(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,B(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(s=H(n)){t.next=15;break}return t.abrupt("return",o);case 15:a=[].concat(o);case 16:if(!s){t.next=27;break}return t.next=19,at(j(j({},e),{},{path:void 0,url:s,parse:!1}));case 19:return l=t.sent,t.next=22,B(l);case 22:c=t.sent,a=a.concat(c),s=H(l),t.next=16;break;case 27:return t.abrupt("return",a);case 28:case"end":return t.stop()}var h,u,d,p}),t)})));return function(e,i){return t.apply(this,arguments)}}();function V(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function W(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},U=function(t){var e={code:"invalid_json",message:p("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},X=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve($(t,e)).catch((function(t){return Y(t,e)}))};function Y(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return U(t).then((function(t){var e={code:"unknown_error",message:p("An unknown error occurred.")};throw t||e}))}function K(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function J(t){for(var e=1;e=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:p("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):Y(e,t.parse)})).then((function(e){return X(e,t.parse)}))};function Q(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function tt(t){for(var e=1;e=200&&t.status<300)return t;throw t},ot=function(t){var e=t.url,i=t.path,n=t.data,o=t.parse,s=void 0===o||o,a=r(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=tt(tt({},et),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,tt(tt(tt({},it),a),{},{body:l,headers:c})).then((function(t){return Promise.resolve(t).then(rt).catch((function(t){return Y(t,s)})).then((function(t){return X(t,s)}))}),(function(){throw{code:"fetch_error",message:p("You are probably offline.")}}))};function st(t){return nt.reduceRight((function(t,e){return function(i){return e(i,t)}}),ot)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(st.nonceEndpoint).then(rt).then((function(t){return t.text()})).then((function(e){return st.nonceMiddleware.nonce=e,st(t)}))}))}st.use=function(t){nt.unshift(t)},st.setFetchHandler=function(t){ot=t},st.createNonceMiddleware=m,st.createPreloadingMiddleware=S,st.createRootURLMiddleware=w,st.fetchAllMiddleware=N,st.mediaUploadMiddleware=Z;var at=e.a=st},function(t,e,i){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function l(t){var e=function(t){for(var e,i,a,l,c=[],h=[];e=t.match(s);){for(i=e[0],(a=t.substr(0,e.index).trim())&&c.push(a);l=h.pop();){if(o[i]){if(o[i][0]===l){i=o[i][1]||i;break}}else if(r.indexOf(l)>=0||n[l]t.length)&&(e=t.length);for(var i=0,n=new Array(e);i3&&void 0!==arguments[3]?arguments[3]:10,l=t[e];if(r(i)&&n(o))if("function"==typeof s)if("number"==typeof a){var c={callback:s,priority:a,namespace:o};if(l[i]){var h,u=l[i].handlers;for(h=u.length;h>0&&!(a>=u[h-1].priority);h--);h===u.length?u[h]=c:u.splice(h,0,c),l.__current.forEach((function(t){t.name===i&&t.currentIndex>=h&&t.currentIndex++}))}else l[i]={handlers:[c],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,o,s,a)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var s=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(o,s){var a=t[e];if(r(o)&&(i||n(s))){if(!a[o])return 0;var l=0;if(i)l=a[o].handlers.length,a[o]={runs:a[o].runs,handlers:[]};else for(var c=a[o].handlers,h=function(t){c[t].namespace===s&&(c.splice(t,1),l++,a.__current.forEach((function(e){e.name===o&&e.currentIndex>=t&&e.currentIndex--})))},u=c.length-1;u>=0;u--)h(u);return"hookRemoved"!==o&&t.doAction("hookRemoved",o,s),l}}};var a=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};i(12);var l=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;lthis.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};e.a=n},function(t,e,i){var n=function(t){"use strict";var e,i=Object.prototype,n=i.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,i){return t[e]=i}}function c(t,e,i,n){var r=e&&e.prototype instanceof m?e:m,o=Object.create(r.prototype),s=new A(n||[]);return o._invoke=function(t,e,i){var n=u;return function(r,o){if(n===p)throw new Error("Generator is already running");if(n===f){if("throw"===r)throw o;return C()}for(i.method=r,i.arg=o;;){var s=i.delegate;if(s){var a=O(s,i);if(a){if(a===g)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===u)throw n=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=p;var l=h(t,e,i);if("normal"===l.type){if(n=i.done?f:d,l.arg===g)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=f,i.method="throw",i.arg=l.arg)}}}(t,i,s),o}function h(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",p="executing",f="completed",g={};function m(){}function b(){}function v(){}var y={};y[o]=function(){return this};var x=Object.getPrototypeOf,_=x&&x(x(L([])));_&&_!==i&&n.call(_,o)&&(y=_);var w=v.prototype=m.prototype=Object.create(y);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function i(r,o,s,a){var l=h(t[r],t,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==typeof u&&n.call(u,"__await")?e.resolve(u.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return i("throw",t,s,a)}))}a(l.arg)}var r;this._invoke=function(t,n){function o(){return new e((function(e,r){i(t,n,e,r)}))}return r=r?r.then(o,o):o()}}function O(t,i){var n=t.iterator[i.method];if(n===e){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=e,O(t,i),"throw"===i.method))return g;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=h(n,t.iterator,i.arg);if("throw"===r.type)return i.method="throw",i.arg=r.arg,i.delegate=null,g;var o=r.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,g):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,s=function i(){for(;++r=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=n.call(s,"catchLoc"),c=n.call(s,"finallyLoc");if(l&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),M(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;M(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:L(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e){var i="Webkit Moz O ms".split(" ");function n(t,e,n){for(var o=t.style,s=0;s{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;00;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=s():(r=[],void 0===(o="function"==typeof(n=s)?n.apply(e,r):n)||(t.exports=o))},function(t,e,i){"use strict";function n(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function o(t){var e=r(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function s(t){return t instanceof r(t).Element||t instanceof Element}function a(t){return t instanceof r(t).HTMLElement||t instanceof HTMLElement}function l(t){return"undefined"!=typeof ShadowRoot&&(t instanceof r(t).ShadowRoot||t instanceof ShadowRoot)}function c(t){return t?(t.nodeName||"").toLowerCase():null}function h(t){return((s(t)?t.ownerDocument:t.document)||window.document).documentElement}function u(t){return n(h(t)).left+o(t).scrollLeft}function d(t){return r(t).getComputedStyle(t)}function p(t){var e=d(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function f(t,e,i){void 0===i&&(i=!1);var s,l,d=h(e),f=n(t),g=a(e),m={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(g||!g&&!i)&&(("body"!==c(e)||p(d))&&(m=(s=e)!==r(s)&&a(s)?{scrollLeft:(l=s).scrollLeft,scrollTop:l.scrollTop}:o(s)),a(e)?((b=n(e)).x+=e.clientLeft,b.y+=e.clientTop):d&&(b.x=u(d))),{x:f.left+m.scrollLeft-b.x,y:f.top+m.scrollTop-b.y,width:f.width,height:f.height}}function g(t){var e=n(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function m(t){return"html"===c(t)?t:t.assignedSlot||t.parentNode||(l(t)?t.host:null)||h(t)}function b(t){return["html","body","#document"].indexOf(c(t))>=0?t.ownerDocument.body:a(t)&&p(t)?t:b(m(t))}function v(t,e){var i;void 0===e&&(e=[]);var n=b(t),o=n===(null==(i=t.ownerDocument)?void 0:i.body),s=r(n),a=o?[s].concat(s.visualViewport||[],p(n)?n:[]):n,l=e.concat(a);return o?l:l.concat(v(m(a)))}function y(t){return["table","td","th"].indexOf(c(t))>=0}function x(t){return a(t)&&"fixed"!==d(t).position?t.offsetParent:null}function _(t){for(var e=r(t),i=x(t);i&&y(i)&&"static"===d(i).position;)i=x(i);return i&&("html"===c(i)||"body"===c(i)&&"static"===d(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&a(t)&&"fixed"===d(t).position)return null;for(var i=m(t);a(i)&&["html","body"].indexOf(c(i))<0;){var n=d(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var w="top",k="bottom",S="right",O="left",E="auto",M=[w,k,S,O],A="start",L="end",C="viewport",T="popper",P=M.reduce((function(t,e){return t.concat([e+"-"+A,e+"-"+L])}),[]),D=[].concat(M,[E]).reduce((function(t,e){return t.concat([e,e+"-"+A,e+"-"+L])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var I={placement:"bottom",modifiers:[],strategy:"absolute"};function j(){for(var t=arguments.length,e=new Array(t),i=0;i=0?"x":"y"}function q(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?N(r):null,s=r?V(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case w:e={x:a,y:i.y-n.height};break;case k:e={x:a,y:i.y+i.height};break;case S:e={x:i.x+i.width,y:l};break;case O:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?W(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case A:e[c]=e[c]-(i[h]/2-n[h]/2);break;case L:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var G={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=q({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},$=Math.max,U=Math.min,X=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function K(t){var e,i=t.popper,n=t.popperRect,o=t.placement,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,p=!0===u?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:X(X(e*n)/n)||0,y:X(X(i*n)/n)||0}}(s):"function"==typeof u?u(s):s,f=p.x,g=void 0===f?0:f,m=p.y,b=void 0===m?0:m,v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),x=O,E=w,M=window;if(c){var A=_(i),L="clientHeight",C="clientWidth";A===r(i)&&"static"!==d(A=h(i)).position&&(L="scrollHeight",C="scrollWidth"),A=A,o===w&&(E=k,b-=A[L]-n.height,b*=l?1:-1),o===O&&(x=S,g-=A[C]-n.width,g*=l?1:-1)}var T,P=Object.assign({position:a},c&&Y);return l?Object.assign({},P,((T={})[E]=y?"0":"",T[x]=v?"0":"",T.transform=(M.devicePixelRatio||1)<2?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",T)):Object.assign({},P,((e={})[E]=y?b+"px":"",e[x]=v?g+"px":"",e.transform="",e))}var J={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];a(r)&&c(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});a(n)&&c(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Z={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(t){return t.replace(/left|right|bottom|top/g,(function(t){return Z[t]}))}var tt={start:"end",end:"start"};function et(t){return t.replace(/start|end/g,(function(t){return tt[t]}))}function it(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&l(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function nt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function rt(t,e){return e===C?nt(function(t){var e=r(t),i=h(t),n=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;return n&&(o=n.width,s=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=n.offsetLeft,l=n.offsetTop)),{width:o,height:s,x:a+u(t),y:l}}(t)):a(e)?function(t){var e=n(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):nt(function(t){var e,i=h(t),n=o(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=$(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=$(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+u(t),c=-n.scrollTop;return"rtl"===d(r||i).direction&&(l+=$(i.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:l,y:c}}(h(t)))}function ot(t,e,i){var n="clippingParents"===e?function(t){var e=v(m(t)),i=["absolute","fixed"].indexOf(d(t).position)>=0&&a(t)?_(t):t;return s(i)?e.filter((function(t){return s(t)&&it(t,i)&&"body"!==c(t)})):[]}(t):[].concat(e),r=[].concat(n,[i]),o=r[0],l=r.reduce((function(e,i){var n=rt(t,i);return e.top=$(n.top,e.top),e.right=U(n.right,e.right),e.bottom=U(n.bottom,e.bottom),e.left=$(n.left,e.left),e}),rt(t,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function st(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function at(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function lt(t,e){void 0===e&&(e={});var i=e,r=i.placement,o=void 0===r?t.placement:r,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,u=void 0===c?C:c,d=i.elementContext,p=void 0===d?T:d,f=i.altBoundary,g=void 0!==f&&f,m=i.padding,b=void 0===m?0:m,v=st("number"!=typeof b?b:at(b,M)),y=p===T?"reference":T,x=t.elements.reference,_=t.rects.popper,O=t.elements[g?y:p],E=ot(s(O)?O:O.contextElement||h(t.elements.popper),l,u),A=n(x),L=q({reference:A,element:_,strategy:"absolute",placement:o}),P=nt(Object.assign({},_,L)),D=p===T?P:A,F={top:E.top-D.top+v.top,bottom:D.bottom-E.bottom+v.bottom,left:E.left-D.left+v.left,right:D.right-E.right+v.right},R=t.modifiersData.offset;if(p===T&&R){var I=R[o];Object.keys(F).forEach((function(t){var e=[S,k].indexOf(t)>=0?1:-1,i=[w,k].indexOf(t)>=0?"y":"x";F[t]+=I[i]*e}))}return F}function ct(t,e,i){return $(t,U(e,i))}function ht(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function ut(t){return[w,S,k,O].some((function(e){return t[e]>=0}))}var dt=B({defaultModifiers:[z,G,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,K(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,K(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=D.reduce((function(t,i){return t[i]=function(t,e,i){var n=N(t),r=[O,w].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[O,S].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,b=N(m),v=l||(b===m||!f?[Q(m)]:function(t){if(N(t)===E)return[];var e=Q(t);return[et(t),e,et(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(N(i)===E?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?D:l,h=V(n),u=h?a?P:P.filter((function(t){return V(t)===h})):M,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var p=d.reduce((function(e,i){return e[i]=lt(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[N(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,L=new Map,C=!0,T=y[0],F=0;F=0,H=B?"width":"height",z=lt(e,{placement:R,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),W=B?j?S:O:j?k:w;x[H]>_[H]&&(W=Q(W));var q=Q(W),G=[];if(o&&G.push(z[I]<=0),a&&G.push(z[W]<=0,z[q]<=0),G.every((function(t){return t}))){T=R,C=!1;break}L.set(R,G)}if(C)for(var $=function(t){var e=y.find((function(e){var i=L.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},U=f?3:1;U>0;U--){if("break"===$(U))break}e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,p=void 0===d||d,f=i.tetherOffset,m=void 0===f?0:f,b=lt(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=N(e.placement),y=V(e.placement),x=!y,E=W(v),M="x"===E?"y":"x",L=e.modifiersData.popperOffsets,C=e.rects.reference,T=e.rects.popper,P="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,D={x:0,y:0};if(L){if(o||a){var F="y"===E?w:O,R="y"===E?k:S,I="y"===E?"height":"width",j=L[E],B=L[E]+b[F],H=L[E]-b[R],z=p?-T[I]/2:0,q=y===A?C[I]:T[I],G=y===A?-T[I]:-C[I],X=e.elements.arrow,Y=p&&X?g(X):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=K[F],Z=K[R],Q=ct(0,C[I],Y[I]),tt=x?C[I]/2-z-Q-J-P:q-Q-J-P,et=x?-C[I]/2+z+Q+Z+P:G+Q+Z+P,it=e.elements.arrow&&_(e.elements.arrow),nt=it?"y"===E?it.clientTop||0:it.clientLeft||0:0,rt=e.modifiersData.offset?e.modifiersData.offset[e.placement][E]:0,ot=L[E]+tt-rt-nt,st=L[E]+et-rt;if(o){var at=ct(p?U(B,ot):B,j,p?$(H,st):H);L[E]=at,D[E]=at-j}if(a){var ht="x"===E?w:O,ut="x"===E?k:S,dt=L[M],pt=dt+b[ht],ft=dt-b[ut],gt=ct(p?U(pt,ot):pt,dt,p?$(ft,st):ft);L[M]=gt,D[M]=gt-dt}}e.modifiersData[n]=D}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=N(i.placement),l=W(a),c=[O,S].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return st("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:at(t,M))}(r.padding,i),u=g(o),d="y"===l?w:O,p="y"===l?k:S,f=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],m=s[l]-i.rects.reference[l],b=_(o),v=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,y=f/2-m/2,x=h[d],E=v-u[c]-h[p],A=v/2-u[c]/2+y,L=ct(x,A,E),C=l;i.modifiersData[n]=((e={})[C]=L,e.centerOffset=L-A,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&it(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=lt(e,{elementContext:"reference"}),a=lt(e,{altBoundary:!0}),l=ht(s,n),c=ht(a,r,o),h=ut(l),u=ut(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),pt="tippy-content",ft="tippy-backdrop",gt="tippy-arrow",mt="tippy-svg-arrow",bt={passive:!0,capture:!0};function vt(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function yt(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function xt(t,e){return"function"==typeof t?t.apply(void 0,e):t}function _t(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function wt(t){return[].concat(t)}function kt(t,e){-1===t.indexOf(e)&&t.push(e)}function St(t){return t.split("-")[0]}function Ot(t){return[].slice.call(t)}function Et(){return document.createElement("div")}function Mt(t){return["Element","Fragment"].some((function(e){return yt(t,e)}))}function At(t){return yt(t,"MouseEvent")}function Lt(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function Ct(t){return Mt(t)?[t]:function(t){return yt(t,"NodeList")}(t)?Ot(t):Array.isArray(t)?t:Ot(document.querySelectorAll(t))}function Tt(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function Pt(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function Dt(t){var e,i=wt(t)[0];return(null==i||null==(e=i.ownerDocument)?void 0:e.body)?i.ownerDocument:document}function Ft(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}var Rt={isTouch:!1},It=0;function jt(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Bt))}function Bt(){var t=performance.now();t-It<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",Bt)),It=t}function Ht(){var t=document.activeElement;if(Lt(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var zt="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Nt=/MSIE |Trident\//.test(zt);var Vt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wt=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Vt,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qt=Object.keys(Wt);function Gt(t){var e=(t.plugins||[]).reduce((function(e,i){var n=i.name,r=i.defaultValue;return n&&(e[n]=void 0!==t[n]?t[n]:r),e}),{});return Object.assign({},t,{},e)}function $t(t,e){var i=Object.assign({},e,{content:xt(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Gt(Object.assign({},Wt,{plugins:e}))):qt).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},Wt.aria,{},i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Ut(t,e){t.innerHTML=e}function Xt(t){var e=Et();return!0===t?e.className=gt:(e.className=mt,Mt(t)?e.appendChild(t):Ut(e,t)),e}function Yt(t,e){Mt(e.content)?(Ut(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Ut(t,e.content):t.textContent=e.content)}function Kt(t){var e=t.firstElementChild,i=Ot(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(pt)})),arrow:i.find((function(t){return t.classList.contains(gt)||t.classList.contains(mt)})),backdrop:i.find((function(t){return t.classList.contains(ft)}))}}function Jt(t){var e=Et(),i=Et();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Et();function r(i,n){var r=Kt(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Yt(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Xt(n.arrow))):o.appendChild(Xt(n.arrow)):a&&o.removeChild(a)}return n.className=pt,n.setAttribute("data-state","hidden"),Yt(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Jt.$$tippy=!0;var Zt=1,Qt=[],te=[];function ee(t,e){var i,n,r,o,s,a,l,c,h,u=$t(t,Object.assign({},Wt,{},Gt((i=e,Object.keys(i).reduce((function(t,e){return void 0!==i[e]&&(t[e]=i[e]),t}),{}))))),d=!1,p=!1,f=!1,g=!1,m=[],b=_t(X,u.interactiveDebounce),v=Zt++,y=(h=u.plugins).filter((function(t,e){return h.indexOf(t)===e})),x={id:v,reference:t,popper:Et(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(e){0;if(x.state.isDestroyed)return;F("onBeforeUpdate",[x,e]),$();var i=x.props,n=$t(t,Object.assign({},x.props,{},e,{ignoreAttributes:!0}));x.props=n,G(),i.interactiveDebounce!==n.interactiveDebounce&&(j(),b=_t(X,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?wt(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),D(),k&&k(i,n);x.popperInstance&&(Z(),tt().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[x,e])},setContent:function(t){x.setProps({content:t})},show:function(){0;var t=x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=Rt.isTouch&&!x.props.touch,r=vt(x.props.duration,0,Wt.duration);if(t||e||i||n)return;if(L().hasAttribute("disabled"))return;if(F("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(w.style.visibility="visible");D(),N(),x.state.isMounted||(w.style.transition="none");if(A()){var o=T(),s=o.box,a=o.content;Tt([s,a],0)}l=function(){var t;if(x.state.isVisible&&!g){if(g=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,A()&&x.props.animation){var e=T(),i=e.box,n=e.content;Tt([i,n],r),Pt([i,n],"visible")}R(),I(),kt(te,x),null==(t=x.popperInstance)||t.forceUpdate(),x.state.isMounted=!0,F("onMount",[x]),x.props.animation&&A()&&function(t,e){W(t,e)}(r,(function(){x.state.isShown=!0,F("onShown",[x])}))}},function(){var t,e=x.props.appendTo,i=L();t=x.props.interactive&&e===Wt.appendTo||"parent"===e?i.parentNode:xt(e,[i]);t.contains(w)||t.appendChild(w);Z(),!1}()},hide:function(){0;var t=!x.state.isVisible,e=x.state.isDestroyed,i=!x.state.isEnabled,n=vt(x.props.duration,1,Wt.duration);if(t||e||i)return;if(F("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,g=!1,d=!1,A()&&(w.style.visibility="hidden");if(j(),V(),D(),A()){var r=T(),o=r.box,s=r.content;x.props.animation&&(Tt([o,s],n),Pt([o,s],"hidden"))}R(),I(),x.props.animation?A()&&function(t,e){W(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()}))}(n,x.unmount):x.unmount()},hideWithInteractivity:function(t){0;C().addEventListener("mousemove",b),kt(Qt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Q(),tt().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);te=te.filter((function(t){return t!==x})),x.state.isMounted=!1,F("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,F("onDestroy",[x])}};if(!u.render)return x;var _=u.render(x),w=_.popper,k=_.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var S=y.map((function(t){return t.fn(x)})),O=t.hasAttribute("aria-expanded");return G(),I(),D(),F("onCreate",[x]),u.showOnCreate&&et(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(t){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(C().addEventListener("mousemove",b),b(t))})),x;function E(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===E()[0]}function A(){var t;return!!(null==(t=x.props.render)?void 0:t.$$tippy)}function L(){return c||t}function C(){var t=L().parentNode;return t?Dt(t):document}function T(){return Kt(w)}function P(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||s&&"focus"===s.type?0:vt(x.props.delay,t?0:1,Wt.delay)}function D(){w.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",w.style.zIndex=""+x.props.zIndex}function F(t,e,i){var n;(void 0===i&&(i=!0),S.forEach((function(i){i[t]&&i[t].apply(void 0,e)})),i)&&(n=x.props)[t].apply(n,e)}function R(){var e=x.props.aria;if(e.content){var i="aria-"+e.content,n=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(x.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===L()?"true":"false"):t.removeAttribute("aria-expanded")}))}function j(){C().removeEventListener("mousemove",b),Qt=Qt.filter((function(t){return t!==b}))}function B(t){if(!(Rt.isTouch&&(f||"mousedown"===t.type)||x.props.interactive&&w.contains(t.target))){if(L().contains(t.target)){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),p=!0,setTimeout((function(){p=!1})),x.state.isMounted||V())}}function H(){f=!0}function z(){f=!1}function N(){var t=C();t.addEventListener("mousedown",B,!0),t.addEventListener("touchend",B,bt),t.addEventListener("touchstart",z,bt),t.addEventListener("touchmove",H,bt)}function V(){var t=C();t.removeEventListener("mousedown",B,!0),t.removeEventListener("touchend",B,bt),t.removeEventListener("touchstart",z,bt),t.removeEventListener("touchmove",H,bt)}function W(t,e){var i=T().box;function n(t){t.target===i&&(Ft(i,"remove",n),e())}if(0===t)return e();Ft(i,"remove",a),Ft(i,"add",n),a=n}function q(e,i,n){void 0===n&&(n=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),m.push({node:t,eventType:e,handler:i,options:n})}))}function G(){var t;M()&&(q("touchstart",U,{passive:!0}),q("touchend",Y,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(q(t,U),t){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Nt?"focusout":"blur",K);break;case"focusin":q("focusout",K)}}))}function $(){m.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),m=[]}function U(t){var e,i=!1;if(x.state.isEnabled&&!J(t)&&!p){var n="focus"===(null==(e=s)?void 0:e.type);s=t,c=t.currentTarget,I(),!x.state.isVisible&&At(t)&&Qt.forEach((function(e){return e(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?i=!0:et(t),"click"===t.type&&(d=!i),i&&!n&&it(t)}}function X(t){var e=t.target,i=L().contains(e)||w.contains(e);"mousemove"===t.type&&i||function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=St(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,p=n-e.bottom-c>o,f=e.left-i+h>o,g=i-e.right-u>o;return d||p||f||g}))}(tt().concat(w).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:u}:null})).filter(Boolean),t)&&(j(),it(t))}function Y(t){J(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):it(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==L()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||it(t)}function J(t){return!!Rt.isTouch&&M()!==t.type.indexOf("touch")>=0}function Z(){Q();var e=x.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,a=A()?Kt(w).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||L()}:t,h=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(A()){var i=T().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];A()&&a&&h.push({name:"arrow",options:{element:a,padding:3}}),h.push.apply(h,(null==i?void 0:i.modifiers)||[]),x.popperInstance=dt(c,w,Object.assign({},i,{placement:n,onFirstUpdate:l,modifiers:h}))}function Q(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function tt(){return Ot(w.querySelectorAll("[data-tippy-root]"))}function et(t){x.clearDelayTimeouts(),t&&F("onTrigger",[x,t]),N();var e=P(!0),i=E(),r=i[0],o=i[1];Rt.isTouch&&"hold"===r&&o&&(e=o),e?n=setTimeout((function(){x.show()}),e):x.show()}function it(t){if(x.clearDelayTimeouts(),F("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=P(!1);e?r=setTimeout((function(){x.state.isVisible&&x.hide()}),e):o=requestAnimationFrame((function(){x.hide()}))}}else V()}}function ie(t,e){void 0===e&&(e={});var i=Wt.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",jt,bt),window.addEventListener("blur",Ht);var n=Object.assign({},e,{plugins:i}),r=Ct(t).reduce((function(t,e){var i=e&&ee(e,n);return i&&t.push(i),t}),[]);return Mt(t)?r[0]:r}ie.defaultProps=Wt,ie.setDefaultProps=function(t){Object.keys(t).forEach((function(e){Wt[e]=t[e]}))},ie.currentInput=Rt;Object.assign({},J,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ie.setDefaultProps({render:Jt});e.a=ie},,,,,,function(t,e,i){},function(t,e,i){t.exports={Line:i(48),Circle:i(32),SemiCircle:i(50),Square:i(51),Path:i(31),Shape:i(21),utils:i(16)}},function(t,e,i){var n=i(49),r=i(16),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},t.exports=a},function(t,e,i){var n=i(21),r=i(16),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},,,function(t,e){if(wp.media&&window.CLDN){wp.media.events.on("editor:image-edit",(function(t){t.metadata.cldoverwrite=null;t.image.className.split(" ").indexOf("cld-overwrite")>=0&&(t.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(t){const e=t.image.className.split(" ");t.metadata.cldoverwrite&&-1===e.indexOf("cld-overwrite")?e.push("cld-overwrite"):!t.metadata.cldoverwrite&&e.indexOf("cld-overwrite")>=0&&delete e[e.indexOf("cld-overwrite")],t.image.className=e.join(" ")}));let t=null;const e=wp.media.string.props;wp.media.string.props=function(i,n){i.cldoverwrite&&(i.classes=["cld-overwrite"],t=!0);return e(i,n)},wp.media.post=function(e,i){if("send-attachment-to-editor"===e){const e=wp.media.editor.get().state().get("selection").get(i.attachment);e.attributes.transformations&&(i.attachment.transformations=e.attributes.transformations),(i.html.indexOf("cld-overwrite")>-1||!0===t)&&(i.attachment.cldoverwrite=!0,t=null)}return wp.ajax.post(e,i)};const i=wp.media.view.MediaFrame.Select,n=wp.media.view.MediaFrame.Post,r=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const t=this.controller,e=this.model.get("selection"),i=this.model.get("library"),n=wp.media.model.Attachment;if(CLDN.mloptions.multiple=t.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+t.cid,1===e.length){const t=n.get(e.models[0].id);void 0!==t.attributes.public_id&&(CLDN.mloptions.asset={resource_id:t.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const t=e.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(t)?t[0]:t}catch(t){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(r){for(let o=0;o>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function p(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var f={scale:"binary",unit:"B"};function g(e,i){return p(e,void 0===i?f:t({},f,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var p=o.findPrefix(e);if(void 0!==r)do{var f=(c=p.factor)/r;e=Math.round(e/f)*f}while((p=o.findPrefix(e)).factor!==c);else c=p.factor;u=p.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return p.bytes=g,p.parse=m,m.raw=b,p.raw=v,p.Scale=c,p})?n.apply(e,r):n)||(t.exports=o)},,,,,,,,,,function(t,e){!function(t,e){"use strict";var i,n,r={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},o="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function a(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function l(t){var e=document.createElement("div");for(e.innerHTML=function(t){var e=t.textContent||t.innerHTML,n="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((e.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((e.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!o&&s&&(void 0===i?e=e.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===t.parentNode.tagName.toLowerCase()&&(e=''+e),e=e.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+n+'" data-lazy-src='))),e}(t);e.firstChild;)o||!s||void 0===i||!e.firstChild.tagName||"img"!==e.firstChild.tagName.toLowerCase()&&"iframe"!==e.firstChild.tagName.toLowerCase()||i.observe(e.firstChild),t.parentNode.insertBefore(e.firstChild,t);t.parentNode.removeChild(t)}function c(){document.querySelectorAll("noscript.loading-lazy").forEach(l),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(r.lazyImage+"[data-lazy-src],"+r.lazyIframe+"[data-lazy-src]").forEach((function(t){a(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(i=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),a(i)}}))}),r)),n="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?n(c):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){n(c)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&c()}))}()},function(t,e){const i=document.querySelector(".cloudinary-collapsible__toggle");i&&i.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},function(t,e,i){var n=i(21),r=i(16),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},t.exports=o},function(t,e,i){self,t.exports=function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return Jt},Tweenable:function(){return gt},interpolate:function(){return Gt},processTweens:function(){return ht},setBezierFunction:function(){return Zt},tween:function(){return mt},unsetBezierFunction:function(){return Qt}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return I},easeFrom:function(){return B},easeFromTo:function(){return j},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return E},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return f},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return L},easeOutBounce:function(){return M},easeOutCirc:function(){return O},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return H},elastic:function(){return T},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return F}});var r={};i.r(r),i.d(r,{afterTween:function(){return Ht},beforeTween:function(){return Bt},doesApply:function(){return It},tweenCreated:function(){return jt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},O=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},j=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},B=function(t){return Math.pow(t,4)},H=function(t){return Math.pow(t,.25)};function z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var i=0;ia?a:e,c=l>=a,h=o-(a-l),u=t._filters.length>0;if(c)return t._render(s,t._data,h),t.stop(!0);u&&t._applyFilter(Q),l1&&void 0!==arguments[1]?arguments[1]:Y,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=V(e);if(at[e])return at[e];if(n===it||n===et)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||Y;return i},pt=function(t){t===ot?(ot=t._next)?ot._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ot=null:(U=t._previous,X=t._next,U._next=X,X._previous=U),t._previous=t._next=null},ft="function"==typeof Promise?Promise:null,gt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;z(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=rt,this._render=rt,this._promiseCtor=ft,i&&this.setConfig(i)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?rt:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||rt:c,u=i.step,d=void 0===u?rt:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in p)m[y]=p[y];var x=!1;for(var _ in m){var w=m[_];x||V(w)!==it||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=dt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ot?(ot=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,ct(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(Q),lt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(J),this._applyFilter(Z))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&N(t.prototype,e),t}();function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new gt;return e.tween(t),e.tweenable=e,e}G(gt,"now",(function(){return $})),gt.setScheduleFunction=function(t){return nt=t},gt.formulas=at,gt.filters={},function t(){$=ut(),nt.call(K,t,16.666666666666668),ht()}();var bt,vt,yt=/(\d|-|\.)/,xt=/([^\-0-9.]+)/g,_t=/[0-9.-]+/g,wt=(bt=_t.source,vt=/,\s*/.source,new RegExp("rgb\\(".concat(bt).concat(vt).concat(bt).concat(vt).concat(bt,"\\)"),"g")),kt=/^.*\(/,St=/#([0-9]|[a-f]){3,6}/gi,Ot="VAL",Et=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Mt(t){return parseInt(t,16)}var At=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Mt(e.substr(0,2)),Mt(e.substr(2,2)),Mt(e.substr(4,2))]).join(","),")");var e},Lt=function(t,e,i){var n=e.match(t),r=e.replace(t,Ot);return n&&n.forEach((function(t){return r=r.replace(Ot,i(t))})),r},Ct=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(St)&&(t[e]=Lt(St,i,At))}},Tt=function(t){var e=t.match(_t).map(Math.floor),i=t.match(kt)[0];return"".concat(i).concat(e.join(","),")")},Pt=function(t){return t.match(_t)},Dt=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},Ft=function(t,e){return e.map((function(e){return t[e]}))},Rt=function(t,e){return e.forEach((function(e){return t=t.replace(Ot,+e.toFixed(4))})),t},It=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function jt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Ct),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(xt),i?(1===i.length||e.charAt(0).match(yt))&&i.unshift(""):i=["",""],i.join(Ot)),chunkNames:Et(Pt(o),r)})}return n}(e)}function Bt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Pt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Ht(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Rt(o,Ft(Dt(t,r),r));t[i]=Lt(wt,s,Tt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Nt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,o=Nt({},t),s=dt(t,n);for(var a in Wt._filters.length=0,Wt.set({}),Wt._currentState=o,Wt._originalState=t,Wt._targetState=e,Wt._easing=s,qt)qt[a].doesApply(Wt)&&Wt._filters.push(qt[a]);Wt._applyFilter("tweenCreated"),Wt._applyFilter("beforeTween");var l=lt(i,o,t,e,1,r,s);return Wt._applyFilter("afterTween"),l};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0?t:0-t},h=1-(d=3*(o=t))-(u=3*(i-o)-d),a=1-(c=3*(s=e))-(l=3*(n-s)-c),function(t){return((a*t+l)*t+c)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,g(o)(n=1))return n;for(;io?i=r:n=r,r=.5*(n-i)+i}return r}(r,.005));var o,s,a,l,c,h,u,d,p,f,g}}(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,gt.formulas[t]=o},Qt=function(t){return delete gt.formulas[t]};gt.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},function(t,e,i){var n=i(21),r=i(32),o=i(16),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};(s.prototype=new n).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,t.exports=s},function(t,e,i){var n=i(21),r=i(16),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};(o.prototype=new n).constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},t.exports=o},function(t,e,i){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";var n=i(3);function r(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,i;return!1!==r(t)&&"function"==typeof(e=t.constructor)&&!1!==r(i=e.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=e.getLuminance=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.parseColorToRgba=e.parseColorToRgb=e.from=e.createPicker=void 0;var n=function(){function t(t,e){for(var i=0;i-1,d="undefined"!=typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",g="RGBA_USER",m="HSLA_USER";function b(t,e,i){return t?t instanceof HTMLElement?t:t instanceof NodeList?t[0]:"string"==typeof t?document.querySelector(t):t.jquery?t.get(0):i?e:null:e}function v(t){var e=t.getContext("2d"),i=+t.width,n=+t.height,s=e.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(t){var r=e.createLinearGradient(1,0,i-1,0);r.addColorStop(0,"hsla("+t+", 100%, 50%, 0)"),r.addColorStop(1,"hsla("+t+", 100%, 50%, 1)"),e.fillStyle=s,e.fillRect(0,0,i,n),e.fillStyle=r,e.globalCompositeOperation="multiply",e.fillRect(0,0,i,n),e.globalCompositeOperation="source-over"},grabColor:function(t,i){return e.getImageData(t,i,1,1).data},findColor:function(t,e,s){var a=(0,o.rgbToHsv)(t,e,s),l=r(a,3),c=l[1],h=l[2];return[c*i,n-h*n]}}}function y(t,e,i){return null===t?e:/^\s*$/.test(t)?i:!!/true|yes|1/i.test(t)||!/false|no|0/i.test(t)&&e}function x(t,e,i){if(null===t)return e;if(/^\s*$/.test(t))return i;var n=t.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:e}var _=function(){function t(e,i){if(c(this,t),i?(e=b(e),this.options=Object.assign({},p,i)):e&&(0,s.default)(e)?(this.options=Object.assign({},p,e),e=b(this.options.attachTo)):(this.options=Object.assign({},p),e=b((0,o.nvl)(e,this.options.attachTo))),!e)throw new Error("Container not found: "+this.options.attachTo);!function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(e.hasAttribute(i+"show-hsl")&&(t.showHSL=y(e.getAttribute(i+"show-hsl"),p.showHSL,!0)),e.hasAttribute(i+"show-rgb")&&(t.showRGB=y(e.getAttribute(i+"show-rgb"),p.showRGB,!0)),e.hasAttribute(i+"show-hex")&&(t.showHEX=y(e.getAttribute(i+"show-hex"),p.showHEX,!0)),e.hasAttribute(i+"show-alpha")&&(t.showAlpha=y(e.getAttribute(i+"show-alpha"),p.showAlpha,!0)),e.hasAttribute(i+"palette-editable")&&(t.paletteEditable=y(e.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),e.hasAttribute(i+"sl-bar-size")&&(t.slBarSize=x(e.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),e.hasAttribute(i+"hue-bar-size")&&(t.hueBarSize=x(e.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),t.alphaBarSize=t.hueBarSize),e.hasAttribute(i+"palette")){var n=e.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":t.palette=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":t.palette=o.PALETTE_MATERIAL_CHROME;break;default:t.palette=n.split(/[;|]/)}}e.hasAttribute(i+"color")&&(t.color=e.getAttribute(i+"color"))}(this.options,e),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,e.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var r=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(r),this.slBarHelper=v(r),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(t,[{key:"setupHueCanvas",value:function(t){var e=this;t.width=this.options.hueBarSize[0],t.height=this.options.hueBarSize[1];for(var i=t.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),r=0;r<=1;r+=1/360)n.addColorStop(r,"hsl("+360*r+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.hueBarSize[0]),r=Math.round(360*n/e.options.hueBarSize[0]);e.huePointer.style.left=n-7+"px",e.onValueChanged("H",r)},a=function t(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){s(t),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)}))}},{key:"setupSlCanvas",value:function(t){var e=this;t.width=this.options.slBarSize[0],t.height=this.options.slBarSize[1];var i=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.slBarSize[0]-1),r=(0,o.limit)(i.clientY-t.getBoundingClientRect().top,0,e.options.slBarSize[1]-1),s=e.slBarHelper.grabColor(n,r);e.slPointer.style.left=n-7+"px",e.slPointer.style.top=r-7+"px",e.onValueChanged("RGB",s)},n=function t(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){i(t),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)}))}},{key:"setupAlphaCanvas",value:function(t){var e=this;t.width=this.options.alphaBarSize[0],t.height=this.options.alphaBarSize[1];var i=t.getContext("2d"),n=i.createLinearGradient(0,0,t.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var r=function(i){var n=(0,o.limit)(i.clientX-t.getBoundingClientRect().left,0,e.options.alphaBarSize[0]),r=+(n/e.options.alphaBarSize[0]).toFixed(2);e.alphaPointer.style.left=n-7+"px",e.onValueChanged("ALPHA",r)},s=function t(){document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",t)};t.addEventListener("mousedown",(function(t){r(t),document.addEventListener("mousemove",r),document.addEventListener("mouseup",s)}))}},{key:"setupInput",value:function(t){var e=this,i=+t.min,n=+t.max,r=t.getAttribute("nameref");t.hasAttribute("select-on-focus")&&t.addEventListener("focus",(function(){t.select()})),"text"===t.type?t.addEventListener("change",(function(){e.onValueChanged(r,t.value)})):((u||d)&&t.addEventListener("keydown",(function(s){"Up"===s.key?(t.value=(0,o.limit)(+t.value+1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1):"Down"===s.key&&(t.value=(0,o.limit)(+t.value-1,i,n),e.onValueChanged(r,t.value),s.returnValue=!1)})),t.addEventListener("change",(function(){var s=+t.value;e.onValueChanged(r,(0,o.limit)(s,i,n))})))}},{key:"setupClipboard",value:function(t){var e=this;t.title="click to copy",t.addEventListener("click",(function(){t.value=(0,o.parseColor)([e.R,e.G,e.B,e.A],"hexcss4"),t.select(),document.execCommand("copy")}))}},{key:"setPalette",value:function(t){var e=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=o.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=o.PALETTE_MATERIAL_CHROME;break;default:n=(0,o.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var r=function(i,n,r){var o=t.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");o.className="a-color-picker-palette-color",o.style.backgroundColor=i,o.setAttribute("data-color",i),o.title=i,t.insertBefore(o,n),e.palette[i]=!0,r&&e.onPaletteColorAdd(i)},s=function(i,n){i?(t.removeChild(i),e.palette[i.getAttribute("data-color")]=!1,n&&e.onPaletteColorRemove(i.getAttribute("data-color"))):(t.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach((function(e){t.removeChild(e)})),Object.keys(e.palette).forEach((function(t){e.palette[t]=!1})),n&&e.onPaletteColorRemove())};if(n.map((function(t){return(0,o.parseColor)(t,i?"rgbcss4":"hex")})).filter((function(t){return!!t})).forEach((function(t){return r(t)})),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",t.appendChild(a),t.addEventListener("click",(function(t){/a-color-picker-palette-add/.test(t.target.className)?t.shiftKey?s(null,!0):r(i?(0,o.parseColor)([e.R,e.G,e.B,e.A],"rgbcss4"):(0,o.rgbToHex)(e.R,e.G,e.B),t.target,!0):/a-color-picker-palette-color/.test(t.target.className)&&(t.shiftKey?s(t.target,!0):e.onValueChanged(f,t.target.getAttribute("data-color")))}))}else t.addEventListener("click",(function(t){/a-color-picker-palette-color/.test(t.target.className)&&e.onValueChanged(f,t.target.getAttribute("data-color"))}))}else t.style.display="none"}},{key:"updatePalette",value:function(t){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=t,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(t){case"H":this.H=e;var n=(0,o.hslToRgb)(this.H,this.S,this.L),s=r(n,3);this.R=s[0],this.G=s[1],this.B=s[2],this.slBarHelper.setHue(e),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=e;var a=(0,o.hslToRgb)(this.H,this.S,this.L),l=r(a,3);this.R=l[0],this.G=l[1],this.B=l[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=e;var c=(0,o.hslToRgb)(this.H,this.S,this.L),h=r(c,3);this.R=h[0],this.G=h[1],this.B=h[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=e;var u=(0,o.rgbToHsl)(this.R,this.G,this.B),d=r(u,3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=e;var p=(0,o.rgbToHsl)(this.R,this.G,this.B),b=r(p,3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=e;var v=(0,o.rgbToHsl)(this.R,this.G,this.B),y=r(v,3);this.H=y[0],this.S=y[1],this.L=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var x=r(e,3);this.R=x[0],this.G=x[1],this.B=x[2];var _=(0,o.rgbToHsl)(this.R,this.G,this.B),w=r(_,3);this.H=w[0],this.S=w[1],this.L=w[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case g:var k=r(e,4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var S=(0,o.rgbToHsl)(this.R,this.G,this.B),O=r(S,3);this.H=O[0],this.S=O[1],this.L=O[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case m:var E=r(e,4);this.H=E[0],this.S=E[1],this.L=E[2],this.A=E[3];var M=(0,o.hslToRgb)(this.H,this.S,this.L),A=r(M,3);this.R=A[0],this.G=A[1],this.B=A[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var L=(0,o.cssColorToRgb)(e)||[this.R,this.G,this.B],C=r(L,3);this.R=C[0],this.G=C[1],this.B=C[2];var T=(0,o.rgbToHsl)(this.R,this.G,this.B),P=r(T,3);this.H=P[0],this.S=P[1],this.L=P[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var D=(0,o.parseColor)(e,"rgba")||[0,0,0,1],F=r(D,4);this.R=F[0],this.G=F[1],this.B=F[2],this.A=F[3];var R=(0,o.rgbToHsl)(this.R,this.G,this.B),I=r(R,3);this.H=I[0],this.S=I[1],this.L=I[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=e}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(t){this.oncoloradd&&this.oncoloradd(t)}},{key:"onPaletteColorRemove",value:function(t){this.oncolorremove&&this.oncolorremove(t)}},{key:"updateInputHSL",value:function(t,e,i){this.options.showHSL&&(this.inputH.value=t,this.inputS.value=e,this.inputL.value=i)}},{key:"updateInputRGB",value:function(t,e,i){this.options.showRGB&&(this.inputR.value=t,this.inputG.value=e,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(t,e,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,o.rgbToHex)(t,e,i))}},{key:"updatePointerH",value:function(t){var e=this.options.hueBarSize[0]*t/360;this.huePointer.style.left=e-7+"px"}},{key:"updatePointerSL",value:function(t,e,i){var n=(0,o.hslToRgb)(t,e,i),s=r(n,3),a=s[0],l=s[1],c=s[2],h=this.slBarHelper.findColor(a,l,c),u=r(h,2),d=u[0],p=u[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=p-7+"px")}},{key:"updatePointerA",value:function(t){if(this.options.showAlpha){var e=this.options.alphaBarSize[0]*t;this.alphaPointer.style.left=e-7+"px"}}}]),t}(),w=function(){function t(e){c(this,t),this.name=e,this.listeners=[]}return n(t,[{key:"on",value:function(t){t&&this.listeners.push(t)}},{key:"off",value:function(t){this.listeners=t?this.listeners.filter((function(e){return e!==t})):[]}},{key:"emit",value:function(t,e){for(var i=this.listeners.slice(0),n=0;n1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,t,{silent:e})},get all(){if(s){var t=[i.R,i.G,i.B,i.A],e=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":o.rgbToHex.apply(void 0,t);(a=(0,o.parseColor)(t,a)).toString=function(){return e},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(t){this.off("change").on("change",t)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(t){this.off("coloradd").on("coloradd",t)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(t){this.off("colorremove").on("colorremove",t)},get palette(){return Object.keys(i.palette).filter((function(t){return i.palette[t]}))},set palette(t){i.updatePalette(t)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(t,e){return t&&n[t]&&n[t].on(e),this},off:function(t,e){return t&&n[t]&&n[t].off(e),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var t=arguments.length,e=Array(t),i=0;istyle[data-source="a-color-picker"]')){var S=i(5).toString(),O=document.createElement("style");O.setAttribute("type","text/css"),O.setAttribute("data-source","a-color-picker"),O.innerHTML=S,document.querySelector("head").appendChild(O)}e.createPicker=k,e.from=function(t,e){var i=function(t){return t?Array.isArray(t)?t:t instanceof HTMLElement?[t]:t instanceof NodeList?[].concat(h(t)):"string"==typeof t?[].concat(h(document.querySelectorAll(t))):t.jquery?t.get():[]:[]}(t).map((function(t,i){var n=k(t,e);return n.index=i,n}));return i.on=function(t,e){return i.forEach((function(i){return i.on(t,e)})),this},i.off=function(t){return i.forEach((function(e){return e.off(t)})),this},i},e.parseColorToRgb=o.parseColorToRgb,e.parseColorToRgba=o.parseColorToRgba,e.parseColorToHsl=o.parseColorToHsl,e.parseColorToHsla=o.parseColorToHsla,e.parseColor=o.parseColor,e.rgbToHex=o.rgbToHex,e.hslToRgb=o.hslToRgb,e.rgbToHsl=o.rgbToHsl,e.rgbToHsv=o.rgbToHsv,e.rgbToInt=o.rgbToInt,e.intToRgb=o.intToRgb,e.getLuminance=o.getLuminance,e.COLOR_NAMES=o.COLOR_NAMES,e.PALETTE_MATERIAL_500=o.PALETTE_MATERIAL_500,e.PALETTE_MATERIAL_CHROME=o.PALETTE_MATERIAL_CHROME,e.VERSION="1.2.1"},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nvl=e.ensureArray=e.limit=e.getLuminance=e.parseColor=e.parseColorToHsla=e.parseColorToHsl=e.cssHslaToHsla=e.cssHslToHsl=e.parseColorToRgba=e.parseColorToRgb=e.cssRgbaToRgba=e.cssRgbToRgb=e.cssColorToRgba=e.cssColorToRgb=e.intToRgb=e.rgbToInt=e.rgbToHsv=e.rgbToHsl=e.hslToRgb=e.rgbToHex=e.PALETTE_MATERIAL_CHROME=e.PALETTE_MATERIAL_500=e.COLOR_NAMES=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(t){return t&&t.__esModule?t:{default:t}}(i(0));function o(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);ei?i:t}function l(t,e){return null==t?e:t}function c(t,e,i){var n=[a(t,0,255),a(e,0,255),a(i,0,255)];return"#"+("000000"+((t=n[0])<<16|(e=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function h(t,e,i){var n=void 0,r=void 0,o=void 0,s=[a(t,0,360)/360,a(e,0,100)/100,a(i,0,100)/100];if(t=s[0],i=s[2],0==(e=s[1]))n=r=o=i;else{var l=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},c=i<.5?i*(1+e):i+e-i*e,h=2*i-c;n=l(h,c,t+1/3),r=l(h,c,t),o=l(h,c,t-1/3)}return[255*n,255*r,255*o].map(Math.round)}function u(t,e,i){var n=[a(t,0,255)/255,a(e,0,255)/255,a(i,0,255)/255];t=n[0],e=n[1],i=n[2];var r=Math.max(t,e,i),o=Math.min(t,e,i),s=void 0,l=void 0,c=(r+o)/2;if(r==o)s=l=0;else{var h=r-o;switch(l=c>.5?h/(2-r-o):h/(r+o),r){case t:s=(e-i)/h+(e>16&255,t>>8&255,255&t]},e.cssColorToRgb=p,e.cssColorToRgba=f,e.cssRgbToRgb=g,e.cssRgbaToRgba=m,e.parseColorToRgb=function(t){return Array.isArray(t)?t=[a(t[0],0,255),a(t[1],0,255),a(t[2],0,255)]:p(t)||g(t)},e.parseColorToRgba=b,e.cssHslToHsl=v,e.cssHslaToHsla=y,e.parseColorToHsl=function(t){return Array.isArray(t)?t=[a(t[0],0,360),a(t[1],0,100),a(t[2],0,100)]:v(t)},e.parseColorToHsla=x,e.parseColor=function(t,e){if(e=e||"rgb",null!=t){var i=void 0;if((i=b(t))||(i=x(t))&&(i=[].concat(o(h.apply(void 0,o(i))),[i[3]])))return(0,r.default)(e)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce((function(t,e){return t[e]=_(i,e),t}),e||{}):_(i,e.toString().toLowerCase())}},e.getLuminance=function(t,e,i){return.2126*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},e.limit=a,e.ensureArray=function(t){return t?Array.from(t):[]},e.nvl=l},function(t,e,i){"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},function(t,e){t.exports='
    '},function(t,e,i){var n=i(6);t.exports="string"==typeof n?n:n.toString()},function(t,e,i){(t.exports=i(7)(!1)).push([t.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(n),o=n.sources.map((function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"}));return[i].concat(o).concat([r]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;rt)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t{this.pendingClear=!0})),XMLHttpRequest.prototype.xhrCloudinarySend=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){-1!==e.indexOf("action=add-tag")&&this.addEventListener("load",(e=>{const i=(new DOMParser).parseFromString(this.response,"text/html");wpAjax.parseAjaxResponse(i,"ajax-response").errors||t._reset()})),this.xhrCloudinarySend(e)}}}};o._init();var s=o,a=i(4);const l={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(a.a.use(a.a.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o{o.style.opacity=1}),250),Object(a.a)({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};var c=l;window.addEventListener("load",(()=>l._init()));const h={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,m.call(window,(()=>{r=!1,t.apply(e,o)})))}}const v=t=>"start"===t?"left":"end"===t?"right":"center",y=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function x(){}const _=function(){let t=0;return function(){return t++}}();function w(t){return null==t}function k(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function S(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const O=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function E(t,e){return O(t)?t:e}function M(t,e){return void 0===t?e:t}const A=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function L(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function C(t,e,i,n){let r,o,s;if(k(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=B(e,i);return t}function z(t){return t.charAt(0).toUpperCase()+t.slice(1)}const N=t=>void 0!==t,V=t=>"function"==typeof t,W=Math.PI,q=2*W,G=q+W,$=Number.POSITIVE_INFINITY,U=W/180,X=W/2,Y=W/4,K=2*W/3,J=Math.log10,Z=Math.sign;function Q(t){const e=Math.round(t);t=et(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(J(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function et(t,e,i){return Math.abs(t-e)l&&c0===t||1===t,dt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*q/i),pt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*q/i)+1,ft={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*X),easeOutSine:t=>Math.sin(t*X),easeInOutSine:t=>-.5*(Math.cos(W*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ut(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ut(t)?t:dt(t,.075,.3),easeOutElastic:t=>ut(t)?t:pt(t,.075,.3),easeInOutElastic(t){const e=.1125;return ut(t)?t:t<.5?.5*dt(2*t,e,.45):.5+.5*pt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ft.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ft.easeInBounce(2*t):.5*ft.easeOutBounce(2*t-1)+.5},gt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},mt="0123456789ABCDEF",bt=t=>mt[15&t],vt=t=>mt[(240&t)>>4]+mt[15&t],yt=t=>(240&t)>>4==(15&t);function xt(t){var e=function(t){return yt(t.r)&&yt(t.g)&&yt(t.b)&&yt(t.a)}(t)?bt:vt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function _t(t){return t+.5|0}const wt=(t,e,i)=>Math.max(Math.min(t,i),e);function kt(t){return wt(_t(2.55*t),0,255)}function St(t){return wt(_t(255*t),0,255)}function Ot(t){return wt(_t(t/2.55)/100,0,1)}function Et(t){return wt(_t(100*t),0,100)}const Mt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const At=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function Ct(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function Tt(t,e,i){const n=Lt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function Pt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=r===e?(i-n)/c+(i>16&255,o>>8&255,255&o]}return t}(),Ht.transparent=[0,0,0,0]);const e=Ht[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function Nt(t,e,i){if(t){let n=Pt(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Ft(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Vt(t,e){return t?Object.assign(e||{},t):t}function Wt(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=St(t[3]))):(e=Vt(t,{r:0,g:0,b:0,a:1})).a=St(e.a),e}function qt(t){return"r"===t.charAt(0)?function(t){const e=Mt.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?kt(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?kt(i):i),n=255&(e[4]?kt(n):n),r=255&(e[6]?kt(r):r),{r:i,g:n,b:r,a:o}}}(t):It(t)}class Gt{constructor(t){if(t instanceof Gt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Wt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*gt[n[1]],g:255&17*gt[n[2]],b:255&17*gt[n[3]],a:5===o?17*gt[n[4]]:255}:7!==o&&9!==o||(r={r:gt[n[1]]<<4|gt[n[2]],g:gt[n[3]]<<4|gt[n[4]],b:gt[n[5]]<<4|gt[n[6]],a:9===o?gt[n[7]]<<4|gt[n[8]]:255})),i=r||zt(t)||qt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Vt(this._rgb);return t&&(t.a=Ot(t.a)),t}set rgb(t){this._rgb=Wt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ot(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?xt(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=Pt(t),i=e[0],n=Et(e[1]),r=Et(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${Ot(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,l=n.a-r.a,c=((a*l==-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,n.r=255&c*n.r+o*r.r+.5,n.g=255&c*n.g+o*r.g+.5,n.b=255&c*n.b+o*r.b+.5,n.a=s*n.a+(1-s)*r.a,i.rgb=n}return i}clone(){return new Gt(this.rgb)}alpha(t){return this._rgb.a=St(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=_t(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Nt(this._rgb,2,t),this}darken(t){return Nt(this._rgb,2,-t),this}saturate(t){return Nt(this._rgb,1,t),this}desaturate(t){return Nt(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Pt(t);i[0]=Rt(i[0]+e),i=Ft(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function $t(t){return new Gt(t)}const Ut=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function Xt(t){return Ut(t)?t:$t(t)}function Yt(t){return Ut(t)?t:$t(t).saturate(.5).darken(.1).hexString()}const Kt=Object.create(null),Jt=Object.create(null);function Zt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Yt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Yt(e.borderColor),this.hoverColor=(t,e)=>Yt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return Qt(this,t,e)}get(t){return Zt(this,t)}describe(t,e){return Qt(Jt,t,e)}override(t,e){return Qt(Kt,t,e)}route(t,e,i,n){const r=Zt(this,t),o=Zt(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return S(t)?Object.assign({},e,t):M(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ee(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function ie(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function se(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);w(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lM(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ve(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ye(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function xe(t){const e=ve(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(t,e){t=t||{},e=e||te.font;let i=M(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=M(t.style,e.style);n&&!(""+n).match(ge)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:M(t.family,e.family),lineHeight:me(M(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:M(t.weight,e.weight),string:""};return r.string=function(t){return!t||w(t.size)||w(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function we(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Oe=(t,e,i)=>Se(t,i,(n=>t[n][e]Se(t,i,(n=>t[n][e]>=i));const Me=["push","pop","shift","splice","unshift"];function Ae(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Me.forEach((e=>{delete t[e]})),delete t._chartjs)}function Le(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){N(n)||(n=Ne("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>Ce([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>Re(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ne(De(o,t),i),N(r))return Fe(t,r)?He(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ve(t).includes(e),ownKeys:t=>Ve(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function Te(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Pe(t,n),setContext:e=>Te(t,e,i,n),override:r=>Te(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Re(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];V(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),S(e)&&(e=He(r._scopes,r,t,e));return e}(e,a,t,i));k(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(N(o.index)&&n(t))e=e[o.index%e.length];else if(S(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=He(n,r,t,l);e.push(Te(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));Fe(e,a)&&(a=Te(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Pe(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:V(i)?i:()=>i,isIndexable:V(n)?n:()=>n}}const De=(t,e)=>t?t+z(e):e,Fe=(t,e)=>S(e)&&"adapters"!==t;function Re(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function Ie(t,e,i){return V(t)?t(e,i):t}const je=(t,e)=>!0===t?e:"string"==typeof t?H(e,t):void 0;function Be(t,e,i,n){for(const r of e){const e=je(i,r);if(e){t.add(e);const r=Ie(e._fallback,i,e);if(N(r)&&r!==i&&r!==n)return r}else if(!1===e&&N(n)&&i!==n)return null}return!1}function He(t,e,i,n){const r=e._rootScopes,o=Ie(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=ze(a,s,i,o||i);return null!==l&&((!N(o)||o===i||(l=ze(a,s,o,l),null!==l))&&Ce(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(k(r)&&S(i))return i;return r}(e,i,n))))}function ze(t,e,i,n){for(;i;)i=Be(t,e,i,n);return i}function Ne(t,e){for(const i of e){if(!i)continue;const e=i[t];if(N(e))return e}}function Ve(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const We=Number.EPSILON||1e-14,qe=(t,e)=>e"x"===t?"y":"x";function $e(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=st(o,r),l=st(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Ue(t,e="x"){const i=Ge(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=qe(t,0);for(s=0;s!t.skip))),"monotone"===e.cubicInterpolationMode)Ue(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;owindow.getComputedStyle(t,null);const ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=ti[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Qe(i),o="border-box"===r.boxSizing,s=ei(r,"padding"),a=ei(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:s}=r;let a,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,s,i.target))a=o,l=s;else{const t=e.getBoundingClientRect();a=r.clientX-t.left,l=r.clientY-t.top,c=!0}return{x:a,y:l,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:p,height:f}=e;return o&&(p-=s.width+a.width,f-=s.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((c-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function ri(t,e,i,n){const r=Qe(t),o=ei(r,"margin"),s=Ze(r.maxWidth,t,"clientWidth")||$,a=Ze(r.maxHeight,t,"clientHeight")||$,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Je(t);if(o){const t=o.getBoundingClientRect(),s=Qe(o),a=ei(s,"border","width"),l=ei(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Ze(s.maxWidth,o,"clientWidth"),r=Ze(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$,maxHeight:r||$}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=ei(r,"border","width"),e=ei(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=ni(Math.min(c,s,l.maxWidth)),h=ni(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ni(c/2)),{width:c,height:h}}function oi(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const si=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ai(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ci(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=li(t,r,i),a=li(r,o,i),l=li(o,e,i),c=li(s,a,i),h=li(a,l,i);return li(c,h,i)}const ui=new Map;function di(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=ui.get(i);return n||(n=new Intl.NumberFormat(t,e),ui.set(i,n)),n}(e,i).format(t)}function pi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function fi(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function gi(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function mi(t){return"angle"===t?{between:ct,compare:at,normalize:lt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function vi(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=mi(n),{start:h,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=mi(n),l=e.length;let c,h,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,c=0,h=l;cv||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(f.push(bi({start:y,end:t,loop:d,count:s,style:p})),y=null),i=t,b=g));return null!==y&&f.push(bi({start:y,end:u,loop:d,count:s,style:p})),f}function yi(t,e){const i=[],n=t.segments;for(let r=0;rn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=m.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Si="transparent",Oi={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Xt(t||Si),r=n.valid&&Xt(e||Si);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Ei{constructor(t,e,i,n){const r=e[i];n=we([t.to,n,r,t.from]);const o=we([t.from,r,n]);this._active=!0,this._fn=t.fn||Oi[t.type||typeof o],this._easing=ft[t.easing]||ft.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=we([t.to,e,n,t.from]),this._from=we([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),te.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),te.describe("animations",{_fallback:"animation"}),te.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Ai{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!S(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!S(n))return;const r={};for(const t of Mi)r[t]=n[t];(k(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new Ei(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ki.add(this._chart,i),!0):void 0}}function Li(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function Ci(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function Ri(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function ji(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const Bi=t=>"reset"===t||"none"===t,Hi=(t,e)=>e?t:Object.assign({},t);class zi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ji(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=M(i.xAxisID,Ii(t,"x")),o=e.yAxisID=M(i.yAxisID,Ii(t,"y")),s=e.rAxisID=M(i.rAxisID,Ii(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ae(this._data,this),t._stacked&&ji(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(S(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+z(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,ji(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&Ri(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=k(n[t])?this.parseArrayData(i,n,t,e):S(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]t&&!e.hidden&&e._stacked&&{keys:Ci(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function p(){d=n[u];const e=d[s.axis];return!O(d[t.axis])||c>e||h=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),h);return p.$shared&&(p.$shared=a,r[o]=Object.freeze(Hi(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Ai(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Bi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Bi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Bi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;st-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(N(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;nMath.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Wi(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;ct.x,i="left",n="right"):(e=t.base=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2),c=g+h),g===e.getPixelForValue(o)){const t=Z(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=M(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,a=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(a),c=this.includeOptions(n,l),h=o.axis,u=s.axis;for(let a=e;a""}}}};class Ji extends zi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(S(i[t])){const{key:t="value"}=this._parsing;s=e=>+H(i[e],t)}for(r=t,o=t+e;rct(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>ct(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=p(0,c,u),m=p(X,h,d),b=f(W,c,u),v=f(W+X,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(b,v)/2,0),x=A(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/q)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this.resolveDataElementOptions(e,n),f=this.getSharedOptions(p),g=this.includeOptions(n,f);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?q*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ji.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return k(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Zi extends zi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=ht(Math.min(Oe(a,s.axis,c).lo,i?n:Oe(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?ht(Math.max(Oe(a,s.axis,h).hi+1,i?0:Oe(e,l,s.getPixelForValue(h)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=s,this._drawCount=a,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,p=s.axis,{spanGaps:f,segment:g}=this.options,m=tt(f)?f:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[d]-v[d]>m,g&&(f.parsed=i,f.raw=l.data[c]),u&&(f.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,f,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Zi.id="line",Zi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Zi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qi extends zi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=di(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=this.getDataset(),a=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,h=l.yCenter,u=l.getIndexAngle(0)-.5*W;let d,p=u;const f=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?nt(this.resolveDataElementOptions(t,e).angle||i):0}}Qi.id="polarArea",Qi.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Qi.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class tn extends Ji{}tn.id="pie",tn.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class en extends zi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,s="reset"===n;for(let a=e;a"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var rn=Object.freeze({__proto__:null,BarController:Yi,BubbleController:Ki,DoughnutController:Ji,LineController:Zi,PolarAreaController:Qi,PieController:tn,RadarController:en,ScatterController:nn});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sn{constructor(t){this.options=t||{}}formats(){return on()}parse(t,e){return on()}format(t,e){return on()}add(t,e,i){return on()}diff(t,e,i){return on()}startOf(t,e,i){return on()}endOf(t,e){return on()}}sn.override=function(t){Object.assign(sn.prototype,t)};var an={_date:sn};function ln(t,e){return"native"in t?{x:t.x,y:t.y}:ii(t,e)}function cn(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&s&&o.length){const t=a._reversePixels?Ee:Oe;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function hn(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t{t[a](r[s],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var fn={modes:{index(t,e,i,n){const r=ln(e,t),o=i.axis||"x",s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n),a=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,n){const r=ln(e,t),o=i.axis||"xy";let s=i.intersect?un(t,r,o,n):dn(t,r,o,!1,n);if(s.length>0){const e=s[0].datasetIndex,i=t.getDatasetMeta(e).data;s=[];for(let t=0;tun(t,ln(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>dn(t,ln(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",pn(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",pn(t,e,i,n))}};const gn=["left","top","right","bottom"];function mn(t,e){return t.filter((t=>t.pos===e))}function bn(t,e){return t.filter((t=>-1===gn.indexOf(t.pos)&&t.box.axis===e))}function vn(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function yn(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!gn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Sn(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;ot.box.fullSize)),!0),n=vn(mn(e,"left"),!0),r=vn(mn(e,"right")),o=vn(mn(e,"top"),!0),s=vn(mn(e,"bottom")),a=bn(e,"x"),l=bn(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:mn(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;C(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);_n(d,xe(n));const p=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),f=yn(l.concat(c),u);Sn(a.fullSize,p,u,f),Sn(l,p,u,f),Sn(c,p,u,f)&&Sn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),En(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,En(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},C(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h)}))}};class An{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ln extends An{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Tn=t=>null===t||""===t;const Pn=!!si&&{passive:!0};function Dn(t,e,i){t.canvas.removeEventListener(e,i,Pn)}function Fn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Rn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const In=new Map;let jn=0;function Bn(){const t=window.devicePixelRatio;t!==jn&&(jn=t,In.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Hn(t,e,i){const n=t.canvas,r=n&&Je(n);if(!r)return;const o=b(((t,e)=>{const n=r.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){In.size||window.addEventListener("resize",Bn),In.set(t,e)}(t,o),s}function zn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){In.delete(t),In.size||window.removeEventListener("resize",Bn)}(t)}function Nn(t,e,i){const n=t.canvas,r=b((e=>{null!==t.ctx&&i(function(t,e){const i=Cn[t.type]||t.type,{x:n,y:r}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Pn)}(n,e,r),r}class Vn extends An{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Tn(r)){const e=ai(t,"width");void 0!==e&&(t.width=e)}if(Tn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ai(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];w(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Fn,detach:Rn,resize:Hn}[e]||Nn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:zn,detach:zn,resize:zn}[e]||Dn)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ri(t,e,i,n)}isAttached(t){const e=Je(t);return!(!e||!e.isConnected)}}class Wn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return tt(this.x)&&tt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Wn.defaults={},Wn.defaultRoutes=void 0;const qn={values:t=>k(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=J(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),di(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(J(t)));return 1===n||2===n||5===n?qn.numeric.call(this,t,e,i):""}};var Gn={formatters:qn};function $n(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;in)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Un(e,l,c,w(n)?0:s-n,s),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Gn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),te.route("scale.ticks","color","","color"),te.route("scale.grid","color","","borderColor"),te.route("scale.grid","borderColor","","borderColor"),te.route("scale.title","color","","color"),te.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),te.describe("scales",{_fallback:"scale"}),te.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Xn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Yn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;os+a)))return c}function Jn(t){return t.drawTicks?t.tickLength:0}function Zn(t,e){if(!t.display)return 0;const i=_e(t.font,e),n=xe(t.padding);return(k(t.text)?t.text.length:1)*i.lineHeight+n.height}function Qn(t,e,i){let n=v(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class tr extends Wn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=E(t,Number.POSITIVE_INFINITY),e=E(e,Number.NEGATIVE_INFINITY),i=E(i,Number.POSITIVE_INFINITY),n=E(n,Number.NEGATIVE_INFINITY),{min:E(t,i),max:E(e,n),minDefined:O(t),maxDefined:O(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;an?n:i,n=r&&i>n?i:n,{min:E(i,E(n,i)),max:E(n,E(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){L(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=A(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=ht(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Jn(t.grid)-e.padding-Zn(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=rt(Math.min(Math.asin(ht((c.highest.height+6)/o,-1,1)),Math.asin(ht(s/a,-1,1))-Math.asin(ht(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){L(this.options.afterCalculateLabelRotation,[this])}beforeFit(){L(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Zn(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Jn(r)+o):(t.height=this.maxHeight,t.width=Jn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=nt(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){L(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ht(this._alignToPixels?ne(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ts*n?s/i:a/n:a*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Jn(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,p=d/2,f=function(t){return ne(i,t,d)};let g,m,b,v,y,x,_,w,k,O,E,A;if("top"===o)g=f(this.bottom),x=this.bottom-c,w=g-p,O=f(t.top)+p,A=t.bottom;else if("bottom"===o)g=f(this.top),O=t.top,A=f(t.bottom)-p,x=g+p,w=this.top+c;else if("left"===o)g=f(this.right),y=this.right-c,_=g-p,k=f(t.left)+p,E=t.right;else if("right"===o)g=f(this.left),k=t.left,E=f(t.right)-p,y=g+p,_=this.left+c;else if("x"===e){if("center"===o)g=f((t.top+t.bottom)/2+.5);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}O=t.top,A=t.bottom,x=g+p,w=x+c}else if("y"===e){if("center"===o)g=f((t.left+t.right)/2);else if(S(o)){const t=Object.keys(o)[0],e=o[t];g=f(this.chart.scales[t].getPixelForValue(e))}y=g-p,_=y-c,k=t.left,E=t.right}const L=M(n.ticks.maxTicksLimit,l),C=Math.max(1,Math.ceil(l/L));for(m=0;me.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");te.route(o,r,l,a)}))}(e,t.defaultRoutes);t.descriptors&&te.describe(e,t.descriptors)}(t,o,i),this.override&&te.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in te[n]&&(delete te[n][i],this.override&&delete Kt[i])}}var ir=new class{constructor(){this.controllers=new er(zi,"datasets",!0),this.elements=new er(Wn,"elements"),this.plugins=new er(Object,"plugins"),this.scales=new er(tr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):C(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=z(t);L(i["before"+n],[],i),e[t](i),L(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function rr(t,e){return e||!1!==t?!0===t?{}:t:null}function or(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function sr(t,e){const i=te.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function ar(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function lr(t){const e=t.options||(t.options={});e.plugins=M(e.plugins,{}),e.scales=function(t,e){const i=Kt[t.type]||{scales:{}},n=e.scales||{},r=sr(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!S(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=ar(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=I(Object.create(null),[{axis:a},e,c[a],c[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||sr(r,e),l=(Kt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),I(s[r],[{axis:e},n[r],l[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];I(e,[te.scales[e.type],te.scale])})),s}(t,e)}function cr(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const hr=new Map,ur=new Set;function dr(t,e){let i=hr.get(t);return i||(i=e(),hr.set(t,i),ur.add(i)),i}const pr=(t,e,i)=>{const n=H(e,i);void 0!==n&&t.add(n)};class fr{constructor(t){this._config=function(t){return(t=t||{}).data=cr(t.data),lr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cr(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),lr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return dr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return dr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return dr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return dr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>pr(a,t,e)))),e.forEach((t=>pr(a,n,t))),e.forEach((t=>pr(a,Kt[r]||{},t))),e.forEach((t=>pr(a,te,t))),e.forEach((t=>pr(a,Jt,t)))}));const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),ur.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Kt[e]||{},te.datasets[e]||{},{type:e},te,Jt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=gr(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=Pe(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(V(s)||mr(s))||o&&k(s))return!0}return!1}(o,e)){r.$shared=!1;a=Te(o,i=V(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=gr(this._resolverCache,t,i);return S(e)?Te(r,e,void 0,n):r}}function gr(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:Ce(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const mr=t=>S(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||V(t[i])),!1);const br=["top","bottom","left","right","chartArea"];function vr(t,e){return"top"===t||"bottom"===t||-1===br.indexOf(t)&&"x"===e}function yr(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function xr(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),L(i&&i.onComplete,[t],e)}function _r(t){const e=t.chart,i=e.options.animation;L(i&&i.onProgress,[t],e)}function wr(t){return Ke()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const kr={},Sr=t=>{const e=wr(t);return Object.values(kr).filter((t=>t.canvas===e)).pop()};class Or{constructor(t,e){const i=this.config=new fr(e),n=wr(t),r=Sr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ke()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ln:Vn}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=_(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new nr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),kr[this.id]=this,s&&a?(ki.listen(this,"complete",xr),ki.listen(this,"progress",_r),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return w(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():oi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return re(this.canvas,this.ctx),this}stop(){return ki.stop(this),this}resize(t,e){ki.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,oi(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),L(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){C(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=ar(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),C(r,(e=>{const r=e.options,o=r.id,s=ar(o,r),a=M(r.type,e.dtype);void 0!==r.position&&vr(r.position,s)===vr(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ir.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)})),C(n,((t,e)=>{t||delete i[e]})),C(i,(t=>{Mn.configure(this,t,t.options),Mn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());C(this.scales,(t=>{Mn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;this.ensureScalesHaveIDs(),this.buildOrUpdateScales();if(((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(yr("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Mn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],C(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&ae(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&le(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=fn.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ke(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);N(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ki.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};C(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){C(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},C(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!T(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let s=[],a=!1,l=null;return"mouseout"!==t.type&&(s=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,se(t,this.chartArea,this._minPadding)&&(L(n.onHover,[t,s,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||L(n.onClick,[t,s,this],this)),a=!T(s,i),(a||e)&&(this._active=s,this._updateHoverStyles(s,i,e)),this._lastEvent=l,a}}const Er=()=>C(Or.instances,(t=>t._plugins.invalidate())),Mr=!0;function Ar(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+X,n-X),t.closePath(),t.clip()}function Lr(t,e,i,n){const r=be(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return ht(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:ht(r.innerStart,0,s),innerEnd:ht(r.innerEnd,0,s)}}function Cr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Tr(t,e,i,n,r){const{x:o,y:s,startAngle:a,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),u=c>0?c+n+i+l:0;let d=0;const p=r-a;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;d=(p-(0!==t?p*t/(t+n):p))/2}const f=(p-Math.max(.001,p*h-i/W)/h)/2,g=a+f+d,m=r-f-d,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Lr(e,u,h,m-g),_=h-b,w=h-v,k=g+b/_,S=m-v/w,O=u+y,E=u+x,M=g+y/O,A=m-x/E;if(t.beginPath(),t.arc(o,s,h,k,S),v>0){const e=Cr(w,S,o,s);t.arc(e.x,e.y,v,S,m+X)}const L=Cr(E,m,o,s);if(t.lineTo(L.x,L.y),x>0){const e=Cr(E,A,o,s);t.arc(e.x,e.y,x,m+X,A+Math.PI)}if(t.arc(o,s,u,m-x/u,g+y/u,!0),y>0){const e=Cr(O,M,o,s);t.arc(e.x,e.y,y,M+Math.PI,g-X)}const C=Cr(_,g,o,s);if(t.lineTo(C.x,C.y),b>0){const e=Cr(_,k,o,s);t.arc(e.x,e.y,b,g-X,k)}t.closePath()}function Pr(t,e,i,n,r){const{options:o}=e,s="inner"===o.borderAlign;o.borderWidth&&(s?(t.lineWidth=2*o.borderWidth,t.lineJoin="round"):(t.lineWidth=o.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&Ar(t,e,o+q),t.beginPath(),t.arc(n,r,c,o+q,o,!0),h=0;h{ir.add(...t),Er()}},unregister:{enumerable:Mr,value:(...t)=>{ir.remove(...t),Er()}}});class Dr extends Wn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*W&&(o+=q),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(h>=q||ct(r,s,a))&&(o>=l+u&&o<=c+u)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=W&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const s=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:s}=e;let a=e.endAngle;if(r){Tr(t,e,i,n,o+q);for(let e=0;ea&&o>a;return{count:n,start:l,loop:e.loop,ilen:c(s+(c?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(m,f),t.lineTo(m,p),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(if&&(f=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,p=f=i),g=i}y()}function Hr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Br:jr}Dr.id="arc",Dr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Dr.defaultRoutes={backgroundColor:"backgroundColor"};const zr="function"==typeof Path2D;function Nr(t,e,i,n){zr&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Fr(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Hr(e);for(const a of r)Fr(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Vr extends Wn{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return xi(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a"borderDash"!==t&&"fill"!==t};class qr extends Wn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=s.left&&e<=s.right)&&(o||i>=s.top&&i<=s.bottom)}function Yr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Kr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}qr.id="point",qr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Jr extends Wn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Ur(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?pe:Yr;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Kr(o,e,r)),t.clip(),s(t,Kr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Kr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Xr(this,t,e,i)}inXRange(t,e){return Xr(this,t,null,e)}inYRange(t,e){return Xr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Jr.id="bar",Jr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Jr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Zr=Object.freeze({__proto__:null,ArcElement:Dr,LineElement:Vr,PointElement:qr,BarElement:Jr});function Qr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function to(t){t.data.datasets.forEach((t=>{Qr(t)}))}var eo={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void to(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===we([s,t.options.indexAxis]))return;if("line"!==a.type)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=ht(Oe(e,o.axis,s).lo,0,i-1)),n=c?ht(Oe(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Qr(e);let d;switch(w(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,p,f,g=e;for(s[l++]=t[g],h=0;hd&&(d=p,u=t[n],f=n);s[l++]=u,g=f}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,p,f=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;rp&&(p=a,h=r),f=(g*f+o.x)/++g;else{const i=r-1;if(!w(c)&&!w(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:f}),n!==u&&n!==i&&m.push({...t[n],x:f})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=p=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){to(t)}};function io(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=M(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(S(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return O(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:q},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function ro(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=[],s=n.reverse?e.max:e.min,a=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?s:"end"===i?a:S(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,s),new no({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;lt;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function so(t,e,i){const n=[];for(let r=0;r=n&&r<=c){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}function lo(t){const{chart:e,fill:i,line:n}=t;if(O(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=oo(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Vr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function ho(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!O(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function uo(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function po(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=lt(r),o=lt(o)),{property:t,start:r,end:o}}function fo(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function go(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function mo(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function bo(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=oo(n,a,r);const l=po(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=yi(e,l);for(const e of c){const n=po(i,o[e.start],o[e.end],e.loop),a=vi(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:fo(l,n,"start",Math.max)},end:{[i]:fo(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,go(t,s,u&&po(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let p;if(u){d?t.closePath():mo(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});p=d&&e,p||mo(t,n,c,r)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function vo(t,e,i){const n=lo(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(ae(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(uo(t,n,s.top),bo(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),uo(t,n,s.bottom)),bo(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),le(t))}var yo={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&vo(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&vo(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&vo(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class _o extends Wn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=L(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=_e(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=xo(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach(((t,p)=>{const f=i+e/2+r.measureText(t.text).width;(0===p||l[l.length-1]+f+2*s>o)&&(h+=c,l[l.length-(p>0?0:1)]=0,d+=c,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,p=0,f=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),p+=u+s,f++,u=d=0),a[o]={left:p,top:d,col:f,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=pi(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=y(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=y(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=y(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ae(t,this),this._draw(),le(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=te.color,a=pi(t.rtl,this.left,this.width),l=_e(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let p;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:g,itemHeight:m}=xo(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();p=b?{x:y(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:y(r,this.top+v+h,this.bottom-e[0].height),line:0},fi(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach(((_,w)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,S=a.textAlign(_.textAlign||(_.textAlign=o.textAlign)),O=f+d+k;let E=p.x,A=p.y;a.setWidth(this.width),b?w>0&&E+O+h>this.right&&(A=p.y+=x,p.line++,E=p.x=y(r,this.left+h,this.right-i[p.line])):w>0&&A+x>this.bottom&&(E=p.x=E+e[p.line].width+h,p.line++,A=p.y=y(r,this.top+v+h,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(f)||f<=0||isNaN(g)||g<0)return;n.save();const r=M(i.lineWidth,1);if(n.fillStyle=M(i.fillStyle,s),n.lineCap=M(i.lineCap,"butt"),n.lineDashOffset=M(i.lineDashOffset,0),n.lineJoin=M(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=M(i.strokeStyle,s),n.setLineDash(M(i.lineDash,[])),o.usePointStyle){const o={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},s=a.xPlus(t,f/2);oe(n,o,s,e+d)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,f),l=ye(i.borderRadius);n.beginPath(),Object.values(l).some((t=>0!==t))?pe(n,{x:s,y:o,w:f,h:g,radius:l}):n.rect(s,o,f,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(E),A,_),E=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(S,E+f+d,b?E+O:this.right,t.rtl),function(t,e,i){ue(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(E),A,_),b?p.x+=O+h:p.y+=x})),gi(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=_e(e.font),n=xe(e.padding);if(!e.display)return;const r=pi(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=y(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+y(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=y(s,h,h+u);o.textAlign=r.textAlign(v(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,ue(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=_e(t.font),i=xe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&L(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&L(e.onHover,[t,i,this],this)}else i&&L(e.onClick,[t,i,this],this);var n,r}}var wo={id:"legend",_element:_o,start(t,e,i){const n=t.legend=new _o({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n)},stop(t){Mn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Mn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=xe(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ko extends Wn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=k(i.text)?i.text.length:1;this._padding=xe(i.padding);const r=n*_e(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=y(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=y(s,n,e),h=-.5*W):(l=r-t,c=y(s,e,n),h=.5*W),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=_e(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);ue(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:v(e.align),textBaseline:"middle",translation:[r,o]})}}var So={id:"title",_element:ko,start(t,e,i){!function(t,e){const i=new ko({ctx:t.ctx,options:e,chart:t});Mn.configure(t,i,e),Mn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Mn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oo=new WeakMap;var Eo={id:"subtitle",start(t,e,i){const n=new ko({ctx:t.ctx,options:i,chart:t});Mn.configure(t,n,i),Mn.addBox(t,n),Oo.set(t,n)},stop(t){Mn.removeBox(t,Oo.get(t)),Oo.delete(t)},beforeUpdate(t,e,i){const n=Oo.get(t);Mn.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Mo={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Co(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function To(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=_e(e.bodyFont),c=_e(e.titleFont),h=_e(e.footerFont),u=o.length,d=r.length,p=n.length,f=xe(e.padding);let g=f.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-p)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,C(t.title,y),i.font=l.string,C(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,C(n,(t=>{C(t.before,y),C(t.lines,y),C(t.after,y)})),v=0,i.font=h.string,C(t.footer,y),i.restore(),m+=f.width,{width:m,height:g}}function Po(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function Do(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Po(t,e,i,n),yAlign:n}}function Fo(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:p}=ye(s);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?f+=c:"right"===a&&(f-=c):"left"===a?f-=Math.max(h,d)+o:"right"===a&&(f+=Math.max(u,p)+o),{x:ht(f,0,n.width-e.width),y:ht(g,0,n.height-e.height)}}function Ro(t,e,i){const n=xe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Io(t){return Ao([],Lo(t))}function jo(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Bo extends Wn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new Ai(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this._chart.getContext(),e=this,i=this._tooltipItems,ke(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}getBeforeBody(t,e){return Io(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return C(t,(t=>{const e={before:[],lines:[],after:[]},r=jo(i,t);Ao(e.before,Lo(r.beforeLabel.call(this,t))),Ao(e.lines,r.label.call(this,t)),Ao(e.after,Lo(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return Io(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=Ao(s,Lo(n)),s=Ao(s,Lo(r)),s=Ao(s,Lo(o)),s}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;st.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),C(l,(e=>{const i=jo(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=Mo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=To(this,i),s=Object.assign({},t,e),a=Do(this._chart,i,s),l=Fo(i,s,a,this._chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=ye(s),{x:u,y:d}=t,{width:p,height:f}=e;let g,m,b,v,y,x;return"center"===r?(y=d+f/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+p,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+p-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+f,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=pi(i.rtl,this.x,this.width);for(t.x=Ro(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=_e(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,pe(t,{x:e,y:f,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),pe(t,{x:i,y:f+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=_e(i.bodyFont);let u=h.lineHeight,d=0;const p=pi(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+r},g=p.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Ro(this,g,i),e.fillStyle=i.bodyColor,C(this.beforeBody,f),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,C(m.before,f),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=Mo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=To(this,t),s=Object.assign({},i,this._size),a=Do(e,t,s),l=Fo(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=xe(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),fi(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),gi(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!T(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const s=this._positionChanged(o,t);return r=e||!T(o,n)||s,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=Mo[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}Bo.positioners=Mo;var Ho={id:"tooltip",_element:Bo,positioners:Mo,afterInit(t,e,i){i&&(t.tooltip=new Bo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:x,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Decimation:eo,Filler:yo,Legend:wo,SubTitle:Eo,Title:So,Tooltip:Ho});function No(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Vo extends tr{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(w(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:No(i,t,M(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Wo(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,p=c-1,{min:f,max:g}=e,m=!w(o),b=!w(s),v=!w(l),y=(g-f)/(h+1);let x,_,k,S,O=Q((g-f)/p/d)*d;if(O<1e-14&&!m&&!b)return[{value:f},{value:g}];S=Math.ceil(g/O)-Math.floor(f/O),S>p&&(O=Q(S*O/p/d)*d),w(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(f/O)*O,k=Math.ceil(g/O)*O):(_=f,k=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(S=Math.round(Math.min((s-o)/O,c)),O=(s-o)/S,_=o,k=s):v?(_=m?o:_,k=b?s:k,S=l-1,O=(k-_)/S):(S=(k-_)/O,S=et(S,Math.round(S),O/1e3)?Math.round(S):Math.ceil(S));const E=Math.max(ot(O),ot(_));x=Math.pow(10,w(a)?E:a),_=Math.round(_*x)/x,k=Math.round(k*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_n=e?n:t,s=t=>r=i?r:t;if(t){const t=Z(n),e=Z(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Wo({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&it(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return di(t,this.chart.options.locale)}}class $o extends Go{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?t:0,this.max=O(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=nt(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Uo(t){return 1===t/Math.pow(10,Math.floor(J(t)))}$o.id="linear",$o.defaults={ticks:{callback:Gn.formatters.numeric}};class Xo extends tr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Go.prototype.parse.apply(this,[t,e]);if(0!==i)return O(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=O(t)?Math.max(0,t):null,this.max=O(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(J(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(J(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=E(t.min,Math.pow(10,Math.floor(J(e.min)))),s=Math.floor(J(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Uo(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(sr?{start:e-i,end:e}:{start:e,end:e+i}}function Jo(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let c=0;ce.r&&(e.r=g.end,i.r=p),m.starte.b&&(e.b=m.end,i.b=p)}var s,a,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,s=Yo(o),a=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o270||i<90)&&(t-=e),t}function es(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,q);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=L(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?Jo(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){let n=e.l/Math.sin(i.l),r=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=is(n),r=is(r),o=is(o),s=is(s),this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(n+r)/2),Math.floor(t-(o+s)/2))),this.setCenterPoint(n,r,o,s)}setCenterPoint(t,e,i,n){const r=this.width-e-this.drawingArea,o=t+this.drawingArea,s=i+this.drawingArea,a=this.height-this.paddingTop-n-this.drawingArea;this.xCenter=Math.floor((o+r)/2+this.left),this.yCenter=Math.floor((s+a)/2+this.top+this.paddingTop)}getIndexAngle(t){return lt(t*(q/this.getLabels().length)+nt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(w(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(w(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=_e(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:p}=e;if(!w(p)){const t=xe(e.backdropPadding);i.fillStyle=p,i.fillRect(c-t.left,h-t.top,u-c+t.width,d-h+t.height)}ue(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),es(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=_e(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=xe(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}ue(t,n.label,0,-r,l,{color:a.color})})),t.restore()}drawTitle(){}}ns.id="radialLinear",ns.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Gn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},ns.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},ns.descriptors={angleLines:{_fallback:"grid"}};const rs={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},os=Object.keys(rs);function ss(t,e){return t-e}function as(t,e){if(w(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),O(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!tt(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ls(t,e,i,n){const r=os.length;for(let o=os.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function hs(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s=0&&(e[l].major=!0);return e}(t,n,r,i):n}class us extends tr{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new an._date(t.adapters.date);I(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:as(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=O(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=O(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=os.indexOf(i);o--){const i=os[o];if(rs[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return os[i?os.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=os.indexOf(t)+1,i=os.length;e1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;ht-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),p=r.ticks.callback;return p?L(p,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Oe(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Oe(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}us.id="time",us.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ps extends us{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ds(e,this.min),this._tableRange=ds(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new gs(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>bs()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new g.a.Line(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new g.a.Circle(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Object(a.a)({path:t,method:"GET"}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t]}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}},xs=i(14);var _s={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};var ws={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};const ks=i(52);var Ss={pickers:null,_init(t){this.pickers=t.getElementsByClassName("cld-input-color-picker"),[...this.pickers].forEach((t=>{const e=document.getElementById(t.dataset.id),i=document.getElementById(t.dataset.id+"_container"),n=document.getElementById(t.dataset.id+"_preview"),r=document.getElementById(t.dataset.id+"_default"),o={attachTo:n},s=ks.createPicker(t,o);s.on("change",(({color:t})=>{const i=ks.parseColor(t,"rgbcss4");n.style.backgroundColor=i,e.value=i,e.dispatchEvent(new Event("input"))})),s.hide(),i.addEventListener("click",(()=>{this.togglePicker(s,i)})),e.addEventListener("input",(t=>{n.style.backgroundColor=t.target.value,s.setColor(t.target.value,!0)})),r.addEventListener("click",(()=>{s.setColor(r.dataset.defaultColor)})),document.addEventListener("mousedown",(n=>{-1===n.path.indexOf(t)&&-1===n.path.indexOf(i)&&-1===n.path.indexOf(e)&&-1===n.path.indexOf(r)&&this.hidePicker(s,i)})),window.addEventListener("keydown",(t=>{"Escape"===t.key&&this.hidePicker(s,i)}))}))},togglePicker(t,e){e.parentNode.classList.contains("focus")?this.hidePicker(t,e):this.showPicker(t,e)},showPicker(t,e){e.parentNode.classList.add("focus"),t.show()},hidePicker(t,e){e.parentNode.classList.remove("focus"),t.hide()},setColor(t){this.color.value=t,this.colorPreview.style.backgroundColor=t,this.color.dispatchEvent(new Event("input"))}};const Os={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};xs.a.init(),p.a.bind(s),l.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Object(d.a)(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),c.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),ys.init(t),_s.init(t),ws.init(t),Ss._init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=xs.a.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),xs.a.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},Es=document.getElementById("cloudinary-settings-page");Es&&window.addEventListener("load",Os._init(Es));var Ms=Os;const As={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,config:{},init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),a.a.use(a.a.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString.length&&(e.value=this.config.cldString),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey))return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString.length?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0));break;case 3:if(!this.config.cldString.length)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString.length)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back),this.saveConfig()}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Object(a.a)({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=Object(vs.a)("Setting up Cloudinary","cloudinary"),Object(a.a)({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=Object(vs.a)("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}))}};window.addEventListener("load",(()=>As.init()));var Ls=As;const Cs={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>Cs._init()));var Ts=Cs;const Ps={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;a.a.use(a.a.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Object(a.a)({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>Ps.init()));var Ds=Ps;const Fs={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>Fs.init()));var Rs=Fs;i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;const Is={UI:Ms,Widget:r.a,GlobalTransformations:s,MediaLibrary:c,Notices:u,Wizard:Ls,Storage:Ts,Extensions:Ds,Tabs:Rs}}]); \ No newline at end of file diff --git a/php/media/class-global-transformations.php b/php/media/class-global-transformations.php index fb2d4e09a..189e1985e 100644 --- a/php/media/class-global-transformations.php +++ b/php/media/class-global-transformations.php @@ -443,7 +443,8 @@ public function make_term_sort_item( $id, $name ) { private function init_taxonomy_manager( $post ) { wp_enqueue_script( 'wp-api' ); - $terms = $this->get_terms( $post->ID ); + $taxonomies = get_object_taxonomies( $post, 'objects' ); + $terms = $this->get_terms( $post->ID ); $out = array(); $out[] = '
    '; @@ -452,7 +453,11 @@ private function init_taxonomy_manager( $post ) { $out[] = '
  • ' . esc_html__( 'No terms added', 'cloudinary' ) . '
  • '; if ( ! empty( $terms ) ) { foreach ( (array) $terms as $item ) { - $out[] = $this->make_term_sort_item( $item['value'], $item['term']->name ); + $value = $item['value']; + if ( $taxonomies[ $item['term']->taxonomy ] && false === $taxonomies[ $item['term']->taxonomy ]->hierarchical ) { + $value = $item['term']->taxonomy . ':' . $item['term']->name; + } + $out[] = $this->make_term_sort_item( $value, $item['term']->name ); } } $out[] = ''; @@ -468,16 +473,9 @@ private function init_taxonomy_manager( $post ) { wp_enqueue_script( 'term-ordering', $this->media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true ); } - $taxonomies = get_object_taxonomies( $post, 'objects' ); - $data = array(); + $data = array(); foreach ( $taxonomies as $taxonomy ) { - $args = array( - 'taxonomy' => $taxonomy->name, - 'hide_empty' => false, - ); - $terms = get_terms( $args ); - $data[] = array( 'slug' => $taxonomy->name, 'hierarchical' => $taxonomy->hierarchical, @@ -485,16 +483,6 @@ private function init_taxonomy_manager( $post ) { 'visibility' => array( 'public' => $taxonomy->public, ), - 'terms' => array_map( - function ( $item ) { - return array( - 'id' => $item->term_id, - 'name' => $item->name, - 'taxonomy' => $item->taxonomy, - ); - }, - $terms - ), ); } $this->media->plugin->add_script_data( 'taxonomies', $data ); diff --git a/src/js/classic-editor.js b/src/js/classic-editor.js index ec34221a6..1bec80e52 100644 --- a/src/js/classic-editor.js +++ b/src/js/classic-editor.js @@ -3,50 +3,81 @@ import TermsInspector from './components/terms-inspector'; const ClassicEditor = { ...TermsInspector, + initTimeout: 10, + interval: 100, selection: {}, tagDelimiter: wp.i18n._x( ',', 'tag delimiter' ) || ',', getTaxonomies() { return cldData.taxonomies; }, addTaxonomyListener( taxonomy ) { - const inputs = document.querySelectorAll( `#taxonomy-${ taxonomy.slug } .selectit input[type="checkbox"],textarea[name=tax_input\\[${ taxonomy.slug }\\]]` ); + const catBox = document.getElementById( `taxonomy-${ taxonomy.slug }` ); + const tagBox = document.getElementById( `tax-input-${ taxonomy.slug }` ); + this.selection[ taxonomy.slug ] = { + items: 0, + selected: 0, + }; - this.available[ taxonomy.slug ] = Object.values( taxonomy.terms ); - this.selection[ taxonomy.slug ] = []; - inputs.forEach( input => { - let value = parseInt( input.value ); - if ( Object.is( value, NaN ) ) { - value = input.value; + // Run the watch. + setInterval( () => { + if ( catBox ) { + this.watchCatBox( catBox, taxonomy ); } - if ( 'checkbox' === input.type ) { - if ( input.checked && -1 === this.selection[ taxonomy.slug ].indexOf( value ) ) { - this.selection[ taxonomy.slug ].push( value ); - } - } else if ( 'textarea' === input.type ) { - const keys = value.split( this.tagDelimiter ); - keys.forEach( ( tag ) => { - const tagValue = tag.trim(); - if ( -1 === this.selection[ taxonomy.slug ].indexOf( tagValue ) ) { - this.selection[ taxonomy.slug ].push( tagValue ); - } - } ); + if ( tagBox ) { + this.watchTagBox( tagBox, taxonomy ); } - input.addEventListener( 'change', () => { - const index = this.selection[ taxonomy.slug ].indexOf( value ); - if ( input.checked ) { - this.selection[ taxonomy.slug ].push( value ); - } else if ( -1 < index ) { - this.selection[ taxonomy.slug ].splice( index, 1 ); + }, this.interval ); + }, + watchCatBox( catBox, taxonomy ) { + const checks = catBox.querySelectorAll( 'input[type="checkbox"]' ); + const checked = Array.from( checks ).filter( check => true === check.checked ); + if ( this.selection[ taxonomy.slug ].items !== checks.length || this.selection[ taxonomy.slug ].selected !== checked.length ) { + checks.forEach( ( checkbox ) => { + const hasItem = this.wrapper.querySelector( `[data-item="${ taxonomy.slug }:${ checkbox.value }"]` ); + if ( checkbox.checked && ! hasItem ) { + const term = { + id: checkbox.value, + name: checkbox.parentNode.innerText.trim(), + taxonomy: taxonomy.slug, + }; + this.createItem( term ); + } else if ( ! checkbox.checked && hasItem ) { + hasItem.parentNode.removeChild( hasItem ); } + } ); + this.selection[ taxonomy.slug ].items = checks.length; + this.selection[ taxonomy.slug ].selected = checked.length; + } + }, + watchTagBox( tagBox, taxonomy ) { + const cleaned = window.tagBox.clean( tagBox.value ); + if ( this.selection[ taxonomy.slug ].items !== cleaned ) { + const newItems = cleaned.split( this.tagDelimiter ); + const oldItems = this.wrapper.querySelectorAll( `[data-item^=${ taxonomy.slug }\\:]` ); - this.event( taxonomy ); + oldItems.forEach( ( item ) => { + const tag = item.dataset.item.split( ':' )[ 1 ]; + const index = newItems.indexOf( tag ); + if ( -1 === index ) { + item.parentNode.removeChild( item ); + } else { + newItems.splice( index, 1 ); + } } ); - } ); - this.event( taxonomy ); + if ( newItems.length ) { + newItems.forEach( ( item ) => { + const term = { + id: item, + name: item, + taxonomy: taxonomy.slug, + }; + this.createItem( term ); + } ); + } + this.selection[ taxonomy.slug ].items = cleaned; + } + }, - getSelection( taxonomy ) { - return this.selection[ taxonomy.slug ]; - } }; if ( typeof window.CLDN !== 'undefined' ) { ClassicEditor._init(); diff --git a/src/js/components/terms-inspector.js b/src/js/components/terms-inspector.js index 7ac1250e0..9e3b67c5a 100644 --- a/src/js/components/terms-inspector.js +++ b/src/js/components/terms-inspector.js @@ -5,6 +5,7 @@ import { select, subscribe } from '@wordpress/data'; import Sortable from 'sortablejs'; const TermsInspector = { + initTimeout: 3000, wrapper: null, /** * Leverage the existing Gutenberg query to get the taxonomies. @@ -25,7 +26,7 @@ const TermsInspector = { // At the given time, not enough options are available to detect when core requests are ready. setTimeout( () => { this._init_listeners(); - }, 3000 ); + }, this.initTimeout ); new Sortable( this.wrapper, { handle: '.dashicons-menu', // handle's class @@ -91,6 +92,7 @@ const TermsInspector = { const element = this.wrapper.querySelector( `[data-item="${ taxonomy.slug }:${ item }"]` ); + // Remove the items out of the selected list. selected.splice( selected.indexOf( element ), 1 ); if ( null === element ) { @@ -131,7 +133,11 @@ const TermsInspector = { this.wrapper.appendChild( li ); }, getItem( taxonomy, id ) { - let term = {}; + let term = { + id, + name: id, + taxonomy: taxonomy.slug, + }; if ( null === this.available[ taxonomy.slug ] ) { // Get term from data. term = this.getTerm( taxonomy, id ); From deef115303f0d1d84e4781929aa1e560ea9c29a1 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 30 Jan 2022 10:27:07 +0200 Subject: [PATCH 16/19] rebuild assets --- js/asset-edit.js | 2 +- js/asset-manager.js | 2 +- js/breakpoints-preview.js | 2 +- js/front-overlay.js | 2 +- js/gallery-ui.js | 2 +- js/lazyload-preview.js | 2 +- js/syntax-highlight.js | 2 +- js/video.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/asset-edit.js b/js/asset-edit.js index fb01c7410..172e0980f 100644 --- a/js/asset-edit.js +++ b/js/asset-edit.js @@ -1 +1 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=46)}({0:function(t,e,r){"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,"a",(function(){return n}))},1:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(4),i=r.n(n);r(2),i()(console.error);var o=r(0),a=r(5);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";f.data[e]=c(c(c({},v),f.data[e]),t),f.data[e][""]=c(c({},v[""]),f.data[e][""])},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[t]||p(void 0,t),f.dcnpgettext(t,e,r,n,i)},d=function(t,e,r){return h(r,e,t)},u&&p(u,l),{setLocaleData:p,__:function(t,e){return h(e,void 0,t)},_x:d,_n:function(t,e,r,n){return h(n,void 0,t,e,r)},_nx:function(t,e,r,n,i){return h(i,n,t,e,r)},isRTL:function(){return"rtl"===d("ltr","text direction")}}),b=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},12:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===h)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return D()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=P(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=h;var c=l(t,e,r);if("normal"===c.type){if(n=r.done?d:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",d="completed",v={};function y(){}function b(){}function g(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,O=w&&w(w(A([])));O&&O!==r&&n.call(O,o)&&(m=O);var j=g.prototype=y.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},2:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return s(u(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}function s(t,e){var r,n,a,s,c,u,l,f,p,h=1,d=t.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?p="":(p=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(p+r).length,c=s.width&&l>0?u.repeat(l):"",v+=s.align?p+r+c:"0"===u?p+c+r:c+p+r)}return v}var c=Object.create(null);function u(t){if(c[t])return c[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],s=e[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return c[t]=n}e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},3:function(t,e,r){"use strict";var n=r(0);function i(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var o=r(4),a=r.n(o);r(2),a()(console.error);var s=r(5);function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e3&&void 0!==arguments[3]?arguments[3]:10,a=t[e];if(h(r)&&p(n))if("function"==typeof i)if("number"==typeof o){var s={callback:i,priority:o,namespace:n};if(a[r]){var c,u=a[r].handlers;for(c=u.length;c>0&&!(o>=u[c-1].priority);c--);c===u.length?u[c]=s:u.splice(c,0,s),a.__current.forEach((function(t){t.name===r&&t.currentIndex>=c&&t.currentIndex++}))}else a[r]={handlers:[s],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,n,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var v=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,i){var o=t[e];if(h(n)&&(r||p(i))){if(!o[n])return 0;var a=0;if(r)a=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var s=o[n].handlers,c=function(t){s[t].namespace===i&&(s.splice(t,1),a++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},u=s.length-1;u>=0;u--)c(u);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,i),a}}};var y=function(t,e){return function(r,n){var i=t[e];return void 0!==n?r in i&&i[r].handlers.some((function(t){return t.namespace===n})):r in i}};function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=t[e];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var o=i[n].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=u(u(u({},l),n.data[e]),t),n.data[e][""]=u(u({},l[""]),n.data[e][""])},c=function(t,e){a(t,e),o()},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||a(void 0,t),n.dcnpgettext(t,e,r,i,o)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},d=function(t,e,n){var i=p(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+h(n),i,t,e,n)):i};if(t&&c(t,e),r){var v=function(t){f.test(t)&&o()};r.addAction("hookAdded","core/i18n",v),r.addAction("hookRemoved","core/i18n",v)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:c,resetLocaleData:function(t,e){n.data={},n.pluralForms={},c(t,e)},subscribe:function(t){return i.add(t),function(){return i.delete(t)}},__:function(t,e){var n=p(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+h(e),n,t,e)):n},_x:d,_n:function(t,e,n,i){var o=p(i,void 0,t,e,n);return r?(o=r.applyFilters("i18n.ngettext",o,t,e,n,i),r.applyFilters("i18n.ngettext_"+h(i),o,t,e,n,i)):o},_nx:function(t,e,n,i,o){var a=p(o,i,t,e,n);return r?(a=r.applyFilters("i18n.ngettext_with_context",a,t,e,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+h(o),a,t,e,n,i,o)):a},isRTL:function(){return"rtl"===d("ltr","text direction")},hasTranslation:function(t,e,i){var o,a,s=e?e+""+t:t,c=!(null===(o=n.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return r&&(c=r.applyFilters("i18n.has_translation",c,t,e,i),c=r.applyFilters("i18n.has_translation_"+h(i),c,t,e,i)),c}}}(void 0,void 0,_)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var r=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(H(t),e),r=r.substr(0,n)),r+"?"+X(e)}function Z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Y(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},V=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),r=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||r},tt=function(){var t,e=(t=U.a.mark((function t(e,r){var n,o,a,s,c,u;return U.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",r(e));case 2:if(V(e)){t.next=4;break}return t.abrupt("return",r(e));case 4:return t.next=6,wt(Y(Y({},(f={per_page:100},p=void 0,h=void 0,p=(l=e).path,h=l.url,Y(Y({},i(l,["path","url"])),{},{url:h&&K(h,f),path:p&&K(p,f)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,q(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(a=Q(n)){t.next=15;break}return t.abrupt("return",o);case 15:s=[].concat(o);case 16:if(!a){t.next=27;break}return t.next=19,wt(Y(Y({},e),{},{path:void 0,url:a,parse:!1}));case 19:return c=t.sent,t.next=22,q(c);case 22:u=t.sent,s=s.concat(u),a=Q(c),t.next=16;break;case 27:return t.abrupt("return",s);case 28:case"end":return t.stop()}var l,f,p,h}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){M(o,n,i,a,s,"next",t)}function s(t){M(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t,r){return e.apply(this,arguments)}}();function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rt(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},at=function(t){var e={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},st=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(ot(t,e)).catch((function(t){return ct(t,e)}))};function ct(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return at(t).then((function(t){var e={code:"unknown_error",message:E("An unknown error occurred.")};throw t||e}))}function ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e=500&&e.status<600&&r?n(r).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):ct(e,t.parse)})).then((function(e){return st(e,t.parse)}))};function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e=200&&t.status<300)return t;throw t},gt=function(t){var e=t.url,r=t.path,n=t.data,o=t.parse,a=void 0===o||o,s=i(t,["url","path","data","parse"]),c=t.body,u=t.headers;return u=ht(ht({},dt),u),n&&(c=JSON.stringify(n),u["Content-Type"]="application/json"),window.fetch(e||r||window.location.href,ht(ht(ht({},vt),s),{},{body:c,headers:u})).then((function(t){return Promise.resolve(t).then(bt).catch((function(t){return ct(t,a)})).then((function(t){return st(t,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function mt(t){return yt.reduceRight((function(t,e){return function(r){return e(r,t)}}),gt)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(mt.nonceEndpoint).then(bt).then((function(t){return t.text()})).then((function(e){return mt.nonceMiddleware.nonce=e,mt(t)}))}))}mt.use=function(t){yt.unshift(t)},mt.setFetchHandler=function(t){gt=t},mt.createNonceMiddleware=A,mt.createPreloadingMiddleware=R,mt.createRootURLMiddleware=C,mt.fetchAllMiddleware=tt,mt.mediaUploadMiddleware=ft;var wt=e.a=mt},4:function(t,e,r){t.exports=function(t,e){var r,n,i=0;function o(){var o,a,s=r,c=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(a=0;ae?t:e,this.defaultWidth=t,this.defaultHeight=e,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=Object(n.a)("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",(t=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"})),this.preview.addEventListener("error",(t=>{this.preview.src=this.getNoURL("⚠")})),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url})),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(t,e=!1){this.preview.style.opacity=.6,e?(this.apply.style.display="none",this.preview.src=t):(this.apply.style.display="block",this.url=t)},getNoURL(t="︎"){const e=this.defaultWidth/2-23,r=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,${t}`}},o=r(3);var a={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(t){if(void 0!==cldData.editor)return o.a.use(o.a.createNonceMiddleware(cldData.editor.nonce)),this.callback=t,this},save(t){this.doBefore(t),Object(o.a)({path:cldData.editor.save_url,data:t,method:"POST"}).then((t=>{this.doComplete(t,this)}))},doBefore(t){this.beforeCallbacks.forEach((e=>e(t,this)))},doComplete(t){this.completeCallbacks.forEach((e=>e(t,this)))},onBefore(t){this.beforeCallbacks.push(t)},onComplete(t){this.completeCallbacks.push(t)}};const s={wrap:document.getElementById("cld-asset-edit"),preview:null,id:null,editor:null,base:null,publicId:null,size:null,transformationsInput:document.getElementById("cld-asset-edit-transformations"),saveButton:document.getElementById("cld-asset-edit-save"),currentURL:null,init(){const t=JSON.parse(this.wrap.dataset.item);this.id=t.ID,this.base=t.base+t.size+"/",this.publicId=t.file,this.transformationsInput.value=t.transformations?t.transformations:"",this.initPreview(),this.initEditor()},initPreview(){this.preview=i.init(),this.wrap.appendChild(this.preview.createPreview(900,675)),this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId,!0),this.transformationsInput.addEventListener("input",(t=>{this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId)})),this.transformationsInput.addEventListener("keydown",(t=>{"Enter"===t.code&&(t.preventDefault(),this.saveButton.dispatchEvent(new Event("click")))}))},initEditor(){this.editor=a.init(),this.editor.onBefore((()=>this.preview.reset())),this.editor.onComplete((t=>{this.transformationsInput.value=t.transformations,this.preview.setSrc(this.base+t.transformations+this.publicId,!0),t.note&&alert(t.note)})),this.saveButton.addEventListener("click",(()=>{this.editor.save({ID:this.id,transformations:this.transformationsInput.value})}))}};window.addEventListener("load",(()=>s.init()));e.default=s},5:function(t,e,r){"use strict";var n,i,o,a;r.d(e,"a",(function(){return l})),n={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function c(t){var e=function(t){for(var e,r,s,c,u=[],l=[];e=t.match(a);){for(r=e[0],(s=t.substr(0,e.index).trim())&&u.push(s);c=l.pop();){if(o[r]){if(o[r][0]===c){r=o[r][1]||r;break}}else if(i.indexOf(c)>=0||n[c]1&&void 0!==arguments[1]?arguments[1]:"default";f.data[e]=s(s(s({},v),f.data[e]),t),f.data[e][""]=s(s({},v[""]),f.data[e][""])},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[t]||p(void 0,t),f.dcnpgettext(t,e,r,n,i)},d=function(t,e,r){return h(r,e,t)},u&&p(u,l),{setLocaleData:p,__:function(t,e){return h(e,void 0,t)},_x:d,_n:function(t,e,r,n){return h(n,void 0,t,e,r)},_nx:function(t,e,r,n,i){return h(i,n,t,e,r)},isRTL:function(){return"rtl"===d("ltr","text direction")}}),b=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},10:function(t,e,r){t.exports=r(15)},11:function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var c=t[o](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function c(t){n(a,i,o,c,s,"next",t)}function s(t){n(a,i,o,c,s,"throw",t)}c(void 0)}))}}r.d(e,"a",(function(){return i}))},12:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(7);var i=r(9);function o(t){return function(t){if(Array.isArray(t))return Object(n.a)(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Object(i.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},13:function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var i=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var o=function(t,e){return function(r,o,a){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(i(r)&&n(o))if("function"==typeof a)if("number"==typeof c){var u={callback:a,priority:c,namespace:o};if(s[r]){var l,f=s[r].handlers;for(l=f.length;l>0&&!(c>=f[l-1].priority);l--);l===f.length?f[l]=u:f.splice(l,0,u),s.__current.forEach((function(t){t.name===r&&t.currentIndex>=l&&t.currentIndex++}))}else s[r]={handlers:[u],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,o,a,c)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(o,a){var c=t[e];if(i(o)&&(r||n(a))){if(!c[o])return 0;var s=0;if(r)s=c[o].handlers.length,c[o]={runs:c[o].runs,handlers:[]};else for(var u=c[o].handlers,l=function(t){u[t].namespace===a&&(u.splice(t,1),s++,c.__current.forEach((function(e){e.name===o&&e.currentIndex>=t&&e.currentIndex--})))},f=u.length-1;f>=0;f--)l(f);return"hookRemoved"!==o&&t.doAction("hookRemoved",o,a),s}}};var c=function(t,e){return function(r,n){var i=t[e];return void 0!==n?r in i&&i[r].handlers.some((function(t){return t.namespace===n})):r in i}};r(12);var s=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=t[e];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var o=i[n].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;s=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:A(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},2:function(t,e,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return c(u(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}function c(t,e){var r,n,a,c,s,u,l,f,p,h=1,d=t.length,v="";for(n=0;n=0),c.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,c.width?parseInt(c.width):0);break;case"e":r=c.precision?parseFloat(r).toExponential(c.precision):parseFloat(r).toExponential();break;case"f":r=c.precision?parseFloat(r).toFixed(c.precision):parseFloat(r);break;case"g":r=c.precision?String(Number(r.toPrecision(c.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=c.precision?r.substring(0,c.precision):r;break;case"t":r=String(!!r),r=c.precision?r.substring(0,c.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=c.precision?r.substring(0,c.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=c.precision?r.substring(0,c.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?v+=r:(!i.number.test(c.type)||f&&!c.sign?p="":(p=f?"+":"-",r=r.toString().replace(i.sign,"")),u=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",l=c.width-(p+r).length,s=c.width&&l>0?u.repeat(l):"",v+=c.align?p+r+s:"0"===u?p+s+r:s+p+r)}return v}var s=Object.create(null);function u(t){if(s[t])return s[t];for(var e,r=t,n=[],o=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],c=e[2],u=[];if(null===(u=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=i.key_access.exec(c)))a.push(u[1]);else{if(null===(u=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}e.sprintf=o,e.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(n=function(){return{sprintf:o,vsprintf:a}}.call(e,r,e,t))||(t.exports=n))}()},4:function(t,e,r){"use strict";var n=r(0);function i(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var o=r(5),a=r.n(o);r(2),a()(console.error);var c=r(6);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=u(u(u({},l),n.data[e]),t),n.data[e][""]=u(u({},l[""]),n.data[e][""])},s=function(t,e){a(t,e),o()},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||a(void 0,t),n.dcnpgettext(t,e,r,i,o)},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return t},d=function(t,e,n){var i=p(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+h(n),i,t,e,n)):i};if(t&&s(t,e),r){var v=function(t){f.test(t)&&o()};r.addAction("hookAdded","core/i18n",v),r.addAction("hookRemoved","core/i18n",v)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:s,resetLocaleData:function(t,e){n.data={},n.pluralForms={},s(t,e)},subscribe:function(t){return i.add(t),function(){return i.delete(t)}},__:function(t,e){var n=p(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+h(e),n,t,e)):n},_x:d,_n:function(t,e,n,i){var o=p(i,void 0,t,e,n);return r?(o=r.applyFilters("i18n.ngettext",o,t,e,n,i),r.applyFilters("i18n.ngettext_"+h(i),o,t,e,n,i)):o},_nx:function(t,e,n,i,o){var a=p(o,i,t,e,n);return r?(a=r.applyFilters("i18n.ngettext_with_context",a,t,e,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+h(o),a,t,e,n,i,o)):a},isRTL:function(){return"rtl"===d("ltr","text direction")},hasTranslation:function(t,e,i){var o,a,c=e?e+""+t:t,s=!(null===(o=n.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return r&&(s=r.applyFilters("i18n.has_translation",s,t,e,i),s=r.applyFilters("i18n.has_translation_"+h(i),s,t,e,i)),s}}}(void 0,void 0,r(13).a),h=(p.getLocaleData.bind(p),p.setLocaleData.bind(p),p.resetLocaleData.bind(p),p.subscribe.bind(p),p.__.bind(p));p._x.bind(p),p._n.bind(p),p._nx.bind(p),p.isRTL.bind(p),p.hasTranslation.bind(p);function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function v(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw o}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var r=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(L(t),e),r=r.substr(0,n)),r+"?"+T(e)}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},U=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),r=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||r},$=function(){var t=Object(P.a)(k.a.mark((function t(e,r){var n,o,a,c,s,u;return k.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",r(e));case 2:if(U(e)){t.next=4;break}return t.abrupt("return",r(e));case 4:return t.next=6,ct(R(R({},(f={per_page:100},p=void 0,h=void 0,p=(l=e).path,h=l.url,R(R({},i(l,["path","url"])),{},{url:h&&C(h,f),path:p&&C(p,f)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,M(n);case 9:if(o=t.sent,Array.isArray(o)){t.next=12;break}return t.abrupt("return",o);case 12:if(a=z(n)){t.next=15;break}return t.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){t.next=27;break}return t.next=19,ct(R(R({},e),{},{path:void 0,url:a,parse:!1}));case 19:return s=t.sent,t.next=22,M(s);case 22:u=t.sent,c=c.concat(u),a=z(s),t.next=16;break;case 27:return t.abrupt("return",c);case 28:case"end":return t.stop()}var l,f,p,h}),t)})));return function(e,r){return t.apply(this,arguments)}}();function B(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function G(t){for(var e=1;e1&&void 0!==arguments[1])||arguments[1];return e?204===t.status?null:t.json?t.json():Promise.reject(t):t},X=function(t){var e={code:"invalid_json",message:h("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))},K=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(J(t,e)).catch((function(t){return Z(t,e)}))};function Z(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)throw t;return X(t).then((function(t){var e={code:"unknown_error",message:h("An unknown error occurred.")};throw t||e}))}function Y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function q(t){for(var e=1;e=500&&e.status<600&&r?n(r).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:h("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):Z(e,t.parse)})).then((function(e){return K(e,t.parse)}))};function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function tt(t){for(var e=1;e=200&&t.status<300)return t;throw t},ot=function(t){var e=t.url,r=t.path,n=t.data,o=t.parse,a=void 0===o||o,c=i(t,["url","path","data","parse"]),s=t.body,u=t.headers;return u=tt(tt({},et),u),n&&(s=JSON.stringify(n),u["Content-Type"]="application/json"),window.fetch(e||r||window.location.href,tt(tt(tt({},rt),c),{},{body:s,headers:u})).then((function(t){return Promise.resolve(t).then(it).catch((function(t){return Z(t,a)})).then((function(t){return K(t,a)}))}),(function(){throw{code:"fetch_error",message:h("You are probably offline.")}}))};function at(t){return nt.reduceRight((function(t,e){return function(r){return e(r,t)}}),ot)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(at.nonceEndpoint).then(it).then((function(t){return t.text()})).then((function(e){return at.nonceMiddleware.nonce=e,at(t)}))}))}at.use=function(t){nt.unshift(t)},at.setFetchHandler=function(t){ot=t},at.createNonceMiddleware=y,at.createPreloadingMiddleware=_,at.createRootURLMiddleware=j,at.fetchAllMiddleware=$,at.mediaUploadMiddleware=Q;var ct=e.a=at},5:function(t,e,r){t.exports=function(t,e){var r,n,i=0;function o(){var o,a,c=r,s=arguments.length;t:for(;c;){if(c.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function s(t){var e=function(t){for(var e,r,c,s,u=[],l=[];e=t.match(a);){for(r=e[0],(c=t.substr(0,e.index).trim())&&u.push(c);s=l.pop();){if(o[r]){if(o[r][0]===s){r=o[r][1]||r;break}}else if(i.indexOf(s)>=0||n[s]t.length)&&(e=t.length);for(var r=0,n=new Array(e);re?t:e,this.defaultWidth=t,this.defaultHeight=e,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=Object(n.a)("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",(t=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"})),this.preview.addEventListener("error",(t=>{this.preview.src=this.getNoURL("⚠")})),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url})),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(t,e=!1){this.preview.style.opacity=.6,e?(this.apply.style.display="none",this.preview.src=t):(this.apply.style.display="block",this.url=t)},getNoURL(t="︎"){const e=this.defaultWidth/2-23,r=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,${t}`}},o=r(4);var a={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(t){if(void 0!==cldData.editor)return o.a.use(o.a.createNonceMiddleware(cldData.editor.nonce)),this.callback=t,this},save(t){this.doBefore(t),Object(o.a)({path:cldData.editor.save_url,data:t,method:"POST"}).then((t=>{this.doComplete(t,this)}))},doBefore(t){this.beforeCallbacks.forEach((e=>e(t,this)))},doComplete(t){this.completeCallbacks.forEach((e=>e(t,this)))},onBefore(t){this.beforeCallbacks.push(t)},onComplete(t){this.completeCallbacks.push(t)}};const c={wrap:document.getElementById("cld-asset-edit"),preview:null,id:null,editor:null,base:null,publicId:null,size:null,transformationsInput:document.getElementById("cld-asset-edit-transformations"),saveButton:document.getElementById("cld-asset-edit-save"),currentURL:null,init(){const t=JSON.parse(this.wrap.dataset.item);this.id=t.ID,this.base=t.base+t.size+"/",this.publicId=t.file,this.transformationsInput.value=t.transformations?t.transformations:"",this.initPreview(),this.initEditor()},initPreview(){this.preview=i.init(),this.wrap.appendChild(this.preview.createPreview(900,675)),this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId,!0),this.transformationsInput.addEventListener("input",(t=>{this.preview.setSrc(this.base+this.transformationsInput.value+this.publicId)})),this.transformationsInput.addEventListener("keydown",(t=>{"Enter"===t.code&&(t.preventDefault(),this.saveButton.dispatchEvent(new Event("click")))}))},initEditor(){this.editor=a.init(),this.editor.onBefore((()=>this.preview.reset())),this.editor.onComplete((t=>{this.transformationsInput.value=t.transformations,this.preview.setSrc(this.base+t.transformations+this.publicId,!0),t.note&&alert(t.note)})),this.saveButton.addEventListener("click",(()=>{this.editor.save({ID:this.id,transformations:this.transformationsInput.value})}))}};window.addEventListener("load",(()=>c.init()));e.default=c},8:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(9);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null!=r){var n,i,o=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(o.push(n.value),!e||o.length!==e);a=!0);}catch(t){c=!0,i=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw i}}return o}}(t,e)||Object(n.a)(t,e)||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.")}()}},9:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(7);function i(t,e){if(t){if("string"==typeof t)return Object(n.a)(t,e);var r=Object.prototype.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)?Object(n.a)(t,e):void 0}}}}); \ No newline at end of file diff --git a/js/asset-manager.js b/js/asset-manager.js index ebecd580f..fcd9314a9 100644 --- a/js/asset-manager.js +++ b/js/asset-manager.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=37)}([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(4),i=n.n(r);n(2),i()(console.error);var o=n(0),a=n(5);function c(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 s(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=s(s(s({},g),d.data[t]),e),d.data[t][""]=s(s({},g[""]),d.data[t][""])},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||p(void 0,e),d.dcnpgettext(e,t,n,r,i)},f=function(e,t,n){return h(n,t,e)},l&&p(l,u),{setLocaleData:p,__:function(e,t){return h(t,void 0,e)},_x:f,_n:function(e,t,n,r){return h(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return h(i,r,e,t,n)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),y=(v.setLocaleData.bind(v),v.__.bind(v));v._x.bind(v),v._n.bind(v),v._nx.bind(v),v.isRTL.bind(v)},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return c(l(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function c(e,t){var n,r,a,c,s,l,u,d,p,h=1,f=e.length,g="";for(r=0;r=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?g+=n:(!i.number.test(c.type)||d&&!c.sign?p="":(p=d?"+":"-",n=n.toString().replace(i.sign,"")),l=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",u=c.width-(p+n).length,s=c.width&&u>0?l.repeat(u):"",g+=c.align?p+n+s:"0"===l?p+s+n:s+p+n)}return g}var s=Object.create(null);function l(e){if(s[e])return s[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],c=t[2],l=[];if(null===(l=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(c=c.substring(l[0].length));)if(null!==(l=i.key_access.exec(c)))a.push(l[1]);else{if(null===(l=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t,n){"use strict";var r=n(0);function i(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=n(4),a=n.n(o);n(2),a()(console.error);var c=n(5);function s(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 l(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:10,a=e[t];if(h(n)&&p(r))if("function"==typeof i)if("number"==typeof o){var c={callback:i,priority:o,namespace:r};if(a[n]){var s,l=a[n].handlers;for(s=l.length;s>0&&!(o>=l[s-1].priority);s--);s===l.length?l[s]=c:l.splice(s,0,c),a.__current.forEach((function(e){e.name===n&&e.currentIndex>=s&&e.currentIndex++}))}else a[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var g=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=e[t];if(h(r)&&(n||p(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var c=o[r].handlers,s=function(e){c[e].namespace===i&&(c.splice(e,1),a++,o.__current.forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},l=c.length-1;l>=0;l--)s(l);return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),a}}};var v=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;s1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=l(l(l({},u),r.data[t]),e),r.data[t][""]=l(l({},u[""]),r.data[t][""])},s=function(e,t){a(e,t),o()},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},f=function(e,t,r){var i=p(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+h(r),i,e,t,r)):i};if(e&&s(e,t),n){var g=function(e){d.test(e)&&o()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:function(e,t){r.data={},r.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=p(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+h(t),r,e,t)):r},_x:f,_n:function(e,t,r,i){var o=p(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+h(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=p(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+h(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===f("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,c=t?t+""+e:e,s=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+h(i),s,e,t,i)),s}}}(void 0,void 0,x)),E=(P.getLocaleData.bind(P),P.setLocaleData.bind(P),P.resetLocaleData.bind(P),P.subscribe.bind(P),P.__.bind(P));P._x.bind(P),P._n.bind(P),P._nx.bind(P),P.isRTL.bind(P),P.hasTranslation.bind(P);function k(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 S(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(H(e),t),n=n.substr(0,r)),n+"?"+X(t)}function q(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 Y(e){for(var t=1;t]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},V=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},ee=function(){var e,t=(e=B.a.mark((function e(t,n){var r,o,a,c,s,l;return B.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(V(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,Oe(Y(Y({},(d={per_page:100},p=void 0,h=void 0,p=(u=t).path,h=u.url,Y(Y({},i(u,["path","url"])),{},{url:h&&Z(h,d),path:p&&Z(p,d)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,W(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=Q(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,Oe(Y(Y({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,W(s);case 22:l=e.sent,c=c.concat(l),a=Q(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var u,d,p,h}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){z(o,r,i,a,c,"next",e)}function c(e){z(o,r,i,a,c,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();function te(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 ne(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},ae=function(e){var t={code:"invalid_json",message:E("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},ce=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(oe(e,t)).catch((function(e){return se(e,t)}))};function se(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return ae(e).then((function(e){var t={code:"unknown_error",message:E("An unknown error occurred.")};throw e||t}))}function le(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 ue(e){for(var t=1;t=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:E("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):se(t,e.parse)})).then((function(t){return ce(t,e.parse)}))};function pe(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 he(e){for(var t=1;t=200&&e.status<300)return e;throw e},be=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=i(e,["url","path","data","parse"]),s=e.body,l=e.headers;return l=he(he({},fe),l),r&&(s=JSON.stringify(r),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,he(he(he({},ge),c),{},{body:s,headers:l})).then((function(e){return Promise.resolve(e).then(ye).catch((function(e){return se(e,a)})).then((function(e){return ce(e,a)}))}),(function(){throw{code:"fetch_error",message:E("You are probably offline.")}}))};function me(e){return ve.reduceRight((function(e,t){return function(n){return t(n,e)}}),be)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(me.nonceEndpoint).then(ye).then((function(e){return e.text()})).then((function(t){return me.nonceMiddleware.nonce=t,me(e)}))}))}me.use=function(e){ve.unshift(e)},me.setFetchHandler=function(e){be=e},me.createNonceMiddleware=L,me.createPreloadingMiddleware=M,me.createRootURLMiddleware=F,me.fetchAllMiddleware=ee,me.mediaUploadMiddleware=de;var Oe=t.a=me},function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function s(e){var t=function(e){for(var t,n,c,s,l=[],u=[];t=e.match(a);){for(n=t[0],(c=e.substr(0,t.index).trim())&&l.push(c);s=u.pop();){if(o[n]){if(o[n][0]===s){n=o[n][1]||n;break}}else if(i.indexOf(s)>=0||r[s]this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((e=>e.json())).then((e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))}))}};t.a=r},,,function(e,t,n){"use strict";var r=n(14),i=n.n(r);const o={controlled:null,bind(e){this.controlled=e,this.controlled.forEach((e=>{this._main(e)})),this._init()},_init(){this.controlled.forEach((e=>{this._checkUp(e)}))},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map((t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n})),this._bindEvents(e),e.mains.forEach((e=>{this._bindEvents(e)}))},_bindEvents(e){e.eventBound||(e.addEventListener("click",(t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)})),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))})),e.elements.forEach((t=>{this._checkDown(t),t.elements||this._checkUp(t,e)})))},_checkUp(e,t){e.mains&&[...e.mains].forEach((e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)}))},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach((r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)}));let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach((t=>{t.checked&&(e.filesize+=t.filesize)}));let t=null;0=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(s&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},,function(e,t,n){var r,i,o,a;a=function(){var e="BKMGTPEZY".split("");function t(e,t){return e&&e.toLowerCase()===t.toLowerCase()}return function(n,r){return n="number"==typeof n?n:0,(r=r||{}).fixed="number"==typeof r.fixed?r.fixed:2,r.spacer="string"==typeof r.spacer?r.spacer:" ",r.calculate=function(e){var i=t(e,"si")?["k","B"]:["K","iB"],o=t(e,"si")?1e3:1024,a=Math.log(n)/Math.log(o)|0,c=n/Math.pow(o,a),s=c.toFixed(r.fixed);return a-1<3&&!t(e,"si")&&t(e,"jedec")&&(i[1]="B"),{suffix:a?(i[0]+"MGTPEZY")[a-1]+i[1]:1==(0|s)?"Byte":"Bytes",magnitude:a,result:c,fixed:s,bits:{result:c/8,fixed:(c/8).toFixed(r.fixed)}}},r.to=function(r,i){var o=t(i,"si")?1e3:1024,a=e.indexOf("string"==typeof r?r[0].toUpperCase():"B"),c=n;if(-1===a||0===a)return c.toFixed(2);for(;a>0;a--)c/=o;return c.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(3),i=n(1),o=n(10),a=n(7);const c={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){r.a.use(r.a.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach((e=>this._bind(e)));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",(()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)})),this._watchPurge(t),setInterval((()=>{this._watchPurge(t)}),5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),o=document.createElement("td");o.colSpan=2,o.className="cld-loading",i.appendChild(o);const a=document.getElementById(t.dataset.slug+"_search"),c=document.getElementById(t.dataset.slug+"_reload"),s=document.getElementById(t.dataset.browser),l=document.getElementById(t.dataset.apply);l.style.float="right",l.style.marginLeft="6px",s.addEventListener("change",(t=>{this._handleManager(e)})),n.addEventListener("change",(t=>{this._handleManager(e)})),window.addEventListener("CacheToggle",(e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)})),l.addEventListener("click",(e=>{this._applyChanges(t)})),c.addEventListener("click",(t=>{this._load(e)})),a.addEventListener("keydown",(t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))})),r.className="cld-pagenav",l.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=a,t.controller=s,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=l,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,Object(r.a)({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then((e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");o.a.bind(n),t.loaded=!0}))},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,Object(r.a)({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then((t=>{e.dataset.updating="",0t.percent?(e.disabled="",this._purgeAll(e,!0)):0{e.innerText=Object(i.a)("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout((()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title}),2e3))}))},_set_state(e,t,n){this._showSpinners(n),Object(r.a)({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then((n=>{this._hideSpinners(n),n.forEach((n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"})),"delete"===t&&this._load(e.dataset.cachePoint)}))},_showSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="visible"}))},_hideSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="hidden"}))},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach((t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),o=this._getEdit(t,e);n.appendChild(i),n.appendChild(o),n.appendChild(r),e.appendChild(n)}))},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",(n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)})),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",(n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)}));const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",(n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,(function(){n._load(e.dataset.cachePoint)}))}}))}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=Object(i.a)("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const o=document.createElement("span"),a="spinner_"+t.ID;return o.className="spinner",o.id=a,n.appendChild(o),this.spinners[a]=o,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],o=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const o=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(o)})),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),o=document.createElement("input"),a=document.createElement("span"),c=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",o.type="checkbox",o.value=t.ID,o.checked=!(-1{const i=new CustomEvent("CacheToggle",{detail:{checked:o.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)})),r.appendChild(i),r}},s=document.getElementById("cloudinary-settings-page");s&&(a.a.init(),window.addEventListener("load",(()=>c.init(s,a.a))))}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=56)}([function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(5),i=n.n(r);n(2),i()(console.error);var o=n(0),a=n(6);function c(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 s(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=s(s(s({},g),d.data[t]),e),d.data[t][""]=s(s({},g[""]),d.data[t][""])},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||p(void 0,e),d.dcnpgettext(e,t,n,r,i)},h=function(e,t,n){return f(n,t,e)},u&&p(u,l),{setLocaleData:p,__:function(e,t){return f(t,void 0,e)},_x:h,_n:function(e,t,n,r){return f(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return f(i,r,e,t,n)},isRTL:function(){return"rtl"===h("ltr","text direction")}}),v=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return c(u(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function c(e,t){var n,r,a,c,s,u,l,d,p,f=1,h=e.length,g="";for(r=0;r=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?g+=n:(!i.number.test(c.type)||d&&!c.sign?p="":(p=d?"+":"-",n=n.toString().replace(i.sign,"")),u=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",l=c.width-(p+n).length,s=c.width&&l>0?u.repeat(l):"",g+=c.align?p+n+s:"0"===u?p+s+n:s+p+n)}return g}var s=Object.create(null);function u(e){if(s[e])return s[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],c=t[2],u=[];if(null===(u=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=i.key_access.exec(c)))a.push(u[1]);else{if(null===(u=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},,function(e,t,n){"use strict";var r=n(0);function i(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o=n(5),a=n.n(o);n(2),a()(console.error);var c=n(6);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=u(u(u({},l),r.data[t]),e),r.data[t][""]=u(u({},l[""]),r.data[t][""])},s=function(e,t){a(e,t),o()},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},h=function(e,t,r){var i=p(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+f(r),i,e,t,r)):i};if(e&&s(e,t),n){var g=function(e){d.test(e)&&o()};n.addAction("hookAdded","core/i18n",g),n.addAction("hookRemoved","core/i18n",g)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:function(e,t){r.data={},r.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=p(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+f(t),r,e,t)):r},_x:h,_n:function(e,t,r,i){var o=p(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+f(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=p(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+f(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===h("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,c=t?t+""+e:e,s=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+f(i),s,e,t,i)),s}}}(void 0,void 0,n(13).a),f=(p.getLocaleData.bind(p),p.setLocaleData.bind(p),p.resetLocaleData.bind(p),p.subscribe.bind(p),p.__.bind(p));p._x.bind(p),p._n.bind(p),p._nx.bind(p),p.isRTL.bind(p),p.hasTranslation.bind(p);function h(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 g(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(C(e),t),n=n.substr(0,r)),n+"?"+I(t)}function N(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 M(e){for(var t=1;t]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},B=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},U=function(){var e=Object(P.a)(k.a.mark((function e(t,n){var r,o,a,c,s,u;return k.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(B(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,ce(M(M({},(d={per_page:100},p=void 0,f=void 0,p=(l=t).path,f=l.url,M(M({},i(l,["path","url"])),{},{url:f&&F(f,d),path:p&&F(p,d)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,z(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=R(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,ce(M(M({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,z(s);case 22:u=e.sent,c=c.concat(u),a=R(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var l,d,p,f}),e)})));return function(t,n){return e.apply(this,arguments)}}();function G(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 J(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];return t?204===e.status?null:e.json?e.json():Promise.reject(e):e},X=function(e){var t={code:"invalid_json",message:f("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},Z=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(K(e,t)).catch((function(e){return q(e,t)}))};function q(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!t)throw e;return X(e).then((function(e){var t={code:"unknown_error",message:f("An unknown error occurred.")};throw e||t}))}function Y(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 W(e){for(var t=1;t=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:f("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):q(t,e.parse)})).then((function(t){return Z(t,e.parse)}))};function V(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 ee(e){for(var t=1;t=200&&e.status<300)return e;throw e},oe=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=i(e,["url","path","data","parse"]),s=e.body,u=e.headers;return u=ee(ee({},te),u),r&&(s=JSON.stringify(r),u["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,ee(ee(ee({},ne),c),{},{body:s,headers:u})).then((function(e){return Promise.resolve(e).then(ie).catch((function(e){return q(e,a)})).then((function(e){return Z(e,a)}))}),(function(){throw{code:"fetch_error",message:f("You are probably offline.")}}))};function ae(e){return re.reduceRight((function(e,t){return function(n){return t(n,e)}}),oe)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(ae.nonceEndpoint).then(ie).then((function(e){return e.text()})).then((function(t){return ae.nonceMiddleware.nonce=t,ae(e)}))}))}ae.use=function(e){re.unshift(e)},ae.setFetchHandler=function(e){oe=e},ae.createNonceMiddleware=y,ae.createPreloadingMiddleware=x,ae.createRootURLMiddleware=w,ae.fetchAllMiddleware=U,ae.mediaUploadMiddleware=Q;var ce=t.a=ae},function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function s(e){var t=function(e){for(var t,n,c,s,u=[],l=[];t=e.match(a);){for(n=t[0],(c=e.substr(0,t.index).trim())&&u.push(c);s=l.pop();){if(o[n]){if(o[n][0]===s){n=o[n][1]||n;break}}else if(i.indexOf(s)>=0||r[s]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&void 0!==arguments[3]?arguments[3]:10,s=e[t];if(i(n)&&r(o))if("function"==typeof a)if("number"==typeof c){var u={callback:a,priority:c,namespace:o};if(s[n]){var l,d=s[n].handlers;for(l=d.length;l>0&&!(c>=d[l-1].priority);l--);l===d.length?d[l]=u:d.splice(l,0,u),s.__current.forEach((function(e){e.name===n&&e.currentIndex>=l&&e.currentIndex++}))}else s[n]={handlers:[u],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,o,a,c)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(o,a){var c=e[t];if(i(o)&&(n||r(a))){if(!c[o])return 0;var s=0;if(n)s=c[o].handlers.length,c[o]={runs:c[o].runs,handlers:[]};else for(var u=c[o].handlers,l=function(e){u[e].namespace===a&&(u.splice(e,1),s++,c.__current.forEach((function(t){t.name===o&&t.currentIndex>=e&&t.currentIndex--})))},d=u.length-1;d>=0;d--)l(d);return"hookRemoved"!==o&&e.doAction("hookRemoved",o,a),s}}};var c=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};n(12);var s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;sthis.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((e=>e.json())).then((e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))}))}};t.a=r},function(e,t,n){var r=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=P(a,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var s=l(e,t,n);if("normal"===s.type){if(r=n.done?h:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=h,n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",g={};function y(){}function v(){}function b(){}var m={};m[o]=function(){return this};var O=Object.getPrototypeOf,_=O&&O(O(L([])));_&&_!==n&&r.call(_,o)&&(m=_);var w=b.prototype=y.prototype=Object.create(m);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,a,c){var s=l(e[i],e,o);if("throw"!==s.type){var u=s.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function L(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},,,function(e,t,n){"use strict";var r=n(22),i=n.n(r);const o={controlled:null,bind(e){this.controlled=e,this.controlled.forEach((e=>{this._main(e)})),this._init()},_init(){this.controlled.forEach((e=>{this._checkUp(e)}))},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map((t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n})),this._bindEvents(e),e.mains.forEach((e=>{this._bindEvents(e)}))},_bindEvents(e){e.eventBound||(e.addEventListener("click",(t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)})),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))})),e.elements.forEach((t=>{this._checkDown(t),t.elements||this._checkUp(t,e)})))},_checkUp(e,t){e.mains&&[...e.mains].forEach((e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)}))},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach((r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)}));let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach((t=>{t.checked&&(e.filesize+=t.filesize)}));let t=null;00;a--)c/=o;return c.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=a():(i=[],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(4),i=n(1),o=n(18),a=n(14);const c={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){r.a.use(r.a.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach((e=>this._bind(e)));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",(()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)})),this._watchPurge(t),setInterval((()=>{this._watchPurge(t)}),5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),o=document.createElement("td");o.colSpan=2,o.className="cld-loading",i.appendChild(o);const a=document.getElementById(t.dataset.slug+"_search"),c=document.getElementById(t.dataset.slug+"_reload"),s=document.getElementById(t.dataset.browser),u=document.getElementById(t.dataset.apply);u.style.float="right",u.style.marginLeft="6px",s.addEventListener("change",(t=>{this._handleManager(e)})),n.addEventListener("change",(t=>{this._handleManager(e)})),window.addEventListener("CacheToggle",(e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)})),u.addEventListener("click",(e=>{this._applyChanges(t)})),c.addEventListener("click",(t=>{this._load(e)})),a.addEventListener("keydown",(t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))})),r.className="cld-pagenav",u.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=a,t.controller=s,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=u,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,Object(r.a)({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then((e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");o.a.bind(n),t.loaded=!0}))},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,Object(r.a)({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then((t=>{e.dataset.updating="",0t.percent?(e.disabled="",this._purgeAll(e,!0)):0{e.innerText=Object(i.a)("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout((()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title}),2e3))}))},_set_state(e,t,n){this._showSpinners(n),Object(r.a)({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then((n=>{this._hideSpinners(n),n.forEach((n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"})),"delete"===t&&this._load(e.dataset.cachePoint)}))},_showSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="visible"}))},_hideSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="hidden"}))},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach((t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),o=this._getEdit(t,e);n.appendChild(i),n.appendChild(o),n.appendChild(r),e.appendChild(n)}))},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",(n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)})),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",(n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)}));const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",(n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,(function(){n._load(e.dataset.cachePoint)}))}}))}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=Object(i.a)("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const o=document.createElement("span"),a="spinner_"+t.ID;return o.className="spinner",o.id=a,n.appendChild(o),this.spinners[a]=o,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],o=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const o=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(o)})),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),o=document.createElement("input"),a=document.createElement("span"),c=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",o.type="checkbox",o.value=t.ID,o.checked=!(-1{const i=new CustomEvent("CacheToggle",{detail:{checked:o.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)})),r.appendChild(i),r}},s=document.getElementById("cloudinary-settings-page");s&&(a.a.init(),window.addEventListener("load",(()=>c.init(s,a.a))))}]); \ No newline at end of file diff --git a/js/breakpoints-preview.js b/js/breakpoints-preview.js index 099f8d063..addacb82d 100644 --- a/js/breakpoints-preview.js +++ b/js/breakpoints-preview.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}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 i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));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=35)}({0:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},1:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(4),i=n.n(r);n(2),i()(console.error);var o=n(0),a=n(5);function s(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 u(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";p.data[t]=u(u(u({},v),p.data[t]),e),p.data[t][""]=u(u({},v[""]),p.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return p.data[e]||f(void 0,e),p.dcnpgettext(e,t,n,r,i)},h=function(e,t,n){return d(n,t,e)},c&&f(c,l),{setLocaleData:f,__:function(e,t){return d(t,void 0,e)},_x:h,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===h("ltr","text direction")}}),m=(g.setLocaleData.bind(g),g.__.bind(g));g._x.bind(g),g._n.bind(g),g._nx.bind(g),g.isRTL.bind(g)},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,u,c,l,p,f,d=1,h=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,u=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}var u=Object.create(null);function c(e){if(u[e])return u[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return u[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},35:function(e,t,n){"use strict";n.r(t);var r=n(1);const i={template:document.getElementById("main-image"),stepper:document.getElementById("responsive.pixel_step"),counter:document.getElementById("responsive.breakpoints"),max:document.getElementById("responsive.max_width"),min:document.getElementById("responsive.min_width"),details:document.getElementById("preview-details"),preview:null,init(){this.preview=this.template.parentNode,this.stepper.addEventListener("change",(()=>{this.counter.value=this.rebuildPreview()})),this.counter.addEventListener("change",(()=>{this.calculateShift()})),this.max.addEventListener("change",(()=>{this.calculateShift()})),this.min.addEventListener("change",(()=>{this.calculateShift()})),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const e=this.counter.value,t=(this.max.value-this.min.value)/(e-1);this.stepper.value=Math.floor(t),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let e=parseInt(this.max.value),t=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),e||(e=parseInt(this.max.dataset.default),this.max.value=e),t||(t=100,this.min.value=t);let i=e,o=i/e*100;const a=this.makeSize(i,o);a.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(a);let s=1;for(;i>t&&(i-=n,!(ii.init()))},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,u=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function u(e){var t=function(e){for(var t,n,s,u,c=[],l=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]1&&void 0!==arguments[1]?arguments[1]:"default";p.data[t]=u(u(u({},v),p.data[t]),e),p.data[t][""]=u(u({},v[""]),p.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return p.data[e]||f(void 0,e),p.dcnpgettext(e,t,n,r,i)},h=function(e,t,n){return d(n,t,e)},c&&f(c,l),{setLocaleData:f,__:function(e,t){return d(t,void 0,e)},_x:h,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===h("ltr","text direction")}}),m=(g.setLocaleData.bind(g),g.__.bind(g));g._x.bind(g),g._n.bind(g),g._nx.bind(g),g.isRTL.bind(g)},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(c(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,u,c,l,p,f,d=1,h=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,u=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}var u=Object.create(null);function c(e){if(u[e])return u[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],c=[];if(null===(c=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(s=s.substring(c[0].length));)if(null!==(c=i.key_access.exec(s)))a.push(c[1]);else{if(null===(c=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return u[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},5:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,u=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a{this.counter.value=this.rebuildPreview()})),this.counter.addEventListener("change",(()=>{this.calculateShift()})),this.max.addEventListener("change",(()=>{this.calculateShift()})),this.min.addEventListener("change",(()=>{this.calculateShift()})),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const e=this.counter.value,t=(this.max.value-this.min.value)/(e-1);this.stepper.value=Math.floor(t),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let e=parseInt(this.max.value),t=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),e||(e=parseInt(this.max.dataset.default),this.max.value=e),t||(t=100,this.min.value=t);let i=e,o=i/e*100;const a=this.makeSize(i,o);a.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(a);let s=1;for(;i>t&&(i-=n,!(ii.init()))},6:function(e,t,n){"use strict";var r,i,o,a;n.d(t,"a",(function(){return l})),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function u(e){var t=function(e){for(var t,n,s,u,c=[],l=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);u=l.pop();){if(o[n]){if(o[n][0]===u){n=o[n][1]||n;break}}else if(i.indexOf(u)>=0||r[u]1&&void 0!==arguments[1]?arguments[1]:"default";f.data[t]=c(c(c({},v),f.data[t]),e),f.data[t][""]=c(c({},v[""]),f.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[e]||l(void 0,e),f.dcnpgettext(e,t,n,r,i)},m=function(e,t,n){return d(n,t,e)},u&&l(u,p),{setLocaleData:l,__:function(e,t){return d(t,void 0,e)},_x:m,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===m("ltr","text direction")}}),g=(h.setLocaleData.bind(h),h.__.bind(h));h._x.bind(h),h._n.bind(h),h._nx.bind(h),h.isRTL.bind(h)},15:function(e,t,n){"use strict";function r(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof i(e).Element||e instanceof Element}function s(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function u(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(p(e)).left+o(e).scrollLeft}function l(e){return i(e).getComputedStyle(e)}function d(e){var t=l(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m(e,t,n){void 0===n&&(n=!1);var a,c,l=p(t),m=r(e),v=s(t),h={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(v||!v&&!n)&&(("body"!==u(t)||d(l))&&(h=(a=t)!==i(a)&&s(a)?{scrollLeft:(c=a).scrollLeft,scrollTop:c.scrollTop}:o(a)),s(t)?((g=r(t)).x+=t.clientLeft,g.y+=t.clientTop):l&&(g.x=f(l))),{x:m.left+h.scrollLeft-g.x,y:m.top+h.scrollTop-g.y,width:m.width,height:m.height}}function v(e){var t=r(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function h(e){return"html"===u(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||p(e)}function g(e){return["html","body","#document"].indexOf(u(e))>=0?e.ownerDocument.body:s(e)&&d(e)?e:g(h(e))}function b(e,t){var n;void 0===t&&(t=[]);var r=g(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=i(r),s=o?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(b(h(s)))}function y(e){return["table","td","th"].indexOf(u(e))>=0}function x(e){return s(e)&&"fixed"!==l(e).position?e.offsetParent:null}function w(e){for(var t=i(e),n=x(e);n&&y(n)&&"static"===l(n).position;)n=x(n);return n&&("html"===u(n)||"body"===u(n)&&"static"===l(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===l(e).position)return null;for(var n=h(e);s(n)&&["html","body"].indexOf(u(n))<0;){var r=l(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",E="bottom",T="right",j="left",k="auto",L=[O,E,T,j],A="start",D="end",_="viewport",C="popper",S=L.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+D])}),[]),P=[].concat(L,[k]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+D])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function q(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?N(i):null,a=i?F(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case O:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=o?z(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case A:t[u]=t[u]-(n[p]/2-r[p]/2);break;case D:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},$=Math.max,X=Math.min,K=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:K(K(t*r)/r)||0,y:K(K(n*r)/r)||0}}(a):"function"==typeof f?f(a):a,m=d.x,v=void 0===m?0:m,h=d.y,g=void 0===h?0:h,b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),x=j,k=O,L=window;if(u){var A=w(n),D="clientHeight",_="clientWidth";A===i(n)&&"static"!==l(A=p(n)).position&&(D="scrollHeight",_="scrollWidth"),A=A,o===O&&(k=E,g-=A[D]-r.height,g*=c?1:-1),o===j&&(x=T,v-=A[_]-r.width,v*=c?1:-1)}var C,S=Object.assign({position:s},u&&Y);return c?Object.assign({},S,((C={})[k]=y?"0":"",C[x]=b?"0":"",C.transform=(L.devicePixelRatio||1)<2?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",C)):Object.assign({},S,((t={})[k]=y?g+"px":"",t[x]=b?v+"px":"",t.transform="",t))}var G={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];s(i)&&u(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});s(r)&&u(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,(function(e){return Q[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&c(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===_?re(function(e){var t=i(e),n=p(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,c=r.offsetTop)),{width:o,height:a,x:s+f(e),y:c}}(e)):s(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):re(function(e){var t,n=p(e),r=o(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=$(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=$(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+f(e),u=-r.scrollTop;return"rtl"===l(i||n).direction&&(c+=$(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:u}}(p(e)))}function oe(e,t,n){var r="clippingParents"===t?function(e){var t=b(h(e)),n=["absolute","fixed"].indexOf(l(e).position)>=0&&s(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&ne(e,n)&&"body"!==u(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],c=i.reduce((function(t,n){var r=ie(e,n);return t.top=$(r.top,t.top),t.right=X(r.right,t.right),t.bottom=X(r.bottom,t.bottom),t.left=$(r.left,t.left),t}),ie(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ae(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ce(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,f=void 0===u?_:u,l=n.elementContext,d=void 0===l?C:l,m=n.altBoundary,v=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,b=ae("number"!=typeof g?g:se(g,L)),y=d===C?"reference":C,x=e.elements.reference,w=e.rects.popper,j=e.elements[v?y:d],k=oe(a(j)?j:j.contextElement||p(e.elements.popper),c,f),A=r(x),D=q({reference:A,element:w,strategy:"absolute",placement:o}),S=re(Object.assign({},w,D)),P=d===C?S:A,M={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},I=e.modifiersData.offset;if(d===C&&I){var H=I[o];Object.keys(M).forEach((function(e){var t=[T,E].indexOf(e)>=0?1:-1,n=[O,E].indexOf(e)>=0?"y":"x";M[e]+=H[n]*t}))}return M}function ue(e,t,n){return $(e,X(t,n))}function pe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fe(e){return[O,T,E,j].some((function(t){return e[t]>=0}))}var le=W({defaultModifiers:[R,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:N(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},G,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=P.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),i=[j,O].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[j,T].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,v=n.allowedAutoPlacements,h=t.options.placement,g=N(h),b=c||(g===h||!m?[Z(h)]:function(e){if(N(e)===k)return[];var t=Z(e);return[te(e),t,te(t)]}(h)),y=[h].concat(b).reduce((function(e,n){return e.concat(N(n)===k?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?P:c,p=F(r),f=p?s?S:S.filter((function(e){return F(e)===p})):L,l=f.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=f);var d=l.reduce((function(t,n){return t[n]=ce(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[N(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,D=new Map,_=!0,C=y[0],M=0;M=0,B=W?"width":"height",R=ce(t,{placement:I,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),z=W?V?T:j:V?E:O;x[B]>w[B]&&(z=Z(z));var q=Z(z),U=[];if(o&&U.push(R[H]<=0),s&&U.push(R[z]<=0,R[q]<=0),U.every((function(e){return e}))){C=I,_=!1;break}D.set(I,U)}if(_)for(var $=function(e){var t=y.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},X=m?3:1;X>0;X--){if("break"===$(X))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,m=n.tetherOffset,h=void 0===m?0:m,g=ce(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),b=N(t.placement),y=F(t.placement),x=!y,k=z(b),L="x"===k?"y":"x",D=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,P={x:0,y:0};if(D){if(o||s){var M="y"===k?O:j,I="y"===k?E:T,H="y"===k?"height":"width",V=D[k],W=D[k]+g[M],B=D[k]-g[I],R=d?-C[H]/2:0,q=y===A?_[H]:C[H],U=y===A?-C[H]:-_[H],K=t.elements.arrow,Y=d&&K?v(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=J[M],Q=J[I],Z=ue(0,_[H],Y[H]),ee=x?_[H]/2-R-Z-G-S:q-Z-G-S,te=x?-_[H]/2+R+Z+Q+S:U+Z+Q+S,ne=t.elements.arrow&&w(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,oe=D[k]+ee-ie-re,ae=D[k]+te-ie;if(o){var se=ue(d?X(W,oe):W,V,d?$(B,ae):B);D[k]=se,P[k]=se-V}if(s){var pe="x"===k?O:j,fe="x"===k?E:T,le=D[L],de=le+g[pe],me=le-g[fe],ve=ue(d?X(de,oe):de,le,d?$(me,ae):me);D[L]=ve,P[L]=ve-le}}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=N(n.placement),c=z(s),u=[j,T].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(e,t){return ae("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,L))}(i.padding,n),f=v(o),l="y"===c?O:j,d="y"===c?E:T,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],h=a[c]-n.rects.reference[c],g=w(o),b=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=m/2-h/2,x=p[l],k=b-f[u]-p[d],A=b/2-f[u]/2+y,D=ue(x,A,k),_=c;n.modifiersData[r]=((t={})[_]=D,t.centerOffset=D-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ce(t,{elementContext:"reference"}),s=ce(t,{altBoundary:!0}),c=pe(a,r),u=pe(s,i,o),p=fe(c),f=fe(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),de="tippy-content",me="tippy-backdrop",ve="tippy-arrow",he="tippy-svg-arrow",ge={passive:!0,capture:!0};function be(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ye(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function xe(e,t){return"function"==typeof e?e.apply(void 0,t):e}function we(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Oe(e){return[].concat(e)}function Ee(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function je(e){return[].slice.call(e)}function ke(){return document.createElement("div")}function Le(e){return["Element","Fragment"].some((function(t){return ye(e,t)}))}function Ae(e){return ye(e,"MouseEvent")}function De(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function _e(e){return Le(e)?[e]:function(e){return ye(e,"NodeList")}(e)?je(e):Array.isArray(e)?e:je(document.querySelectorAll(e))}function Ce(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Se(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Pe(e){var t,n=Oe(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Me(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ie={isTouch:!1},He=0;function Ve(){Ie.isTouch||(Ie.isTouch=!0,window.performance&&document.addEventListener("mousemove",We))}function We(){var e=performance.now();e-He<20&&(Ie.isTouch=!1,document.removeEventListener("mousemove",We)),He=e}function Be(){var e=document.activeElement;if(De(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Re="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Ne=/MSIE |Trident\//.test(Re);var Fe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Fe,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qe=Object.keys(ze);function Ue(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function $e(e,t){var n=Object.assign({},t,{content:xe(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ue(Object.assign({},ze,{plugins:t}))):qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},ze.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Xe(e,t){e.innerHTML=t}function Ke(e){var t=ke();return!0===e?t.className=ve:(t.className=he,Le(e)?t.appendChild(e):Xe(t,e)),t}function Ye(e,t){Le(t.content)?(Xe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Xe(e,t.content):e.textContent=t.content)}function Je(e){var t=e.firstElementChild,n=je(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(de)})),arrow:n.find((function(e){return e.classList.contains(ve)||e.classList.contains(he)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function Ge(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ke();function i(n,r){var i=Je(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ye(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Ke(r.arrow))):o.appendChild(Ke(r.arrow)):s&&o.removeChild(s)}return r.className=de,r.setAttribute("data-state","hidden"),Ye(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ge.$$tippy=!0;var Qe=1,Ze=[],et=[];function tt(e,t){var n,r,i,o,a,s,c,u,p,f=$e(e,Object.assign({},ze,{},Ue((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),l=!1,d=!1,m=!1,v=!1,h=[],g=we(K,f.interactiveDebounce),b=Qe++,y=(p=f.plugins).filter((function(e,t){return p.indexOf(e)===t})),x={id:b,reference:e,popper:ke(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){0;if(x.state.isDestroyed)return;M("onBeforeUpdate",[x,t]),$();var n=x.props,r=$e(e,Object.assign({},x.props,{},t,{ignoreAttributes:!0}));x.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),g=we(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Oe(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");H(),P(),E&&E(n,r);x.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[x,t])},setContent:function(e){x.setProps({content:e})},show:function(){0;var e=x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=Ie.isTouch&&!x.props.touch,i=be(x.props.duration,0,ze.duration);if(e||t||n||r)return;if(D().hasAttribute("disabled"))return;if(M("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(O.style.visibility="visible");P(),N(),x.state.isMounted||(O.style.transition="none");if(A()){var o=C(),a=o.box,s=o.content;Ce([a,s],0)}c=function(){var e;if(x.state.isVisible&&!v){if(v=!0,O.offsetHeight,O.style.transition=x.props.moveTransition,A()&&x.props.animation){var t=C(),n=t.box,r=t.content;Ce([n,r],i),Se([n,r],"visible")}I(),H(),Ee(et,x),null==(e=x.popperInstance)||e.forceUpdate(),x.state.isMounted=!0,M("onMount",[x]),x.props.animation&&A()&&function(e,t){z(e,t)}(i,(function(){x.state.isShown=!0,M("onShown",[x])}))}},function(){var e,t=x.props.appendTo,n=D();e=x.props.interactive&&t===ze.appendTo||"parent"===t?n.parentNode:xe(t,[n]);e.contains(O)||e.appendChild(O);Q(),!1}()},hide:function(){0;var e=!x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=be(x.props.duration,1,ze.duration);if(e||t||n)return;if(M("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,v=!1,l=!1,A()&&(O.style.visibility="hidden");if(V(),F(),P(),A()){var i=C(),o=i.box,a=i.content;x.props.animation&&(Ce([o,a],r),Se([o,a],"hidden"))}I(),H(),x.props.animation?A()&&function(e,t){z(e,(function(){!x.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",g),Ee(Ze,g),g(e)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);et=et.filter((function(e){return e!==x})),x.state.isMounted=!1,M("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete e._tippy,x.state.isDestroyed=!0,M("onDestroy",[x])}};if(!f.render)return x;var w=f.render(x),O=w.popper,E=w.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+x.id,x.popper=O,e._tippy=x,O._tippy=x;var T=y.map((function(e){return e.fn(x)})),j=e.hasAttribute("aria-expanded");return U(),H(),P(),M("onCreate",[x]),f.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(_().addEventListener("mousemove",g),g(e))})),x;function k(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===k()[0]}function A(){var e;return!!(null==(e=x.props.render)?void 0:e.$$tippy)}function D(){return u||e}function _(){var e=D().parentNode;return e?Pe(e):document}function C(){return Je(O)}function S(e){return x.state.isMounted&&!x.state.isVisible||Ie.isTouch||a&&"focus"===a.type?0:be(x.props.delay,e?0:1,ze.delay)}function P(){O.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",O.style.zIndex=""+x.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),T.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=x.props)[e].apply(r,t)}function I(){var t=x.props.aria;if(t.content){var n="aria-"+t.content,r=O.id;Oe(x.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(x.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function H(){!j&&x.props.aria.expanded&&Oe(x.props.triggerTarget||e).forEach((function(e){x.props.interactive?e.setAttribute("aria-expanded",x.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){_().removeEventListener("mousemove",g),Ze=Ze.filter((function(e){return e!==g}))}function W(e){if(!(Ie.isTouch&&(m||"mousedown"===e.type)||x.props.interactive&&O.contains(e.target))){if(D().contains(e.target)){if(Ie.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[x,e]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),d=!0,setTimeout((function(){d=!1})),x.state.isMounted||F())}}function B(){m=!0}function R(){m=!1}function N(){var e=_();e.addEventListener("mousedown",W,!0),e.addEventListener("touchend",W,ge),e.addEventListener("touchstart",R,ge),e.addEventListener("touchmove",B,ge)}function F(){var e=_();e.removeEventListener("mousedown",W,!0),e.removeEventListener("touchend",W,ge),e.removeEventListener("touchstart",R,ge),e.removeEventListener("touchmove",B,ge)}function z(e,t){var n=C().box;function r(e){e.target===n&&(Me(n,"remove",r),t())}if(0===e)return t();Me(n,"remove",s),Me(n,"add",r),s=r}function q(t,n,r){void 0===r&&(r=!1),Oe(x.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;L()&&(q("touchstart",X,{passive:!0}),q("touchend",Y,{passive:!0})),(e=x.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(q(e,X),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Ne?"focusout":"blur",J);break;case"focusin":q("focusout",J)}}))}function $(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),h=[]}function X(e){var t,n=!1;if(x.state.isEnabled&&!G(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,H(),!x.state.isVisible&&Ae(e)&&Ze.forEach((function(t){return t(e)})),"click"===e.type&&(x.props.trigger.indexOf("mouseenter")<0||l)&&!1!==x.props.hideOnClick&&x.state.isVisible?n=!0:te(e),"click"===e.type&&(l=!n),n&&!r&&ne(e)}}function K(e){var t=e.target,n=D().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=Te(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=t.top-r+c>o,d=r-t.bottom-u>o,m=t.left-n+p>o,v=n-t.right-f>o;return l||d||m||v}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:f}:null})).filter(Boolean),e)&&(V(),ne(e))}function Y(e){G(e)||x.props.trigger.indexOf("click")>=0&&l||(x.props.interactive?x.hideWithInteractivity(e):ne(e))}function J(e){x.props.trigger.indexOf("focusin")<0&&e.target!==D()||x.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function G(e){return!!Ie.isTouch&&L()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=x.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=A()?Je(O).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||D()}:e,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&s&&p.push({name:"arrow",options:{element:s,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),x.popperInstance=le(u,O,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:p}))}function Z(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ee(){return je(O.querySelectorAll("[data-tippy-root]"))}function te(e){x.clearDelayTimeouts(),e&&M("onTrigger",[x,e]),N();var t=S(!0),n=k(),i=n[0],o=n[1];Ie.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout((function(){x.show()}),t):x.show()}function ne(e){if(x.clearDelayTimeouts(),M("onUntrigger",[x,e]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&l)){var t=S(!1);t?i=setTimeout((function(){x.state.isVisible&&x.hide()}),t):o=requestAnimationFrame((function(){x.hide()}))}}else F()}}function nt(e,t){void 0===t&&(t={});var n=ze.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ge),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=_e(e).reduce((function(e,t){var n=t&&tt(t,r);return n&&e.push(n),e}),[]);return Le(e)?i[0]:i}nt.defaultProps=ze,nt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){ze[t]=e[t]}))},nt.currentInput=Ie;Object.assign({},G,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});nt.setDefaultProps({render:Ge});t.a=nt},18:function(e,t,n){},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(u(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,c,u,p,f,l,d=1,m=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||f&&!s.sign?l="":(l=f?"+":"-",n=n.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+n).length,c=s.width&&p>0?u.repeat(p):"",v+=s.align?l+n+c:"0"===u?l+c+n:c+l+n)}return v}var c=Object.create(null);function u(e){if(c[e])return c[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},4:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a{this.wrapImage(e)}));const e=document.querySelectorAll(".cld-tag");Object(i.a)(e,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:e=>e.template.innerHTML,allowHTML:!0})},wrapImage(e){e.dataset.publicId?this.cldTag(e):this.wpTag(e)},createTag(e){const t=document.createElement("span");return t.classList.add("overlay-tag"),e.parentNode.insertBefore(t,e),t},cldTag(e){const t=this.createTag(e);t.template=this.createTemplate(e),t.innerText=Object(r.a)("Cloudinary","cloudinary"),t.classList.add("cld-tag")},wpTag(e){const t=this.createTag(e);t.innerText=Object(r.a)("WordPress","cloudinary"),t.classList.add("wp-tag")},createTemplate(e){const t=document.createElement("div");t.classList.add("cld-tag-info"),t.appendChild(this.makeLine(Object(r.a)("Local size","cloudinary"),e.dataset.filesize)),t.appendChild(this.makeLine(Object(r.a)("Optimized size","cloudinary"),e.dataset.optsize)),t.appendChild(this.makeLine(Object(r.a)("Optimized format","cloudinary"),e.dataset.optformat)),e.dataset.percent&&t.appendChild(this.makeLine(Object(r.a)("Reduction","cloudinary"),e.dataset.percent+"%")),t.appendChild(this.makeLine(Object(r.a)("Transformations","cloudinary"),e.dataset.transformations));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=e.dataset.permalink,n.innerText=Object(r.a)("Edit asset","cloudinary"),t.appendChild(this.makeLine("","",n)),t},makeLine(e,t,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=e,i.classList.add("title"),o.innerText=t,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r}};window.addEventListener("load",(()=>o.init()))},5:function(e,t,n){"use strict";var r,i,o,a;n.d(t,"a",(function(){return p})),r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function c(e){var t=function(e){for(var t,n,s,c,u=[],p=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&u.push(s);c=p.pop();){if(o[n]){if(o[n][0]===c){n=o[n][1]||n;break}}else if(i.indexOf(c)>=0||r[c]1&&void 0!==arguments[1]?arguments[1]:"default";f.data[t]=c(c(c({},v),f.data[t]),e),f.data[t][""]=c(c({},v[""]),f.data[t][""])},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return f.data[e]||l(void 0,e),f.dcnpgettext(e,t,n,r,i)},m=function(e,t,n){return d(n,t,e)},u&&l(u,p),{setLocaleData:l,__:function(e,t){return d(t,void 0,e)},_x:m,_n:function(e,t,n,r){return d(r,void 0,e,t,n)},_nx:function(e,t,n,r,i){return d(i,r,e,t,n)},isRTL:function(){return"rtl"===m("ltr","text direction")}}),g=(h.setLocaleData.bind(h),h.__.bind(h));h._x.bind(h),h._n.bind(h),h._nx.bind(h),h.isRTL.bind(h)},2:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return s(u(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}function s(e,t){var n,r,a,s,c,u,p,f,l,d=1,m=e.length,v="";for(r=0;r=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||f&&!s.sign?l="":(l=f?"+":"-",n=n.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+n).length,c=s.width&&p>0?u.repeat(p):"",v+=s.align?l+n+c:"0"===u?l+c+n:c+l+n)}return v}var c=Object.create(null);function u(e){if(c[e])return c[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))a.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=o,t.vsprintf=a,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},23:function(e,t,n){"use strict";function r(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function i(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o(e){var t=i(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function a(e){return e instanceof i(e).Element||e instanceof Element}function s(e){return e instanceof i(e).HTMLElement||e instanceof HTMLElement}function c(e){return"undefined"!=typeof ShadowRoot&&(e instanceof i(e).ShadowRoot||e instanceof ShadowRoot)}function u(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((a(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return r(p(e)).left+o(e).scrollLeft}function l(e){return i(e).getComputedStyle(e)}function d(e){var t=l(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function m(e,t,n){void 0===n&&(n=!1);var a,c,l=p(t),m=r(e),v=s(t),h={scrollLeft:0,scrollTop:0},g={x:0,y:0};return(v||!v&&!n)&&(("body"!==u(t)||d(l))&&(h=(a=t)!==i(a)&&s(a)?{scrollLeft:(c=a).scrollLeft,scrollTop:c.scrollTop}:o(a)),s(t)?((g=r(t)).x+=t.clientLeft,g.y+=t.clientTop):l&&(g.x=f(l))),{x:m.left+h.scrollLeft-g.x,y:m.top+h.scrollTop-g.y,width:m.width,height:m.height}}function v(e){var t=r(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function h(e){return"html"===u(e)?e:e.assignedSlot||e.parentNode||(c(e)?e.host:null)||p(e)}function g(e){return["html","body","#document"].indexOf(u(e))>=0?e.ownerDocument.body:s(e)&&d(e)?e:g(h(e))}function b(e,t){var n;void 0===t&&(t=[]);var r=g(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=i(r),s=o?[a].concat(a.visualViewport||[],d(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(b(h(s)))}function y(e){return["table","td","th"].indexOf(u(e))>=0}function x(e){return s(e)&&"fixed"!==l(e).position?e.offsetParent:null}function w(e){for(var t=i(e),n=x(e);n&&y(n)&&"static"===l(n).position;)n=x(n);return n&&("html"===u(n)||"body"===u(n)&&"static"===l(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&s(e)&&"fixed"===l(e).position)return null;for(var n=h(e);s(n)&&["html","body"].indexOf(u(n))<0;){var r=l(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var O="top",E="bottom",T="right",j="left",k="auto",L=[O,E,T,j],A="start",D="end",_="viewport",C="popper",S=L.reduce((function(e,t){return e.concat([t+"-"+A,t+"-"+D])}),[]),P=[].concat(L,[k]).reduce((function(e,t){return e.concat([t,t+"-"+A,t+"-"+D])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function I(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var H={placement:"bottom",modifiers:[],strategy:"absolute"};function V(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function q(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?N(i):null,a=i?F(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case O:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case T:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=o?z(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case A:t[u]=t[u]-(n[p]/2-r[p]/2);break;case D:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var U={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=q({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},$=Math.max,X=Math.min,K=Math.round,Y={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=!0===f?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:K(K(t*r)/r)||0,y:K(K(n*r)/r)||0}}(a):"function"==typeof f?f(a):a,m=d.x,v=void 0===m?0:m,h=d.y,g=void 0===h?0:h,b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),x=j,k=O,L=window;if(u){var A=w(n),D="clientHeight",_="clientWidth";A===i(n)&&"static"!==l(A=p(n)).position&&(D="scrollHeight",_="scrollWidth"),A=A,o===O&&(k=E,g-=A[D]-r.height,g*=c?1:-1),o===j&&(x=T,v-=A[_]-r.width,v*=c?1:-1)}var C,S=Object.assign({position:s},u&&Y);return c?Object.assign({},S,((C={})[k]=y?"0":"",C[x]=b?"0":"",C.transform=(L.devicePixelRatio||1)<2?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",C)):Object.assign({},S,((t={})[k]=y?g+"px":"",t[x]=b?v+"px":"",t.transform="",t))}var G={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];s(i)&&u(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});s(r)&&u(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Q={left:"right",right:"left",bottom:"top",top:"bottom"};function Z(e){return e.replace(/left|right|bottom|top/g,(function(e){return Q[e]}))}var ee={start:"end",end:"start"};function te(e){return e.replace(/start|end/g,(function(e){return ee[e]}))}function ne(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&c(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function re(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ie(e,t){return t===_?re(function(e){var t=i(e),n=p(e),r=t.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;return r&&(o=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,c=r.offsetTop)),{width:o,height:a,x:s+f(e),y:c}}(e)):s(t)?function(e){var t=r(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):re(function(e){var t,n=p(e),r=o(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=$(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=$(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+f(e),u=-r.scrollTop;return"rtl"===l(i||n).direction&&(c+=$(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:u}}(p(e)))}function oe(e,t,n){var r="clippingParents"===t?function(e){var t=b(h(e)),n=["absolute","fixed"].indexOf(l(e).position)>=0&&s(e)?w(e):e;return a(n)?t.filter((function(e){return a(e)&&ne(e,n)&&"body"!==u(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),o=i[0],c=i.reduce((function(t,n){var r=ie(e,n);return t.top=$(r.top,t.top),t.right=X(r.right,t.right),t.bottom=X(r.bottom,t.bottom),t.left=$(r.left,t.left),t}),ie(e,o));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function ae(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function se(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ce(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,f=void 0===u?_:u,l=n.elementContext,d=void 0===l?C:l,m=n.altBoundary,v=void 0!==m&&m,h=n.padding,g=void 0===h?0:h,b=ae("number"!=typeof g?g:se(g,L)),y=d===C?"reference":C,x=e.elements.reference,w=e.rects.popper,j=e.elements[v?y:d],k=oe(a(j)?j:j.contextElement||p(e.elements.popper),c,f),A=r(x),D=q({reference:A,element:w,strategy:"absolute",placement:o}),S=re(Object.assign({},w,D)),P=d===C?S:A,M={top:k.top-P.top+b.top,bottom:P.bottom-k.bottom+b.bottom,left:k.left-P.left+b.left,right:P.right-k.right+b.right},I=e.modifiersData.offset;if(d===C&&I){var H=I[o];Object.keys(M).forEach((function(e){var t=[T,E].indexOf(e)>=0?1:-1,n=[O,E].indexOf(e)>=0?"y":"x";M[e]+=H[n]*t}))}return M}function ue(e,t,n){return $(e,X(t,n))}function pe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function fe(e){return[O,T,E,j].some((function(t){return e[t]>=0}))}var le=W({defaultModifiers:[R,U,{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:N(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},G,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=P.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),i=[j,O].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[j,T].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,v=n.allowedAutoPlacements,h=t.options.placement,g=N(h),b=c||(g===h||!m?[Z(h)]:function(e){if(N(e)===k)return[];var t=Z(e);return[te(e),t,te(t)]}(h)),y=[h].concat(b).reduce((function(e,n){return e.concat(N(n)===k?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?P:c,p=F(r),f=p?s?S:S.filter((function(e){return F(e)===p})):L,l=f.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=f);var d=l.reduce((function(t,n){return t[n]=ce(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[N(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,D=new Map,_=!0,C=y[0],M=0;M=0,B=W?"width":"height",R=ce(t,{placement:I,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),z=W?V?T:j:V?E:O;x[B]>w[B]&&(z=Z(z));var q=Z(z),U=[];if(o&&U.push(R[H]<=0),s&&U.push(R[z]<=0,R[q]<=0),U.every((function(e){return e}))){C=I,_=!1;break}D.set(I,U)}if(_)for(var $=function(e){var t=y.find((function(t){var n=D.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},X=m?3:1;X>0;X--){if("break"===$(X))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,m=n.tetherOffset,h=void 0===m?0:m,g=ce(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),b=N(t.placement),y=F(t.placement),x=!y,k=z(b),L="x"===k?"y":"x",D=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,P={x:0,y:0};if(D){if(o||s){var M="y"===k?O:j,I="y"===k?E:T,H="y"===k?"height":"width",V=D[k],W=D[k]+g[M],B=D[k]-g[I],R=d?-C[H]/2:0,q=y===A?_[H]:C[H],U=y===A?-C[H]:-_[H],K=t.elements.arrow,Y=d&&K?v(K):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=J[M],Q=J[I],Z=ue(0,_[H],Y[H]),ee=x?_[H]/2-R-Z-G-S:q-Z-G-S,te=x?-_[H]/2+R+Z+Q+S:U+Z+Q+S,ne=t.elements.arrow&&w(t.elements.arrow),re=ne?"y"===k?ne.clientTop||0:ne.clientLeft||0:0,ie=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,oe=D[k]+ee-ie-re,ae=D[k]+te-ie;if(o){var se=ue(d?X(W,oe):W,V,d?$(B,ae):B);D[k]=se,P[k]=se-V}if(s){var pe="x"===k?O:j,fe="x"===k?E:T,le=D[L],de=le+g[pe],me=le-g[fe],ve=ue(d?X(de,oe):de,le,d?$(me,ae):me);D[L]=ve,P[L]=ve-le}}t.modifiersData[r]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=N(n.placement),c=z(s),u=[j,T].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(e,t){return ae("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:se(e,L))}(i.padding,n),f=v(o),l="y"===c?O:j,d="y"===c?E:T,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],h=a[c]-n.rects.reference[c],g=w(o),b=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=m/2-h/2,x=p[l],k=b-f[u]-p[d],A=b/2-f[u]/2+y,D=ue(x,A,k),_=c;n.modifiersData[r]=((t={})[_]=D,t.centerOffset=D-A,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ne(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ce(t,{elementContext:"reference"}),s=ce(t,{altBoundary:!0}),c=pe(a,r),u=pe(s,i,o),p=fe(c),f=fe(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),de="tippy-content",me="tippy-backdrop",ve="tippy-arrow",he="tippy-svg-arrow",ge={passive:!0,capture:!0};function be(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ye(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function xe(e,t){return"function"==typeof e?e.apply(void 0,t):e}function we(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Oe(e){return[].concat(e)}function Ee(e,t){-1===e.indexOf(t)&&e.push(t)}function Te(e){return e.split("-")[0]}function je(e){return[].slice.call(e)}function ke(){return document.createElement("div")}function Le(e){return["Element","Fragment"].some((function(t){return ye(e,t)}))}function Ae(e){return ye(e,"MouseEvent")}function De(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function _e(e){return Le(e)?[e]:function(e){return ye(e,"NodeList")}(e)?je(e):Array.isArray(e)?e:je(document.querySelectorAll(e))}function Ce(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Se(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Pe(e){var t,n=Oe(e)[0];return(null==n||null==(t=n.ownerDocument)?void 0:t.body)?n.ownerDocument:document}function Me(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var Ie={isTouch:!1},He=0;function Ve(){Ie.isTouch||(Ie.isTouch=!0,window.performance&&document.addEventListener("mousemove",We))}function We(){var e=performance.now();e-He<20&&(Ie.isTouch=!1,document.removeEventListener("mousemove",We)),He=e}function Be(){var e=document.activeElement;if(De(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Re="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",Ne=/MSIE |Trident\//.test(Re);var Fe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ze=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Fe,{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),qe=Object.keys(ze);function Ue(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function $e(e,t){var n=Object.assign({},t,{content:xe(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ue(Object.assign({},ze,{plugins:t}))):qe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},ze.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Xe(e,t){e.innerHTML=t}function Ke(e){var t=ke();return!0===e?t.className=ve:(t.className=he,Le(e)?t.appendChild(e):Xe(t,e)),t}function Ye(e,t){Le(t.content)?(Xe(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Xe(e,t.content):e.textContent=t.content)}function Je(e){var t=e.firstElementChild,n=je(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(de)})),arrow:n.find((function(e){return e.classList.contains(ve)||e.classList.contains(he)})),backdrop:n.find((function(e){return e.classList.contains(me)}))}}function Ge(e){var t=ke(),n=ke();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ke();function i(n,r){var i=Je(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ye(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Ke(r.arrow))):o.appendChild(Ke(r.arrow)):s&&o.removeChild(s)}return r.className=de,r.setAttribute("data-state","hidden"),Ye(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Ge.$$tippy=!0;var Qe=1,Ze=[],et=[];function tt(e,t){var n,r,i,o,a,s,c,u,p,f=$e(e,Object.assign({},ze,{},Ue((n=t,Object.keys(n).reduce((function(e,t){return void 0!==n[t]&&(e[t]=n[t]),e}),{}))))),l=!1,d=!1,m=!1,v=!1,h=[],g=we(K,f.interactiveDebounce),b=Qe++,y=(p=f.plugins).filter((function(e,t){return p.indexOf(e)===t})),x={id:b,reference:e,popper:ke(),popperInstance:null,props:f,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)},setProps:function(t){0;if(x.state.isDestroyed)return;M("onBeforeUpdate",[x,t]),$();var n=x.props,r=$e(e,Object.assign({},x.props,{},t,{ignoreAttributes:!0}));x.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),g=we(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Oe(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");H(),P(),E&&E(n,r);x.popperInstance&&(Q(),ee().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[x,t])},setContent:function(e){x.setProps({content:e})},show:function(){0;var e=x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=Ie.isTouch&&!x.props.touch,i=be(x.props.duration,0,ze.duration);if(e||t||n||r)return;if(D().hasAttribute("disabled"))return;if(M("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,A()&&(O.style.visibility="visible");P(),N(),x.state.isMounted||(O.style.transition="none");if(A()){var o=C(),a=o.box,s=o.content;Ce([a,s],0)}c=function(){var e;if(x.state.isVisible&&!v){if(v=!0,O.offsetHeight,O.style.transition=x.props.moveTransition,A()&&x.props.animation){var t=C(),n=t.box,r=t.content;Ce([n,r],i),Se([n,r],"visible")}I(),H(),Ee(et,x),null==(e=x.popperInstance)||e.forceUpdate(),x.state.isMounted=!0,M("onMount",[x]),x.props.animation&&A()&&function(e,t){z(e,t)}(i,(function(){x.state.isShown=!0,M("onShown",[x])}))}},function(){var e,t=x.props.appendTo,n=D();e=x.props.interactive&&t===ze.appendTo||"parent"===t?n.parentNode:xe(t,[n]);e.contains(O)||e.appendChild(O);Q(),!1}()},hide:function(){0;var e=!x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=be(x.props.duration,1,ze.duration);if(e||t||n)return;if(M("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,v=!1,l=!1,A()&&(O.style.visibility="hidden");if(V(),F(),P(),A()){var i=C(),o=i.box,a=i.content;x.props.animation&&(Ce([o,a],r),Se([o,a],"hidden"))}I(),H(),x.props.animation?A()&&function(e,t){z(e,(function(){!x.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&t()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(e){0;_().addEventListener("mousemove",g),Ee(Ze,g),g(e)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Z(),ee().forEach((function(e){e._tippy.unmount()})),O.parentNode&&O.parentNode.removeChild(O);et=et.filter((function(e){return e!==x})),x.state.isMounted=!1,M("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete e._tippy,x.state.isDestroyed=!0,M("onDestroy",[x])}};if(!f.render)return x;var w=f.render(x),O=w.popper,E=w.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+x.id,x.popper=O,e._tippy=x,O._tippy=x;var T=y.map((function(e){return e.fn(x)})),j=e.hasAttribute("aria-expanded");return U(),H(),P(),M("onCreate",[x]),f.showOnCreate&&te(),O.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),O.addEventListener("mouseleave",(function(e){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&(_().addEventListener("mousemove",g),g(e))})),x;function k(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===k()[0]}function A(){var e;return!!(null==(e=x.props.render)?void 0:e.$$tippy)}function D(){return u||e}function _(){var e=D().parentNode;return e?Pe(e):document}function C(){return Je(O)}function S(e){return x.state.isMounted&&!x.state.isVisible||Ie.isTouch||a&&"focus"===a.type?0:be(x.props.delay,e?0:1,ze.delay)}function P(){O.style.pointerEvents=x.props.interactive&&x.state.isVisible?"":"none",O.style.zIndex=""+x.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),T.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=x.props)[e].apply(r,t)}function I(){var t=x.props.aria;if(t.content){var n="aria-"+t.content,r=O.id;Oe(x.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(x.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function H(){!j&&x.props.aria.expanded&&Oe(x.props.triggerTarget||e).forEach((function(e){x.props.interactive?e.setAttribute("aria-expanded",x.state.isVisible&&e===D()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){_().removeEventListener("mousemove",g),Ze=Ze.filter((function(e){return e!==g}))}function W(e){if(!(Ie.isTouch&&(m||"mousedown"===e.type)||x.props.interactive&&O.contains(e.target))){if(D().contains(e.target)){if(Ie.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[x,e]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),d=!0,setTimeout((function(){d=!1})),x.state.isMounted||F())}}function B(){m=!0}function R(){m=!1}function N(){var e=_();e.addEventListener("mousedown",W,!0),e.addEventListener("touchend",W,ge),e.addEventListener("touchstart",R,ge),e.addEventListener("touchmove",B,ge)}function F(){var e=_();e.removeEventListener("mousedown",W,!0),e.removeEventListener("touchend",W,ge),e.removeEventListener("touchstart",R,ge),e.removeEventListener("touchmove",B,ge)}function z(e,t){var n=C().box;function r(e){e.target===n&&(Me(n,"remove",r),t())}if(0===e)return t();Me(n,"remove",s),Me(n,"add",r),s=r}function q(t,n,r){void 0===r&&(r=!1),Oe(x.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),h.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;L()&&(q("touchstart",X,{passive:!0}),q("touchend",Y,{passive:!0})),(e=x.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(q(e,X),e){case"mouseenter":q("mouseleave",Y);break;case"focus":q(Ne?"focusout":"blur",J);break;case"focusin":q("focusout",J)}}))}function $(){h.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),h=[]}function X(e){var t,n=!1;if(x.state.isEnabled&&!G(e)&&!d){var r="focus"===(null==(t=a)?void 0:t.type);a=e,u=e.currentTarget,H(),!x.state.isVisible&&Ae(e)&&Ze.forEach((function(t){return t(e)})),"click"===e.type&&(x.props.trigger.indexOf("mouseenter")<0||l)&&!1!==x.props.hideOnClick&&x.state.isVisible?n=!0:te(e),"click"===e.type&&(l=!n),n&&!r&&ne(e)}}function K(e){var t=e.target,n=D().contains(t)||O.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=Te(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=t.top-r+c>o,d=r-t.bottom-u>o,m=t.left-n+p>o,v=n-t.right-f>o;return l||d||m||v}))}(ee().concat(O).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:f}:null})).filter(Boolean),e)&&(V(),ne(e))}function Y(e){G(e)||x.props.trigger.indexOf("click")>=0&&l||(x.props.interactive?x.hideWithInteractivity(e):ne(e))}function J(e){x.props.trigger.indexOf("focusin")<0&&e.target!==D()||x.props.interactive&&e.relatedTarget&&O.contains(e.relatedTarget)||ne(e)}function G(e){return!!Ie.isTouch&&L()!==e.type.indexOf("touch")>=0}function Q(){Z();var t=x.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,s=A()?Je(O).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||D()}:e,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=C().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];A()&&s&&p.push({name:"arrow",options:{element:s,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),x.popperInstance=le(u,O,Object.assign({},n,{placement:r,onFirstUpdate:c,modifiers:p}))}function Z(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ee(){return je(O.querySelectorAll("[data-tippy-root]"))}function te(e){x.clearDelayTimeouts(),e&&M("onTrigger",[x,e]),N();var t=S(!0),n=k(),i=n[0],o=n[1];Ie.isTouch&&"hold"===i&&o&&(t=o),t?r=setTimeout((function(){x.show()}),t):x.show()}function ne(e){if(x.clearDelayTimeouts(),M("onUntrigger",[x,e]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&l)){var t=S(!1);t?i=setTimeout((function(){x.state.isVisible&&x.hide()}),t):o=requestAnimationFrame((function(){x.hide()}))}}else F()}}function nt(e,t){void 0===t&&(t={});var n=ze.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Ve,ge),window.addEventListener("blur",Be);var r=Object.assign({},t,{plugins:n}),i=_e(e).reduce((function(e,t){var n=t&&tt(t,r);return n&&e.push(n),e}),[]);return Le(e)?i[0]:i}nt.defaultProps=ze,nt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){ze[t]=e[t]}))},nt.currentInput=Ie;Object.assign({},G,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});nt.setDefaultProps({render:Ge});t.a=nt},29:function(e,t,n){},5:function(e,t,n){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function c(e){var t=function(e){for(var t,n,s,c,u=[],p=[];t=e.match(a);){for(n=t[0],(s=e.substr(0,t.index).trim())&&u.push(s);c=p.pop();){if(o[n]){if(o[n][0]===c){n=o[n][1]||n;break}}else if(i.indexOf(c)>=0||r[c]{this.wrapImage(e)}));const e=document.querySelectorAll(".cld-tag");Object(i.a)(e,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:e=>e.template.innerHTML,allowHTML:!0})},wrapImage(e){e.dataset.publicId?this.cldTag(e):this.wpTag(e)},createTag(e){const t=document.createElement("span");return t.classList.add("overlay-tag"),e.parentNode.insertBefore(t,e),t},cldTag(e){const t=this.createTag(e);t.template=this.createTemplate(e),t.innerText=Object(r.a)("Cloudinary","cloudinary"),t.classList.add("cld-tag")},wpTag(e){const t=this.createTag(e);t.innerText=Object(r.a)("WordPress","cloudinary"),t.classList.add("wp-tag")},createTemplate(e){const t=document.createElement("div");t.classList.add("cld-tag-info"),t.appendChild(this.makeLine(Object(r.a)("Local size","cloudinary"),e.dataset.filesize)),t.appendChild(this.makeLine(Object(r.a)("Optimized size","cloudinary"),e.dataset.optsize)),t.appendChild(this.makeLine(Object(r.a)("Optimized format","cloudinary"),e.dataset.optformat)),e.dataset.percent&&t.appendChild(this.makeLine(Object(r.a)("Reduction","cloudinary"),e.dataset.percent+"%")),t.appendChild(this.makeLine(Object(r.a)("Transformations","cloudinary"),e.dataset.transformations));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=e.dataset.permalink,n.innerText=Object(r.a)("Edit asset","cloudinary"),t.appendChild(this.makeLine("","",n)),t},makeLine(e,t,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=e,i.classList.add("title"),o.innerText=t,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r}};window.addEventListener("load",(()=>o.init()))}}); \ No newline at end of file diff --git a/js/gallery-ui.js b/js/gallery-ui.js index 89b01d8f4..4d3091b88 100644 --- a/js/gallery-ui.js +++ b/js/gallery-ui.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=42)}({42:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=61)}({61:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file diff --git a/js/lazyload-preview.js b/js/lazyload-preview.js index 4f29bf8f1..e63490d90 100644 --- a/js/lazyload-preview.js +++ b/js/lazyload-preview.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}({0:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},1:function(e,t,r){"use strict";r.d(t,"a",(function(){return m}));var n=r(4),i=r.n(n);r(2),i()(console.error);var o=r(0),s=r(5);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=l(l(l({},g),d.data[t]),e),d.data[t][""]=l(l({},g[""]),d.data[t][""])},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||h(void 0,e),d.dcnpgettext(e,t,r,n,i)},f=function(e,t,r){return p(r,t,e)},c&&h(c,u),{setLocaleData:h,__:function(e,t){return p(t,void 0,e)},_x:f,_n:function(e,t,r,n){return p(n,void 0,e,t,r)},_nx:function(e,t,r,n,i){return p(i,n,e,t,r)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),m=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},2:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return a(c(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}function a(e,t){var r,n,s,a,l,c,u,d,h,p=1,f=e.length,g="";for(n=0;n=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=r:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",r=r.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+r).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?h+r+l:"0"===c?h+l+r:l+h+r)}return g}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],a=t[2],c=[];if(null===(c=i.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=i.key_access.exec(a)))s.push(c[1]);else{if(null===(c=i.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return l[e]=n}t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},36:function(e,t,r){"use strict";r.r(t);r(1);const n={cycleTime:2e3,animate:document.getElementById("lazy_loading.lazy_animate"),image:document.getElementById("lazyload-image"),placeHolders:document.querySelectorAll('[name="lazy_loading[lazy_placeholder]"]'),preloader:document.getElementById("preloader-image"),color:document.getElementById("lazy_loading.lazy_custom_color"),previewCycle:document.getElementById("preview-cycle"),progress:document.getElementById("progress-bar"),threshold:document.getElementById("lazy_loading.lazy_threshold"),currentPlaceholder:null,svg:null,running:!1,init(){this.svg=this.image.dataset.svg,this.currentPlaceholder=document.getElementById("placeholder-"+this.getPlaceholder()),[...this.placeHolders].forEach((e=>{e.addEventListener("change",(()=>this.changePlaceholder(e.value)))})),this.color.addEventListener("input",(()=>this.changePreloader())),this.animate.addEventListener("change",(()=>this.changePreloader())),this.previewCycle.addEventListener("click",(()=>this.startCycle()))},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout((()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout((()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout((()=>{setTimeout((()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()}),this.cycleTime/3)}),this.cycleTime/2)}),this.cycleTime/2)}),this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout((()=>{this.showImage()}),this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout((()=>{this.endCycle()}),this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout((()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)}),this.cycleTime)}};window.addEventListener("load",(()=>n.init())),t.default=n},4:function(e,t,r){e.exports=function(e,t){var r,n,i=0;function o(){var o,s,a=r,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function l(e){var t=function(e){for(var t,r,a,l,c=[],u=[];t=e.match(s);){for(r=t[0],(a=e.substr(0,t.index).trim())&&c.push(a);l=u.pop();){if(o[r]){if(o[r][0]===l){r=o[r][1]||r;break}}else if(i.indexOf(l)>=0||n[l]1&&void 0!==arguments[1]?arguments[1]:"default";d.data[t]=l(l(l({},g),d.data[t]),e),d.data[t][""]=l(l({},g[""]),d.data[t][""])},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return d.data[e]||h(void 0,e),d.dcnpgettext(e,t,r,n,i)},f=function(e,t,r){return p(r,t,e)},c&&h(c,u),{setLocaleData:h,__:function(e,t){return p(t,void 0,e)},_x:f,_n:function(e,t,r,n){return p(n,void 0,e,t,r)},_nx:function(e,t,r,n,i){return p(i,n,e,t,r)},isRTL:function(){return"rtl"===f("ltr","text direction")}}),m=(y.setLocaleData.bind(y),y.__.bind(y));y._x.bind(y),y._n.bind(y),y._nx.bind(y),y.isRTL.bind(y)},2:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return a(c(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}function a(e,t){var r,n,s,a,l,c,u,d,h,p=1,f=e.length,g="";for(n=0;n=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=r:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",r=r.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+r).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?h+r+l:"0"===c?h+l+r:l+h+r)}return g}var l=Object.create(null);function c(e){if(l[e])return l[e];for(var t,r=e,n=[],o=0;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],a=t[2],c=[];if(null===(c=i.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=i.key_access.exec(a)))s.push(c[1]);else{if(null===(c=i.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return l[e]=n}t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},5:function(e,t,r){e.exports=function(e,t){var r,n,i=0;function o(){var o,s,a=r,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s{e.addEventListener("change",(()=>this.changePlaceholder(e.value)))})),this.color.addEventListener("input",(()=>this.changePreloader())),this.animate.addEventListener("change",(()=>this.changePreloader())),this.previewCycle.addEventListener("click",(()=>this.startCycle()))},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout((()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout((()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout((()=>{setTimeout((()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()}),this.cycleTime/3)}),this.cycleTime/2)}),this.cycleTime/2)}),this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout((()=>{this.showImage()}),this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout((()=>{this.endCycle()}),this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout((()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)}),this.cycleTime)}};window.addEventListener("load",(()=>n.init())),t.default=n},6:function(e,t,r){"use strict";var n,i,o,s;r.d(t,"a",(function(){return u})),n={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},i=["(","?"],o={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function l(e){var t=function(e){for(var t,r,a,l,c=[],u=[];t=e.match(s);){for(r=t[0],(a=e.substr(0,t.index).trim())&&c.push(a);l=u.pop();){if(o[r]){if(o[r][0]===l){r=o[r][1]||r;break}}else if(i.indexOf(l)>=0||n[l]a.ch)?l("{","}",a)||s&&l("[","]",s):s?l("[","]",s)||a&&l("{","}",a):null})),e.registerHelper("fold","import",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var i=r,o=Math.min(t.lastLine(),r+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:n.end,end:e.Pos(i,l)}}}var i,o=r.line,l=n(o);if(!l||n(o-1)||(i=n(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=n(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var i=r.line,o=n(i);if(null==o||null!=n(i-1))return null;for(var l=i;null!=n(l+1);)++l;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}(r(9))},39:function(e,t,r){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",c),t.off("viewportChange",f),t.off("fold",d),t.off("unfold",d),t.off("swapDoc",c)),i&&(t.state.foldGutter=new r(n(i)),s(t),t.on("gutterClick",u),t.on("changes",c),t.on("viewportChange",f),t.on("fold",d),t.on("unfold",d),t.on("swapDoc",c))}));var t=e.Pos;function r(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,r){for(var n=e.findMarks(t(r,0),t(r+1,0)),i=0;i=u){if(d&&a&&d.test(a.className))return;n=o(l.indicatorOpen)}}(n||a)&&e.setGutterMarker(r,l.gutter,n)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation((function(){l(e,t.from,t.to)})),r.from=t.from,r.to=t.to)}function u(e,r,n){var o=e.state.foldGutter;if(o){var l=o.options;if(n==l.gutter){var a=i(e,r);a?a.clear():e.foldCode(t(r,0),l)}}}function c(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),r.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?s(e):e.operation((function(){r.fromt.to&&(l(e,t.to,r.to),t.to=r.to)}))}),r.updateViewportTimeSpan||400)}}function d(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&nt.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==l){var f=r(t,o,c);e.on(f,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(r,n){e.signal(t,"unfold",t,r,n)})),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t,r){var n=i(e,t,"widget");if("function"==typeof n&&(n=n(r.from,r.to)),"string"==typeof n){var o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}e.newFoldFunction=function(e,r){return function(n,i){t(n,i,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",(function(e,r,n){t(this,e,r,n)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),r=0;r!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,i=r,t}function m(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return v(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return r.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=m),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var x="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;l>=0;--l){var a=e.string.charAt(l),s=x.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(f.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}}o&&!i&&(t.fatArrowAt=l)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function T(e,t,r,n,i){var o=e.cc;for(M.state=e,M.stream=i,M.marked=null,M.cc=o,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?_:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return M.marked?M.marked:"variable"==r&&L(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function N(){return O.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function D(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=W(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new H(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new H(e,t.globalVars))}}function W(e,t){if(t){if(t.block){var r=W(e,t.prev);return r?r==t.prev?t:new E(r,t.vars,!0):null}return A(e,t.vars)?t:new E(t.prev,new H(e,t.vars),!1)}return null}function F(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function E(e,t,r){this.prev=e,this.vars=t,this.block=r}function H(e,t){this.name=e,this.next=t}var P=new H("this",new H("arguments",null));function I(){M.state.context=new E(M.state.context,M.state.localVars,!1),M.state.localVars=P}function z(){M.state.context=new E(M.state.context,M.state.localVars,!0),M.state.localVars=null}function R(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function B(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function G(e){function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?O():N(t)}return t}function V(e,t){return"var"==e?N(B("vardef",t),Oe,G(";"),j):"keyword a"==e?N(B("form"),X,V,j):"keyword b"==e?N(B("form"),V,j):"keyword d"==e?M.stream.match(/^\s*$/,!1)?N():N(B("stat"),Y,G(";"),j):"debugger"==e?N(G(";")):"{"==e?N(B("}"),z,de,j,R):";"==e?N():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==j&&M.state.cc.pop()(),N(B("form"),X,V,j,Ee)):"function"==e?N(ze):"for"==e?N(B("form"),z,He,V,R,j):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form","class"==e?e:t),Ve,j)):"variable"==e?c&&"declare"==t?(M.marked="keyword",N(V)):c&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?N(tt):"type"==t?N(Be,G("operator"),me,G(";")):N(B("form"),Ne,G("{"),B("}"),de,j,j)):c&&"namespace"==t?(M.marked="keyword",N(B("form"),_,V,j)):c&&"abstract"==t?(M.marked="keyword",N(V)):N(B("stat"),oe):"switch"==e?N(B("form"),X,G("{"),B("}","switch"),z,de,j,j,R):"case"==e?N(_,G(":")):"default"==e?N(G(":")):"catch"==e?N(B("form"),I,U,V,j,R):"export"==e?N(B("stat"),Xe,j):"import"==e?N(B("stat"),Ye,j):"async"==e?N(V):"@"==t?N(_,V):O(B("stat"),_,G(";"),j)}function U(e){if("("==e)return N(je,G(")"))}function _(e,t){return $(e,t,!1)}function K(e,t){return $(e,t,!0)}function X(e){return"("!=e?O():N(B(")"),Y,G(")"),j)}function $(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?te:ee;if("("==e)return N(I,B(")"),ce(je,")"),j,G("=>"),n,R);if("variable"==e)return O(I,Ne,G("=>"),n,R)}var i=r?Z:q;return k.hasOwnProperty(e)?N(i):"function"==e?N(ze,i):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form"),Ge,j)):"keyword c"==e||"async"==e?N(r?K:_):"("==e?N(B(")"),Y,G(")"),j,i):"operator"==e||"spread"==e?N(r?K:_):"["==e?N(B("]"),et,j,i):"{"==e?fe(ae,"}",null,i):"quasi"==e?O(J,i):"new"==e?N(re(r)):N()}function Y(e){return e.match(/[;\}\)\],]/)?O():O(_)}function q(e,t){return","==e?N(Y):Z(e,t,!1)}function Z(e,t,r){var n=0==r?q:Z,i=0==r?_:K;return"=>"==e?N(I,r?te:ee,R):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(n):c&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(B(">"),ce(me,">"),j,n):"?"==t?N(_,G(":"),i):N(i):"quasi"==e?O(J,n):";"!=e?"("==e?fe(K,")","call",n):"."==e?N(le,n):"["==e?N(B("]"),Y,G("]"),j,n):c&&"as"==t?(M.marked="keyword",N(me,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(J):N(Y,Q)}function Q(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(J)}function ee(e){return C(M.stream,M.state),O("{"==e?V:_)}function te(e){return C(M.stream,M.state),O("{"==e?V:K)}function re(e){return function(t){return"."==t?N(e?ie:ne):"variable"==t&&c?N(Le,e?Z:q):O(e?K:_)}}function ne(e,t){if("target"==t)return M.marked="keyword",N(q)}function ie(e,t){if("target"==t)return M.marked="keyword",N(Z)}function oe(e){return":"==e?N(j,V):O(q,G(";"),j)}function le(e){if("variable"==e)return M.marked="property",N()}function ae(e,t){return"async"==e?(M.marked="property",N(ae)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?N(se):(c&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),N(ue))):"number"==e||"string"==e?(M.marked=a?"property":M.style+" property",N(ue)):"jsonld-keyword"==e?N(ue):c&&F(t)?(M.marked="keyword",N(ae)):"["==e?N(_,he,G("]"),ue):"spread"==e?N(K,ue):"*"==t?(M.marked="keyword",N(ae)):":"==e?O(ue):void 0;var r}function se(e){return"variable"!=e?O(ue):(M.marked="property",N(ze))}function ue(e){return":"==e?N(K):"("==e?O(ze):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var l=M.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),N((function(r,n){return r==t||n==t?O():O(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?O(e):N(G(t))}return function(r,i){return r==t||i==t?N():O(e,n)}}function fe(e,t,r){for(var n=3;n"),me):"quasi"==e?O(xe,Se):void 0}function ye(e){if("=>"==e)return N(me)}function be(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(be):O(we,be)}function we(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",N(we)):"?"==t||"number"==e||"string"==e?N(we):":"==e?N(me):"["==e?N(G("variable"),pe,G("]"),we):"("==e?O(Re,we):e.match(/[;\}\)\],]/)?void 0:N()}function xe(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(xe):N(me,Ce)}function Ce(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(xe)}function ke(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?N(ke):":"==e?N(me):"spread"==e?N(ke):O(me)}function Se(e,t){return"<"==t?N(B(">"),ce(me,">"),j,Se):"|"==t||"."==e||"&"==t?N(me):"["==e?N(me,G("]"),Se):"extends"==t||"implements"==t?(M.marked="keyword",N(me)):"?"==t?N(me,G(":"),me):void 0}function Le(e,t){if("<"==t)return N(B(">"),ce(me,">"),j,Se)}function Te(){return O(me,Me)}function Me(e,t){if("="==t)return N(me)}function Oe(e,t){return"enum"==t?(M.marked="keyword",N(tt)):O(Ne,he,We,Fe)}function Ne(e,t){return c&&F(t)?(M.marked="keyword",N(Ne)):"variable"==e?(D(t),N()):"spread"==e?N(Ne):"["==e?fe(De,"]"):"{"==e?fe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?N(Ne):"}"==e?O():"["==e?N(_,G("]"),G(":"),Ae):N(G(":"),Ne,We)):(D(t),N(We))}function De(){return O(Ne,We)}function We(e,t){if("="==t)return N(K)}function Fe(e){if(","==e)return N(Oe)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(B("form","else"),V,j)}function He(e,t){return"await"==t?N(He):"("==e?N(B(")"),Pe,j):void 0}function Pe(e){return"var"==e?N(Oe,Ie):"variable"==e?N(Ie):O(Ie)}function Ie(e,t){return")"==e?N():";"==e?N(Ie):"in"==t||"of"==t?(M.marked="keyword",N(_,Ie)):O(_,Ie)}function ze(e,t){return"*"==t?(M.marked="keyword",N(ze)):"variable"==e?(D(t),N(ze)):"("==e?N(I,B(")"),ce(je,")"),j,ge,V,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,ze):void 0}function Re(e,t){return"*"==t?(M.marked="keyword",N(Re)):"variable"==e?(D(t),N(Re)):"("==e?N(I,B(")"),ce(je,")"),j,ge,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,Re):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(M.marked="type",N(Be)):"<"==t?N(B(">"),ce(Te,">"),j):void 0}function je(e,t){return"@"==t&&N(_,je),"spread"==e?N(je):c&&F(t)?(M.marked="keyword",N(je)):c&&"this"==e?N(he,We):O(Ne,he,We)}function Ge(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return D(t),N(Ue)}function Ue(e,t){return"<"==t?N(B(">"),ce(Te,">"),j,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(M.marked="keyword"),N(c?me:_,Ue)):"{"==e?N(B("}"),_e,j):void 0}function _e(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&F(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",N(_e)):"variable"==e||"keyword"==M.style?(M.marked="property",N(Ke,_e)):"number"==e||"string"==e?N(Ke,_e):"["==e?N(_,he,G("]"),Ke,_e):"*"==t?(M.marked="keyword",N(_e)):c&&"("==e?O(Re,_e):";"==e||","==e?N(_e):"}"==e?N():"@"==t?N(_,_e):void 0}function Ke(e,t){if("!"==t)return N(Ke);if("?"==t)return N(Ke);if(":"==e)return N(me,We);if("="==t)return N(K);var r=M.state.lexical.prev;return O(r&&"interface"==r.info?Re:ze)}function Xe(e,t){return"*"==t?(M.marked="keyword",N(Qe,G(";"))):"default"==t?(M.marked="keyword",N(_,G(";"))):"{"==e?N(ce($e,"}"),Qe,G(";")):O(V)}function $e(e,t){return"as"==t?(M.marked="keyword",N(G("variable"))):"variable"==e?O(K,$e):void 0}function Ye(e){return"string"==e?N():"("==e?O(_):"."==e?O(q):O(qe,Ze,Qe)}function qe(e,t){return"{"==e?fe(qe,"}"):("variable"==e&&D(t),"*"==t&&(M.marked="keyword"),N(Je))}function Ze(e){if(","==e)return N(qe,Ze)}function Je(e,t){if("as"==t)return M.marked="keyword",N(qe)}function Qe(e,t){if("from"==t)return M.marked="keyword",N(_)}function et(e){return"]"==e?N():O(ce(K,"]"))}function tt(){return O(B("form"),Ne,G("{"),B("}"),ce(rt,"}"),j,j)}function rt(){return O(Ne,We)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new E(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",T(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=m)return 0;var i,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==j)s=s.prev;else if(c!=Ee&&c!=R)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==q||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(nt(t,n)?l||o:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:it,skipExpression:function(t){T(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(9))},45:function(e,t,r){"use strict";r.r(t);var n=r(9),i=r.n(n);r(38),r(39),r(41);const o={init(){document.addEventListener("DOMContentLoaded",(function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data");i()(e,{value:JSON.stringify(CLD_METADATA,null," "),lineNumbers:!0,theme:"material",readOnly:!0,mode:{name:"javascript",json:!0},matchBrackets:!0,foldGutter:!0,htmlMode:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],viewportMargin:50}).setSize(null,600)}))}};o.init();t.default=o},9:function(e,t,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,a=l&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,s=!0);var C=y&&(u||f&&(null==x||x<12.11)),k=r||l&&a>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return M(e).appendChild(t)}function N(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(H=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function $(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var ue=null;function ce(e,t,r){var n;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ue=i)}return null!=n?n:ue}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){Ce(e),ke(e)}function Te(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ne,Ae=function(){if(l&&a<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Oe){var t=N("span","​");O(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var r=Oe?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function We(e){if(null!=Ne)return Ne;var t=O(e,document.createTextNode("AخA")),r=L(t,0,1).getBoundingClientRect(),n=L(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Ne=n.right-r.right<3)}var Fe,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(Fe=N("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Ie=null;function ze(e){if(null!=Ie)return Ie;var t=O(e,N("span","x")),r=t.getBoundingClientRect(),n=L(t,0,1).getBoundingClientRect();return Ie=Math.abs(r.left-n.left)>1}var Re={},Be={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function Ge(e,t){Be[e]=t}function Ve(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Ve(t);var r=Re[t.name];if(!r)return Ue(e,"text/plain");var n=r(e,t);if(_e.hasOwnProperty(t.name)){var i=_e[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var _e={};function Ke(e,t){I(t,_e.hasOwnProperty(e)?_e[e]:_e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ot(r,Ze(e,r).text.length):ht(t,Ze(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?ot(e.line,t):r<0?ot(e.line,0):e}function pt(e,t){for(var r=[],n=0;n=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,r,n){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,a=function(n){r.baseTokens=i;var a=e.state.overlays[n],s=1,u=0;r.state=!0,Tt(e,t.text,a.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Xe(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new vt(n,!0,t);var o=Mt(e,t,r),l=o>n.first&&Ze(n,o-1).stateAfter,a=l?vt.fromSaved(n,l,o):new vt(n,Ye(n.mode),o);return n.iter(o,t,(function(r){wt(e,r.text,a);var n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,r){return t instanceof gt?new vt(e,Xe(e.mode,t.state),r,t.lookAhead):new vt(e,Xe(e.mode,t),r)},vt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function St(e,t,r,n){var i,o,l=e.doc,a=l.mode,s=Ze(l,(t=dt(l,t)).line),u=bt(e,t.line,r),c=new qe(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(a=!1,l&&wt(e,t,n,f.pos),f.pos=t.length,s=null):s=Lt(Ct(r,f,n.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;ul;--a){if(a<=o.first)return o.first;var s=Ze(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof gt?u.lookAhead:0)<=o.modeFrontier))return a;var c=z(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=a-1,n=c)}return i}function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof gt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new Ft(l,o.from,a?null:o.to))}}return n}function zt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var b=0;b0)){var c=[s,1],f=lt(u.from,a.from),d=lt(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Kt(r,o.marker)<0)&&(r=o.marker)}return r}function Zt(e,t,r,n,i){var o=Ze(e,t),l=At&&o.markedSpans;if(l)for(var a=0;a=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.to,r)>=0:lt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.from,n)<=0:lt(u.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function er(e){for(var t,r;t=Yt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function tr(e,t){var r=Ze(e,t),n=Jt(r);return r==n?t:tt(n)}function rr(e,t){if(t>e.lastLine())return t;var r,n=Ze(e,t);if(!nr(e,n))return t;for(;r=Yt(n);)n=r.find(1,!0).line;return tt(n)+1}function nr(e,t){var r=At&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function ur(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&et(e,i)}function cr(e){e.parent=null,Gt(e)}sr.prototype.lineNo=function(){return tt(this)},xe(sr);var fr={},dr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dr:fr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function pr(e,t){var r=A("span",null,null,s?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=vr,We(e.display.measure)&&(l=de(o,e.doc.direction))&&(n.addToken=yr(n.addToken,l)),n.map=[],wr(o,n,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function gr(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?mr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(N("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(N("span",$(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(N("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(N("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||d||o||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=N("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function mr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u);d++);if(f.to>=c)return e(r,n,i,o,l,a,s);e(r,n.slice(0,f.to-u),i,o,null,a,s),o=null,n=n.slice(f.to-u),u=f.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function wr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!f||Kt(f.marker,C)<0)&&(f=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=h)break;for(var T=Math.min(h,m);;){if(v){var M=p+v.length;if(!f){var O=M>T?v.slice(0,T-p):v;t.addToken(t,O,l?l+s:s,c,p+O.length==m?u:"",a,d)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=hr(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Zr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=tt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=pr(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}function Qr(e,t,r,n){return rn(e,tn(e,t),r,n)}function en(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(n=e[u+2],a==s&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==s-a)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=ln(t.map,r,n),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(f=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+An(e.display),top:p.top,bottom:p.bottom}:on}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,r){return l(r?e-1:e,1==a[t].level!=r)}var f=ce(a,s,u),d=ue,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function wn(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=An(e.display)*t.ch);var n=Ze(e.doc,t.line),i=or(n)+Ur(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=ot(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Cn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=rt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ze(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ze(n,i);;){var a=Tn(e,l,i,t,r),s=qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=Ze(n,i=u.line)}}function kn(e,t,r,n){n-=gn(t);var i=t.text.length,o=ae((function(t){return rn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=ae((function(t){return rn(e,r,t).top>n}),o,i)}}function Sn(e,t,r,n){return r||(r=tn(e,t)),kn(e,t,r,vn(e,t,rn(e,r,n),"line").top)}function Ln(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Tn(e,t,r,n,i){i-=or(t);var o=tn(e,t),l=gn(t),a=0,s=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?On:Mn)(e,t,r,o,c,n,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,v=ae((function(t){var r=rn(e,o,t);return r.top+=l,r.bottom+=l,!!Ln(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),a,s),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return xn(r,v=le(t.text,v,1),h,m,n-d)}function Mn(e,t,r,n,i,o,l){var a=ae((function(a){var s=i[a],u=1!=s.level;return Ln(bn(e,ot(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=bn(e,ot(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Ln(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function On(e,t,r,n,i,o,l){var a=kn(e,t,n,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d=u||h.to<=s)){var p=rn(e,n,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=pg)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==nn){nn=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nn.appendChild(document.createTextNode("x")),nn.appendChild(N("br"));nn.appendChild(document.createTextNode("x"))}O(e.measure,nn);var r=nn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function An(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;r[a]=o.offsetLeft+o.clientLeft+i,n[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fn(e){var t=Nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/An(e.display)-3);return function(i){if(nr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=Ze(e.doc,u.line).text).length==u.ch){var c=z(s,s.length,e.options.tabSize)-s.length;u=ot(u.line,Math.max(0,Math.round((o-Kr(e.display).left)/An(e.display))-c))}return u}function Pn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&tr(e.doc,t)i.viewFrom?Rn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Rn(e);else if(t<=i.viewFrom){var o=Bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Rn(e)}else if(r>=i.viewTo){var l=Bn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Rn(e)}else{var a=Bn(e,t,t,-1),s=Bn(e,r,r+n,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Cr(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Rn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Pn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bn(e,t,r,n){var i,o=Pn(e,t),l=e.display.view;if(!At||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;tr(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function jn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Cr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Cr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Pn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var a=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Kn(e,t){return e.top-t.top||e.left-t.left}function Xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Kr(e.display),a=l.left,s=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=Ze(i,t),d=f.text.length;function h(r,n){return yn(e,ot(t,r),"div",f,n)}function p(t,r,n){var i=Sn(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=de(f,i.direction);return se(g,r||0,null==n?d:n,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,x=0==f,C=!g||f==g.length-1;if(y.top-m.top<=3){var k=(u?w:b)&&C,S=(u?b:w)&&x?a:(v?m:y).left,L=k?s:(v?y:m).right;c(S,m.top,L-S,m.bottom)}else{var T,M,O,N;v?(T=u&&b&&x?a:m.left,M=u?s:p(e,i,"before"),O=u?a:p(t,i,"after"),N=u&&w&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&x?s:m.right,O=!u&&w&&C?a:y.left,N=u?p(t,i,"after"):s),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zn(e))}function qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Zn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(d/An(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ei(e){if(e.widgets)for(var t=0;t=l&&(o=rt(t,or(Ze(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ri(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ur(e.display))+"px;\n height: "+(t.bottom-t.top+Xr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ot(t.line,t.ch+1,"before"):t,t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=bn(e,t),s=r&&r!=t?bn(e,r):a,u=oi(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(di(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(pi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function ii(e,t){var r=oi(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null!=r.scrollLeft&&pi(e,r.scrollLeft)}function oi(e,t){var r=e.display,n=Nn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Yr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+_r(r),s=t.topa-n;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,h=$r(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function li(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,fi(e,wn(e,t.from),wn(e,t.to),t.margin))}function fi(e,t,r,n){var i=oi(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Vi(e,{top:t}),hi(e,t,!0),r&&Vi(e),Hi(e,100))}function hi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Xi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_r(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Xr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var vi=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},vi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function yi(e,t){t||(t=gi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Qn(e),bi(e,gi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var wi={native:vi,null:mi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ci=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ci,markArrays:null},Sr(e.curOp)}function Si(e){var t=e.curOp;t&&Tr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function Oi(e){var t=e.cm,r=t.display;e.updatedDisplay&&Qn(t),e.barMeasure=gi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Xr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Xe(t.mode,n.state):null,s=mt(e,o,n,!0);a&&(n.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dr)return Hi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Di(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;$i(e)&&(Rn(e),t.dims=Dn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),At&&(o=tr(e.doc,o),l=rr(e.doc,l));var a=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jn(e,o,l),r.viewOffset=or(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!a&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ri(e);return s>4&&(r.lineDiv.style.display="none"),Ui(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Bi(u),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Hi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ti(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+_r(e.display)-Yr(e),r.top)}),t.visible=ti(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ji(e,t))break;Qn(e);var i=gi(e);Vn(e),yi(e,i),Ki(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Vi(e,t){var r=new Ii(e,t);if(ji(e,r)){Qn(e),Gi(e,r);var n=gi(e);Vn(e),yi(e,n),Ki(e,n),r.finish()}}function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function a(t){var r=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,f=0;f-1&&(h=!1),Ar(e,d,c,r)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),l=d.node.nextSibling}else{var p=zr(e,d,c,r);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}function _i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Or(e,"gutterChanged",e)}function Ki(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xr(e)+"px"}function Xi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lu.clientWidth,d=u.scrollHeight>u.clientHeight;if(i&&c||o&&d){if(o&&y&&s)e:for(var h=t.target,p=a.view;h!=u;h=h.parentNode)for(var g=0;g=0&<(e,n.to())<=0)return r}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function lo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=B(t,i);for(var o=1;o0:s>=0){var u=ct(a.from(),l.from()),c=ut(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=r&&--r,t.splice(--o,2,new oo(f?c:u,f?u:c))}}return new io(t,r)}function ao(e,t){return new io([new oo(e,t||e)],0)}function so(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),ot(r,n)}function co(e,t){for(var r=[],n=0;n1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Or(e,"change",e,t)}function yo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function To(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Lo(i,i.lastOp==n)))l=Y(o.changes),0==lt(t.from,t.to)&&0==lt(t.from,l.to)?l.to=so(t):o.changes.push(ko(e,t));else{var s=Y(i.done);for(s&&s.ranges||No(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||me(e,"historyAdded")}function Mo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Oo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Mo(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&So(i.undone)}function No(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,r=0;r-1&&(Y(a)[f]=u[f],delete u[f])}}}return n}function Ho(e,t,r,n){if(n){var i=e.anchor;if(r){var o=lt(t,i)<0;o!=lt(r,i)<0?(i=t,t=r):o!=lt(t,r)<0&&(t=r)}return new oo(i,t)}return new oo(r||t,t)}function Po(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new io([Ho(e.sel.primary(),t,r,i)],0),n)}function Io(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(me(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(f=Yo(e,f,-n,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Xo(e,f,t,n,i)}var h=s.find(n<0?-1:1);return(n<0?u:c)&&(h=Yo(e,h,n,h.line==t.line?o:null)),h?Xo(e,h,t,n,i):null}}return t}function $o(e,t,r,n,i){var o=n||1,l=Xo(e,t,r,o,i)||!i&&Xo(e,t,r,o,!0)||Xo(e,t,r,-o,i)||!i&&Xo(e,t,r,-o,!0);return l||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,ot(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=co(e,t);To(e,t,r,e.cm?e.cm.curOp.id:NaN),rl(e,t,r,Rt(e,t));var n=[];yo(e,(function(e,r){r||-1!=B(n,e.history)||(al(e.history,t),n.push(e.history)),rl(e,t,null,Rt(e,t))}))}}function el(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--h){var p=d(h);if(p)return p.v}}}}function tl(e,t){if(0!=t&&(e.first+=t,e.sel=new io(q(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){In(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=co(e,t)),e.cm?nl(e.cm,t,n):mo(e,t,n),Vo(e,r,V),e.cantEdit&&$o(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function nl(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=tt(Jt(Ze(n,o.line))),n.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&be(e),mo(n,t,r,Fn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=lr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Ot(n,o.line),Hi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?In(e):o.line!=l.line||1!=t.text.length||vo(e.doc,t)?In(e,o.line,l.line+1,u):zn(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Or(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function il(e,t,r,n,i){var o;n||(n=r),lt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ol(e,t,r,n){r1||!(this.children[0]instanceof ul))){var a=[];this.collapse(a),this.children=[new ul(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Zt(e,t.line,t,r,o)||t.line!=r.line&&Zt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wt()}o.addToHistory&&To(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&Jt(n)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&et(n,0),Pt(n,new Ft(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){nr(e,t)&&et(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)In(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)zn(u,c,"text");o.atomic&&_o(u.doc),Or(u,"markerAdded",u,o)}return o}gl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),we(this,"clear")){var r=this.find();r&&Or(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&In(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_o(e.doc)),e&&Or(e,"markerCleared",e,this,n,i),t&&Si(e),this.parent&&this.parent.clear()}},gl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)Jo(this,n[s]);a?jo(this,a):this.cm&&ai(this.cm)})),undo:Ei((function(){el(this,"undo")})),redo:Ei((function(){el(this,"redo")})),undoSelection:Ei((function(){el(this,"undo",!0)})),redoSelection:Ei((function(){el(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),dt(this,ot(r,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vo(t.doc,ao(r,r)),d)for(var h=0;h=0;t--)il(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Xl(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $l(e,t,r){var n=Xl(e,t.ch,r);return null==n?null:new ot(t.line,n,r<0?"after":"before")}function Yl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var l,a=i<0?Y(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=tn(t,r);l=i<0?r.text.length-1:0;var c=rn(t,u,l).top;l=ae((function(e){return rn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=Xl(r,l,1))}else l=i<0?a.to:a.from;return new ot(n,l,s)}}return new ot(n,i<0?r.text.length:0,i<0?"before":"after")}function ql(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return $l(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&d>=c.begin)){var h=f?"before":"after";return new ot(r.line,d,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ot(r.line,s(e,1),"before"):new ot(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?n.begin:s(n.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}zl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zl.default=y?zl.macDefault:zl.pcDefault;var Zl={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Kl(e,(function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ze(e.doc,i.line-1).text;l&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ot(i.line-1,l.length-1),i,"+transpose"))}r.push(new oo(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(lt((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(lt(i.to(),t)>0||t.xRel<0)?Ca(e,n,t,o):Sa(e,n,t,o)}function Ca(e,t,r,n){var i=e.display,o=!1,u=Wi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:qn(e)),ve(i.wrapper.ownerDocument,"mouseup",u),ve(i.wrapper.ownerDocument,"mousemove",c),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",u),o||(Ce(t),n.addNew||Po(e.doc,r,null,null,n.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ka(e,t,r){if("char"==r)return new oo(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new oo(ot(t.line,0),dt(e.doc,ot(t.line+1,0)));var n=r(e,t);return new oo(n.from,n.to)}function Sa(e,t,r,n){l&&qn(e);var i=e.display,o=e.doc;Ce(t);var a,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new oo(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new oo(r,r)),r=Hn(e,t,!0,!0),s=-1;else{var f=ka(e,r,n.unit);a=n.extend?Ho(a,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=c.length,Go(o,lo(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,lo(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):zo(o,s,a,U):(s=0,Go(o,new io([a],0),U),u=o.sel);var d=r;function h(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=z(Ze(o,r.line).text,r.ch,l),f=z(Ze(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Ze(o,g).text,y=K(m,h,l);h==p?i.push(new oo(ot(g,y),ot(g,y))):m.length>y&&i.push(new oo(ot(g,y),ot(g,K(m,p,l))))}i.length||i.push(new oo(r,r)),Go(o,lo(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=ka(e,t,n.unit),C=w.anchor;lt(x.anchor,C)>0?(b=x.head,C=ct(w.from(),x.anchor)):(b=x.anchor,C=ut(w.to(),x.head));var k=u.ranges.slice(0);k[s]=La(e,new oo(dt(o,C),b)),Go(o,lo(e,k,s),U)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var r=++g,l=Hn(e,t,!0,"rectangle"==n.unit);if(l)if(0!=lt(l,d)){e.curOp.focus=W(),h(l);var a=ti(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Wi(e,(function(){g==r&&(i.scroller.scrollTop+=s,v(t))})),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Wi(e,(function(e){0!==e.buttons&&Me(e)?v(e):m(e)})),b=Wi(e,m);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}function La(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var l=ce(o,r.ch,r.sticky),a=o[l];if(a.from!=r.ch&&a.to!=r.ch)return t;var s,u=l+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new oo(new ot(r.line,p,g),n)}function Ta(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ce(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!we(e,r))return Se(t);o-=a.top-l.viewOffset;for(var s=0;s=i)return me(e,r,e,rt(e.doc,o),e.display.gutterSpecs[s].className,t),Se(t)}}function Ma(e,t){return Ta(e,t,"gutterClick",!0)}function Oa(e,t){Vr(e.display,t)||Na(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Na(e,t){return!!we(e,"gutterContextMenu")&&Ta(e,t,"gutterContextMenu",!1)}function Aa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dn(e)}va.prototype.compare=function(e,t,r){return this.time+ga>e&&0==lt(t,this.pos)&&r==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Wa={},Fa={};function Ea(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Da&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Da,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),r("indentUnit",2,po,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){go(e),dn(e),In(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ot(n,o))}n++}));for(var i=r.length-1;i>=0;i--)il(e.doc,t,r[i],ot(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Da&&e.refresh()})),r("specialCharPlaceholder",gr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Aa(e),Zi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=_l(t),i=r!=Da&&_l(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Pa,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Zi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Wn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Zi(e)}),!0),r("firstLineNumber",1,Zi,!0),r("lineNumberFormatter",(function(e){return e}),Zi,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ha),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,go,!0),r("addModeClass",!1,go,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,go,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Ha(e,t,r){if(!t!=!(r&&r!=Da)){var n=e.display.dragFunctions,i=t?pe:ve;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Pa(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),ar(e)),En(e),In(e),dn(e),setTimeout((function(){return yi(e)}),100)}function Ia(e,t){var r=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?I(t):{},I(Wa,t,!1);var n=t.value;"string"==typeof n?n=new kl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ia.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Aa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),za(this),Dl(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Zn(r)}),20):Jn(this),Fa)Fa.hasOwnProperty(u)&&Fa[u](this,t[u],Da);$i(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ma(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new oo(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new oo(ot(l.line,0),dt(e.doc,ot(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(r)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Le(t)},over:function(t){ye(e,t)||(Ml(e,t),Le(t))},start:function(t){return Tl(e,t)},drop:Wi(e,Ll),leave:function(t){ye(e,t)||Ol(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return fa.call(e,t)})),pe(u,"keydown",Wi(e,ua)),pe(u,"keypress",Wi(e,da)),pe(u,"focus",(function(t){return Zn(e,t)})),pe(u,"blur",(function(t){return Jn(e,t)}))}Ia.defaults=Wa,Ia.optionHandlers=Fa;var Ra=[];function Ba(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var l=e.options.tabSize,a=Ze(o,t),s=z(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==r&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Ze(o,t-1).text,null,l):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(dl,s=Ee(t),u=null;if(a&&n.ranges.length>1)if(ja&&ja.text.join("\n")==t){if(n.ranges.length%ja.text.length==0){u=[];for(var c=0;c=0;d--){var h=n.ranges[d],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=ot(p.line,p.ch-r):e.state.overwrite&&!a?g=ot(g.line,Math.min(Ze(o,g.line).text.length,g.ch+Y(s).length)):a&&ja&&ja.lineWise&&ja.text.join("\n")==s.join("\n")&&(p=g=ot(p.line,0)));var v={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jo(e.doc,v),Or(e,"inputRead",e,v)}t&&!a&&_a(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ua(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Va(t,r,0,null,"paste")})),!0}function _a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Ba(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ba(e,i.head.line,"smart"));l&&Or(e,"electricInput",e,i.head.line)}}}function Ka(e){for(var t=[],r=[],n=0;nr&&(Ba(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),l=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&zo(this.doc,n,new oo(o,u[n].to()),V)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,r=yt(this,Ze(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Ze(this.doc,e)}else n=e;return vn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-or(n):0)},defaultTextHeight:function(){return Nn(this.display)},defaultCharWidth:function(){return An(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=bn(this,dt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ii(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Fi(ua),triggerOnKeyPress:Fi(da),triggerOnKeyUp:fa,triggerOnMouseDown:Fi(ya),execCommand:function(e){if(Zl.hasOwnProperty(e))return Zl[e].call(null,this)},triggerElectric:Fi((function(e){_a(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&En(this),me(this,"refresh",this)})),swapDoc:Fi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),dn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Or(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function qa(e,t,r,n,i){var o=t,l=r,a=Ze(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ot(r,t.ch,t.sticky),a=Ze(e,r))}function c(o){var l;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ot(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(f?2:1))),-r)}}else l=i?ql(e.cm,a,t,r):$l(a,t,r);if(null==l){if(o||!u())return!1;t=Yl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var g=a.text.charAt(t.ch)||"\n",v=re(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!p))break}var m=$o(e,t,o,l,!0);return at(o,m)&&(m.hitSide=!0),m}function Za(e,t,r,n){var i,o,l=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Nn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Cn(e,a,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qa(e,t){var r=en(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=Zr(r,n,t.line),o=de(n,e.doc.direction),l="left";o&&(l=ce(o,t.ch)%2?"right":"left");var a=ln(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function es(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ts(e,t){return t&&(e.bad=!0),e}function rs(e,t,r,n,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(ot(n,0),ot(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(Je(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&Qa(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=ot(l.line-1,Ze(n.doc,l.line-1).length)),a.ch==Ze(n.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Pn(n,l.line))?(t=tt(i.view[0].line),r=i.view[0].node):(t=tt(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Pn(n,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(rs(n,r,u,t,s)),d=Je(n.doc,ot(t,0),ot(s,Ze(n.doc,s).text.length));f.length>1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);hl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=ot(t,h),C=ot(s,d.length?Y(d).length-p:0);return f.length>1||f[0]||lt(x,C)?(il(n.doc,f,x,C,"+input"),!0):void 0},Ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ja.prototype.reset=function(){this.forceCompositionEnd()},Ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return In(e.cm)}))},Ja.prototype.setUneditable=function(e){e.contentEditable="false"},Ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Wi(this.cm,Va)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ja.prototype.onContextMenu=function(){},Ja.prototype.resetPosition=function(){},Ja.prototype.needsContentAttribute=!0;var os=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};function ls(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=a.getValue()}var i;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function as(e){e.off=ve,e.on=pe,e.wheelEventPixels=ro,e.Doc=kl,e.splitLines=Ee,e.countColumn=z,e.findColumn=K,e.isWordChar=te,e.Pass=G,e.signal=me,e.Line=sr,e.changeEnd=so,e.scrollbarModel=wi,e.Pos=ot,e.cmpPos=lt,e.modes=Re,e.mimeModes=Be,e.resolveMode=Ve,e.getMode=Ue,e.modeExtensions=_e,e.extendMode=Ke,e.copyState=Xe,e.startState=Ye,e.innerMode=$e,e.commands=Zl,e.keyMap=zl,e.keyName=Ul,e.isModifierKey=Gl,e.lookupKey=jl,e.normalizeKeyMap=Bl,e.StringStream=qe,e.SharedTextMarker=ml,e.TextMarker=gl,e.LineWidget=fl,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Le,e.addClass=F,e.contains=D,e.rmClass=T,e.keyNames=El}os.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(n,e)){if(n.somethingSelected())Ga({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ka(n);Ga({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(i,"paste",(function(e){ye(n,e)||Ua(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!ye(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},os.prototype.createField=function(e){this.wrapper=$a(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Un(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},os.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},os.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&H(this.textarea),l&&a>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},os.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},os.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Hn(r,e),u=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Wi(r,Go)(r.doc,ao(o),V);var c,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),n.input.focus(),s&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&a>=9&&v(),k){Le(e);var g=function(){ve(window,"mouseup",g),setTimeout(m,20)};pe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,l&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Wi(r,qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},os.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1,Ea(Ia),Ya(Ia);var ss="iter insert remove copy getEditor constructor".split(" ");for(var us in kl.prototype)kl.prototype.hasOwnProperty(us)&&B(ss,us)<0&&(Ia.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(kl.prototype[us]));return xe(kl),Ia.inputStyles={textarea:os,contenteditable:Ja},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),je.apply(this,arguments)},Ia.defineMIME=Ge,Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){kl.prototype[e]=t},Ia.fromTextArea=ls,as(Ia),Ia.version="5.65.0",Ia}()}}); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=71)}({17:function(e,t,r){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,a=l&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,s=!0);var C=y&&(u||f&&(null==x||x<12.11)),k=r||l&&a>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var r=e.className,n=S(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return M(e).appendChild(t)}function N(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}g?H=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(H=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function $(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var ue=null;function ce(e,t,r){var n;ue=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:ue=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ue=i)}return null!=n?n:ue}var fe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var r=ge(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){Ce(e),ke(e)}function Te(e){return e.target||e.srcElement}function Me(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Oe,Ne,Ae=function(){if(l&&a<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Oe){var t=N("span","​");O(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var r=Oe?N("span","​"):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function We(e){if(null!=Ne)return Ne;var t=O(e,document.createTextNode("AخA")),r=L(t,0,1).getBoundingClientRect(),n=L(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Ne=n.right-r.right<3)}var Fe,Ee=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Pe="oncopy"in(Fe=N("div"))||(Fe.setAttribute("oncopy","return;"),"function"==typeof Fe.oncopy),Ie=null;function ze(e){if(null!=Ie)return Ie;var t=O(e,N("span","x")),r=t.getBoundingClientRect(),n=L(t,0,1).getBoundingClientRect();return Ie=Math.abs(r.left-n.left)>1}var Re={},Be={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function Ge(e,t){Be[e]=t}function Ve(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Ve(t);var r=Re[t.name];if(!r)return Ue(e,"text/plain");var n=r(e,t);if(_e.hasOwnProperty(t.name)){var i=_e[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var _e={};function Ke(e,t){I(t,_e.hasOwnProperty(e)?_e[e]:_e[e]={})}function Xe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ye(e,t,r){return!e.startState||e.startState(t,r)}var qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ze(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?ot(r,Ze(e,r).text.length):ht(t,Ze(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?ot(e.line,t):r<0?ot(e.line,0):e}function pt(e,t){for(var r=[],n=0;n=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.post},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var gt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function mt(e,t,r,n){var i=[e.state.modeGen],o={};Tt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,a=function(n){r.baseTokens=i;var a=e.state.overlays[n],s=1,u=0;r.state=!0,Tt(e,t.text,a.mode,r,(function(e,t){for(var r=s;ue&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;re.options.maxHighlightLength&&Xe(e.doc.mode,n.state),o=mt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new vt(n,!0,t);var o=Mt(e,t,r),l=o>n.first&&Ze(n,o-1).stateAfter,a=l?vt.fromSaved(n,l,o):new vt(n,Ye(n.mode),o);return n.iter(o,t,(function(r){wt(e,r.text,a);var n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,r){return t instanceof gt?new vt(e,Xe(e.mode,t.state),r,t.lookAhead):new vt(e,Xe(e.mode,t),r)},vt.prototype.save=function(e){var t=!1!==e?Xe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new gt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function St(e,t,r,n){var i,o,l=e.doc,a=l.mode,s=Ze(l,(t=dt(l,t)).line),u=bt(e,t.line,r),c=new qe(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(a=!1,l&&wt(e,t,n,f.pos),f.pos=t.length,s=null):s=Lt(Ct(r,f,n.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;ul;--a){if(a<=o.first)return o.first;var s=Ze(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof gt?u.lookAhead:0)<=o.modeFrontier))return a;var c=z(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=a-1,n=c)}return i}function Ot(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof gt)||n+i.lookAhead=t:o.to>t);(n||(n=[])).push(new Ft(l,o.from,a?null:o.to))}}return n}function zt(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&a)for(var b=0;b0)){var c=[s,1],f=lt(u.from,a.from),d=lt(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Gt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Kt(r,o.marker)<0)&&(r=o.marker)}return r}function Zt(e,t,r,n,i){var o=Ze(e,t),l=At&&o.markedSpans;if(l)for(var a=0;a=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.to,r)>=0:lt(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?lt(u.from,n)<=0:lt(u.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function er(e){for(var t,r;t=Yt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function tr(e,t){var r=Ze(e,t),n=Jt(r);return r==n?t:tt(n)}function rr(e,t){if(t>e.lastLine())return t;var r,n=Ze(e,t);if(!nr(e,n))return t;for(;r=Yt(n);)n=r.find(1,!0).line;return tt(n)+1}function nr(e,t){var r=At&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function ur(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Gt(e),Vt(e,r);var i=n?n(e):1;i!=e.height&&et(e,i)}function cr(e){e.parent=null,Gt(e)}sr.prototype.lineNo=function(){return tt(this)},xe(sr);var fr={},dr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?dr:fr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function pr(e,t){var r=A("span",null,null,s?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=vr,We(e.display.measure)&&(l=de(o,e.doc.direction))&&(n.addToken=yr(n.addToken,l)),n.map=[],wr(o,n,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function gr(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vr(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?mr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(N("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(N("span",$(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(N("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(N("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||d||o||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=N("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function mr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&f.from<=u);d++);if(f.to>=c)return e(r,n,i,o,l,a,s);e(r,n.slice(0,f.to-u),i,o,null,a,s),o=null,n=n.slice(f.to-u),u=f.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function wr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!f||Kt(f.marker,C)<0)&&(f=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S=h)break;for(var T=Math.min(h,m);;){if(v){var M=p+v.length;if(!f){var O=M>T?v.slice(0,T-p):v;t.addToken(t,O,l?l+s:s,c,p+O.length==m?u:"",a,d)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=hr(r[g++],t.cm.options)}}else for(var N=1;N2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Zr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=tt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=pr(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}function Qr(e,t,r,n){return rn(e,tn(e,t),r,n)}function en(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(n=e[u+2],a==s&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==s-a)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=ln(t.map,r,n),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&oe(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c0&&(f=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+An(e.display),top:p.top,bottom:p.bottom}:on}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,r){return l(r?e-1:e,1==a[t].level!=r)}var f=ce(a,s,u),d=ue,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function wn(e,t){var r=0;t=dt(e.doc,t),e.options.lineWrapping||(r=An(e.display)*t.ch);var n=Ze(e.doc,t.line),i=or(n)+Ur(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=ot(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Cn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=rt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ze(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ze(n,i);;){var a=Tn(e,l,i,t,r),s=qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=Ze(n,i=u.line)}}function kn(e,t,r,n){n-=gn(t);var i=t.text.length,o=ae((function(t){return rn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=ae((function(t){return rn(e,r,t).top>n}),o,i)}}function Sn(e,t,r,n){return r||(r=tn(e,t)),kn(e,t,r,vn(e,t,rn(e,r,n),"line").top)}function Ln(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Tn(e,t,r,n,i){i-=or(t);var o=tn(e,t),l=gn(t),a=0,s=t.text.length,u=!0,c=de(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?On:Mn)(e,t,r,o,c,n,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,v=ae((function(t){var r=rn(e,o,t);return r.top+=l,r.bottom+=l,!!Ln(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),a,s),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return xn(r,v=le(t.text,v,1),h,m,n-d)}function Mn(e,t,r,n,i,o,l){var a=ae((function(a){var s=i[a],u=1!=s.level;return Ln(bn(e,ot(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=bn(e,ot(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Ln(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function On(e,t,r,n,i,o,l){var a=kn(e,t,n,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d=u||h.to<=s)){var p=rn(e,n,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=pg)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function Nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==nn){nn=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)nn.appendChild(document.createTextNode("x")),nn.appendChild(N("br"));nn.appendChild(document.createTextNode("x"))}O(e.measure,nn);var r=nn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function An(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),r=N("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;r[a]=o.offsetLeft+o.clientLeft+i,n[a]=o.clientWidth}return{fixedPos:Wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Fn(e){var t=Nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/An(e.display)-3);return function(i){if(nr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(s=Ze(e.doc,u.line).text).length==u.ch){var c=z(s,s.length,e.options.tabSize)-s.length;u=ot(u.line,Math.max(0,Math.round((o-Kr(e.display).left)/An(e.display))-c))}return u}function Pn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)At&&tr(e.doc,t)i.viewFrom?Rn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Rn(e);else if(t<=i.viewFrom){var o=Bn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Rn(e)}else if(r>=i.viewTo){var l=Bn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Rn(e)}else{var a=Bn(e,t,t,-1),s=Bn(e,r,r+n,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Cr(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Rn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[Pn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Rn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bn(e,t,r,n){var i,o=Pn(e,t),l=e.display.view;if(!At||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var a=e.display.viewFrom,s=0;s0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;tr(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function jn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Cr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Cr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Pn(e,r)))),n.viewTo=r}function Gn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var a=r.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Kn(e,t){return e.top-t.top||e.left-t.left}function Xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Kr(e.display),a=l.left,s=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=Ze(i,t),d=f.text.length;function h(r,n){return yn(e,ot(t,r),"div",f,n)}function p(t,r,n){var i=Sn(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=de(f,i.direction);return se(g,r||0,null==n?d:n,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,x=0==f,C=!g||f==g.length-1;if(y.top-m.top<=3){var k=(u?w:b)&&C,S=(u?b:w)&&x?a:(v?m:y).left,L=k?s:(v?y:m).right;c(S,m.top,L-S,m.bottom)}else{var T,M,O,N;v?(T=u&&b&&x?a:m.left,M=u?s:p(e,i,"before"),O=u?a:p(t,i,"after"),N=u&&w&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&x?s:m.right,O=!u&&w&&C?a:y.left,N=u?p(t,i,"after"):s),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Zn(e))}function qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Zn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(d/An(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ei(e){if(e.widgets)for(var t=0;t=l&&(o=rt(t,or(Ze(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function ri(e,t){if(!ye(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ur(e.display))+"px;\n height: "+(t.bottom-t.top+Xr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ni(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?ot(t.line,t.ch+1,"before"):t,t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=bn(e,t),s=r&&r!=t?bn(e,r):a,u=oi(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(di(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(pi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function ii(e,t){var r=oi(e,t);null!=r.scrollTop&&di(e,r.scrollTop),null!=r.scrollLeft&&pi(e,r.scrollLeft)}function oi(e,t){var r=e.display,n=Nn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Yr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+_r(r),s=t.topa-n;if(t.topi+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,h=$r(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.lefth+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function li(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ui(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,fi(e,wn(e,t.from),wn(e,t.to),t.margin))}function fi(e,t,r,n){var i=oi(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||Vi(e,{top:t}),hi(e,t,!0),r&&Vi(e),Hi(e,100))}function hi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Xi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function gi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+_r(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Xr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var vi=function(e,t,r){this.cm=r;var n=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),pe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},vi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var mi=function(){};function yi(e,t){t||(t=gi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Qn(e),bi(e,gi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var wi={native:vi,null:mi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?pi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Ci=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ci,markArrays:null},Sr(e.curOp)}function Si(e){var t=e.curOp;t&&Tr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mi(e){e.updatedDisplay=e.mustUpdate&&ji(e.cm,e.update)}function Oi(e){var t=e.cm,r=t.display;e.updatedDisplay&&Qn(t),e.barMeasure=gi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Xr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ni(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?Xe(t.mode,n.state):null,s=mt(e,o,n,!0);a&&(n.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dr)return Hi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Di(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Gn(e))return!1;$i(e)&&(Rn(e),t.dims=Dn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),At&&(o=tr(e.doc,o),l=rr(e.doc,l));var a=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;jn(e,o,l),r.viewOffset=or(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Gn(e);if(!a&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Ri(e);return s>4&&(r.lineDiv.style.display="none"),Ui(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Bi(u),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Hi(e,400)),r.updateLineNumbers=null,!0}function Gi(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ti(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+_r(e.display)-Yr(e),r.top)}),t.visible=ti(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ji(e,t))break;Qn(e);var i=gi(e);Vn(e),yi(e,i),Ki(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Vi(e,t){var r=new Ii(e,t);if(ji(e,r)){Qn(e),Gi(e,r);var n=gi(e);Vn(e),yi(e,n),Ki(e,n),r.finish()}}function Ui(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function a(t){var r=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,f=0;f-1&&(h=!1),Ar(e,d,c,r)),h&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),l=d.node.nextSibling}else{var p=zr(e,d,c,r);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}function _i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Or(e,"gutterChanged",e)}function Ki(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Xr(e)+"px"}function Xi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lu.clientWidth,d=u.scrollHeight>u.clientHeight;if(i&&c||o&&d){if(o&&y&&s)e:for(var h=t.target,p=a.view;h!=u;h=h.parentNode)for(var g=0;g=0&<(e,n.to())<=0)return r}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function lo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=B(t,i);for(var o=1;o0:s>=0){var u=ct(a.from(),l.from()),c=ut(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=r&&--r,t.splice(--o,2,new oo(f?c:u,f?u:c))}}return new io(t,r)}function ao(e,t){return new io([new oo(e,t||e)],0)}function so(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function uo(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),ot(r,n)}function co(e,t){for(var r=[],n=0;n1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Or(e,"change",e,t)}function yo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function To(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Lo(i,i.lastOp==n)))l=Y(o.changes),0==lt(t.from,t.to)&&0==lt(t.from,l.to)?l.to=so(t):o.changes.push(ko(e,t));else{var s=Y(i.done);for(s&&s.ranges||No(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||me(e,"historyAdded")}function Mo(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Oo(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Mo(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:No(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&So(i.undone)}function No(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,r=0;r-1&&(Y(a)[f]=u[f],delete u[f])}}}return n}function Ho(e,t,r,n){if(n){var i=e.anchor;if(r){var o=lt(t,i)<0;o!=lt(r,i)<0?(i=t,t=r):o!=lt(t,r)<0&&(t=r)}return new oo(i,t)}return new oo(r||t,t)}function Po(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Go(e,new io([Ho(e.sel.primary(),t,r,i)],0),n)}function Io(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(i&&(me(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(f=Yo(e,f,-n,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Xo(e,f,t,n,i)}var h=s.find(n<0?-1:1);return(n<0?u:c)&&(h=Yo(e,h,n,h.line==t.line?o:null)),h?Xo(e,h,t,n,i):null}}return t}function $o(e,t,r,n,i){var o=n||1,l=Xo(e,t,r,o,i)||!i&&Xo(e,t,r,o,!0)||Xo(e,t,r,-o,i)||!i&&Xo(e,t,r,-o,!0);return l||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?dt(e,ot(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line=0;--i)Qo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Qo(e,t)}}function Qo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=co(e,t);To(e,t,r,e.cm?e.cm.curOp.id:NaN),rl(e,t,r,Rt(e,t));var n=[];yo(e,(function(e,r){r||-1!=B(n,e.history)||(al(e.history,t),n.push(e.history)),rl(e,t,null,Rt(e,t))}))}}function el(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u=0;--h){var p=d(h);if(p)return p.v}}}}function tl(e,t){if(0!=t&&(e.first+=t,e.sel=new io(q(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){In(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ot(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=co(e,t)),e.cm?nl(e.cm,t,n):mo(e,t,n),Vo(e,r,V),e.cantEdit&&$o(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function nl(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=tt(Jt(Ze(n,o.line))),n.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&be(e),mo(n,t,r,Fn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=lr(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Ot(n,o.line),Hi(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?In(e):o.line!=l.line||1!=t.text.length||vo(e.doc,t)?In(e,o.line,l.line+1,u):zn(e,o.line,"text");var c=we(e,"changes"),f=we(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Or(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function il(e,t,r,n,i){var o;n||(n=r),lt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ol(e,t,r,n){r1||!(this.children[0]instanceof ul))){var a=[];this.collapse(a),this.children=[new ul(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,a=l;a10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Zt(e,t.line,t,r,o)||t.line!=r.line&&Zt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wt()}o.addToHistory&&To(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&Jt(n)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&et(n,0),Pt(n,new Ft(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){nr(e,t)&&et(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++pl,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)In(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)zn(u,c,"text");o.atomic&&_o(u.doc),Or(u,"markerAdded",u,o)}return o}gl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),we(this,"clear")){var r=this.find();r&&Or(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&In(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&_o(e.doc)),e&&Or(e,"markerCleared",e,this,n,i),t&&Si(e),this.parent&&this.parent.clear()}},gl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;s--)Jo(this,n[s]);a?jo(this,a):this.cm&&ai(this.cm)})),undo:Ei((function(){el(this,"undo")})),redo:Ei((function(){el(this,"redo")})),undoSelection:Ei((function(){el(this,"undo",!0)})),redoSelection:Ei((function(){el(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=dt(this,e),t=dt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),dt(this,ot(r,t))},indexFromPos:function(e){var t=(e=dt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vo(t.doc,ao(r,r)),d)for(var h=0;h=0;t--)il(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Xl(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $l(e,t,r){var n=Xl(e,t.ch,r);return null==n?null:new ot(t.line,n,r<0?"after":"before")}function Yl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var l,a=i<0?Y(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=tn(t,r);l=i<0?r.text.length-1:0;var c=rn(t,u,l).top;l=ae((function(e){return rn(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=Xl(r,l,1))}else l=i<0?a.to:a.from;return new ot(n,l,s)}}return new ot(n,i<0?r.text.length:0,i<0?"before":"after")}function ql(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return $l(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&d>=c.begin)){var h=f?"before":"after";return new ot(r.line,d,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ot(r.line,s(e,1),"before"):new ot(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=a?n.begin:s(n.end,-1);if(l.from<=u&&u0?c.end:s(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}zl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},zl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},zl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},zl.default=y?zl.macDefault:zl.pcDefault;var Zl={selectAll:qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Kl(e,(function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ze(e.doc,i.line-1).text;l&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ot(i.line-1,l.length-1),i,"+transpose"))}r.push(new oo(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(lt((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(lt(i.to(),t)>0||t.xRel<0)?Ca(e,n,t,o):Sa(e,n,t,o)}function Ca(e,t,r,n){var i=e.display,o=!1,u=Wi(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:qn(e)),ve(i.wrapper.ownerDocument,"mouseup",u),ve(i.wrapper.ownerDocument,"mousemove",c),ve(i.scroller,"dragstart",f),ve(i.scroller,"drop",u),o||(Ce(t),n.addNew||Po(e.doc,r,null,null,n.extend),s&&!d||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ka(e,t,r){if("char"==r)return new oo(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new oo(ot(t.line,0),dt(e.doc,ot(t.line+1,0)));var n=r(e,t);return new oo(n.from,n.to)}function Sa(e,t,r,n){l&&qn(e);var i=e.display,o=e.doc;Ce(t);var a,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new oo(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new oo(r,r)),r=Hn(e,t,!0,!0),s=-1;else{var f=ka(e,r,n.unit);a=n.extend?Ho(a,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=c.length,Go(o,lo(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Go(o,lo(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):zo(o,s,a,U):(s=0,Go(o,new io([a],0),U),u=o.sel);var d=r;function h(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=z(Ze(o,r.line).text,r.ch,l),f=z(Ze(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Ze(o,g).text,y=K(m,h,l);h==p?i.push(new oo(ot(g,y),ot(g,y))):m.length>y&&i.push(new oo(ot(g,y),ot(g,K(m,p,l))))}i.length||i.push(new oo(r,r)),Go(o,lo(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=ka(e,t,n.unit),C=w.anchor;lt(x.anchor,C)>0?(b=x.head,C=ct(w.from(),x.anchor)):(b=x.anchor,C=ut(w.to(),x.head));var k=u.ranges.slice(0);k[s]=La(e,new oo(dt(o,C),b)),Go(o,lo(e,k,s),U)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var r=++g,l=Hn(e,t,!0,"rectangle"==n.unit);if(l)if(0!=lt(l,d)){e.curOp.focus=W(),h(l);var a=ti(i,o);(l.line>=a.to||l.linep.bottom?20:0;s&&setTimeout(Wi(e,(function(){g==r&&(i.scroller.scrollTop+=s,v(t))})),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Ce(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",y),ve(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Wi(e,(function(e){0!==e.buttons&&Me(e)?v(e):m(e)})),b=Wi(e,m);e.state.selectingText=b,pe(i.wrapper.ownerDocument,"mousemove",y),pe(i.wrapper.ownerDocument,"mouseup",b)}function La(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var l=ce(o,r.ch,r.sticky),a=o[l];if(a.from!=r.ch&&a.to!=r.ch)return t;var s,u=l+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new oo(new ot(r.line,p,g),n)}function Ta(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ce(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!we(e,r))return Se(t);o-=a.top-l.viewOffset;for(var s=0;s=i)return me(e,r,e,rt(e.doc,o),e.display.gutterSpecs[s].className,t),Se(t)}}function Ma(e,t){return Ta(e,t,"gutterClick",!0)}function Oa(e,t){Vr(e.display,t)||Na(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Na(e,t){return!!we(e,"gutterContextMenu")&&Ta(e,t,"gutterContextMenu",!1)}function Aa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dn(e)}va.prototype.compare=function(e,t,r){return this.time+ga>e&&0==lt(t,this.pos)&&r==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Wa={},Fa={};function Ea(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Da&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Da,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),r("indentUnit",2,po,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){go(e),dn(e),In(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ot(n,o))}n++}));for(var i=r.length-1;i>=0;i--)il(e.doc,t,r[i],ot(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Da&&e.refresh()})),r("specialCharPlaceholder",gr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Aa(e),Zi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=_l(t),i=r!=Da&&_l(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Pa,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Zi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Wn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Zi(e)}),!0),r("firstLineNumber",1,Zi,!0),r("lineNumberFormatter",(function(e){return e}),Zi,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ha),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,go,!0),r("addModeClass",!1,go,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,go,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Ha(e,t,r){if(!t!=!(r&&r!=Da)){var n=e.display.dragFunctions,i=t?pe:ve;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Pa(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),ar(e)),En(e),In(e),dn(e),setTimeout((function(){return yi(e)}),100)}function Ia(e,t){var r=this;if(!(this instanceof Ia))return new Ia(e,t);this.options=t=t?I(t):{},I(Wa,t,!1);var n=t.value;"string"==typeof n?n=new kl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ia.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Aa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),za(this),Dl(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Zn(r)}),20):Jn(this),Fa)Fa.hasOwnProperty(u)&&Fa[u](this,t[u],Da);$i(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ma(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new oo(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new oo(ot(l.line,0),dt(e.doc,ot(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(r)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Le(t)},over:function(t){ye(e,t)||(Ml(e,t),Le(t))},start:function(t){return Tl(e,t)},drop:Wi(e,Ll),leave:function(t){ye(e,t)||Ol(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return fa.call(e,t)})),pe(u,"keydown",Wi(e,ua)),pe(u,"keypress",Wi(e,da)),pe(u,"focus",(function(t){return Zn(e,t)})),pe(u,"blur",(function(t){return Jn(e,t)}))}Ia.defaults=Wa,Ia.optionHandlers=Fa;var Ra=[];function Ba(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var l=e.options.tabSize,a=Ze(o,t),s=z(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==r&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==G||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Ze(o,t-1).text,null,l):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(dl,s=Ee(t),u=null;if(a&&n.ranges.length>1)if(ja&&ja.text.join("\n")==t){if(n.ranges.length%ja.text.length==0){u=[];for(var c=0;c=0;d--){var h=n.ranges[d],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=ot(p.line,p.ch-r):e.state.overwrite&&!a?g=ot(g.line,Math.min(Ze(o,g.line).text.length,g.ch+Y(s).length)):a&&ja&&ja.lineWise&&ja.text.join("\n")==s.join("\n")&&(p=g=ot(p.line,0)));var v={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jo(e.doc,v),Or(e,"inputRead",e,v)}t&&!a&&_a(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ua(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Va(t,r,0,null,"paste")})),!0}function _a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a-1){l=Ba(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Ba(e,i.head.line,"smart"));l&&Or(e,"electricInput",e,i.head.line)}}}function Ka(e){for(var t=[],r=[],n=0;nr&&(Ba(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),l=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s0&&zo(this.doc,n,new oo(o,u[n].to()),V)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,r=yt(this,Ze(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Ze(this.doc,e)}else n=e;return vn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-or(n):0)},defaultTextHeight:function(){return Nn(this.display)},defaultCharWidth:function(){return An(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=bn(this,dt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ii(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Fi(ua),triggerOnKeyPress:Fi(da),triggerOnKeyUp:fa,triggerOnMouseDown:Fi(ya),execCommand:function(e){if(Zl.hasOwnProperty(e))return Zl[e].call(null,this)},triggerElectric:Fi((function(e){_a(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&En(this),me(this,"refresh",this)})),swapDoc:Fi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),dn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Or(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function qa(e,t,r,n,i){var o=t,l=r,a=Ze(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r=e.first+e.size)&&(t=new ot(r,t.ch,t.sticky),a=Ze(e,r))}function c(o){var l;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new ot(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(f?2:1))),-r)}}else l=i?ql(e.cm,a,t,r):$l(a,t,r);if(null==l){if(o||!u())return!1;t=Yl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var g=a.text.charAt(t.ch)||"\n",v=re(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!p))break}var m=$o(e,t,o,l,!0);return at(o,m)&&(m.hitSide=!0),m}function Za(e,t,r,n){var i,o,l=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*Nn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Cn(e,a,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Ja=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Qa(e,t){var r=en(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=Zr(r,n,t.line),o=de(n,e.doc.direction),l="left";o&&(l=ce(o,t.ch)%2?"right":"left");var a=ln(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function es(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ts(e,t){return t&&(e.bad=!0),e}function rs(e,t,r,n,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(ot(n,0),ot(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(Je(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v=t.display.viewTo||o.line=t.display.viewFrom&&Qa(t,i)||{node:s[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=ot(l.line-1,Ze(n.doc,l.line-1).length)),a.ch==Ze(n.doc,a.line).text.length&&a.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Pn(n,l.line))?(t=tt(i.view[0].line),r=i.view[0].node):(t=tt(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Pn(n,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=tt(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(rs(n,r,u,t,s)),d=Je(n.doc,ot(t,0),ot(s,Ze(n.doc,s).text.length));f.length>1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);hl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=ot(t,h),C=ot(s,d.length?Y(d).length-p:0);return f.length>1||f[0]||lt(x,C)?(il(n.doc,f,x,C,"+input"),!0):void 0},Ja.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ja.prototype.reset=function(){this.forceCompositionEnd()},Ja.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ja.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ja.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return In(e.cm)}))},Ja.prototype.setUneditable=function(e){e.contentEditable="false"},Ja.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Wi(this.cm,Va)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ja.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ja.prototype.onContextMenu=function(){},Ja.prototype.resetPosition=function(){},Ja.prototype.needsContentAttribute=!0;var os=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};function ls(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=a.getValue()}var i;if(e.form&&(pe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ia((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function as(e){e.off=ve,e.on=pe,e.wheelEventPixels=ro,e.Doc=kl,e.splitLines=Ee,e.countColumn=z,e.findColumn=K,e.isWordChar=te,e.Pass=G,e.signal=me,e.Line=sr,e.changeEnd=so,e.scrollbarModel=wi,e.Pos=ot,e.cmpPos=lt,e.modes=Re,e.mimeModes=Be,e.resolveMode=Ve,e.getMode=Ue,e.modeExtensions=_e,e.extendMode=Ke,e.copyState=Xe,e.startState=Ye,e.innerMode=$e,e.commands=Zl,e.keyMap=zl,e.keyName=Ul,e.isModifierKey=Gl,e.lookupKey=jl,e.normalizeKeyMap=Bl,e.StringStream=qe,e.SharedTextMarker=ml,e.TextMarker=gl,e.LineWidget=fl,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=Le,e.addClass=F,e.contains=D,e.rmClass=T,e.keyNames=El}os.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(n,e)){if(n.somethingSelected())Ga({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ka(n);Ga({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),H(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),pe(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),pe(i,"paste",(function(e){ye(n,e)||Ua(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!ye(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Ce(t)})),pe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},os.prototype.createField=function(e){this.wrapper=$a(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Un(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},os.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},os.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&H(this.textarea),l&&a>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},os.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},os.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Hn(r,e),u=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Wi(r,Go)(r.doc,ao(o),V);var c,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=window.scrollY),n.input.focus(),s&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&a>=9&&v(),k){Le(e);var g=function(){ve(window,"mouseup",g),setTimeout(m,20)};pe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,l&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Wi(r,qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},os.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1,Ea(Ia),Ya(Ia);var ss="iter insert remove copy getEditor constructor".split(" ");for(var us in kl.prototype)kl.prototype.hasOwnProperty(us)&&B(ss,us)<0&&(Ia.prototype[us]=function(e){return function(){return e.apply(this.doc,arguments)}}(kl.prototype[us]));return xe(kl),Ia.inputStyles={textarea:os,contenteditable:Ja},Ia.defineMode=function(e){Ia.defaults.mode||"null"==e||(Ia.defaults.mode=e),je.apply(this,arguments)},Ia.defineMIME=Ge,Ia.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ia.defineMIME("text/plain","null"),Ia.defineExtension=function(e,t){Ia.prototype[e]=t},Ia.defineDocExtension=function(e,t){kl.prototype[e]=t},Ia.fromTextArea=ls,as(Ia),Ia.version="5.65.0",Ia}()},57:function(e,t,r){!function(e){"use strict";e.registerHelper("fold","brace",(function(t,r){var n=r.line,i=t.getLine(n);function o(o){for(var l,a=r.ch,s=0;;){var u=a<=0?-1:i.lastIndexOf(o,a-1);if(-1!=u){if(1==s&&ua.ch)?l("{","}",a)||s&&l("[","]",s):s?l("[","]",s)||a&&l("{","}",a):null})),e.registerHelper("fold","import",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var i=r,o=Math.min(t.lastLine(),r+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:n.end,end:e.Pos(i,l)}}}var i,o=r.line,l=n(o);if(!l||n(o-1)||(i=n(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=n(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,r){function n(r){if(rt.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var i=r.line,o=n(i);if(null==o||null!=n(i-1))return null;for(var l=i;null!=n(l+1);)++l;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}(r(17))},58:function(e,t,r){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",c),t.off("viewportChange",f),t.off("fold",d),t.off("unfold",d),t.off("swapDoc",c)),i&&(t.state.foldGutter=new r(n(i)),s(t),t.on("gutterClick",u),t.on("changes",c),t.on("viewportChange",f),t.on("fold",d),t.on("unfold",d),t.on("swapDoc",c))}));var t=e.Pos;function r(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,r){for(var n=e.findMarks(t(r,0),t(r+1,0)),i=0;i=u){if(d&&a&&d.test(a.className))return;n=o(l.indicatorOpen)}}(n||a)&&e.setGutterMarker(r,l.gutter,n)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation((function(){l(e,t.from,t.to)})),r.from=t.from,r.to=t.to)}function u(e,r,n){var o=e.state.foldGutter;if(o){var l=o.options;if(n==l.gutter){var a=i(e,r);a?a.clear():e.foldCode(t(r,0),l)}}}function c(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),r.foldOnChangeTimeSpan||600)}}function f(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?s(e):e.operation((function(){r.fromt.to&&(l(e,t.to,r.to),t.to=r.to)}))}),r.updateViewportTimeSpan||400)}}function d(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&nt.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==l){var f=r(t,o,c);e.on(f,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(r,n){e.signal(t,"unfold",t,r,n)})),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t,r){var n=i(e,t,"widget");if("function"==typeof n&&(n=n(r.from,r.to)),"string"==typeof n){var o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}e.newFoldFunction=function(e,r){return function(n,i){t(n,i,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",(function(e,r,n){t(this,e,r,n)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),r=0;r!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,i=r,t}function m(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return v(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return r.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=m),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var x="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;l>=0;--l){var a=e.string.charAt(l),s=x.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(f.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}}o&&!i&&(t.fatArrowAt=l)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function T(e,t,r,n,i){var o=e.cc;for(M.state=e,M.stream=i,M.marked=null,M.cc=o,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?_:V)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return M.marked?M.marked:"variable"==r&&L(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function N(){return O.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function D(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=W(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new H(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new H(e,t.globalVars))}}function W(e,t){if(t){if(t.block){var r=W(e,t.prev);return r?r==t.prev?t:new E(r,t.vars,!0):null}return A(e,t.vars)?t:new E(t.prev,new H(e,t.vars),!1)}return null}function F(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function E(e,t,r){this.prev=e,this.vars=t,this.block=r}function H(e,t){this.name=e,this.next=t}var P=new H("this",new H("arguments",null));function I(){M.state.context=new E(M.state.context,M.state.localVars,!1),M.state.localVars=P}function z(){M.state.context=new E(M.state.context,M.state.localVars,!0),M.state.localVars=null}function R(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function B(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function j(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function G(e){function t(r){return r==e?N():";"==e||"}"==r||")"==r||"]"==r?O():N(t)}return t}function V(e,t){return"var"==e?N(B("vardef",t),Oe,G(";"),j):"keyword a"==e?N(B("form"),X,V,j):"keyword b"==e?N(B("form"),V,j):"keyword d"==e?M.stream.match(/^\s*$/,!1)?N():N(B("stat"),Y,G(";"),j):"debugger"==e?N(G(";")):"{"==e?N(B("}"),z,de,j,R):";"==e?N():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==j&&M.state.cc.pop()(),N(B("form"),X,V,j,Ee)):"function"==e?N(ze):"for"==e?N(B("form"),z,He,V,R,j):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form","class"==e?e:t),Ve,j)):"variable"==e?c&&"declare"==t?(M.marked="keyword",N(V)):c&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?N(tt):"type"==t?N(Be,G("operator"),me,G(";")):N(B("form"),Ne,G("{"),B("}"),de,j,j)):c&&"namespace"==t?(M.marked="keyword",N(B("form"),_,V,j)):c&&"abstract"==t?(M.marked="keyword",N(V)):N(B("stat"),oe):"switch"==e?N(B("form"),X,G("{"),B("}","switch"),z,de,j,j,R):"case"==e?N(_,G(":")):"default"==e?N(G(":")):"catch"==e?N(B("form"),I,U,V,j,R):"export"==e?N(B("stat"),Xe,j):"import"==e?N(B("stat"),Ye,j):"async"==e?N(V):"@"==t?N(_,V):O(B("stat"),_,G(";"),j)}function U(e){if("("==e)return N(je,G(")"))}function _(e,t){return $(e,t,!1)}function K(e,t){return $(e,t,!0)}function X(e){return"("!=e?O():N(B(")"),Y,G(")"),j)}function $(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?te:ee;if("("==e)return N(I,B(")"),ce(je,")"),j,G("=>"),n,R);if("variable"==e)return O(I,Ne,G("=>"),n,R)}var i=r?Z:q;return k.hasOwnProperty(e)?N(i):"function"==e?N(ze,i):"class"==e||c&&"interface"==t?(M.marked="keyword",N(B("form"),Ge,j)):"keyword c"==e||"async"==e?N(r?K:_):"("==e?N(B(")"),Y,G(")"),j,i):"operator"==e||"spread"==e?N(r?K:_):"["==e?N(B("]"),et,j,i):"{"==e?fe(ae,"}",null,i):"quasi"==e?O(J,i):"new"==e?N(re(r)):N()}function Y(e){return e.match(/[;\}\)\],]/)?O():O(_)}function q(e,t){return","==e?N(Y):Z(e,t,!1)}function Z(e,t,r){var n=0==r?q:Z,i=0==r?_:K;return"=>"==e?N(I,r?te:ee,R):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?N(n):c&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?N(B(">"),ce(me,">"),j,n):"?"==t?N(_,G(":"),i):N(i):"quasi"==e?O(J,n):";"!=e?"("==e?fe(K,")","call",n):"."==e?N(le,n):"["==e?N(B("]"),Y,G("]"),j,n):c&&"as"==t?(M.marked="keyword",N(me,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),N(i)):void 0:void 0}function J(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(J):N(Y,Q)}function Q(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(J)}function ee(e){return C(M.stream,M.state),O("{"==e?V:_)}function te(e){return C(M.stream,M.state),O("{"==e?V:K)}function re(e){return function(t){return"."==t?N(e?ie:ne):"variable"==t&&c?N(Le,e?Z:q):O(e?K:_)}}function ne(e,t){if("target"==t)return M.marked="keyword",N(q)}function ie(e,t){if("target"==t)return M.marked="keyword",N(Z)}function oe(e){return":"==e?N(j,V):O(q,G(";"),j)}function le(e){if("variable"==e)return M.marked="property",N()}function ae(e,t){return"async"==e?(M.marked="property",N(ae)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?N(se):(c&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),N(ue))):"number"==e||"string"==e?(M.marked=a?"property":M.style+" property",N(ue)):"jsonld-keyword"==e?N(ue):c&&F(t)?(M.marked="keyword",N(ae)):"["==e?N(_,he,G("]"),ue):"spread"==e?N(K,ue):"*"==t?(M.marked="keyword",N(ae)):":"==e?O(ue):void 0;var r}function se(e){return"variable"!=e?O(ue):(M.marked="property",N(ze))}function ue(e){return":"==e?N(K):"("==e?O(ze):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var l=M.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),N((function(r,n){return r==t||n==t?O():O(e)}),n)}return i==t||o==t?N():r&&r.indexOf(";")>-1?O(e):N(G(t))}return function(r,i){return r==t||i==t?N():O(e,n)}}function fe(e,t,r){for(var n=3;n"),me):"quasi"==e?O(xe,Se):void 0}function ye(e){if("=>"==e)return N(me)}function be(e){return e.match(/[\}\)\]]/)?N():","==e||";"==e?N(be):O(we,be)}function we(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",N(we)):"?"==t||"number"==e||"string"==e?N(we):":"==e?N(me):"["==e?N(G("variable"),pe,G("]"),we):"("==e?O(Re,we):e.match(/[;\}\)\],]/)?void 0:N()}function xe(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?N(xe):N(me,Ce)}function Ce(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,N(xe)}function ke(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?N(ke):":"==e?N(me):"spread"==e?N(ke):O(me)}function Se(e,t){return"<"==t?N(B(">"),ce(me,">"),j,Se):"|"==t||"."==e||"&"==t?N(me):"["==e?N(me,G("]"),Se):"extends"==t||"implements"==t?(M.marked="keyword",N(me)):"?"==t?N(me,G(":"),me):void 0}function Le(e,t){if("<"==t)return N(B(">"),ce(me,">"),j,Se)}function Te(){return O(me,Me)}function Me(e,t){if("="==t)return N(me)}function Oe(e,t){return"enum"==t?(M.marked="keyword",N(tt)):O(Ne,he,We,Fe)}function Ne(e,t){return c&&F(t)?(M.marked="keyword",N(Ne)):"variable"==e?(D(t),N()):"spread"==e?N(Ne):"["==e?fe(De,"]"):"{"==e?fe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?N(Ne):"}"==e?O():"["==e?N(_,G("]"),G(":"),Ae):N(G(":"),Ne,We)):(D(t),N(We))}function De(){return O(Ne,We)}function We(e,t){if("="==t)return N(K)}function Fe(e){if(","==e)return N(Oe)}function Ee(e,t){if("keyword b"==e&&"else"==t)return N(B("form","else"),V,j)}function He(e,t){return"await"==t?N(He):"("==e?N(B(")"),Pe,j):void 0}function Pe(e){return"var"==e?N(Oe,Ie):"variable"==e?N(Ie):O(Ie)}function Ie(e,t){return")"==e?N():";"==e?N(Ie):"in"==t||"of"==t?(M.marked="keyword",N(_,Ie)):O(_,Ie)}function ze(e,t){return"*"==t?(M.marked="keyword",N(ze)):"variable"==e?(D(t),N(ze)):"("==e?N(I,B(")"),ce(je,")"),j,ge,V,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,ze):void 0}function Re(e,t){return"*"==t?(M.marked="keyword",N(Re)):"variable"==e?(D(t),N(Re)):"("==e?N(I,B(")"),ce(je,")"),j,ge,R):c&&"<"==t?N(B(">"),ce(Te,">"),j,Re):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(M.marked="type",N(Be)):"<"==t?N(B(">"),ce(Te,">"),j):void 0}function je(e,t){return"@"==t&&N(_,je),"spread"==e?N(je):c&&F(t)?(M.marked="keyword",N(je)):c&&"this"==e?N(he,We):O(Ne,he,We)}function Ge(e,t){return"variable"==e?Ve(e,t):Ue(e,t)}function Ve(e,t){if("variable"==e)return D(t),N(Ue)}function Ue(e,t){return"<"==t?N(B(">"),ce(Te,">"),j,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(M.marked="keyword"),N(c?me:_,Ue)):"{"==e?N(B("}"),_e,j):void 0}function _e(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&F(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",N(_e)):"variable"==e||"keyword"==M.style?(M.marked="property",N(Ke,_e)):"number"==e||"string"==e?N(Ke,_e):"["==e?N(_,he,G("]"),Ke,_e):"*"==t?(M.marked="keyword",N(_e)):c&&"("==e?O(Re,_e):";"==e||","==e?N(_e):"}"==e?N():"@"==t?N(_,_e):void 0}function Ke(e,t){if("!"==t)return N(Ke);if("?"==t)return N(Ke);if(":"==e)return N(me,We);if("="==t)return N(K);var r=M.state.lexical.prev;return O(r&&"interface"==r.info?Re:ze)}function Xe(e,t){return"*"==t?(M.marked="keyword",N(Qe,G(";"))):"default"==t?(M.marked="keyword",N(_,G(";"))):"{"==e?N(ce($e,"}"),Qe,G(";")):O(V)}function $e(e,t){return"as"==t?(M.marked="keyword",N(G("variable"))):"variable"==e?O(K,$e):void 0}function Ye(e){return"string"==e?N():"("==e?O(_):"."==e?O(q):O(qe,Ze,Qe)}function qe(e,t){return"{"==e?fe(qe,"}"):("variable"==e&&D(t),"*"==t&&(M.marked="keyword"),N(Je))}function Ze(e){if(","==e)return N(qe,Ze)}function Je(e,t){if("as"==t)return M.marked="keyword",N(qe)}function Qe(e,t){if("from"==t)return M.marked="keyword",N(_)}function et(e){return"]"==e?N():O(ce(K,"]"))}function tt(){return O(B("form"),Ne,G("{"),B("}"),ce(rt,"}"),j,j)}function rt(){return O(Ne,We)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return R.lex=!0,j.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new E(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",T(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=m)return 0;var i,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==j)s=s.prev;else if(c!=Ee&&c!=R)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==q||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(nt(t,n)?l||o:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:it,skipExpression:function(t){T(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(17))},71:function(e,t,r){"use strict";r.r(t);var n=r(17),i=r.n(n);r(57),r(58),r(60);const o={init(){document.addEventListener("DOMContentLoaded",(function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data");i()(e,{value:JSON.stringify(CLD_METADATA,null," "),lineNumbers:!0,theme:"material",readOnly:!0,mode:{name:"javascript",json:!0},matchBrackets:!0,foldGutter:!0,htmlMode:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],viewportMargin:50}).setSize(null,600)}))}};o.init();t.default=o}}); \ No newline at end of file diff --git a/js/video.js b/js/video.js index 76bbd479e..3bfc876b6 100644 --- a/js/video.js +++ b/js/video.js @@ -1 +1 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=33)}({33:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=53)}({53:function(e,t,r){"use strict";r.r(t)}}); \ No newline at end of file From 9028617d10e684d339ecdecfcc3623e781e1fd47 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 30 Jan 2022 10:31:09 +0200 Subject: [PATCH 17/19] rename handle --- php/media/class-global-transformations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/media/class-global-transformations.php b/php/media/class-global-transformations.php index 189e1985e..6e1477c43 100644 --- a/php/media/class-global-transformations.php +++ b/php/media/class-global-transformations.php @@ -470,7 +470,7 @@ private function init_taxonomy_manager( $post ) { $out[] = ''; if ( ! function_exists( 'use_block_editor_for_post' ) || ! use_block_editor_for_post( $post ) ) { - wp_enqueue_script( 'term-ordering', $this->media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true ); + wp_enqueue_script( 'cld-classic-editor', $this->media->plugin->dir_url . '/js/classic-editor.js', array(), $this->media->plugin->version, true ); } $data = array(); From 4e4c75f7dd6f79e09f8ad7da7efba8d5fd91f79c Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 30 Jan 2022 10:33:45 +0200 Subject: [PATCH 18/19] cremove unused --- .eslintrc.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 90afb9a3d..590e8f80b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,8 +10,7 @@ "samplePlayer": "readonly", "CLDCACHE": "readonly", "cldData": "readonly", - "CLD_METADATA": "readonly", - "wpAjax": "readonly" + "CLD_METADATA": "readonly" }, "extends": [ "plugin:@wordpress/eslint-plugin/recommended" From 479d75c3a7fbe21de2cd1eed822ac57c08691e67 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Sun, 30 Jan 2022 10:44:06 +0200 Subject: [PATCH 19/19] guess I needed it. --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 590e8f80b..90afb9a3d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,8 @@ "samplePlayer": "readonly", "CLDCACHE": "readonly", "cldData": "readonly", - "CLD_METADATA": "readonly" + "CLD_METADATA": "readonly", + "wpAjax": "readonly" }, "extends": [ "plugin:@wordpress/eslint-plugin/recommended"