diff --git a/classes/Visualizer/Gutenberg/build/block.js b/classes/Visualizer/Gutenberg/build/block.js index 489e9044b..2cc3956fe 100644 --- a/classes/Visualizer/Gutenberg/build/block.js +++ b/classes/Visualizer/Gutenberg/build/block.js @@ -61,7 +61,7 @@ object-assign * * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday */ -!function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,o=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},i=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=_(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=_(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},f=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=_({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},g=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},v=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},w=function(e,t){return""+(t?e.reverse():e).join("")+""},M=function(e,t,n,r,a,o){var i,s,l,c,d,p=e._o,m=n===p.minYear,h=n===p.maxYear,f='
',_=!0,y=!0;for(l=[],i=0;i<12;i++)l.push('");for(c='
'+p.i18n.months[r]+'
",u(p.yearRange)?(i=p.yearRange[0],s=p.yearRange[1]+1):(i=n-p.yearRange,s=1+n+p.yearRange),l=[];i=p.minYear&&l.push('");return d='
'+n+p.yearSuffix+'
",p.showMonthAfterYear?f+=d+c:f+=c+d,m&&(0===r||p.minMonth>=r)&&(_=!1),h&&(11===r||p.maxMonth<=r)&&(y=!1),0===t&&(f+='"),t===e._o.numberOfMonths-1&&(f+='"),f+"
"},k=function(i){var s=this,u=s.config(i);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),o(s.el,"mousedown",s._onMouseDown,!0),o(s.el,"touchend",s._onMouseDown,!0),o(s.el,"change",s._onChange),o(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),o(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",o(u.trigger,"click",s._onInputClick),o(u.trigger,"focus",s._onInputFocus),o(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=_({},b,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&er&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u'+M(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,o,i,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,i=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>o||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>i+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,o=m(e,t),i=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(i-=r.firstDay)<0&&(i+=7);for(var u,p,_,y,b=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=m(k,b),T=o+i,D=T;D>7;)D-=7;T+=7-D;for(var S=0,O=0;S=o+i,C=S-i+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),R=r.endRange&&f(r.endRange,j),N=r.startRange&&r.endRange&&r.startRanger.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:P,isStartRange:A,isEndRange:R,isInRange:N,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(F)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-i,p=t,_=e,y=void 0,void 0,y=new Date(_,0,1),''+Math.ceil(((new Date(_,p,u)-y)/864e5+y.getDay()+1)/7)+"")),s.push(w(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return''+function(e){var t,n=[];e.showWeekNumber&&n.push("");for(t=0;t<7;t++)n.push('");return""+(e.isRTL?n.reverse():n).join("")+""}(e)+(r=t,""+r.join("")+"
'+g(e,t,!0)+"
");var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(o(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&i(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),i(this.el,"mousedown",this._onMouseDown,!0),i(this.el,"touchend",this._onMouseDown,!0),i(this.el,"change",this._onChange),this._o.field&&(i(this._o.field,"change",this._onInputChange),this._o.bound&&(i(this._o.trigger,"click",this._onInputClick),i(this._o.trigger,"focus",this._onInputFocus),i(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),o=n(129),i=n.n(o),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0){var i=Array.from({length:o-1}).map((function(e,r){var o=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(o)?"#CCCCCC":void 0!==n.colors&&null!==n.colors?n.colors[r]:_[r]}));r.setOptions(u({},n,{colors:i})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(M,{render:function(e){return Object(r.createElement)(k,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var o=function(e){var n=e.eventName,o=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n)<[^<]*)*<\/script>/gi,""):r.series[t].format.truthy.replace(/)<[^<]*)*<\/script>/gi,"")},a=jQuery.fn.dataTable.render.extra}return a}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(F),B=n(4),J=n.n(B),U=n(131),G=n.n(U),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},q=function(e){var t;if(Array.isArray(e))return 0=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function oe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){oe(o,r,a,i,s,"next",e)}function s(e){oe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;na.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t="undefined"!=typeof google?google.visualization.Version:"current",n=this.state,r=n.charts,a=n.isBusy,o=n.chartsLoaded,i=n.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(Le,{status:"warning",isDismissible:!1},fe("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(ke,{href:visualizerLocalize.adminPage},fe("Click here to visit Visualizer Charts Library."))),null!==r?1<=r.length?wp.element.createElement(ge,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(r).map((function(n){var a,o,i,s=V(r[n].chart_data);if(a=s["visualizer-settings"].title?s["visualizer-settings"].title:"#".concat(r[n].id),0<=["gauge","tabular","timeline"].indexOf(s["visualizer-chart-type"])?"DataTable"===s["visualizer-chart-library"]?o=s["visualizer-chart-type"]:("tabular"===(o=s["visualizer-chart-type"])&&(o="table"),o=he(o)):o="".concat(he(s["visualizer-chart-type"]),"Chart"),!s["visualizer-chart-library"]||"ChartJS"!==s["visualizer-chart-library"])return s["visualizer-data-exploded"]&&(i=fe("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single","data-chart-type":o,key:"chart-".concat(r[n].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},a),"DataTable"===s["visualizer-chart-library"]?wp.element.createElement(I,{id:r[n].id,rows:s["visualizer-data"],columns:s["visualizer-series"],chartsScreen:!0,options:s["visualizer-settings"]}):(s["visualizer-data-exploded"],wp.element.createElement(S,{chartVersion:t,chartType:o,rows:s["visualizer-data"],columns:s["visualizer-series"],options:K(s["visualizer-settings"]),formatters:X(s)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:fe("Insert Chart"),onClick:function(){return e.props.getChart(r[n].id)}},wp.element.createElement(Me,{icon:"upload"})))}))),!o&&i-1=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function qe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function $e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){qe(o,r,a,i,s,"next",e)}function s(e){qe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getJSONData",value:(o=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,ot({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:rt("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:rt("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(a=$e(Ve().mark((function e(){var t,n,r,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,ot({path:"/visualizer/v1/set-json-data",data:Je({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(o=e.sent).success?(this.props.JSONImportData(o.data.name,JSON.parse(o.data.series),JSON.parse(o.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(o.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(pt,{title:rt("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},rt("For more info check this tutorial."))),wp.element.createElement(mt,{label:rt("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:rt("One-time"),value:"-1"},{label:rt("Live"),value:"0"},{label:rt("Each hour"),value:"1"},{label:rt("Each 12 hours"),value:"12"},{label:rt("Each day"),value:"24"},{label:rt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,onClick:this.openModal},rt("Modify Parameters")),this.state.isOpen&&wp.element.createElement(dt,{title:rt("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(pt,{title:rt("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,rt("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},rt("How to extend REST endpoints with JSON response"))),wp.element.createElement(ht,{placeholder:rt("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(ct,{icon:"arrow-right-alt2",label:rt("Add Headers"),onClick:this.toggleHeaders},rt("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(mt,{label:rt("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:rt("GET")},{value:"POST",label:rt("POST")}],onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=Je(Je({},r),{},{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("Credentials")),wp.element.createElement(ht,{label:rt("Username"),placeholder:rt("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=Je(Je({},r),{},{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},rt("&")),wp.element.createElement(ht,{label:rt("Password"),placeholder:rt("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=Je(Je({},r),{},{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("OR")),wp.element.createElement(ht,{label:rt("Authorization"),placeholder:rt("e.g. SharedKey :"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=Je(Je({},r),{},{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},rt("Fetch Endpoint"))),wp.element.createElement(pt,{title:rt("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,rt("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(mt,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},rt("Parse Endpoint"))),wp.element.createElement(pt,{title:rt("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(mt,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,rt("Enable this feature in PRO version!"))),wp.element.createElement(pt,{title:rt("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,rt("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,rt("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,rt("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,rt("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},rt("Save & Show Chart")))))}}])&&Ze(t.prototype,n),r&&Ze(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(it);function _t(e){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(e,t){for(var n=0;n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function Ct(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var n=0;n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function tn(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;n=["timeline"].indexOf(t)&&(r[1]={label:gr("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:gr("The tooltip will not be displayed"),value:"none"};var a=[{label:gr("Left of the chart"),value:"left"},{label:gr("Right of the chart"),value:"right"},{label:gr("Above the chart"),value:"top"},{label:gr("Below the chart"),value:"bottom"},{label:gr("Omit the legend"),value:"none"}];"pie"!==t&&a.push({label:gr("Inside the chart"),value:"in"}),"bubble"===t&&(a=a.filter((function(e){return"left"!==e.value})));var o=gr("Text to display above the chart.");return 0<=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&(o=gr("Text to display in the back-end admin area")),wp.element.createElement(Yr,{title:gr("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Yr,{title:gr("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Dr,{label:gr("Chart Title"),help:o,value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Chart Title Position"),help:gr("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(kr,{label:gr("Chart Title Color")},wp.element.createElement(wr,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Axes Titles Position"),help:gr("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Font Family"),help:gr("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:gr("Arial"),value:"Arial"},{label:gr("Sans Serif"),value:"Sans Serif"},{label:gr("Serif"),value:"serif"},{label:gr("Arial"),value:"Arial"},{label:gr("Wide"),value:"Arial black"},{label:gr("Narrow"),value:"Arial Narrow"},{label:gr("Comic Sans MS"),value:"Comic Sans MS"},{label:gr("Courier New"),value:"Courier New"},{label:gr("Garamond"),value:"Garamond"},{label:gr("Georgia"),value:"Georgia"},{label:gr("Tahoma"),value:"Tahoma"},{label:gr("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Font Size"),help:gr("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Position"),help:gr("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:a,onChange:function(r){if("pie"!==t){var a="left"===r?1:0;n.series&&Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Alignment"),help:gr("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:gr("Aligned to the start of the allocated area"),value:"start"},{label:gr("Centered in the allocated area"),value:"center"},{label:gr("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:gr("Font Color")},wp.element.createElement(wr,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["tabular","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Trigger"),help:gr("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Show Color Code"),help:gr("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:gr("Yes"),value:"1"},{label:gr("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Text"),help:gr("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:gr("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:gr("Display only the absolute value of the slice"),value:"value"},{label:gr("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:gr("Animate on startup?"),help:gr("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Dr,{label:gr("Duration"),help:gr("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Easing"),help:gr("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:gr("Constant speed"),value:"linear"},{label:gr("Start slow and speed up"),value:"in"},{label:gr("Start fast and slow down"),value:"out"},{label:gr("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&hr(t.prototype,n),r&&hr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(vr);function Or(e){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xr(e,t){for(var n=0;n=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(ia,{label:Kr("Number Format"),help:Kr("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,Kr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ra,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Kr("ICU pattern set.")),Kr(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Kr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ra,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Kr("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(aa,{title:Kr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Maximun Value"),help:Kr("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(ia,{label:Kr("Minimum Value"),help:Kr("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Ur(t.prototype,n),r&&Ur(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Qr);function la(e){return(la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ca(e,t){for(var n=0;n=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(Ya,{label:fa("Number Format"),help:fa("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,fa("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ma,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},fa("ICU pattern set.")),fa(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,fa("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Ma,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},fa("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(ka,{title:fa("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Maximun Value"),help:fa("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Ya,{label:fa("Minimum Value"),help:fa("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&ca(t.prototype,n),r&&ca(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ya);function Da(e){return(Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oa(e,t){for(var n=0;n=["area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Curve Type"),help:fo("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:fo("Straight line without curve"),value:"none"},{label:fo("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Focus Target"),help:fo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:fo("Focus on a single data point."),value:"datum"},{label:fo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Selection Mode"),help:fo("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:fo("Single data point"),value:"single"},{label:fo("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Aggregation Target"),help:fo("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:fo("Group selected data by x-value"),value:"category"},{label:fo("Group selected data by series"),value:"series"},{label:fo("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:fo("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:fo("Point Opacity"),help:fo("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(bo,null,wp.element.createElement(Mo,{label:fo("Area Opacity"),help:fo("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Is Stacked"),help:fo("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Interpolate Nulls"),help:fo("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&uo(t.prototype,n),r&&uo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(yo);function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(e,t){for(var n=0;n=["tabular","pie"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Visible In Legend"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].visibleInLegend?t.series[a].visibleInLegend:"1",options:[{label:Fl("Yes"),value:"1"},{label:Fl("No"),value:"0"}],onChange:function(n){t.series[a].visibleInLegend=n,e.props.edit(t)}}),-1>=["tabular","candlestick","combo","column","bar"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Line Width"),help:Fl("Overrides the global line width value for this series."),value:t.series[a].lineWidth,onChange:function(n){t.series[a].lineWidth=n,e.props.edit(t)},onKeyUp:function(n){clearTimeout(l),l=setTimeout((function(){""!=t.series[a].lineWidth&&0>=t.series[a].lineWidth&&(t.series[a].lineWidth="0.1",e.props.edit(t))}),700)}}),wp.element.createElement(Kl,{label:Fl("Point Size"),help:Fl("Overrides the global point size value for this series."),value:t.series[a].pointSize,onChange:function(n){t.series[a].pointSize=n,e.props.edit(t)}})),-1>=["candlestick"].indexOf(s)&&s&&"number"===s?wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Format"),help:Fl("Enter custom format pattern to apply to this series value."),value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Vl,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Fl("ICU pattern set.")),Fl(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):0<=["date","datetime","timeofday"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Date Format"),help:Fl("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("This is a subset of the date formatting "),wp.element.createElement(Vl,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Fl("ICU date and time format.")))),0<=["scatter","line"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Curve Type"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].curveType?t.series[a].curveType:"none",options:[{label:Fl("Straight line without curve"),value:"none"},{label:Fl("The angles of the line will be smoothed"),value:"function"}],onChange:function(n){t.series[a].curveType=n,e.props.edit(t)}}),0<=["area"].indexOf(s)&&wp.element.createElement(Kl,{label:Fl("Area Opacity"),help:Fl("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.series[a].areaOpacity,onChange:function(n){t.series[a].areaOpacity=n,e.props.edit(t)}}),0<=["combo"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Chart Type"),help:Fl("Select the type of chart to show for this series."),value:t.series[a].type?t.series[a].type:"area",options:[{label:Fl("Area"),value:"area"},{label:Fl("Bar"),value:"bars"},{label:Fl("Candlesticks"),value:"candlesticks"},{label:Fl("Line"),value:"line"},{label:Fl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.series[a].type=n,e.props.edit(t)}}),-1>=["tabular"].indexOf(s)&&wp.element.createElement(Gl,{label:Fl("Color")},wp.element.createElement(Jl,{value:t.series[a].color,onChange:function(n){t.series[a].color=n,e.props.edit(t)}})))})))}}])&&Hl(t.prototype,n),r&&Hl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Il);function Ql(e){return(Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eu(e,t){for(var n=0;n=["gauge","tabular"].indexOf(t)&&wp.element.createElement(tc,null,wp.element.createElement(lc,{label:Qu("Stroke Width"),help:Qu("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(ac,{label:Qu("Stroke Color")},wp.element.createElement(nc,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(ac,{label:Qu("Background Color")},wp.element.createElement(nc,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(oc,{label:Qu("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge","tabular"].indexOf(t)&&wp.element.createElement(ic,{title:Qu("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lc,{label:Qu("Left Margin"),help:Qu("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Top Margin"),help:Qu("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Width Of Chart Area"),help:Qu("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Height Of Chart Area"),help:Qu("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Vu(t.prototype,n),r&&Vu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ec);function cc(e){return(cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pc(e,t){for(var n=0;n=["dataTable","tabular","gauge","table"].indexOf(n)&&wp.element.createElement(kc,{label:yc("Download Image"),help:yc("To download the chart as an image."),checked:0<=t.actions.indexOf("image"),onChange:function(n){if(0<=t.actions.indexOf("image")){var r=t.actions.indexOf("image");-1!==r&&t.actions.splice(r,1)}else t.actions.push("image");e.props.edit(t)}}))):wp.element.createElement(Lc,{title:yc("Frontend Actions"),initialOpen:!1,icon:"lock",className:"visualizer-advanced-panel"},wp.element.createElement("p",null,yc("Enable this feature in PRO version!")),wp.element.createElement(Mc,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},yc("Buy Now")))}}])&&pc(t.prototype,n),r&&pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(gc);function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e){for(var t=1;t{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="",t)=>{[null,void 0].indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e)},isFalsy:(e="",t)=>{t||jc.throwError(jc.getCaller(2),e)},isNoneOf:(e="",t,n=[])=>{-1===n.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="",t,n=[])=>{n.indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="",t,n="")=>{Object(Oc.getType)(t)!==n.toLowerCase()&&jc.throwError(jc.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="",t,n=[])=>{n.forEach(n=>{Object(Oc.getType)(t)===n&&jc.throwError(jc.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="",t,n="")=>{jc.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&jc.throwError(jc.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="",t,n=[""])=>{jc.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="",t)=>{[void 0,null].forEach(n=>{const r=Object(Oc.locate)(t,n);r&&jc.throwError(jc.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="",t)=>{jc.isUndefined(e,t),jc.isNotType(e,t,"string"),jc.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&jc.throwError(jc.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&jc.throwError(jc.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="",t)=>{jc.isUndefined(e,t),jc.containsUndefined(e,t)}};var xc=jc;const Ec=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var Pc={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"}; +!function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,o=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},i=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=_(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=_(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},f=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=_({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},g=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},v=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},w=function(e,t){return""+(t?e.reverse():e).join("")+""},M=function(e,t,n,r,a,o){var i,s,l,c,d,p=e._o,m=n===p.minYear,h=n===p.maxYear,f='
',_=!0,y=!0;for(l=[],i=0;i<12;i++)l.push('");for(c='
'+p.i18n.months[r]+'
",u(p.yearRange)?(i=p.yearRange[0],s=p.yearRange[1]+1):(i=n-p.yearRange,s=1+n+p.yearRange),l=[];i=p.minYear&&l.push('");return d='
'+n+p.yearSuffix+'
",p.showMonthAfterYear?f+=d+c:f+=c+d,m&&(0===r||p.minMonth>=r)&&(_=!1),h&&(11===r||p.maxMonth<=r)&&(y=!1),0===t&&(f+='"),t===e._o.numberOfMonths-1&&(f+='"),f+"
"},k=function(i){var s=this,u=s.config(i);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),o(s.el,"mousedown",s._onMouseDown,!0),o(s.el,"touchend",s._onMouseDown,!0),o(s.el,"change",s._onChange),o(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),o(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",o(u.trigger,"click",s._onInputClick),o(u.trigger,"focus",s._onInputFocus),o(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=_({},b,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&er&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u'+M(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,o,i,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,i=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>o||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>i+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,o=m(e,t),i=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(i-=r.firstDay)<0&&(i+=7);for(var u,p,_,y,b=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=m(k,b),T=o+i,D=T;D>7;)D-=7;T+=7-D;for(var S=0,O=0;S=o+i,C=S-i+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),R=r.endRange&&f(r.endRange,j),N=r.startRange&&r.endRange&&r.startRanger.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:P,isStartRange:A,isEndRange:R,isInRange:N,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(F)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-i,p=t,_=e,y=void 0,void 0,y=new Date(_,0,1),''+Math.ceil(((new Date(_,p,u)-y)/864e5+y.getDay()+1)/7)+"")),s.push(w(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return''+function(e){var t,n=[];e.showWeekNumber&&n.push("");for(t=0;t<7;t++)n.push('");return""+(e.isRTL?n.reverse():n).join("")+""}(e)+(r=t,""+r.join("")+"
'+g(e,t,!0)+"
");var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(o(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&i(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),i(this.el,"mousedown",this._onMouseDown,!0),i(this.el,"touchend",this._onMouseDown,!0),i(this.el,"change",this._onChange),this._o.field&&(i(this._o.field,"change",this._onInputChange),this._o.bound&&(i(this._o.trigger,"click",this._onInputClick),i(this._o.trigger,"focus",this._onInputFocus),i(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),o=n(129),i=n.n(o),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]0){var i=Array.from({length:o-1}).map((function(e,r){var o=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(o)?"#CCCCCC":void 0!==n.colors&&null!==n.colors?n.colors[r]:_[r]}));r.setOptions(u({},n,{colors:i})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(M,{render:function(e){return Object(r.createElement)(k,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var o=function(e){var n=e.eventName,o=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n)<[^<]*)*<\/script>/gi,""):r.series[t].format.truthy.replace(/)<[^<]*)*<\/script>/gi,"")},a=jQuery.fn.dataTable.render.extra}return a}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(F),B=n(4),J=n.n(B),U=n(131),G=n.n(U),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},q=function(e){var t;if(Array.isArray(e))return 0=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function oe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){oe(o,r,a,i,s,"next",e)}function s(e){oe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;na.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t="undefined"!=typeof google?google.visualization.Version:"current",n=this.state,r=n.charts,a=n.isBusy,o=n.chartsLoaded,i=n.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(Le,{status:"warning",isDismissible:!1},fe("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(ke,{href:visualizerLocalize.adminPage},fe("Click here to visit Visualizer Charts Library."))),null!==r?1<=r.length?wp.element.createElement(ge,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(r).map((function(n){var a,o,i,s=V(r[n].chart_data);if(a=s["visualizer-settings"].title?s["visualizer-settings"].title:"#".concat(r[n].id),0<=["gauge","tabular","timeline"].indexOf(s["visualizer-chart-type"])?"DataTable"===s["visualizer-chart-library"]?o=s["visualizer-chart-type"]:("tabular"===(o=s["visualizer-chart-type"])&&(o="table"),o=he(o)):o="".concat(he(s["visualizer-chart-type"]),"Chart"),!s["visualizer-chart-library"]||"ChartJS"!==s["visualizer-chart-library"])return s["visualizer-data-exploded"]&&(i=fe("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single","data-chart-type":o,key:"chart-".concat(r[n].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},a),"DataTable"===s["visualizer-chart-library"]?wp.element.createElement(I,{id:r[n].id,rows:s["visualizer-data"],columns:s["visualizer-series"],chartsScreen:!0,options:s["visualizer-settings"]}):(s["visualizer-data-exploded"],wp.element.createElement(S,{chartVersion:t,chartType:o,rows:s["visualizer-data"],columns:s["visualizer-series"],options:K(s["visualizer-settings"]),formatters:X(s)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:fe("Insert Chart"),onClick:function(){return e.props.getChart(r[n].id)}},wp.element.createElement(Me,{icon:"upload"})))}))),!o&&i-1=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function qe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function $e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){qe(o,r,a,i,s,"next",e)}function s(e){qe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getJSONData",value:(o=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,ot({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:rt("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:rt("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(a=$e(Ve().mark((function e(){var t,n,r,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,ot({path:"/visualizer/v1/set-json-data",data:Je({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(o=e.sent).success?(this.props.JSONImportData(o.data.name,JSON.parse(o.data.series),JSON.parse(o.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(o.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(pt,{title:rt("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},rt("For more info check this tutorial."))),wp.element.createElement(mt,{label:rt("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:rt("One-time"),value:"-1"},{label:rt("Live"),value:"0"},{label:rt("Each hour"),value:"1"},{label:rt("Each 12 hours"),value:"12"},{label:rt("Each day"),value:"24"},{label:rt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,onClick:this.openModal},rt("Modify Parameters")),this.state.isOpen&&wp.element.createElement(dt,{title:rt("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(pt,{title:rt("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,rt("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},rt("How to extend REST endpoints with JSON response"))),wp.element.createElement(ht,{placeholder:rt("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(ct,{icon:"arrow-right-alt2",label:rt("Add Headers"),onClick:this.toggleHeaders},rt("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(mt,{label:rt("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:rt("GET")},{value:"POST",label:rt("POST")}],onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=Je(Je({},r),{},{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("Credentials")),wp.element.createElement(ht,{label:rt("Username"),placeholder:rt("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=Je(Je({},r),{},{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},rt("&")),wp.element.createElement(ht,{label:rt("Password"),placeholder:rt("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=Je(Je({},r),{},{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("OR")),wp.element.createElement(ht,{label:rt("Authorization"),placeholder:rt("e.g. SharedKey :"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=Je(Je({},r),{},{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},rt("Fetch Endpoint"))),wp.element.createElement(pt,{title:rt("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,rt("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(mt,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},rt("Parse Endpoint"))),wp.element.createElement(pt,{title:rt("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(mt,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,rt("Enable this feature in PRO version!"))),wp.element.createElement(pt,{title:rt("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,rt("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,rt("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,rt("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,rt("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},rt("Save & Show Chart")))))}}])&&Ze(t.prototype,n),r&&Ze(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(it);function _t(e){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(e,t){for(var n=0;n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function Ct(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var n=0;n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},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 a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function tn(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;n=["timeline"].indexOf(t)&&(r[1]={label:gr("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:gr("The tooltip will not be displayed"),value:"none"};var a=[{label:gr("Left of the chart"),value:"left"},{label:gr("Right of the chart"),value:"right"},{label:gr("Above the chart"),value:"top"},{label:gr("Below the chart"),value:"bottom"},{label:gr("Omit the legend"),value:"none"}];"pie"!==t&&a.push({label:gr("Inside the chart"),value:"in"}),"bubble"===t&&(a=a.filter((function(e){return"left"!==e.value})));var o=gr("Text to display above the chart.");return 0<=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&(o=gr("Text to display in the back-end admin area")),wp.element.createElement(Yr,{title:gr("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Yr,{title:gr("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Dr,{label:gr("Chart Title"),help:o,value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Chart Title Position"),help:gr("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(kr,{label:gr("Chart Title Color")},wp.element.createElement(wr,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Axes Titles Position"),help:gr("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Font Family"),help:gr("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:gr("Arial"),value:"Arial"},{label:gr("Sans Serif"),value:"Sans Serif"},{label:gr("Serif"),value:"serif"},{label:gr("Arial"),value:"Arial"},{label:gr("Wide"),value:"Arial black"},{label:gr("Narrow"),value:"Arial Narrow"},{label:gr("Comic Sans MS"),value:"Comic Sans MS"},{label:gr("Courier New"),value:"Courier New"},{label:gr("Garamond"),value:"Garamond"},{label:gr("Georgia"),value:"Georgia"},{label:gr("Tahoma"),value:"Tahoma"},{label:gr("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Font Size"),help:gr("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Position"),help:gr("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:a,onChange:function(r){if("pie"!==t){var a="left"===r?1:0;n.series&&Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Alignment"),help:gr("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:gr("Aligned to the start of the allocated area"),value:"start"},{label:gr("Centered in the allocated area"),value:"center"},{label:gr("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:gr("Font Color")},wp.element.createElement(wr,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["tabular","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Trigger"),help:gr("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Show Color Code"),help:gr("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:gr("Yes"),value:"1"},{label:gr("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Text"),help:gr("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:gr("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:gr("Display only the absolute value of the slice"),value:"value"},{label:gr("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:gr("Animate on startup?"),help:gr("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Dr,{label:gr("Duration"),help:gr("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Easing"),help:gr("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:gr("Constant speed"),value:"linear"},{label:gr("Start slow and speed up"),value:"in"},{label:gr("Start fast and slow down"),value:"out"},{label:gr("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&hr(t.prototype,n),r&&hr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(vr);function Or(e){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xr(e,t){for(var n=0;n=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(ia,{label:Kr("Number Format"),help:Kr("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,Kr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ra,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Kr("ICU pattern set.")),Kr(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Kr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ra,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Kr("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(aa,{title:Kr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Maximun Value"),help:Kr("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(ia,{label:Kr("Minimum Value"),help:Kr("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Ur(t.prototype,n),r&&Ur(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Qr);function la(e){return(la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ca(e,t){for(var n=0;n=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(Ya,{label:fa("Number Format"),help:fa("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,fa("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ma,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},fa("ICU pattern set.")),fa(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,fa("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Ma,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},fa("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(ka,{title:fa("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Maximun Value"),help:fa("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Ya,{label:fa("Minimum Value"),help:fa("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&ca(t.prototype,n),r&&ca(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ya);function Da(e){return(Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oa(e,t){for(var n=0;n=["area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Curve Type"),help:fo("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:fo("Straight line without curve"),value:"none"},{label:fo("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Focus Target"),help:fo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:fo("Focus on a single data point."),value:"datum"},{label:fo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Selection Mode"),help:fo("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:fo("Single data point"),value:"single"},{label:fo("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Aggregation Target"),help:fo("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:fo("Group selected data by x-value"),value:"category"},{label:fo("Group selected data by series"),value:"series"},{label:fo("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:fo("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:fo("Point Opacity"),help:fo("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(bo,null,wp.element.createElement(Mo,{label:fo("Area Opacity"),help:fo("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Is Stacked"),help:fo("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Interpolate Nulls"),help:fo("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&uo(t.prototype,n),r&&uo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(yo);function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(e,t){for(var n=0;n=["tabular","pie"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Visible In Legend"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].visibleInLegend?t.series[a].visibleInLegend:"1",options:[{label:Fl("Yes"),value:"1"},{label:Fl("No"),value:"0"}],onChange:function(n){t.series[a].visibleInLegend=n,e.props.edit(t)}}),-1>=["tabular","candlestick","combo","column","bar"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Line Width"),help:Fl("Overrides the global line width value for this series."),value:t.series[a].lineWidth,onChange:function(n){t.series[a].lineWidth=n,e.props.edit(t)},onKeyUp:function(n){clearTimeout(l),l=setTimeout((function(){""!=t.series[a].lineWidth&&0>=t.series[a].lineWidth&&(t.series[a].lineWidth="0.1",e.props.edit(t))}),700)}}),wp.element.createElement(Kl,{label:Fl("Point Size"),help:Fl("Overrides the global point size value for this series."),value:t.series[a].pointSize,onChange:function(n){t.series[a].pointSize=n,e.props.edit(t)}})),-1>=["candlestick"].indexOf(s)&&s&&"number"===s?wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Format"),help:Fl("Enter custom format pattern to apply to this series value."),value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Vl,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Fl("ICU pattern set.")),Fl(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):0<=["date","datetime","timeofday"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Date Format"),help:Fl("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("This is a subset of the date formatting "),wp.element.createElement(Vl,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Fl("ICU date and time format.")))),0<=["scatter","line"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Curve Type"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].curveType?t.series[a].curveType:"none",options:[{label:Fl("Straight line without curve"),value:"none"},{label:Fl("The angles of the line will be smoothed"),value:"function"}],onChange:function(n){t.series[a].curveType=n,e.props.edit(t)}}),0<=["area"].indexOf(s)&&wp.element.createElement(Kl,{label:Fl("Area Opacity"),help:Fl("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.series[a].areaOpacity,onChange:function(n){t.series[a].areaOpacity=n,e.props.edit(t)}}),0<=["combo"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Chart Type"),help:Fl("Select the type of chart to show for this series."),value:t.series[a].type?t.series[a].type:"area",options:[{label:Fl("Area"),value:"area"},{label:Fl("Bar"),value:"bars"},{label:Fl("Candlesticks"),value:"candlesticks"},{label:Fl("Line"),value:"line"},{label:Fl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.series[a].type=n,e.props.edit(t)}}),-1>=["tabular"].indexOf(s)&&wp.element.createElement(Gl,{label:Fl("Color")},wp.element.createElement(Jl,{value:t.series[a].color,onChange:function(n){t.series[a].color=n,e.props.edit(t)}})))})))}}])&&Hl(t.prototype,n),r&&Hl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Il);function Ql(e){return(Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eu(e,t){for(var n=0;n=["gauge","tabular"].indexOf(t)&&wp.element.createElement(tc,null,wp.element.createElement(lc,{label:Qu("Stroke Width"),help:Qu("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(ac,{label:Qu("Stroke Color")},wp.element.createElement(nc,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(ac,{label:Qu("Background Color")},wp.element.createElement(nc,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(oc,{label:Qu("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge","tabular"].indexOf(t)&&wp.element.createElement(ic,{title:Qu("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lc,{label:Qu("Left Margin"),help:Qu("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Top Margin"),help:Qu("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Width Of Chart Area"),help:Qu("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Height Of Chart Area"),help:Qu("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Vu(t.prototype,n),r&&Vu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ec);function cc(e){return(cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pc(e,t){for(var n=0;n=["dataTable","tabular","gauge","table"].indexOf(n)&&wp.element.createElement(kc,{label:yc("Download Image"),help:yc("To download the chart as an image."),checked:0<=t.actions.indexOf("image"),onChange:function(n){if(0<=t.actions.indexOf("image")){var r=t.actions.indexOf("image");-1!==r&&t.actions.splice(r,1)}else t.actions.push("image");e.props.edit(t)}}))):wp.element.createElement(Lc,{title:yc("Frontend Actions"),initialOpen:!1,icon:"lock",className:"visualizer-advanced-panel"},wp.element.createElement("p",null,yc("Enable this feature in PRO version!")),wp.element.createElement(Mc,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},yc("Buy Now")))}}])&&pc(t.prototype,n),r&&pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(gc);function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e){for(var t=1;t{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="",t)=>{[null,void 0].indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e)},isFalsy:(e="",t)=>{t||jc.throwError(jc.getCaller(2),e)},isNoneOf:(e="",t,n=[])=>{-1===n.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="",t,n=[])=>{n.indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="",t,n="")=>{Object(Oc.getType)(t)!==n.toLowerCase()&&jc.throwError(jc.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="",t,n=[])=>{n.forEach(n=>{Object(Oc.getType)(t)===n&&jc.throwError(jc.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="",t,n="")=>{jc.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&jc.throwError(jc.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="",t,n=[""])=>{jc.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="",t)=>{[void 0,null].forEach(n=>{const r=Object(Oc.locate)(t,n);r&&jc.throwError(jc.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="",t)=>{jc.isUndefined(e,t),jc.isNotType(e,t,"string"),jc.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&jc.throwError(jc.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&jc.throwError(jc.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="",t)=>{jc.isUndefined(e,t),jc.containsUndefined(e,t)}};var xc=jc;const Ec=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var Pc={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"}; /** @license react-json-editor-ajrm v2.5.13 * * This source code is licensed under the MIT license found in the diff --git a/classes/Visualizer/Gutenberg/src/Components/Sidebar/HorizontalAxisSettings.js b/classes/Visualizer/Gutenberg/src/Components/Sidebar/HorizontalAxisSettings.js index 04eb20d7b..cc100d4ca 100644 --- a/classes/Visualizer/Gutenberg/src/Components/Sidebar/HorizontalAxisSettings.js +++ b/classes/Visualizer/Gutenberg/src/Components/Sidebar/HorizontalAxisSettings.js @@ -130,7 +130,7 @@ class HorizontalAxisSettings extends Component {

{ __( 'For date axis labels, this is a subset of the date formatting ' ) } - + { __( 'ICU date and time format.' ) }

diff --git a/classes/Visualizer/Gutenberg/src/Components/Sidebar/PieSettings.js b/classes/Visualizer/Gutenberg/src/Components/Sidebar/PieSettings.js index df769d23b..c84961227 100644 --- a/classes/Visualizer/Gutenberg/src/Components/Sidebar/PieSettings.js +++ b/classes/Visualizer/Gutenberg/src/Components/Sidebar/PieSettings.js @@ -56,7 +56,7 @@ class PieSettings extends Component {

{ __( 'For date axis labels, this is a subset of the date formatting ' ) } - + { __( 'ICU date and time format.' ) }

diff --git a/classes/Visualizer/Gutenberg/src/Components/Sidebar/SeriesSettings.js b/classes/Visualizer/Gutenberg/src/Components/Sidebar/SeriesSettings.js index f117ba92b..bf40821f1 100644 --- a/classes/Visualizer/Gutenberg/src/Components/Sidebar/SeriesSettings.js +++ b/classes/Visualizer/Gutenberg/src/Components/Sidebar/SeriesSettings.js @@ -175,7 +175,7 @@ class SeriesSettings extends Component {

{ __( 'This is a subset of the date formatting ' ) } - + { __( 'ICU date and time format.' ) }

diff --git a/classes/Visualizer/Gutenberg/src/Components/Sidebar/VerticalAxisSettings.js b/classes/Visualizer/Gutenberg/src/Components/Sidebar/VerticalAxisSettings.js index 73c68f8ab..f996b4bd5 100644 --- a/classes/Visualizer/Gutenberg/src/Components/Sidebar/VerticalAxisSettings.js +++ b/classes/Visualizer/Gutenberg/src/Components/Sidebar/VerticalAxisSettings.js @@ -131,7 +131,7 @@ class VerticalAxisSettings extends Component {

{ __( 'For date axis labels, this is a subset of the date formatting ' ) } - + { __( 'ICU date and time format.' ) }

diff --git a/classes/Visualizer/Render/Sidebar.php b/classes/Visualizer/Render/Sidebar.php index 5854b98f5..ab96a2294 100644 --- a/classes/Visualizer/Render/Sidebar.php +++ b/classes/Visualizer/Render/Sidebar.php @@ -468,7 +468,7 @@ protected function _renderFormatField( $index = 0 ) { esc_html__( 'Date Format', 'visualizer' ), 'series[' . $index . '][format]', isset( $this->series[ $index ]['format'] ) ? $this->series[ $index ]['format'] : '', - sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU date and time format%2$s.', 'visualizer' ), '', '' ), + sprintf( esc_html__( 'Enter custom format pattern to apply to this series value, similar to the %1$sICU date and time format%2$s.', 'visualizer' ), '', '' ), 'eeee, dd LLLL yyyy' ); break; diff --git a/classes/Visualizer/Render/Sidebar/Graph.php b/classes/Visualizer/Render/Sidebar/Graph.php index c783c5393..c93d1a2a5 100644 --- a/classes/Visualizer/Render/Sidebar/Graph.php +++ b/classes/Visualizer/Render/Sidebar/Graph.php @@ -481,7 +481,7 @@ protected function _renderHorizontalAxisFormatField() { ), sprintf( esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), - '', + '', '' ) ) @@ -510,7 +510,7 @@ protected function _renderVerticalAxisFormatField() { ), sprintf( esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), - '', + '', '' ) ) diff --git a/classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php b/classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php index f91c4ec87..0887920f5 100644 --- a/classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php +++ b/classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php @@ -205,7 +205,7 @@ protected function _renderHorizontalAxisGeneralSettings() { ), sprintf( esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), - '', + '', '' ) ) @@ -307,7 +307,7 @@ protected function _renderVerticalAxisGeneralSettings() { ), sprintf( esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), - '', + '', '' ) ) diff --git a/classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php b/classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php index 20a40aaad..a1987aa30 100644 --- a/classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php +++ b/classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php @@ -72,7 +72,7 @@ protected function _renderPieSettings() { ), sprintf( esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ), - '', + '', '' ) )