/home/nbcgowuy/kdosheleads.com/wp-content/plugins/getgenie/assets/dist/admin/js/common-scripts.js
(()=>{var cl=Object.create;var hn=Object.defineProperty;var ul=Object.getOwnPropertyDescriptor;var hl=Object.getOwnPropertyNames;var fl=Object.getPrototypeOf,ml=Object.prototype.hasOwnProperty;var ka=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(r,l)=>(typeof require<"u"?require:r)[l]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});var pl=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports),fn=(o,r)=>{for(var l in r)hn(o,l,{get:r[l],enumerable:!0})},gl=(o,r,l,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let f of hl(r))!ml.call(o,f)&&f!==l&&hn(o,f,{get:()=>r[f],enumerable:!(u=ul(r,f))||u.enumerable});return o};var wl=(o,r,l)=>(l=o!=null?cl(fl(o)):{},gl(r||!o||!o.__esModule?hn(l,"default",{value:o,enumerable:!0}):l,o));var Ma=pl((pn,ze)=>{(function(o,r){typeof pn=="object"&&typeof ze<"u"?ze.exports=r():typeof define=="function"&&define.amd?define(r):o.moment=r()})(pn,function(){"use strict";var o;function r(){return o.apply(null,arguments)}function l(e){o=e}function u(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function f(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(h(e,t))return!1;return!0}function m(e){return e===void 0}function g(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function w(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function C(e,t){var n=[],a,s=e.length;for(a=0;a<s;++a)n.push(t(e[a],a));return n}function S(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,a){return Xn(e,t,n,a,!0).utc()}function M(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function d(e){return e._pf==null&&(e._pf=M()),e._pf}var N;Array.prototype.some?N=Array.prototype.some:N=function(e){var t=Object(this),n=t.length>>>0,a;for(a=0;a<n;a++)if(a in t&&e.call(this,t[a],a,t))return!0;return!1};function x(e){if(e._isValid==null){var t=d(e),n=N.call(t.parsedDateParts,function(s){return s!=null}),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=a;else return a}return e._isValid}function _(e){var t=y(NaN);return e!=null?S(d(t),e):d(t).userInvalidated=!0,t}var F=r.momentProperties=[],G=!1;function V(e,t){var n,a,s,i=F.length;if(m(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),m(t._i)||(e._i=t._i),m(t._f)||(e._f=t._f),m(t._l)||(e._l=t._l),m(t._strict)||(e._strict=t._strict),m(t._tzm)||(e._tzm=t._tzm),m(t._isUTC)||(e._isUTC=t._isUTC),m(t._offset)||(e._offset=t._offset),m(t._pf)||(e._pf=d(t)),m(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)a=F[n],s=t[a],m(s)||(e[a]=s);return e}function K(e){V(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),G===!1&&(G=!0,r.updateOffset(this),G=!1)}function ee(e){return e instanceof K||e!=null&&e._isAMomentObject!=null}function pt(e){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Z(e,t){var n=!0;return S(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,e),n){var a=[],s,i,c,T=arguments.length;for(i=0;i<T;i++){if(s="",typeof arguments[i]=="object"){s+=`
[`+i+"] ";for(c in arguments[0])h(arguments[0],c)&&(s+=c+": "+arguments[0][c]+", ");s=s.slice(0,-2)}else s=arguments[i];a.push(s)}pt(e+`
Arguments: `+Array.prototype.slice.call(a).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var gt={};function Qe(e,t){r.deprecationHandler!=null&&r.deprecationHandler(e,t),gt[e]||(pt(t),gt[e]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function se(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Xe(e){var t,n;for(n in e)h(e,n)&&(t=e[n],se(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Re(e,t){var n=S({},e),a;for(a in t)h(t,a)&&(f(e[a])&&f(t[a])?(n[a]={},S(n[a],e[a]),S(n[a],t[a])):t[a]!=null?n[a]=t[a]:delete n[a]);for(a in e)h(e,a)&&!h(t,a)&&f(e[a])&&(n[a]=S({},n[a]));return n}function et(e){e!=null&&this.set(e)}var tt;Object.keys?tt=Object.keys:tt=function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var Vt={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function wt(e,t,n){var a=this._calendar[e]||this._calendar.sameElse;return se(a)?a.call(t,n):a}function re(e,t,n){var a=""+Math.abs(e),s=t-a.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+a}var Ne=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,We=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,He={},ke={};function D(e,t,n,a){var s=a;typeof a=="string"&&(s=function(){return this[a]()}),e&&(ke[e]=s),t&&(ke[t[0]]=function(){return re(s.apply(this,arguments),t[1],t[2])}),n&&(ke[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function b(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function R(e){var t=e.match(Ne),n,a;for(n=0,a=t.length;n<a;n++)ke[t[n]]?t[n]=ke[t[n]]:t[n]=b(t[n]);return function(s){var i="",c;for(c=0;c<a;c++)i+=se(t[c])?t[c].call(s,e):t[c];return i}}function q(e,t){return e.isValid()?(t=ie(t,e.localeData()),He[t]=He[t]||R(t),He[t](e)):e.localeData().invalidDate()}function ie(e,t){var n=5;function a(s){return t.longDateFormat(s)||s}for(We.lastIndex=0;n>=0&&We.test(e);)e=e.replace(We,a),We.lastIndex=0,n-=1;return e}var nt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Oe(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(Ne).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var Ce="Invalid date";function vs(){return this._invalidDate}var _s="%d",ks=/\d{1,2}/;function Cs(e){return this._ordinal.replace("%d",e)}var Ss={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function bs(e,t,n,a){var s=this._relativeTime[n];return se(s)?s(e,t,n,a):s.replace(/%d/i,e)}function Ms(e,t){var n=this._relativeTime[e>0?"future":"past"];return se(n)?n(t):n.replace(/%s/i,t)}var at={};function J(e,t){var n=e.toLowerCase();at[n]=at[n+"s"]=at[t]=e}function oe(e){return typeof e=="string"?at[e]||at[e.toLowerCase()]:void 0}function jt(e){var t={},n,a;for(a in e)h(e,a)&&(n=oe(a),n&&(t[n]=e[a]));return t}var Ln={};function Q(e,t){Ln[e]=t}function xs(e){var t=[],n;for(n in e)h(e,n)&&t.push({unit:n,priority:Ln[n]});return t.sort(function(a,s){return a.priority-s.priority}),t}function yt(e){return e%4===0&&e%100!==0||e%400===0}function le(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Y(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=le(t)),n}function Fe(e,t){return function(n){return n!=null?(Pn(this,e,n),r.updateOffset(this,t),this):vt(this,e)}}function vt(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Pn(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&yt(e.year())&&e.month()===1&&e.date()===29?(n=Y(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xt(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ds(e){return e=oe(e),se(this[e])?this[e]():this}function Ts(e,t){if(typeof e=="object"){e=jt(e);var n=xs(e),a,s=n.length;for(a=0;a<s;a++)this[n[a].unit](e[n[a].unit])}else if(e=oe(e),se(this[e]))return this[e](t);return this}var Rn=/\d/,ne=/\d\d/,Wn=/\d{3}/,zt=/\d{4}/,_t=/[+-]?\d{6}/,A=/\d\d?/,Hn=/\d\d\d\d?/,Fn=/\d\d\d\d\d\d?/,kt=/\d{1,3}/,Bt=/\d{1,4}/,Ct=/[+-]?\d{1,6}/,Ge=/\d+/,St=/[+-]?\d+/,Ns=/Z|[+-]\d\d:?\d\d/gi,bt=/Z|[+-]\d\d(?::?\d\d)?/gi,Os=/[+-]?\d+(\.\d{1,3})?/,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Mt;Mt={};function k(e,t,n){Mt[e]=se(t)?t:function(a,s){return a&&n?n:t}}function Ys(e,t){return h(Mt,e)?Mt[e](t._strict,t._locale):new RegExp(Ls(e))}function Ls(e){return ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,a,s,i){return n||a||s||i}))}function ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var $t={};function W(e,t){var n,a=t,s;for(typeof e=="string"&&(e=[e]),g(t)&&(a=function(i,c){c[t]=Y(i)}),s=e.length,n=0;n<s;n++)$t[e[n]]=a}function rt(e,t){W(e,function(n,a,s,i){s._w=s._w||{},t(n,s._w,s,i)})}function Ps(e,t,n){t!=null&&h($t,e)&&$t[e](t,n._a,n,e)}var X=0,he=1,ue=2,j=3,de=4,fe=5,Ye=6,Rs=7,Ws=8;function Hs(e,t){return(e%t+t)%t}var U;Array.prototype.indexOf?U=Array.prototype.indexOf:U=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function xt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Hs(t,12);return e+=(t-n)/12,n===1?yt(e)?29:28:31-n%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),D("MMMM",0,0,function(e){return this.localeData().months(this,e)}),J("month","M"),Q("month",8),k("M",A),k("MM",A,ne),k("MMM",function(e,t){return t.monthsShortRegex(e)}),k("MMMM",function(e,t){return t.monthsRegex(e)}),W(["M","MM"],function(e,t){t[he]=Y(e)-1}),W(["MMM","MMMM"],function(e,t,n,a){var s=n._locale.monthsParse(e,a,n._strict);s!=null?t[he]=s:d(n).invalidMonth=e});var Fs="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Gn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),An=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Gs=st,As=st;function Is(e,t){return e?u(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||An).test(t)?"format":"standalone"][e.month()]:u(this._months)?this._months:this._months.standalone}function Es(e,t){return e?u(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[An.test(t)?"format":"standalone"][e.month()]:u(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Us(e,t,n){var a,s,i,c=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)i=y([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(i,"").toLocaleLowerCase();return n?t==="MMM"?(s=U.call(this._shortMonthsParse,c),s!==-1?s:null):(s=U.call(this._longMonthsParse,c),s!==-1?s:null):t==="MMM"?(s=U.call(this._shortMonthsParse,c),s!==-1?s:(s=U.call(this._longMonthsParse,c),s!==-1?s:null)):(s=U.call(this._longMonthsParse,c),s!==-1?s:(s=U.call(this._shortMonthsParse,c),s!==-1?s:null))}function Vs(e,t,n){var a,s,i;if(this._monthsParseExact)return Us.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(s=y([2e3,a]),n&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!n&&!this._monthsParse[a]&&(i="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[a]=new RegExp(i.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[a].test(e))return a;if(n&&t==="MMM"&&this._shortMonthsParse[a].test(e))return a;if(!n&&this._monthsParse[a].test(e))return a}}function In(e,t){var n;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Y(t);else if(t=e.localeData().monthsParse(t),!g(t))return e}return n=Math.min(e.date(),xt(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function En(e){return e!=null?(In(this,e),r.updateOffset(this,!0),this):vt(this,"Month")}function js(){return xt(this.year(),this.month())}function zs(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Un.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Gs),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Bs(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Un.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=As),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Un(){function e(c,T){return T.length-c.length}var t=[],n=[],a=[],s,i;for(s=0;s<12;s++)i=y([2e3,s]),t.push(this.monthsShort(i,"")),n.push(this.months(i,"")),a.push(this.months(i,"")),a.push(this.monthsShort(i,""));for(t.sort(e),n.sort(e),a.sort(e),s=0;s<12;s++)t[s]=ae(t[s]),n[s]=ae(n[s]);for(s=0;s<24;s++)a[s]=ae(a[s]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}D("Y",0,0,function(){var e=this.year();return e<=9999?re(e,4):"+"+e}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),J("year","y"),Q("year",1),k("Y",St),k("YY",A,ne),k("YYYY",Bt,zt),k("YYYYY",Ct,_t),k("YYYYYY",Ct,_t),W(["YYYYY","YYYYYY"],X),W("YYYY",function(e,t){t[X]=e.length===2?r.parseTwoDigitYear(e):Y(e)}),W("YY",function(e,t){t[X]=r.parseTwoDigitYear(e)}),W("Y",function(e,t){t[X]=parseInt(e,10)});function it(e){return yt(e)?366:365}r.parseTwoDigitYear=function(e){return Y(e)+(Y(e)>68?1900:2e3)};var Vn=Fe("FullYear",!0);function $s(){return yt(this.year())}function Ks(e,t,n,a,s,i,c){var T;return e<100&&e>=0?(T=new Date(e+400,t,n,a,s,i,c),isFinite(T.getFullYear())&&T.setFullYear(e)):T=new Date(e,t,n,a,s,i,c),T}function ot(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Dt(e,t,n){var a=7+t-n,s=(7+ot(e,0,a).getUTCDay()-t)%7;return-s+a-1}function jn(e,t,n,a,s){var i=(7+n-a)%7,c=Dt(e,a,s),T=1+7*(t-1)+i+c,O,H;return T<=0?(O=e-1,H=it(O)+T):T>it(e)?(O=e+1,H=T-it(e)):(O=e,H=T),{year:O,dayOfYear:H}}function lt(e,t,n){var a=Dt(e.year(),t,n),s=Math.floor((e.dayOfYear()-a-1)/7)+1,i,c;return s<1?(c=e.year()-1,i=s+me(c,t,n)):s>me(e.year(),t,n)?(i=s-me(e.year(),t,n),c=e.year()+1):(c=e.year(),i=s),{week:i,year:c}}function me(e,t,n){var a=Dt(e,t,n),s=Dt(e+1,t,n);return(it(e)-a+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),J("week","w"),J("isoWeek","W"),Q("week",5),Q("isoWeek",5),k("w",A),k("ww",A,ne),k("W",A),k("WW",A,ne),rt(["w","ww","W","WW"],function(e,t,n,a){t[a.substr(0,1)]=Y(e)});function Zs(e){return lt(e,this._week.dow,this._week.doy).week}var qs={dow:0,doy:6};function Js(){return this._week.dow}function Qs(){return this._week.doy}function Xs(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function er(e){var t=lt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),J("day","d"),J("weekday","e"),J("isoWeekday","E"),Q("day",11),Q("weekday",11),Q("isoWeekday",11),k("d",A),k("e",A),k("E",A),k("dd",function(e,t){return t.weekdaysMinRegex(e)}),k("ddd",function(e,t){return t.weekdaysShortRegex(e)}),k("dddd",function(e,t){return t.weekdaysRegex(e)}),rt(["dd","ddd","dddd"],function(e,t,n,a){var s=n._locale.weekdaysParse(e,a,n._strict);s!=null?t.d=s:d(n).invalidWeekday=e}),rt(["d","e","E"],function(e,t,n,a){t[a]=Y(e)});function tr(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function nr(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Kt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ar="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),zn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),sr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),rr=st,ir=st,or=st;function lr(e,t){var n=u(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Kt(n,this._week.dow):e?n[e.day()]:n}function dr(e){return e===!0?Kt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function cr(e){return e===!0?Kt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ur(e,t,n){var a,s,i,c=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)i=y([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(s=U.call(this._weekdaysParse,c),s!==-1?s:null):t==="ddd"?(s=U.call(this._shortWeekdaysParse,c),s!==-1?s:null):(s=U.call(this._minWeekdaysParse,c),s!==-1?s:null):t==="dddd"?(s=U.call(this._weekdaysParse,c),s!==-1||(s=U.call(this._shortWeekdaysParse,c),s!==-1)?s:(s=U.call(this._minWeekdaysParse,c),s!==-1?s:null)):t==="ddd"?(s=U.call(this._shortWeekdaysParse,c),s!==-1||(s=U.call(this._weekdaysParse,c),s!==-1)?s:(s=U.call(this._minWeekdaysParse,c),s!==-1?s:null)):(s=U.call(this._minWeekdaysParse,c),s!==-1||(s=U.call(this._weekdaysParse,c),s!==-1)?s:(s=U.call(this._shortWeekdaysParse,c),s!==-1?s:null))}function hr(e,t,n){var a,s,i;if(this._weekdaysParseExact)return ur.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(s=y([2e3,1]).day(a),n&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[a]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(n&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(n&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!n&&this._weekdaysParse[a].test(e))return a}}function fr(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=tr(e,this.localeData()),this.add(e-t,"d")):t}function mr(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function pr(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=nr(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function gr(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=rr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function wr(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ir),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function yr(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Zt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=or),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Zt(){function e(te,ve){return ve.length-te.length}var t=[],n=[],a=[],s=[],i,c,T,O,H;for(i=0;i<7;i++)c=y([2e3,1]).day(i),T=ae(this.weekdaysMin(c,"")),O=ae(this.weekdaysShort(c,"")),H=ae(this.weekdays(c,"")),t.push(T),n.push(O),a.push(H),s.push(T),s.push(O),s.push(H);t.sort(e),n.sort(e),a.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function qt(){return this.hours()%12||12}function vr(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,qt),D("k",["kk",2],0,vr),D("hmm",0,0,function(){return""+qt.apply(this)+re(this.minutes(),2)}),D("hmmss",0,0,function(){return""+qt.apply(this)+re(this.minutes(),2)+re(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+re(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+re(this.minutes(),2)+re(this.seconds(),2)});function Bn(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Bn("a",!0),Bn("A",!1),J("hour","h"),Q("hour",13);function $n(e,t){return t._meridiemParse}k("a",$n),k("A",$n),k("H",A),k("h",A),k("k",A),k("HH",A,ne),k("hh",A,ne),k("kk",A,ne),k("hmm",Hn),k("hmmss",Fn),k("Hmm",Hn),k("Hmmss",Fn),W(["H","HH"],j),W(["k","kk"],function(e,t,n){var a=Y(e);t[j]=a===24?0:a}),W(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),W(["h","hh"],function(e,t,n){t[j]=Y(e),d(n).bigHour=!0}),W("hmm",function(e,t,n){var a=e.length-2;t[j]=Y(e.substr(0,a)),t[de]=Y(e.substr(a)),d(n).bigHour=!0}),W("hmmss",function(e,t,n){var a=e.length-4,s=e.length-2;t[j]=Y(e.substr(0,a)),t[de]=Y(e.substr(a,2)),t[fe]=Y(e.substr(s)),d(n).bigHour=!0}),W("Hmm",function(e,t,n){var a=e.length-2;t[j]=Y(e.substr(0,a)),t[de]=Y(e.substr(a))}),W("Hmmss",function(e,t,n){var a=e.length-4,s=e.length-2;t[j]=Y(e.substr(0,a)),t[de]=Y(e.substr(a,2)),t[fe]=Y(e.substr(s))});function _r(e){return(e+"").toLowerCase().charAt(0)==="p"}var kr=/[ap]\.?m?\.?/i,Cr=Fe("Hours",!0);function Sr(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var Kn={calendar:Vt,longDateFormat:nt,invalidDate:Ce,ordinal:_s,dayOfMonthOrdinalParse:ks,relativeTime:Ss,months:Fs,monthsShort:Gn,week:qs,weekdays:ar,weekdaysMin:sr,weekdaysShort:zn,meridiemParse:kr},E={},dt={},ct;function br(e,t){var n,a=Math.min(e.length,t.length);for(n=0;n<a;n+=1)if(e[n]!==t[n])return n;return a}function Zn(e){return e&&e.toLowerCase().replace("_","-")}function Mr(e){for(var t=0,n,a,s,i;t<e.length;){for(i=Zn(e[t]).split("-"),n=i.length,a=Zn(e[t+1]),a=a?a.split("-"):null;n>0;){if(s=Tt(i.slice(0,n).join("-")),s)return s;if(a&&a.length>=n&&br(i,a)>=n-1)break;n--}t++}return ct}function xr(e){return e.match("^[^/\\\\]*$")!=null}function Tt(e){var t=null,n;if(E[e]===void 0&&typeof ze<"u"&&ze&&ze.exports&&xr(e))try{t=ct._abbr,n=ka,n("./locale/"+e),Se(t)}catch{E[e]=null}return E[e]}function Se(e,t){var n;return e&&(m(t)?n=pe(e):n=Jt(e,t),n?ct=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ct._abbr}function Jt(e,t){if(t!==null){var n,a=Kn;if(t.abbr=e,E[e]!=null)Qe("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=E[e]._config;else if(t.parentLocale!=null)if(E[t.parentLocale]!=null)a=E[t.parentLocale]._config;else if(n=Tt(t.parentLocale),n!=null)a=n._config;else return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;return E[e]=new et(Re(a,t)),dt[e]&&dt[e].forEach(function(s){Jt(s.name,s.config)}),Se(e),E[e]}else return delete E[e],null}function Dr(e,t){if(t!=null){var n,a,s=Kn;E[e]!=null&&E[e].parentLocale!=null?E[e].set(Re(E[e]._config,t)):(a=Tt(e),a!=null&&(s=a._config),t=Re(s,t),a==null&&(t.abbr=e),n=new et(t),n.parentLocale=E[e],E[e]=n),Se(e)}else E[e]!=null&&(E[e].parentLocale!=null?(E[e]=E[e].parentLocale,e===Se()&&Se(e)):E[e]!=null&&delete E[e]);return E[e]}function pe(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ct;if(!u(e)){if(t=Tt(e),t)return t;e=[e]}return Mr(e)}function Tr(){return tt(E)}function Qt(e){var t,n=e._a;return n&&d(e).overflow===-2&&(t=n[he]<0||n[he]>11?he:n[ue]<1||n[ue]>xt(n[X],n[he])?ue:n[j]<0||n[j]>24||n[j]===24&&(n[de]!==0||n[fe]!==0||n[Ye]!==0)?j:n[de]<0||n[de]>59?de:n[fe]<0||n[fe]>59?fe:n[Ye]<0||n[Ye]>999?Ye:-1,d(e)._overflowDayOfYear&&(t<X||t>ue)&&(t=ue),d(e)._overflowWeeks&&t===-1&&(t=Rs),d(e)._overflowWeekday&&t===-1&&(t=Ws),d(e).overflow=t),e}var Nr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Or=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Yr=/Z|[+-]\d\d(?::?\d\d)?/,Nt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Xt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Lr=/^\/?Date\((-?\d+)/i,Pr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Rr={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function qn(e){var t,n,a=e._i,s=Nr.exec(a)||Or.exec(a),i,c,T,O,H=Nt.length,te=Xt.length;if(s){for(d(e).iso=!0,t=0,n=H;t<n;t++)if(Nt[t][1].exec(s[1])){c=Nt[t][0],i=Nt[t][2]!==!1;break}if(c==null){e._isValid=!1;return}if(s[3]){for(t=0,n=te;t<n;t++)if(Xt[t][1].exec(s[3])){T=(s[2]||" ")+Xt[t][0];break}if(T==null){e._isValid=!1;return}}if(!i&&T!=null){e._isValid=!1;return}if(s[4])if(Yr.exec(s[4]))O="Z";else{e._isValid=!1;return}e._f=c+(T||"")+(O||""),tn(e)}else e._isValid=!1}function Wr(e,t,n,a,s,i){var c=[Hr(e),Gn.indexOf(t),parseInt(n,10),parseInt(a,10),parseInt(s,10)];return i&&c.push(parseInt(i,10)),c}function Hr(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Fr(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Gr(e,t,n){if(e){var a=zn.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(a!==s)return d(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Ar(e,t,n){if(e)return Rr[e];if(t)return 0;var a=parseInt(n,10),s=a%100,i=(a-s)/100;return i*60+s}function Jn(e){var t=Pr.exec(Fr(e._i)),n;if(t){if(n=Wr(t[4],t[3],t[2],t[5],t[6],t[7]),!Gr(t[1],n,e))return;e._a=n,e._tzm=Ar(t[8],t[9],t[10]),e._d=ot.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),d(e).rfc2822=!0}else e._isValid=!1}function Ir(e){var t=Lr.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(qn(e),e._isValid===!1)delete e._isValid;else return;if(Jn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:r.createFromInputFallback(e)}r.createFromInputFallback=Z("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ae(e,t,n){return e??t??n}function Er(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function en(e){var t,n,a=[],s,i,c;if(!e._d){for(s=Er(e),e._w&&e._a[ue]==null&&e._a[he]==null&&Ur(e),e._dayOfYear!=null&&(c=Ae(e._a[X],s[X]),(e._dayOfYear>it(c)||e._dayOfYear===0)&&(d(e)._overflowDayOfYear=!0),n=ot(c,0,e._dayOfYear),e._a[he]=n.getUTCMonth(),e._a[ue]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[j]===24&&e._a[de]===0&&e._a[fe]===0&&e._a[Ye]===0&&(e._nextDay=!0,e._a[j]=0),e._d=(e._useUTC?ot:Ks).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[j]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(d(e).weekdayMismatch=!0)}}function Ur(e){var t,n,a,s,i,c,T,O,H;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,c=4,n=Ae(t.GG,e._a[X],lt(I(),1,4).year),a=Ae(t.W,1),s=Ae(t.E,1),(s<1||s>7)&&(O=!0)):(i=e._locale._week.dow,c=e._locale._week.doy,H=lt(I(),i,c),n=Ae(t.gg,e._a[X],H.year),a=Ae(t.w,H.week),t.d!=null?(s=t.d,(s<0||s>6)&&(O=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(O=!0)):s=i),a<1||a>me(n,i,c)?d(e)._overflowWeeks=!0:O!=null?d(e)._overflowWeekday=!0:(T=jn(n,a,s,i,c),e._a[X]=T.year,e._dayOfYear=T.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function tn(e){if(e._f===r.ISO_8601){qn(e);return}if(e._f===r.RFC_2822){Jn(e);return}e._a=[],d(e).empty=!0;var t=""+e._i,n,a,s,i,c,T=t.length,O=0,H,te;for(s=ie(e._f,e._locale).match(Ne)||[],te=s.length,n=0;n<te;n++)i=s[n],a=(t.match(Ys(i,e))||[])[0],a&&(c=t.substr(0,t.indexOf(a)),c.length>0&&d(e).unusedInput.push(c),t=t.slice(t.indexOf(a)+a.length),O+=a.length),ke[i]?(a?d(e).empty=!1:d(e).unusedTokens.push(i),Ps(i,a,e)):e._strict&&!a&&d(e).unusedTokens.push(i);d(e).charsLeftOver=T-O,t.length>0&&d(e).unusedInput.push(t),e._a[j]<=12&&d(e).bigHour===!0&&e._a[j]>0&&(d(e).bigHour=void 0),d(e).parsedDateParts=e._a.slice(0),d(e).meridiem=e._meridiem,e._a[j]=Vr(e._locale,e._a[j],e._meridiem),H=d(e).era,H!==null&&(e._a[X]=e._locale.erasConvertYear(H,e._a[X])),en(e),Qt(e)}function Vr(e,t,n){var a;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(a=e.isPM(n),a&&t<12&&(t+=12),!a&&t===12&&(t=0)),t)}function jr(e){var t,n,a,s,i,c,T=!1,O=e._f.length;if(O===0){d(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<O;s++)i=0,c=!1,t=V({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],tn(t),x(t)&&(c=!0),i+=d(t).charsLeftOver,i+=d(t).unusedTokens.length*10,d(t).score=i,T?i<a&&(a=i,n=t):(a==null||i<a||c)&&(a=i,n=t,c&&(T=!0));S(e,n||t)}function zr(e){if(!e._d){var t=jt(e._i),n=t.day===void 0?t.date:t.day;e._a=C([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(a){return a&&parseInt(a,10)}),en(e)}}function Br(e){var t=new K(Qt(Qn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Qn(e){var t=e._i,n=e._f;return e._locale=e._locale||pe(e._l),t===null||n===void 0&&t===""?_({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ee(t)?new K(Qt(t)):(w(t)?e._d=t:u(n)?jr(e):n?tn(e):$r(e),x(e)||(e._d=null),e))}function $r(e){var t=e._i;m(t)?e._d=new Date(r.now()):w(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Ir(e):u(t)?(e._a=C(t.slice(0),function(n){return parseInt(n,10)}),en(e)):f(t)?zr(e):g(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Xn(e,t,n,a,s){var i={};return(t===!0||t===!1)&&(a=t,t=void 0),(n===!0||n===!1)&&(a=n,n=void 0),(f(e)&&v(e)||u(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=s,i._l=n,i._i=e,i._f=t,i._strict=a,Br(i)}function I(e,t,n,a){return Xn(e,t,n,a,!1)}var Kr=Z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()}),Zr=Z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=I.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()});function ea(e,t){var n,a;if(t.length===1&&u(t[0])&&(t=t[0]),!t.length)return I();for(n=t[0],a=1;a<t.length;++a)(!t[a].isValid()||t[a][e](n))&&(n=t[a]);return n}function qr(){var e=[].slice.call(arguments,0);return ea("isBefore",e)}function Jr(){var e=[].slice.call(arguments,0);return ea("isAfter",e)}var Qr=function(){return Date.now?Date.now():+new Date},ut=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Xr(e){var t,n=!1,a,s=ut.length;for(t in e)if(h(e,t)&&!(U.call(ut,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(a=0;a<s;++a)if(e[ut[a]]){if(n)return!1;parseFloat(e[ut[a]])!==Y(e[ut[a]])&&(n=!0)}return!0}function ei(){return this._isValid}function ti(){return ce(NaN)}function Ot(e){var t=jt(e),n=t.year||0,a=t.quarter||0,s=t.month||0,i=t.week||t.isoWeek||0,c=t.day||0,T=t.hour||0,O=t.minute||0,H=t.second||0,te=t.millisecond||0;this._isValid=Xr(t),this._milliseconds=+te+H*1e3+O*6e4+T*1e3*60*60,this._days=+c+i*7,this._months=+s+a*3+n*12,this._data={},this._locale=pe(),this._bubble()}function Yt(e){return e instanceof Ot}function nn(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function ni(e,t,n){var a=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),i=0,c;for(c=0;c<a;c++)(n&&e[c]!==t[c]||!n&&Y(e[c])!==Y(t[c]))&&i++;return i+s}function ta(e,t){D(e,0,0,function(){var n=this.utcOffset(),a="+";return n<0&&(n=-n,a="-"),a+re(~~(n/60),2)+t+re(~~n%60,2)})}ta("Z",":"),ta("ZZ",""),k("Z",bt),k("ZZ",bt),W(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=an(bt,e)});var ai=/([\+\-]|\d\d)/gi;function an(e,t){var n=(t||"").match(e),a,s,i;return n===null?null:(a=n[n.length-1]||[],s=(a+"").match(ai)||["-",0,0],i=+(s[1]*60)+Y(s[2]),i===0?0:s[0]==="+"?i:-i)}function sn(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(ee(e)||w(e)?e.valueOf():I(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),r.updateOffset(n,!1),n):I(e).local()}function rn(e){return-Math.round(e._d.getTimezoneOffset())}r.updateOffset=function(){};function si(e,t,n){var a=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=an(bt,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(s=rn(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),a!==e&&(!t||this._changeInProgress?ra(this,ce(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?a:rn(this)}function ri(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function ii(e){return this.utcOffset(0,e)}function oi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(rn(this),"m")),this}function li(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=an(Ns,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function di(e){return this.isValid()?(e=e?I(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function ci(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ui(){if(!m(this._isDSTShifted))return this._isDSTShifted;var e={},t;return V(e,this),e=Qn(e),e._a?(t=e._isUTC?y(e._a):I(e._a),this._isDSTShifted=this.isValid()&&ni(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function hi(){return this.isValid()?!this._isUTC:!1}function fi(){return this.isValid()?this._isUTC:!1}function na(){return this.isValid()?this._isUTC&&this._offset===0:!1}var mi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,pi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ce(e,t){var n=e,a=null,s,i,c;return Yt(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:g(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(a=mi.exec(e))?(s=a[1]==="-"?-1:1,n={y:0,d:Y(a[ue])*s,h:Y(a[j])*s,m:Y(a[de])*s,s:Y(a[fe])*s,ms:Y(nn(a[Ye]*1e3))*s}):(a=pi.exec(e))?(s=a[1]==="-"?-1:1,n={y:Le(a[2],s),M:Le(a[3],s),w:Le(a[4],s),d:Le(a[5],s),h:Le(a[6],s),m:Le(a[7],s),s:Le(a[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(c=gi(I(n.from),I(n.to)),n={},n.ms=c.milliseconds,n.M=c.months),i=new Ot(n),Yt(e)&&h(e,"_locale")&&(i._locale=e._locale),Yt(e)&&h(e,"_isValid")&&(i._isValid=e._isValid),i}ce.fn=Ot.prototype,ce.invalid=ti;function Le(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function aa(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function gi(e,t){var n;return e.isValid()&&t.isValid()?(t=sn(t,e),e.isBefore(t)?n=aa(e,t):(n=aa(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function sa(e,t){return function(n,a){var s,i;return a!==null&&!isNaN(+a)&&(Qe(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=a,a=i),s=ce(n,a),ra(this,s,e),this}}function ra(e,t,n,a){var s=t._milliseconds,i=nn(t._days),c=nn(t._months);!e.isValid()||(a=a??!0,c&&In(e,vt(e,"Month")+c*n),i&&Pn(e,"Date",vt(e,"Date")+i*n),s&&e._d.setTime(e._d.valueOf()+s*n),a&&r.updateOffset(e,i||c))}var wi=sa(1,"add"),yi=sa(-1,"subtract");function ia(e){return typeof e=="string"||e instanceof String}function vi(e){return ee(e)||w(e)||ia(e)||g(e)||ki(e)||_i(e)||e===null||e===void 0}function _i(e){var t=f(e)&&!v(e),n=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,i,c=a.length;for(s=0;s<c;s+=1)i=a[s],n=n||h(e,i);return t&&n}function ki(e){var t=u(e),n=!1;return t&&(n=e.filter(function(a){return!g(a)&&ia(e)}).length===0),t&&n}function Ci(e){var t=f(e)&&!v(e),n=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,i;for(s=0;s<a.length;s+=1)i=a[s],n=n||h(e,i);return t&&n}function Si(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function bi(e,t){arguments.length===1&&(arguments[0]?vi(arguments[0])?(e=arguments[0],t=void 0):Ci(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||I(),a=sn(n,this).startOf("day"),s=r.calendarFormat(this,a)||"sameElse",i=t&&(se(t[s])?t[s].call(this,n):t[s]);return this.format(i||this.localeData().calendar(s,this,I(n)))}function Mi(){return new K(this)}function xi(e,t){var n=ee(e)?e:I(e);return this.isValid()&&n.isValid()?(t=oe(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Di(e,t){var n=ee(e)?e:I(e);return this.isValid()&&n.isValid()?(t=oe(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Ti(e,t,n,a){var s=ee(e)?e:I(e),i=ee(t)?t:I(t);return this.isValid()&&s.isValid()&&i.isValid()?(a=a||"()",(a[0]==="("?this.isAfter(s,n):!this.isBefore(s,n))&&(a[1]===")"?this.isBefore(i,n):!this.isAfter(i,n))):!1}function Ni(e,t){var n=ee(e)?e:I(e),a;return this.isValid()&&n.isValid()?(t=oe(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(a=n.valueOf(),this.clone().startOf(t).valueOf()<=a&&a<=this.clone().endOf(t).valueOf())):!1}function Oi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Yi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Li(e,t,n){var a,s,i;if(!this.isValid())return NaN;if(a=sn(e,this),!a.isValid())return NaN;switch(s=(a.utcOffset()-this.utcOffset())*6e4,t=oe(t),t){case"year":i=Lt(this,a)/12;break;case"month":i=Lt(this,a);break;case"quarter":i=Lt(this,a)/3;break;case"second":i=(this-a)/1e3;break;case"minute":i=(this-a)/6e4;break;case"hour":i=(this-a)/36e5;break;case"day":i=(this-a-s)/864e5;break;case"week":i=(this-a-s)/6048e5;break;default:i=this-a}return n?i:le(i)}function Lt(e,t){if(e.date()<t.date())return-Lt(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),a=e.clone().add(n,"months"),s,i;return t-a<0?(s=e.clone().add(n-1,"months"),i=(t-a)/(a-s)):(s=e.clone().add(n+1,"months"),i=(t-a)/(s-a)),-(n+i)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Pi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ri(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?q(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):se(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",q(n,"Z")):q(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Wi(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,a,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+a+s+i)}function Hi(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)}function Fi(e,t){return this.isValid()&&(ee(e)&&e.isValid()||I(e).isValid())?ce({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Gi(e){return this.from(I(),e)}function Ai(e,t){return this.isValid()&&(ee(e)&&e.isValid()||I(e).isValid())?ce({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ii(e){return this.to(I(),e)}function oa(e){var t;return e===void 0?this._locale._abbr:(t=pe(e),t!=null&&(this._locale=t),this)}var la=Z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function da(){return this._locale}var Pt=1e3,Ie=60*Pt,Rt=60*Ie,ca=(365*400+97)*24*Rt;function Ee(e,t){return(e%t+t)%t}function ua(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ca:new Date(e,t,n).valueOf()}function ha(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ca:Date.UTC(e,t,n)}function Ei(e){var t,n;if(e=oe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ha:ua,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Ee(t+(this._isUTC?0:this.utcOffset()*Ie),Rt);break;case"minute":t=this._d.valueOf(),t-=Ee(t,Ie);break;case"second":t=this._d.valueOf(),t-=Ee(t,Pt);break}return this._d.setTime(t),r.updateOffset(this,!0),this}function Ui(e){var t,n;if(e=oe(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ha:ua,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Rt-Ee(t+(this._isUTC?0:this.utcOffset()*Ie),Rt)-1;break;case"minute":t=this._d.valueOf(),t+=Ie-Ee(t,Ie)-1;break;case"second":t=this._d.valueOf(),t+=Pt-Ee(t,Pt)-1;break}return this._d.setTime(t),r.updateOffset(this,!0),this}function Vi(){return this._d.valueOf()-(this._offset||0)*6e4}function ji(){return Math.floor(this.valueOf()/1e3)}function zi(){return new Date(this.valueOf())}function Bi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $i(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ki(){return this.isValid()?this.toISOString():null}function Zi(){return x(this)}function qi(){return S({},d(this))}function Ji(){return d(this).overflow}function Qi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),k("N",on),k("NN",on),k("NNN",on),k("NNNN",co),k("NNNNN",uo),W(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,a){var s=n._locale.erasParse(e,a,n._strict);s?d(n).era=s:d(n).invalidEra=e}),k("y",Ge),k("yy",Ge),k("yyy",Ge),k("yyyy",Ge),k("yo",ho),W(["y","yy","yyy","yyyy"],X),W(["yo"],function(e,t,n,a){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[X]=n._locale.eraYearOrdinalParse(e,s):t[X]=parseInt(e,10)});function Xi(e,t){var n,a,s,i=this._eras||pe("en")._eras;for(n=0,a=i.length;n<a;++n){switch(typeof i[n].since){case"string":s=r(i[n].since).startOf("day"),i[n].since=s.valueOf();break}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":s=r(i[n].until).startOf("day").valueOf(),i[n].until=s.valueOf();break}}return i}function eo(e,t,n){var a,s,i=this.eras(),c,T,O;for(e=e.toUpperCase(),a=0,s=i.length;a<s;++a)if(c=i[a].name.toUpperCase(),T=i[a].abbr.toUpperCase(),O=i[a].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(T===e)return i[a];break;case"NNNN":if(c===e)return i[a];break;case"NNNNN":if(O===e)return i[a];break}else if([c,T,O].indexOf(e)>=0)return i[a]}function to(e,t){var n=e.since<=e.until?1:-1;return t===void 0?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function no(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].name;return""}function ao(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].narrow;return""}function so(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].abbr;return""}function ro(){var e,t,n,a,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,a=this.clone().startOf("day").valueOf(),s[e].since<=a&&a<=s[e].until||s[e].until<=a&&a<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()}function io(e){return h(this,"_erasNameRegex")||ln.call(this),e?this._erasNameRegex:this._erasRegex}function oo(e){return h(this,"_erasAbbrRegex")||ln.call(this),e?this._erasAbbrRegex:this._erasRegex}function lo(e){return h(this,"_erasNarrowRegex")||ln.call(this),e?this._erasNarrowRegex:this._erasRegex}function on(e,t){return t.erasAbbrRegex(e)}function co(e,t){return t.erasNameRegex(e)}function uo(e,t){return t.erasNarrowRegex(e)}function ho(e,t){return t._eraYearOrdinalRegex||Ge}function ln(){var e=[],t=[],n=[],a=[],s,i,c=this.eras();for(s=0,i=c.length;s<i;++s)t.push(ae(c[s].name)),e.push(ae(c[s].abbr)),n.push(ae(c[s].narrow)),a.push(ae(c[s].name)),a.push(ae(c[s].abbr)),a.push(ae(c[s].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Wt(e,t){D(0,[e,e.length],0,t)}Wt("gggg","weekYear"),Wt("ggggg","weekYear"),Wt("GGGG","isoWeekYear"),Wt("GGGGG","isoWeekYear"),J("weekYear","gg"),J("isoWeekYear","GG"),Q("weekYear",1),Q("isoWeekYear",1),k("G",St),k("g",St),k("GG",A,ne),k("gg",A,ne),k("GGGG",Bt,zt),k("gggg",Bt,zt),k("GGGGG",Ct,_t),k("ggggg",Ct,_t),rt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,a){t[a.substr(0,2)]=Y(e)}),rt(["gg","GG"],function(e,t,n,a){t[a]=r.parseTwoDigitYear(e)});function fo(e){return fa.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function mo(e){return fa.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function po(){return me(this.year(),1,4)}function go(){return me(this.isoWeekYear(),1,4)}function wo(){var e=this.localeData()._week;return me(this.year(),e.dow,e.doy)}function yo(){var e=this.localeData()._week;return me(this.weekYear(),e.dow,e.doy)}function fa(e,t,n,a,s){var i;return e==null?lt(this,a,s).year:(i=me(e,a,s),t>i&&(t=i),vo.call(this,e,t,n,a,s))}function vo(e,t,n,a,s){var i=jn(e,t,n,a,s),c=ot(i.year,0,i.dayOfYear);return this.year(c.getUTCFullYear()),this.month(c.getUTCMonth()),this.date(c.getUTCDate()),this}D("Q",0,"Qo","quarter"),J("quarter","Q"),Q("quarter",7),k("Q",Rn),W("Q",function(e,t){t[he]=(Y(e)-1)*3});function _o(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),J("date","D"),Q("date",9),k("D",A),k("DD",A,ne),k("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),W(["D","DD"],ue),W("Do",function(e,t){t[ue]=Y(e.match(A)[0])});var ma=Fe("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),J("dayOfYear","DDD"),Q("dayOfYear",4),k("DDD",kt),k("DDDD",Wn),W(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Y(e)});function ko(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}D("m",["mm",2],0,"minute"),J("minute","m"),Q("minute",14),k("m",A),k("mm",A,ne),W(["m","mm"],de);var Co=Fe("Minutes",!1);D("s",["ss",2],0,"second"),J("second","s"),Q("second",15),k("s",A),k("ss",A,ne),W(["s","ss"],fe);var So=Fe("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),J("millisecond","ms"),Q("millisecond",16),k("S",kt,Rn),k("SS",kt,ne),k("SSS",kt,Wn);var be,pa;for(be="SSSS";be.length<=9;be+="S")k(be,Ge);function bo(e,t){t[Ye]=Y(("0."+e)*1e3)}for(be="S";be.length<=9;be+="S")W(be,bo);pa=Fe("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function Mo(){return this._isUTC?"UTC":""}function xo(){return this._isUTC?"Coordinated Universal Time":""}var p=K.prototype;p.add=wi,p.calendar=bi,p.clone=Mi,p.diff=Li,p.endOf=Ui,p.format=Hi,p.from=Fi,p.fromNow=Gi,p.to=Ai,p.toNow=Ii,p.get=Ds,p.invalidAt=Ji,p.isAfter=xi,p.isBefore=Di,p.isBetween=Ti,p.isSame=Ni,p.isSameOrAfter=Oi,p.isSameOrBefore=Yi,p.isValid=Zi,p.lang=la,p.locale=oa,p.localeData=da,p.max=Zr,p.min=Kr,p.parsingFlags=qi,p.set=Ts,p.startOf=Ei,p.subtract=yi,p.toArray=Bi,p.toObject=$i,p.toDate=zi,p.toISOString=Ri,p.inspect=Wi,typeof Symbol<"u"&&Symbol.for!=null&&(p[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),p.toJSON=Ki,p.toString=Pi,p.unix=ji,p.valueOf=Vi,p.creationData=Qi,p.eraName=no,p.eraNarrow=ao,p.eraAbbr=so,p.eraYear=ro,p.year=Vn,p.isLeapYear=$s,p.weekYear=fo,p.isoWeekYear=mo,p.quarter=p.quarters=_o,p.month=En,p.daysInMonth=js,p.week=p.weeks=Xs,p.isoWeek=p.isoWeeks=er,p.weeksInYear=wo,p.weeksInWeekYear=yo,p.isoWeeksInYear=po,p.isoWeeksInISOWeekYear=go,p.date=ma,p.day=p.days=fr,p.weekday=mr,p.isoWeekday=pr,p.dayOfYear=ko,p.hour=p.hours=Cr,p.minute=p.minutes=Co,p.second=p.seconds=So,p.millisecond=p.milliseconds=pa,p.utcOffset=si,p.utc=ii,p.local=oi,p.parseZone=li,p.hasAlignedHourOffset=di,p.isDST=ci,p.isLocal=hi,p.isUtcOffset=fi,p.isUtc=na,p.isUTC=na,p.zoneAbbr=Mo,p.zoneName=xo,p.dates=Z("dates accessor is deprecated. Use date instead.",ma),p.months=Z("months accessor is deprecated. Use month instead",En),p.years=Z("years accessor is deprecated. Use year instead",Vn),p.zone=Z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ri),p.isDSTShifted=Z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ui);function Do(e){return I(e*1e3)}function To(){return I.apply(null,arguments).parseZone()}function ga(e){return e}var P=et.prototype;P.calendar=wt,P.longDateFormat=Oe,P.invalidDate=vs,P.ordinal=Cs,P.preparse=ga,P.postformat=ga,P.relativeTime=bs,P.pastFuture=Ms,P.set=Xe,P.eras=Xi,P.erasParse=eo,P.erasConvertYear=to,P.erasAbbrRegex=oo,P.erasNameRegex=io,P.erasNarrowRegex=lo,P.months=Is,P.monthsShort=Es,P.monthsParse=Vs,P.monthsRegex=Bs,P.monthsShortRegex=zs,P.week=Zs,P.firstDayOfYear=Qs,P.firstDayOfWeek=Js,P.weekdays=lr,P.weekdaysMin=cr,P.weekdaysShort=dr,P.weekdaysParse=hr,P.weekdaysRegex=gr,P.weekdaysShortRegex=wr,P.weekdaysMinRegex=yr,P.isPM=_r,P.meridiem=Sr;function Ht(e,t,n,a){var s=pe(),i=y().set(a,t);return s[n](i,e)}function wa(e,t,n){if(g(e)&&(t=e,e=void 0),e=e||"",t!=null)return Ht(e,t,n,"month");var a,s=[];for(a=0;a<12;a++)s[a]=Ht(e,a,n,"month");return s}function dn(e,t,n,a){typeof e=="boolean"?(g(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,g(t)&&(n=t,t=void 0),t=t||"");var s=pe(),i=e?s._week.dow:0,c,T=[];if(n!=null)return Ht(t,(n+i)%7,a,"day");for(c=0;c<7;c++)T[c]=Ht(t,(c+i)%7,a,"day");return T}function No(e,t){return wa(e,t,"months")}function Oo(e,t){return wa(e,t,"monthsShort")}function Yo(e,t,n){return dn(e,t,n,"weekdays")}function Lo(e,t,n){return dn(e,t,n,"weekdaysShort")}function Po(e,t,n){return dn(e,t,n,"weekdaysMin")}Se("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Y(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),r.lang=Z("moment.lang is deprecated. Use moment.locale instead.",Se),r.langData=Z("moment.langData is deprecated. Use moment.localeData instead.",pe);var ge=Math.abs;function Ro(){var e=this._data;return this._milliseconds=ge(this._milliseconds),this._days=ge(this._days),this._months=ge(this._months),e.milliseconds=ge(e.milliseconds),e.seconds=ge(e.seconds),e.minutes=ge(e.minutes),e.hours=ge(e.hours),e.months=ge(e.months),e.years=ge(e.years),this}function ya(e,t,n,a){var s=ce(t,n);return e._milliseconds+=a*s._milliseconds,e._days+=a*s._days,e._months+=a*s._months,e._bubble()}function Wo(e,t){return ya(this,e,t,1)}function Ho(e,t){return ya(this,e,t,-1)}function va(e){return e<0?Math.floor(e):Math.ceil(e)}function Fo(){var e=this._milliseconds,t=this._days,n=this._months,a=this._data,s,i,c,T,O;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=va(cn(n)+t)*864e5,t=0,n=0),a.milliseconds=e%1e3,s=le(e/1e3),a.seconds=s%60,i=le(s/60),a.minutes=i%60,c=le(i/60),a.hours=c%24,t+=le(c/24),O=le(_a(t)),n+=O,t-=va(cn(O)),T=le(n/12),n%=12,a.days=t,a.months=n,a.years=T,this}function _a(e){return e*4800/146097}function cn(e){return e*146097/4800}function Go(e){if(!this.isValid())return NaN;var t,n,a=this._milliseconds;if(e=oe(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+a/864e5,n=this._months+_a(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(cn(this._months)),e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}function Ao(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Y(this._months/12)*31536e6:NaN}function we(e){return function(){return this.as(e)}}var Io=we("ms"),Eo=we("s"),Uo=we("m"),Vo=we("h"),jo=we("d"),zo=we("w"),Bo=we("M"),$o=we("Q"),Ko=we("y");function Zo(){return ce(this)}function qo(e){return e=oe(e),this.isValid()?this[e+"s"]():NaN}function Pe(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jo=Pe("milliseconds"),Qo=Pe("seconds"),Xo=Pe("minutes"),el=Pe("hours"),tl=Pe("days"),nl=Pe("months"),al=Pe("years");function sl(){return le(this.days()/7)}var ye=Math.round,Ue={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rl(e,t,n,a,s){return s.relativeTime(t||1,!!n,e,a)}function il(e,t,n,a){var s=ce(e).abs(),i=ye(s.as("s")),c=ye(s.as("m")),T=ye(s.as("h")),O=ye(s.as("d")),H=ye(s.as("M")),te=ye(s.as("w")),ve=ye(s.as("y")),Me=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||c<=1&&["m"]||c<n.m&&["mm",c]||T<=1&&["h"]||T<n.h&&["hh",T]||O<=1&&["d"]||O<n.d&&["dd",O];return n.w!=null&&(Me=Me||te<=1&&["w"]||te<n.w&&["ww",te]),Me=Me||H<=1&&["M"]||H<n.M&&["MM",H]||ve<=1&&["y"]||["yy",ve],Me[2]=t,Me[3]=+e>0,Me[4]=a,rl.apply(null,Me)}function ol(e){return e===void 0?ye:typeof e=="function"?(ye=e,!0):!1}function ll(e,t){return Ue[e]===void 0?!1:t===void 0?Ue[e]:(Ue[e]=t,e==="s"&&(Ue.ss=t-1),!0)}function dl(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,a=Ue,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(a=Object.assign({},Ue,t),t.s!=null&&t.ss==null&&(a.ss=t.s-1)),s=this.localeData(),i=il(this,!n,a,s),n&&(i=s.pastFuture(+this,i)),s.postformat(i)}var un=Math.abs;function Ve(e){return(e>0)-(e<0)||+e}function Ft(){if(!this.isValid())return this.localeData().invalidDate();var e=un(this._milliseconds)/1e3,t=un(this._days),n=un(this._months),a,s,i,c,T=this.asSeconds(),O,H,te,ve;return T?(a=le(e/60),s=le(a/60),e%=60,a%=60,i=le(n/12),n%=12,c=e?e.toFixed(3).replace(/\.?0+$/,""):"",O=T<0?"-":"",H=Ve(this._months)!==Ve(T)?"-":"",te=Ve(this._days)!==Ve(T)?"-":"",ve=Ve(this._milliseconds)!==Ve(T)?"-":"",O+"P"+(i?H+i+"Y":"")+(n?H+n+"M":"")+(t?te+t+"D":"")+(s||a||e?"T":"")+(s?ve+s+"H":"")+(a?ve+a+"M":"")+(e?ve+c+"S":"")):"P0D"}var L=Ot.prototype;L.isValid=ei,L.abs=Ro,L.add=Wo,L.subtract=Ho,L.as=Go,L.asMilliseconds=Io,L.asSeconds=Eo,L.asMinutes=Uo,L.asHours=Vo,L.asDays=jo,L.asWeeks=zo,L.asMonths=Bo,L.asQuarters=$o,L.asYears=Ko,L.valueOf=Ao,L._bubble=Fo,L.clone=Zo,L.get=qo,L.milliseconds=Jo,L.seconds=Qo,L.minutes=Xo,L.hours=el,L.days=tl,L.weeks=sl,L.months=nl,L.years=al,L.humanize=dl,L.toISOString=Ft,L.toString=Ft,L.toJSON=Ft,L.locale=oa,L.localeData=da,L.toIsoString=Z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ft),L.lang=la,D("X",0,0,"unix"),D("x",0,0,"valueOf"),k("x",St),k("X",Os),W("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),W("x",function(e,t,n){n._d=new Date(Y(e))});return r.version="2.29.4",l(I),r.fn=p,r.min=qr,r.max=Jr,r.now=Qr,r.utc=y,r.unix=Do,r.months=No,r.isDate=w,r.locale=Se,r.invalid=_,r.duration=ce,r.isMoment=ee,r.weekdays=Yo,r.parseZone=To,r.localeData=pe,r.isDuration=Yt,r.monthsShort=Oo,r.weekdaysMin=Po,r.defineLocale=Jt,r.updateLocale=Dr,r.locales=Tr,r.weekdaysShort=Lo,r.normalizeUnits=oe,r.relativeTimeRounding=ol,r.relativeTimeThreshold=ll,r.calendarFormat=Si,r.prototype=p,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})});var Gt={};fn(Gt,{GenieHelpers:()=>xe});var je={};fn(je,{clearHistoryUrl:()=>vl,competitorData:()=>Tl,contentFeedback:()=>Rl,continueWriting:()=>Ol,createHistoryUrl:()=>Sa,expandOutline:()=>Yl,filterNlpKeywordsUrl:()=>xl,genieChat:()=>Ul,genieChatClear:()=>zl,genieChatList:()=>jl,genieChatSave:()=>Vl,genieImage:()=>Il,genieImageSave:()=>El,genieMode:()=>Ll,getLicenseToken:()=>Hl,historyData:()=>yl,keywordsData:()=>Dl,limitUsage:()=>Gl,nlpKeywords:()=>Jl,nlpKeywordsUrl:()=>Ml,oneClickBlog:()=>Pl,outlines:()=>bl,plagiarismData:()=>Nl,relatedKeywords:()=>ql,removeLicenseToken:()=>Fl,semanticKeywords:()=>Ql,storeApiUrl:()=>Wl,subscriptionUpdateUrl:()=>Al,topicalMap:()=>Xl,updateUsageUrl:()=>_l,webviewDataCreate:()=>Bl,webviewDataList:()=>Kl,webviewDeletePost:()=>$l,webviewGetBlogWizardData:()=>Zl,writeIntro:()=>Cl,writeTemplates:()=>kl,writeTitle:()=>Sl});var $=window.getGenie.config,z=$.parserApi,Ca=$.licenseApi,yl=$.historyApi+"list",Sa=$.historyApi+"create",vl=$.historyApi+"clear",_l=$.baseApi+"user_usage_log",kl=z+"writer-default/generate-templates-content",Cl=z+"writer-wizard/generate-intro",Sl=z+"writer-wizard/generate-title",bl=z+"writer-wizard/generate-outline",Ml=z+"writer-wizard/keyword-cluster",xl=z+"writer-wizard/filter-nlp-keyword",Dl=z+"writer-wizard/keyword-doctor",Tl=z+"writer-wizard/serp-data",Nl=z+"writer-wizard/plagiarism-checker",Ol=z+"advanced-writing/continue-writing",Yl=z+"advanced-writing/outline-expand",Ll=z+"advanced-writing/genie-mode",Pl=z+"writer-wizard/generate-one-click-blog",Rl=$.feedbackApi,Wl=$.storeApi+window.getGenie.blogWizardData?.post_id,Hl=Ca+"get-token",Fl=Ca+"remove-token",Gl=$.usageLimitStatsApi,Al=$.subscriptionUpgradeUrlApi,Il=z+"genie-image/generate-image",El=$.baseApi+"genie-image/upload",Ul=z+"chat/default",Vl=$.genieChatApi+"create",jl=$.genieChatApi+"list",zl=$.genieChatApi+"clear",Bl=$.webviewBaseApi+"save",$l=$.webviewBaseApi+"delete",Kl=$.webviewBaseApi+"list",Zl=$.webviewBaseApi+"doc_meta",ql=z+"writer-wizard/related-keywords",Jl=z+"writer-wizard/nlp-keywords",Ql=z+"writer-wizard/semantic-keywords",Xl=z+"writer-wizard/topical-map";var{notification:ba}=window.antd,ed=(o,r,l="",u="top")=>{let f=wp.data.select("getgenie").sidebar();ba.config({getContainer:()=>f.rootContainer,placement:u}),ba[o]({message:r,description:React.createElement("span",{dangerouslySetInnerHTML:{__html:l}}),duration:8,zIndex:999999})},mn=ed;var{Modal:lu}=window.antd;var xa=wl(Ma()),gn=class{storeTimeout={};callStoreApi(r,l){if(!!window.getGenie.blogWizardData?.post_id)if(window.getGenie.config.saveData)window.getGenie.config.saveData(r,l);else{let u=je.storeApiUrl+"/"+r+"/";fetch(u,{method:"POST",body:JSON.stringify(l),headers:{"Content-type":"application/json; charset=UTF-8","X-WP-Nonce":window.getGenie.config?.restNonce||""}})}}storeData=r=>{this.storeTimeout[r]&&clearTimeout(this.storeTimeout[r]),this.storeTimeout[r]=setTimeout(()=>{let l=wp.data.select("getgenie").getInputs();this.callStoreApi(r,l[r]||"")},3e3)};copyToClipboard(r){if(navigator?.clipboard&&window?.isSecureContext)return navigator.clipboard.writeText(r);{let l=document.createElement("textarea");return l.value=r,l.style.position="fixed",l.style.left="-999999px",l.style.top="-999999px",document.body.appendChild(l),l.focus(),l.select(),new Promise((u,f)=>{document.execCommand("copy")?u():f(),l.remove()})}}formatLargeNumber(r){if(r<1e3)return r;if(r>=1e3&&r<1e6)return+(r/1e3).toFixed(1)+"K";if(r>=1e6&&r<1e9)return+(r/1e6).toFixed(1)+"M";if(r>=1e9&&r<1e12)return+(r/1e9).toFixed(1)+"B";if(r>=1e12)return+(r/1e12).toFixed(1)+"T"}getDomainName(r){try{return new URL(r).hostname.split(".").slice(-2).join(".")}catch{return""}}saveSidebarControllerOption(r,l){!r||!l||(localStorage.setItem(r,JSON.stringify(l)),r=="getgenie-language"&&wp.data.dispatch("getgenie").setSidebar({currentLanguage:l}))}snakeToTitleCase=r=>r.replace(/^[_]*(.)/,(f,h)=>h.toUpperCase()).replace(/[_]+(.)/g,(f,h)=>" "+h.toUpperCase());camelCaseToTitleCase(r){let l=r.replace(/([A-Z])/g," $1").trim();return l.charAt(0).toUpperCase()+l.slice(1).toLowerCase()}hyphenatedToCamelCase(r){return r.replace(/-([a-z])/g,l=>l[1].toUpperCase())}joinArray(r,l="-"){return r&&r.length>1?r.join(l):""}sortObjArray(r,l){return r.last_nom<l.last_nom?-1:r.last_nom>l.last_nom?1:0}convertToSlug(r){return r?.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-")}getCurrentDateTime=r=>window.getGenie?.isPlayground?(0,xa.default)(r,"YYYY-MM-DD HH:mm:ssZ").format("YYYY-MM-DD, h:mm:ss A"):r;isExistDomain=r=>["shopify","wikipedia","youtube","amazon","aliexpress","walmart","alibaba","bookshop","etsy","flipkart","netflix","reddit","quora"].some(u=>r?.includes(u))},xe=new gn;var Et={};fn(Et,{BlurElement:()=>ss,Button:()=>Da,Card:()=>Pa,Collapse:()=>Ea,ConfirmModal:()=>$a,DrawerFooter:()=>Wa,DrawerHeader:()=>Va,DrawerWrapper:()=>Ja,ErrorModal:()=>Ka,Input:()=>Fa,Loading:()=>It,Modal:()=>Ta,Navbar:()=>ns,Notification:()=>mn,NumberInput:()=>Xa,Popover:()=>Ha,Select:()=>Oa,SkeletonCard:()=>yn,SkeletonSingle:()=>Ba,Slider:()=>es,Switch:()=>za,Table:()=>Qa,Textarea:()=>Ya,TitleMsg:()=>Ga,Tooltip:()=>At});var{Form:td,Button:nd}=window.antd,ad=({children:o,onClick:r,loading:l=!1,...u})=>React.createElement(td.Item,null,React.createElement(nd,{onClick:r,loading:l,...u},o)),Da=ad;var{Modal:sd}=window.antd,rd=({children:o,className:r,centered:l,closeIcon:u,footer:f,isModalVisible:h,setIsModalVisible:v,title:m="",closable:g=!0,onClose:w=C=>""})=>React.createElement(React.Fragment,null,React.createElement(sd,{className:r,title:m,open:h,closeIcon:u||React.createElement("span",{className:"getgenie-icon-close1"}),closable:g,zIndex:9999,onOk:()=>{v(!1)},onCancel:()=>{v(!1),w()},centered:l,footer:f},o)),Ta=rd;var{Tooltip:id}=window.antd,od=({title:o,placement:r,className:l="",color:u,...f})=>React.createElement(id,{className:"getgenie-tooltip-icon getgenie-icon-alert-circle",color:u,overlayStyle:{paddingLeft:"8px"},placement:r,...f,title:o,overlayClassName:l,zIndex:9999}),At=od;var ld=({size:o=25})=>React.createElement("div",{style:{width:`${o}px`,height:`${o}px`},className:"loading-icon"}),It=ld;var{ComposeComponents:dd}=window.getGenie.Components.Common.ReduxManager,{Select:Na,Form:cd}=window.antd,{Option:ud}=Na,{useEffect:hd}=window.React,fd=dd(({options:o,setInput:r,sidebar:l,getInputs:u,except:f=[],disableList:h=[],name:v="",defaultValue:m="",label:g="",placeholder:w="",className:C="",handleOnChange:S=()=>"",onSearch:y=()=>{},...M})=>{let d=o,N=_=>{S(_),r(v,_)},x=u[v]||m||null;return hd(()=>{r(v,x)},[l.currentTemplate]),f&&f.length>0&&(d=o.filter(_=>!f.includes(_.value)),f.includes(x)&&(x=d?.[0]?.value)),React.createElement(cd.Item,{label:g,className:C},React.createElement(Na,{showSearch:!0,value:x,placeholder:w,name:v,notFoundContent:M?.loading?React.createElement(It,{width:25}):null,suffixIcon:React.createElement("span",{className:"getgenie-icon-arrow_down"}),onChange:N,onSearch:y,onKeyDown:_=>_.stopPropagation(),filterOption:(_,F)=>F.children.toLowerCase().indexOf(_.toLowerCase())>=0,getPopupContainer:_=>_.parentNode,...M},d.map((_,F)=>React.createElement(ud,{key:F,disabled:h.includes(_.value),value:_.value},_.label))))},["setInput","getInputs","sidebar"]),Oa=fd;var{ComposeComponents:md}=window.getGenie.Components.Common.ReduxManager,{Input:pd,Form:gd}=window.antd,{useEffect:wd}=window.React,yd=md(({name:o="",setInput:r,sidebar:l,getInputs:u,className:f="",label:h="",defaultValue:v="",errorMessage:m="",...g})=>{let w=y=>{r(o,y.target.value)};wd(()=>{r(o,u[o]||v)},[]);let C=u[o]||v,S=l.languages.find(y=>y.value===l.currentLanguage)?.writingDirection;return React.createElement(gd.Item,{label:h,key:o,className:`genie-input ${f}`},React.createElement(pd.TextArea,{className:S,value:C,onChange:w,onKeyDown:y=>y.stopPropagation(),...g}))},["setInput","getInputs","sidebar"]),Ya=yd;var{Row:vd,Col:_d,Card:kd}=window.antd,{ComposeComponents:Cd}=window.getGenie.Components.Common.ReduxManager,{useState:Sd,useEffect:La}=window.React,bd=Cd(({list:o,children:r,column:l=1,handleClick:u,sidebar:f,setSidebar:h,skeleton:v=null,showActiveItem:m=!1,loading:g=!1,value:w="",...C})=>{let[S,y]=Sd(null),M=24/l;l>2?M=24/(l-2):l>1&&(M=24/(l-1)),La(()=>{if(m&&w){let x=o.findIndex(_=>_.title===w);x!==-1&&y(x+"-selected")}},[w]);let d=(x,_,F)=>{y(F+"-selected"),u&&u(x,_)};La(()=>{o.length===0&&y(null)},[o]);let N=f.languages.find(x=>x.value===f.currentLanguage)?.writingDirection;return v?React.createElement(v,null):React.createElement("div",{className:"getgenie-card"},React.createElement(vd,{gutter:16},o.map((x,_)=>React.createElement(_d,{xs:24,sm:M,xl:24/l,key:_,className:N},React.createElement(kd,{className:S&&S===_+"-selected"?"active":"",key:_,onClick:F=>d(F,x,_),...C},r(x,_))))))},["sidebar","setSidebar"]),Pa=bd;var{Button:Ra,Tooltip:bu}=window.antd,{ComposeComponents:Md}=window.getGenie.Components.Common.ReduxManager,xd=Md(({prevScreen:o=!0,nextScreen:r=!0,enableNextBtn:l=!1,handleNext:u=()=>"",handlePrev:f=()=>"",insertBtn:h="",sidebar:v})=>React.createElement("div",{className:`getgenie-sidebar-footer ${o&&"getgenie-sidebar-footer-grid"}`},o&&React.createElement(Ra,{type:"primary",onClick:f,className:"prevBtn"},React.createElement("span",{className:"getgenie-icon-arrow"})),React.createElement("div",{className:"btnGrp"},h,r&&React.createElement(Ra,{type:"primary",onClick:u,disabled:!l,className:"nextBtn"},v.__("Next","getgenie")))),["sidebar"]),Wa=xd;var{Popover:Dd}=window.antd,{useState:Td}=window.React,Nd=({children:o,placement:r="top",title:l="",content:u="",isVisible:f=!1,...h})=>{let[v,m]=Td(f);return React.createElement(Dd,{content:u,title:l,trigger:"click",placement:r,open:v,onOpenChange:w=>{m(w)},zIndex:99999,...h},o)},Ha=Nd;var{ComposeComponents:Od}=window.getGenie.Components.Common.ReduxManager,{Input:Yd,Form:Ld}=window.antd,{useEffect:Pd,useState:Rd}=window.React,Wd=Od(({name:o,sidebar:r,setInput:l,getInputs:u,autoComplete:f="off",className:h="",defaultValue:v="",label:m="",required:g=!1,errorMessage:w="",...C})=>{let[S,y]=Rd(!1),M=x=>{let _=x.target.value;l(o,_),_.length?y(!1):y(!0)};Pd(()=>{l(o,u[o]||v)},[]);let d=u[o]||v,N=r.languages.find(x=>x.value===r.currentLanguage)?.writingDirection;return React.createElement(Ld.Item,{className:`genie-input ${h} ${g&&S&&!d&&"ant-form-item-has-error"}`,label:m},React.createElement(Yd,{className:N,value:d,name:o,...C,onChange:M,onKeyDown:x=>x.stopPropagation()}),g&&S&&!d?React.createElement("p",{className:"ant-form-item-explain-error"},w):"")},["setInput","getInputs","sidebar"]),Fa=Wd;var{Typography:Hd,Tooltip:wn}=window.antd,De=wp.data.select("getgenie").sidebar(),Fd=({loading:o,title:r,list:l})=>{let{Text:u}=Hd;return React.createElement(React.Fragment,null,o?React.createElement(u,{className:"generateMsg"},De.__("Generating","getgenie")," ",r," "," ",React.createElement(u,{className:"resultNumber"},"....")):l.length>0&&(r==="title"?React.createElement(u,{className:"generateMsg"},React.createElement(wn,{title:De.__("Select a title and click next","getgenie"),placement:"top"},De.__("Generated","getgenie")," ",r," "," "),React.createElement("span",{className:"resultNumber"},l.length)):r==="intro"?React.createElement(u,{className:"generateMsg"},React.createElement(wn,{title:De.__("Select an intro and click next","getgenie"),placement:"top"},De.__("Generated","getgenie")," ",r," "," "),React.createElement("span",{className:"resultNumber"},l.length)):r==="outline"?React.createElement(u,{className:"generateMsg"},React.createElement(wn,{title:De.__("Edit or delete the existing headings. Also you can add more headings to the outline. Finally, click Insert.","getgenie"),placement:"top"},De.__("Selected","getgenie")," ",r," "," "),React.createElement("span",{className:"resultNumber"},l.length)):React.createElement(u,{className:"generateMsg"},De.__("Generated","getgenie")," ",r," "," ",React.createElement("span",{className:"resultNumber"},l.length))))},Ga=Fd;var{Collapse:Aa,Form:Gd}=window.antd,{Panel:Ad}=Aa,Ia=({children:o,...r})=>React.createElement(Gd.Item,null,React.createElement(Aa,{...r,expandIconPosition:"right",expandIcon:l=>React.createElement("span",{className:"getgenie-icon-arrow_down"})},o));Ia.Panel=({children:o,...r})=>React.createElement(Ad,{...r},o);var Ea=Ia;var{Button:Id,Col:Ua,Row:Ed}=window.antd,{ComposeComponents:Ud}=window.getGenie.Components.Common.ReduxManager,Ou=window.getGenie.config?.sidebar,Vd=Ud(({sidebar:o,setSidebar:r,getInputs:l,setInput:u,screenName:f=""})=>{let{imageUrl:h}=o,v=l.searchVolume,m=l.seoEnabled,g=()=>{u("seoEnabled",!m)},w=()=>{r({open:!1})};return React.createElement("div",{className:"getgenie-sidebar-header"},React.createElement(Ed,null,React.createElement(Ua,{span:20},React.createElement("img",{className:"main-logo",src:`${h}/logo_black.svg`,alt:"logo"}),["introScreen","outlineScreen","paragraphScreen"].includes(f)&&v?React.createElement(Id,{onClick:g,shape:"round",className:"getgenie-sidebar-header-seoBtn"},React.createElement("img",{src:`${h}/badge.png`,alt:"logo"}),"SEO ",m?o.__("Enabled","getgenie"):o.__("Disabled","getgenie")):React.createElement("div",{className:"empty-btn-space"})),React.createElement(Ua,{span:4,className:"getgenie-close-btn"},React.createElement("span",{onClick:w},React.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M10 1.00714L8.99286 0L5 3.99286L1.00714 0L0 1.00714L3.99286 5L0 8.99286L1.00714 10L5 6.00714L8.99286 10L10 8.99286L6.00714 5L10 1.00714Z",fill:"#323232"}))))))},["setSidebar","sidebar","getInputs","setInput"]),Va=Vd;var{Col:ja,Row:jd,Switch:zd}=window.antd,{ComposeComponents:Bd}=window.getGenie.Components.Common.ReduxManager,{useEffect:$d}=window.React,Kd=Bd(({getInputs:o,setInput:r,defaultChecked:l=!1,className:u="",name:f="",label:h="",...v})=>{let m=w=>{r(f,w)},g=o[f]||l;return $d(()=>{r(f,g)},[]),React.createElement(jd,{justify:"space-between",className:`getgenie-switch ${u}`},React.createElement(ja,{span:18,className:"label"},h),React.createElement(ja,{span:6,className:"switch"},React.createElement(zd,{name:f,checked:g,...v,onChange:m})))},["setInput","getInputs"]),za=Kd;var{Skeleton:Zd}=window.antd,qd=({count:o=2,...r})=>[...Array(o)].map((l,u)=>React.createElement(Zd.Button,{key:u,className:"getgenie-single-skeleton",active:!0,block:!0,shape:"default",...r})),Ba=qd;var{Card:Jd,Skeleton:Qd}=window.antd,Xd=({count:o=3})=>React.createElement("div",{className:"getgenie-card-skeleton"},[...Array(o)].map((r,l)=>React.createElement(Jd,{key:l,className:"getgenie-generated-outlines-card"},React.createElement(Qd,{active:!0})))),yn=Xd;var{Modal:ec}=window.antd,tc=(o="",r="",l=()=>"",u=()=>"")=>{let f=wp.data.select("getgenie").sidebar();ec.confirm({title:o,icon:React.createElement("span",{className:"anticon"},React.createElement("span",{className:"getgenie-icon-alert"})),content:r,okText:"Yes",cancelText:"No",className:"getgenie-confirm-modal",zIndex:99999,getContainer:()=>f.rootContainer,onOk(){l()},onCancel(){u()}})},$a=tc;var{Modal:nc}=window.antd,ac=({title:o,content:r})=>{let l=wp.data.select("getgenie").sidebar();nc.error({title:o,content:r,className:"getgenie-confirm-modal",getContainer:()=>l.rootContainer,zIndex:999999})},Ka=ac;var{useState:sc,useEffect:vn,useCallback:Za}=window.React,{Drawer:rc}=window.antd,{ComposeComponents:ic}=window.getGenie.Components.Common.ReduxManager,_n=null,kn=window.getGenie.config?.sidebar||{},qa=kn?.width||380,B={main:qa,generatedOutlines:280,analyzeKeywordScreen:350,keywordHeatMap:860,paragraphEditorScreen:350};delete kn?.width;var oc=ic(({children:o,sidebar:r,setSidebar:l,getInputs:u})=>{let[f,h]=sc(B.main),{open:v,generatedOutlines:m,analyzeKeyword:g}=r,w=u.headTohead||!1,C=!0;window.getGenie.config.wizardScreen==="post"&&r.component==="ScoreAnalysis"&&(C=!1),r.component==="GenieChat"?B.main=430:B.main=qa;let S=Za(N,[]),y=Za(M,[]);vn(()=>{l({width:f})},[f]);function M(x){!_n||(_n=!1,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",y))}function d(x){x.stopPropagation(),x.preventDefault(),document.addEventListener("mousemove",S),document.addEventListener("mouseup",y),_n=!0}function N(x){let _=document.body.offsetWidth-(x.clientX-document.body.offsetLeft),F=380,G=window.innerWidth*.8;_>F&&_<G&&h(_)}return vn(()=>{g.open&&!m.open&&h(B.main+B.analyzeKeywordScreen),m.open&&!g.open&&h(B.main+B.generatedOutlines),m.open&&g.open&&h(B.main+B.generatedOutlines+B.analyzeKeywordScreen),!m.open&&!g.open&&h(B.main),r.paragraphEditorScreen.open&&g.open&&h(B.main+B.analyzeKeywordScreen+B.paragraphEditorScreen),r.paragraphEditorScreen.open&&!g.open&&h(B.main+B.paragraphEditorScreen),w&&(l({analyzeKeyword:{...l.analyzeKeyword,open:!1},generatedOutlines:{...r.generatedOutlines,open:!1}}),h(B.main+B.keywordHeatMap))},[r.analyzeKeyword.open,r.generatedOutlines.open,r.paragraphEditorScreen.open,w]),vn(()=>{let x=document.querySelector("body"),_=r.rootContainer,{userAgent:F}=window.navigator,G=F.indexOf("Firefox")!=-1||F.indexOf("Safari")!=-1,V=K=>x.classList.contains(K);G&&(V("is-fullscreen-mode")||V("elementor-device-desktop")?_.classList.add("getgenie-browser-support"):V("wc-sass-manager")?_.classList.add("getgenie-browser-support-playground"):_.classList.remove("getgenie-browser-support"))},[r.open]),React.createElement(rc,{rootClassName:"getgenie-drawer",width:"auto",onClose:()=>l({open:!1}),open:v,closable:!1,mask:C,...kn,zIndex:1200,autoFocus:!1},o(f,B),React.createElement("div",{className:"getgenie-sidebar-draggable",onMouseDown:d}))},["sidebar","setSidebar","getInputs"]),Ja=oc;var{Table:lc}=window.antd,dc=({columns:o,dataSource:r,pagination:l=!1,rowData:u=()=>{}})=>React.createElement(lc,{sticky:!0,dataSource:r,columns:o,pagination:l,bordered:!0,onRow:u}),Qa=dc;var{ComposeComponents:cc}=window.getGenie.Components.Common.ReduxManager,{Input:uc,Form:hc}=window.antd,{useEffect:fc}=window.React,mc=cc(({name:o,setInput:r,getInputs:l,sidebar:u,handleOnChange:f=()=>"",defaultValue:h=1,max:v=null,label:m="",placeholder:g="",type:w="text",required:C=!1,errorMessage:S="",className:y="",...M})=>{let d=l[o]||h,N=_=>{isNaN(_)||v&&_>v||(f(_),r(o,_))};fc(()=>{N(l[o]||d)},[u.currentTemplate]);let x=_=>{if(M?.disabled||d===1&&_===-1)return;let F=parseInt(d)+parseInt(_);v&&F>v||(f(F),r(o,F))};return React.createElement(hc.Item,{initialValue:d,className:`NumberInput ${y}`,label:m,name:o,rules:[{required:C,message:S}]},React.createElement("span",{className:"getgenie-icon-minus icon",onClick:()=>x(-1)}),React.createElement(uc,{...M,type:w,placeholder:g,value:d,defaultValue:d,onChange:_=>N(_.target.value)}),React.createElement("span",{className:"getgenie-icon-plus icon",onClick:()=>x(1)}))},["setInput","getInputs","sidebar"]),Xa=mc;var{Slider:pc,Form:gc}=window.antd,{ComposeComponents:wc}=window.getGenie.Components.Common.ReduxManager,{useEffect:yc}=window.React,vc=wc(({label:o,name:r,setInput:l,getInputs:u,sidebar:f,defaultValue:h,message:v,handleOnChange:m=()=>"",className:g="",...w})=>{let C=w.max||5,S=w.min||1,y=N=>{m(N),l(r,N)};yc(()=>{l(r,u[r]||h)},[f.currentTemplate]);let M=u[r]||h,d=N=>`${N}/${C}`;return React.createElement(gc.Item,{label:o,className:"getgenie-slider "+g,name:r},React.createElement(pc,{style:{margin:0},min:S,max:C,...w,defaultValue:M,onChange:y,tooltip:{formatter:d}}))},["getInputs","setInput","sidebar"]),es=vc;var{Tabs:ts}=window.antd,{TabPane:Eu}=ts,_c=({tabPaneList:o=[],handleActiveKey:r=()=>"",activeKey:l="",destroyInactiveTabPane:u=!0,className:f="",...h})=>React.createElement("div",{className:`getgenie-navbar ${f}`},React.createElement(ts,{onChange:r,destroyInactiveTabPane:u,activeKey:l,items:o})),ns=_c;var{ComposeComponents:kc}=window.getGenie.Components.Common.ReduxManager,{Button:Cc,Typography:Sc}=window.antd,{useRef:bc,useState:as}=window.React,Mc=kc(({children:o,show:r=!1,top:l=0,left:u=0,text:f="",btnText:h="",href:v="#",textMargin:m=13})=>{let[g,w]=as(!1),[C,S]=as({top:0}),y=bc(null);return r?React.createElement("div",{className:"blur-element"},o,React.createElement("div",{className:"blur-element-content",ref:y,onMouseMove:x=>{if(y.current&&x.target.classList.contains("blur-element-content")){let _=y.current.getBoundingClientRect();S({top:x.clientY-_.top-50})}},onMouseOver:()=>{w(!0)},onMouseOut:()=>{w(!1)},style:{top:l,left:u,width:`calc(100% - ${u}px)`,height:`calc(100% - ${l}px)`}},g&&React.createElement("div",{className:"blur-element-text",style:{margin:m,...C}},React.createElement(Sc.Title,{level:4},f),React.createElement(Cc,{type:"primary",href:v,target:"_blank"},h)))):o}),ss=Mc;var xc={countries:[{label:"Global",value:"global"},{label:"Australia",value:2036},{label:"Canada",value:2124},{label:"India",value:2356},{label:"New Zealand",value:2554},{label:"South Africa",value:2710},{label:"United States (USA)",value:2840},{label:"United Kingdom",value:2826},{label:"Germany",value:2276},{label:"Portugal",value:2620},{label:"Spain",value:2724},{label:"Vietnam",value:2704},{label:"Indonesia",value:2360},{label:"Malaysia",value:2458},{label:"South Korea",value:2410},{label:"Japan",value:2392},{label:"China",value:2156},{label:"Turkey",value:2792},{label:"Ukraine",value:2804},{label:"Italy",value:2380},{label:"France",value:2250},{label:"Poland",value:2616},{label:"Netherland",value:2528},{label:"Lithuania",value:2440},{label:"Hungary",value:2348},{label:"Denmark",value:2208},{label:"Czechia",value:2203},{label:"Thailand",value:2764},{label:"Latvia",value:2428},{label:"Slovakia",value:2703},{label:"Greece",value:2300},{label:"Sweden",value:2752},{label:"Saudi Arabia",value:2682},{label:"Russia",value:2643},{label:"Bulgaria",value:2100},{label:"Mexico",value:2484},{label:"Norway",value:2578},{label:"Pakistan",value:2586},{label:"Israel",value:2376}],languages:[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"de",label:"German"}],outputSizes:[{label:"Small",value:"sm"},{label:"Medium",value:"md"},{label:"Large",value:"lg"}],maxToken:[{label:"Small",value:200},{label:"Medium",value:400},{label:"Large",value:1200}],chatCharacters:[{label:"Professional Writer",value:"professional-writer"},{label:"General Purpose",value:"general-purpose"},{label:"Standup Comedian",value:"standup-comedian"},{label:"Life Coach",value:"life-coach"},{label:"Career Counselor",value:"career-counselor"},{label:"Nutritionist",value:"nutritionist"},{label:"Product Manager",value:"product-manager"},{label:"Personal Trainer",value:"personal-trainer"},{label:"Life Hacker",value:"life-hacker"},{label:"Travel Advisor",value:"travel-advisor"},{label:"Mindfulness Coach",value:"mindfulness-coach"},{label:"Financial Advisor",value:"financial-advisor"},{label:"Language Tutor",value:"language-tutor"},{label:"Travel Guide",value:"travel-guide"},{label:"Marketing Expert",value:"marketing-expert"},{label:"Software Developer",value:"software-developer"},{label:"Dating Coach",value:"dating-coach"},{label:"DIY Expert",value:"diy-expert"},{label:"Journalist",value:"journalist"},{label:"Tech Writer",value:"tech-writer"},{label:"Pro Chef",value:"professional-chef"},{label:"Pro Salesperson",value:"professional-salesperson"},{label:"Startup Tech Lawyer",value:"startup-tech-lawyer"},{label:"Email Copywriter",value:"email-copywriter"}]},Be=xc;var{HandleFetch:Dc}=window.getGenie.Components.Common.RequestManager,{ComposeComponents:Tc}=window.getGenie.Components.Common.ReduxManager,{Tooltip:Nc}=window.antd,Oc=Tc(({content:o,listName:r,getInputs:l,setInput:u,creativityLevel:f,input:h,sidebar:v,contentType:m=""})=>{let g=(w,C)=>{let S,y=l[r];if(w==="like"){if(y.find(d=>d.title===C&&d.like))return;S=y.map(d=>d.title===C?{...d,like:!0,dislike:!1}:d)}else{if(y.find(d=>d.title===C&&d.dislike))return;S=y.map(d=>d.title===C?{...d,dislike:!0,like:!1}:d)}u(r,S);let M={input:h,output:C,creativity_level:f,feedback_type:w,template_name:m||v.currentTemplate||"unknown",request_hash:v.requestId};Dc(d=>{},"contentFeedback",M)};return React.createElement(Nc,{placement:"bottomRight",title:"Is the output good?"},React.createElement("div",{className:"getgenie-giving-feedback",onClick:w=>w.stopPropagation()},React.createElement("span",{onClick:()=>g("like",o.title)},React.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fill:`${o.like?"#0FA958":"none"}`,d:"M7.81833 4.16667H5.83333V2.08333C5.83333 1.86232 5.74554 1.65036 5.58926 1.49408C5.43298 1.3378 5.22101 1.25 5 1.25H4.96042C4.75208 1.25 4.58333 1.41875 4.58333 1.62708C4.58333 1.92458 4.49542 2.21542 4.33 2.46292L2.91667 4.58333V8.33333L4.48375 8.725C4.55 8.74167 4.61792 8.75 4.68583 8.75H6.35958C6.51444 8.75007 6.66626 8.70699 6.798 8.62559C6.92974 8.54419 7.03619 8.42769 7.10542 8.28917L8.56375 5.3725C8.62724 5.24545 8.6572 5.10428 8.65079 4.9624C8.64438 4.82052 8.60182 4.68263 8.52714 4.56182C8.45246 4.44101 8.34814 4.34129 8.22408 4.27213C8.10003 4.20298 7.96036 4.16667 7.81833 4.16667Z"}),React.createElement("path",{d:"M5.83333 4.16667H7.81833C7.96036 4.16667 8.10003 4.20298 8.22408 4.27213C8.34814 4.34129 8.45246 4.44101 8.52714 4.56182C8.60182 4.68263 8.64438 4.82052 8.65079 4.9624C8.6572 5.10428 8.62724 5.24545 8.56375 5.3725L7.10542 8.28917C7.03619 8.42769 6.92974 8.54419 6.798 8.62559C6.66626 8.70699 6.51444 8.75007 6.35958 8.75H4.68583C4.61792 8.75 4.55 8.74167 4.48375 8.725L2.91667 8.33333M5.83333 4.16667V2.08333C5.83333 1.86232 5.74554 1.65036 5.58926 1.49408C5.43298 1.3378 5.22101 1.25 5 1.25H4.96042C4.75208 1.25 4.58333 1.41875 4.58333 1.62708C4.58333 1.92458 4.49542 2.21542 4.33 2.46292L2.91667 4.58333V8.33333M5.83333 4.16667H5M2.91667 8.33333H2.08333C1.86232 8.33333 1.65036 8.24554 1.49408 8.08926C1.3378 7.93298 1.25 7.72101 1.25 7.5V5C1.25 4.77899 1.3378 4.56702 1.49408 4.41074C1.65036 4.25446 1.86232 4.16667 2.08333 4.16667H3.125",stroke:"#0FA958",strokeLinecap:"round",strokeLinejoin:"round"}))),React.createElement("span",{onClick:()=>g("dislike",o.title)},React.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fill:`${o.dislike?"#EA4646":"none"}`,d:"M2.18166 5.83333H4.16625V7.91667C4.16625 8.13768 4.25404 8.34964 4.41032 8.50592C4.5666 8.6622 4.77857 8.75 4.99958 8.75H5.03958C5.24791 8.75 5.41666 8.58125 5.41666 8.37333C5.41666 8.07542 5.50458 7.78458 5.67 7.53667L7.08333 5.41667L7.08291 1.66667L5.51625 1.275C5.45016 1.25844 5.38229 1.25004 5.31416 1.25H3.64C3.48521 1.25001 3.33348 1.29312 3.20182 1.37452C3.07016 1.45591 2.96377 1.57237 2.89458 1.71083L1.43625 4.6275C1.37276 4.75455 1.3428 4.89572 1.34921 5.0376C1.35562 5.17948 1.39818 5.31737 1.47286 5.43818C1.54754 5.55899 1.65186 5.65871 1.77591 5.72787C1.89997 5.79702 2.03964 5.83333 2.18166 5.83333Z"}),React.createElement("path",{d:"M7.08291 1.66667L5.51625 1.275C5.45016 1.25844 5.38229 1.25004 5.31416 1.25H3.64C3.48521 1.25001 3.33348 1.29312 3.20182 1.37452C3.07016 1.45591 2.96377 1.57237 2.89458 1.71083L1.43625 4.6275C1.37276 4.75455 1.3428 4.89572 1.34921 5.0376C1.35562 5.17948 1.39818 5.31737 1.47286 5.43818C1.54754 5.55899 1.65186 5.65871 1.77591 5.72787C1.89997 5.79702 2.03964 5.83333 2.18166 5.83333H4.16666H5M7.08291 1.66667L7.08333 5.41667L5.67 7.53667C5.50458 7.78458 5.41666 8.07542 5.41666 8.37333C5.41666 8.58125 5.24791 8.75 5.03958 8.75H4.99958C4.77857 8.75 4.5666 8.6622 4.41032 8.50592C4.25404 8.34964 4.16625 8.13768 4.16625 7.91667V5.83333M7.08291 1.66667H7.91666C8.13768 1.66667 8.34964 1.75446 8.50592 1.91074C8.6622 2.06702 8.75 2.27899 8.75 2.5V5C8.75 5.22101 8.6622 5.43298 8.50592 5.58926C8.34964 5.74554 8.13768 5.83333 7.91666 5.83333H6.875",stroke:"#EA4646",strokeLinecap:"round",strokeLinejoin:"round"})))))},["setInput","getInputs","sidebar"]),Cn=Oc;var $e=class{content="";constructor(r=""){this.content=r}escapeRegExp(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}findAllMatch(r=this.content,l=[]){let u=[];for(let f=0;f<l.length;f++){let h=l[f],v=this.findSingleMatch(r,h);u.push({keyword:h,count:v})}return u}findSingleMatch(r=this.content,l=""){let h=this.escapeRegExp(l).split(" ").join(String.raw`(\s+\w+\s+|\s+)`),v=r?.match(new RegExp(h,"gmi"));return v&&v.length>0?v.length:0}};var ht=class{constructor(r,l,u){this.ContentAnalysis=r,this.KeywordFinder=l,this.GenieHelpers=u}getDomainName(r){try{return new URL(r).hostname.split(".").slice(-2).join(".")}catch{return""}}saveCompetitor=r=>{this.GenieHelpers.callStoreApi("serpData",{competitorData:r})};getNlpKeywords=async(r,l,u,f)=>new Promise((h,v)=>{let m=window.getGenie.config,g={method:"POST",headers:{"Content-type":"application/json; charset=UTF-8","Site-Token":m?.siteToken||"","Auth-Token":m?.authToken||"","X-WP-Nonce":m?.restNonce||"","Plugin-Version":m?.version}};(async()=>{let w=u||[],C=[];for(let M of l){g.body=JSON.stringify({textContent:M?.textContent,requestId:M?.requestId});let N=await(await fetch(f,g)).json();for(let x of N?.data||[])C.push(x[0].toLowerCase())}C=[...new Set(C)],g.body=JSON.stringify({mainKeywords:u.length===0?[r]:u.map(M=>M?.keyword||"").slice(0,10),nlpKeywords:C});let S=await fetch(je.filterNlpKeywordsUrl,g).catch(M=>h(w));if(!S.ok){h(w);return}let y=await S.json();try{let M=(y?.data||C)?.map(d=>({keyword:Array.isArray(d)?d[0]:d,type:"nlp"}));w=[...w,...M||[]],w=w.filter((d,N,x)=>N===x.findIndex(_=>_?.keyword===d?.keyword)),h(w)}catch(M){h(w),console.log(M)}})()});analyze=async(r,l)=>new Promise((u,f)=>{let h=[],v={},m={},g=new this.KeywordFinder,w=0,C=0,S=0,y=0;for(let d of r){let N=this.getDomainName(d?.url),_=new this.ContentAnalysis({content:d?.source,url:N,title:d?.title,description:d?.description},l).getStat(),F=g.findAllMatch(d?.source,Object.keys(l.keywords));m[d.keySlug]={url:d.url,title:d.title,rank:y,favicon:d.favicon};for(let V of F)!l.keywords?.[V.keyword]?.total||(v[V.keyword]?v[V.keyword].heatMap[d.keySlug]={matchedKeyPhrase:V.count}:v[V.keyword]={keyPhrase:V.keyword,recommendation:l.keywords?.[V.keyword]?.total,heatMap:{[d.keySlug]:{matchedKeyPhrase:V.count}}});if(y++,d.title==="myContent")continue;let G=parseFloat(_.contentStats.totalScore);h.push({url:d.url,statistics:_.statistics,score:parseInt(Math.ceil(G))||0}),C<G&&(C=parseInt(Math.ceil(G))||0),S+=G}w=Math.ceil(S/h.length-1),w=parseInt(w)||0;let M={headToHeadData:{serpDomains:m,statistics:v},analyzedCompetitors:h,avgScore:w,maxScore:C,firstCompetitorScore:h?.[1]?.score||0};u(M)})};var{Libs:Yc,Utilities:Sh}=window.getGenie.Components.Common,{ComposeComponents:Lc}=window.getGenie.Components.Common.ReduxManager,{Sidebar:cs,BlogWizardUtils:Sn}=window.getGenie.Components,{OutlineScreen:rs,ParagraphGenerator:is,AnalyzeKeywordScreen:os,KeywordHeatMap:ls}=cs||{},{Col:ds}=window.antd,{useEffect:Ke}=window.React,bh=Lc(({sidebar:o,setSidebar:r,setInput:l,getInputs:u})=>{let f=window.getGenie.blogWizardData,h=window.getGenie.config.isBlockEditor||window.getGenie.config.wizardScreen==="post",{open:v,generatedOutlines:m,analyzeKeyword:g,paragraphEditorScreen:w}=o;Ke(()=>{o.open?document.body.classList.add("genie-sidebar-open"):document.body.classList.contains("genie-sidebar-open")&&document.body.classList.remove("genie-sidebar-open"),navigator?.platform==="Win32"&&document.body.classList.add("genie-scrollbar-windows")},[o.open]),Ke(()=>{if(!h)return;u.seoEnabled?u.searchVolume&&o.component=="BlogScreen"&&r({analyzeKeyword:{...o.analyzeKeyword,open:!0}}):r({analyzeKeyword:{...o.analyzeKeyword,open:!1,loading:!1}})},[u.searchVolume,u.seoEnabled,o.component]),Ke(()=>{if(!h)return;let M=wp.data.select("core/editor")?.getEditedPostContent();if(M){let d=wp.data.select("core/editor")?.getEditedPostAttribute("title");d&&!M.includes(d)&&(M=`<h1>${d}</h1>`+M),r({currentPostContent:M})}if(!(!f||Object.values(f).filter(Boolean).length<2)){r({component:"BlogScreen",currentTemplate:"blogWizard"});for(let[d,N]of Object.entries(f))if(!(!N||d=="post_id"))if(d==="keywordData"){if(N&&Object.values(N).length>0)for(let[x,_]of Object.entries(N))l(x,_)}else if(d==="serpData"){if(N&&Object.values(N).length>0)for(let[x,_]of Object.entries(N))x==="statisticsData"?r({statisticsData:_}):l(x,_)}else JSON.parse(localStorage.getItem("getgenie-"+d))||l(d,N)}},[]),Ke(()=>{if(!h)return;let M=o.statisticsData,d=o.currentPostContent;if(!Array.isArray(M?.keywords)&&Sn&&M){let N="",x="";document.getElementsByClassName("block-editor__container")?.length>0?(N=wp.data.select("core/editor")?.getEditedPostAttribute("title"),x=wp.data.select("core/editor")?.getEditedPostAttribute("excerpt")):document.getElementById("wp-content-editor-container")&&(N=document.getElementById("title")?.value,x=document.getElementById("excerpt")?.value),o.currentPostTitle&&(N=o.currentPostTitle),o.currentPostDescription&&(x=o.currentPostDescription);let _={content:d,url:location.origin,title:N,description:x},F=new Sn.ContentAnalysis(_,M),G=o.competitorStats;if(G?.headToHeadData?.statistics){let V=new $e;for(let K of Object.keys(G?.headToHeadData?.statistics)){let ee=V.findSingleMatch(d,K);G.headToHeadData.statistics[K]?.heatMap?.myContent_0||(G.headToHeadData.statistics[K].heatMap.myContent_0={matchedKeyPhrase:0}),G.headToHeadData.statistics[K].heatMap.myContent_0.matchedKeyPhrase=ee}}r({analyzedContent:F.getStat(),competitorStats:G})}},[o.statisticsData,o.currentPostContent]),Ke(()=>{let M=o.component==="BlogScreen"&&o.currentScreen==="paragraphScreen";r({paragraphEditorScreen:{...o.paragraphEditorScreen,open:M}})},[o.component,o.currentScreen]),Ke(()=>{(async()=>{let M=u.competitorData;if(!M||!o.statisticsData||Object.values(o.statisticsData).length===0)return;let d={source:o.currentPostContent,url:location.hostname||"myContent.com",title:"myContent",keySlug:"myContent_0",rank:0,favicon:"default"},N=new ht(Sn.ContentAnalysis,$e),x=(M||[]).filter(F=>!xe.isExistDomain(F?.url)).slice(0,10),_=await N.analyze([d,...x],o.statisticsData);r({competitorStats:_})})()},[o.statisticsData,u.competitorData]);let C=cs[o.component]||(()=>""),S=u.headTohead||!1,y=(M,d)=>{let N=M-(g.open?d.analyzeKeywordScreen:0)-(m.open?d.generatedOutlines:0)-(S?d.keywordHeatMap:0)-(w.open?d.paragraphEditorScreen:0);return N>=d.main?N:d.main};return React.createElement(Yc.DrawerWrapper,null,(M,d)=>React.createElement("div",{className:"getgenie-sidebar-content"},React.createElement(ds,{className:"extended-panel"},os&&React.createElement(os,{visible:o.open&&g.open,width:d.analyzeKeywordScreen}),rs&&React.createElement(rs.GeneratedOutlines,{visible:o.open&&m.open,width:d.generatedOutlines}),is&&React.createElement(is,{visible:o.open&&w.open,width:d.paragraphEditorScreen}),ls&&React.createElement(ls,{visible:o.open&&S,width:d.keywordHeatMap})),React.createElement(ds,{className:"wizard-screen",style:{width:`${y(M,d)}px`}},React.createElement(C,null))))},["sidebar","setSidebar","setInput","getInputs"]);var{Alert:Pc}=window.antd,Rc=wp.data.select("getgenie").sidebar(),Wc=()=>window.getGenie.config?.siteToken?"":React.createElement("div",{className:"getgenie-license-alert",style:{padding:"10px"}},React.createElement(Pc,{style:{borderRadius:"2px",padding:"15px"},message:React.createElement("a",{style:{color:"#357ab5",fontWeight:500},href:`${window.getGenie.config?.siteUrl}/wp-admin/admin.php?page=getgenie#license`},Rc.__("Please activate your license","getgenie")),type:"warning",showIcon:!0})),bn=Wc;var{Libs:ft,Utilities:Mn}=window.getGenie.Components.Common,{HandleFetch:us}=window.getGenie.Components.Common.RequestManager,{ComposeComponents:Hc}=window.getGenie.Components.Common.ReduxManager,{useEffect:Fc,useState:hs}=window.React,{Button:Gc,Typography:Ac}=window.antd,Dh=Hc(({setSidebar:o,setUserHistoryData:r,userHistoryData:l})=>{let[u,f]=hs(1),[h,v]=hs(!1),m=(S=1)=>{v(!0),us(y=>{v(!1);let M=(y.data?.history||[]).filter(N=>N?.templateTitle),d=S===1?M:[...l.allHistory,...M];r({allHistory:d,isCallable:!1,hasMoreData:y?.data?.total_pages!=S})},"historyData",{page:S})};Fc(()=>{l.isCallable&&m()},[]);let g=S=>{f(u+1),m(S)},w=(S,y)=>{o({component:"UserHistoryDetails"}),r({currentHistoryData:y})},C=()=>{ft.ConfirmModal("You're clearing/removing all historical data of your GetGenie usage.","Are you sure you want to remove them?",()=>{us(S=>{r({allHistory:[]})},"clearHistoryUrl")})};return React.createElement("div",{className:"getgenie-history getgenie-history-sidebar-content"},React.createElement(ft.DrawerHeader,null),React.createElement("div",{className:"getgenie-history-card-container"},l.allHistory?.length>0?React.createElement(React.Fragment,null,React.createElement(Gc,{onClick:C,type:"primary",className:"history-action-btn clear"},"Clear History"),React.createElement(ft.Card,{list:l?.allHistory,handleClick:w},S=>React.createElement(React.Fragment,null,React.createElement("div",{className:"card-container"},React.createElement("div",{className:"card-heading"},React.createElement("div",{className:"date"},React.createElement("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M11.6667 2.33334H2.33333C1.59695 2.33334 1 2.9303 1 3.66668V13C1 13.7364 1.59695 14.3333 2.33333 14.3333H11.6667C12.403 14.3333 13 13.7364 13 13V3.66668C13 2.9303 12.403 2.33334 11.6667 2.33334Z",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M9.66675 1V3.66667",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M4.33325 1V3.66667",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M1 6.33334H13",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),React.createElement("span",{className:"date-info"},Mn.GenieHelpers.getCurrentDateTime(S?.date))),React.createElement("h3",{"data-slug":S?.templateSlug},Mn.GenieHelpers.camelCaseToTitleCase(S?.templateTitle))),React.createElement("div",{className:"card-body"},Object.keys(S.input).map((y,M)=>S.input[y]&&React.createElement("p",{key:M}," ",React.createElement("strong",null,Mn.GenieHelpers.camelCaseToTitleCase(y),": "),S.input[y]))))))):h?"":React.createElement(Ac.Title,{level:5,className:"getgenie-not-found-title"},"No record found!"),h?React.createElement(ft.SkeletonCard,{count:5}):"",l.hasMoreData&&l.allHistory?.length?React.createElement(ft.Button,{onClick:()=>g(u+1)},"Load More"):""))},["setSidebar","setUserHistoryData","userHistoryData"]);var{Libs:Ic,Utilities:Ze}=window.getGenie.Components.Common,{Card:Ec,Tooltip:fs,Button:Uc}=window.antd,{ComposeComponents:Vc}=window.getGenie.Components.Common.ReduxManager,{useState:ms}=window.React,Nh=Vc(({setSidebar:o,userHistoryData:r})=>{let[l,u]=ms(r.currentHistoryData),[f,h]=ms(null),v=(m,g)=>{let w="";typeof m=="string"?w=m.replace(/<br\s*[\/]?>/g,`
`):Array.isArray(m)&&(w=m.join(",").replace(/<br\s*[\/]?>/g,`
`)),Ze.GenieHelpers.copyToClipboard(w).then(()=>{h(g),setTimeout(()=>{h(null)},3e3)}).catch(()=>console.log("error"))};return React.createElement(React.Fragment,null,React.createElement(Ic.DrawerHeader,null),React.createElement("div",{className:"getgenie-history getgenie-history-sidebar-content details"},React.createElement("div",{className:"getgenie-history-card-container"},React.createElement("div",{className:"getgenie-card"},React.createElement(Uc,{onClick:()=>o({component:"UserHistory"}),type:"primary",className:"history-action-btn back"},React.createElement("span",{className:"getgenie-icon-arrow-left"})),React.createElement(Ec,{className:"getgenie-history-card-detail"},React.createElement("div",{className:"date"},React.createElement("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M11.6667 2.33334H2.33333C1.59695 2.33334 1 2.9303 1 3.66668V13C1 13.7364 1.59695 14.3333 2.33333 14.3333H11.6667C12.403 14.3333 13 13.7364 13 13V3.66668C13 2.9303 12.403 2.33334 11.6667 2.33334Z",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M9.66675 1V3.66667",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M4.33325 1V3.66667",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),React.createElement("path",{d:"M1 6.33334H13",stroke:"#57595F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),React.createElement("span",{className:"date-info"},Ze.GenieHelpers.getCurrentDateTime(l?.date))),React.createElement("h3",{className:"getgenie-history-title"},Ze.GenieHelpers.camelCaseToTitleCase(l?.templateTitle)),React.createElement("div",{className:"getgenie-history-inputs"},Object.keys(l?.input||{}).map((m,g)=>l.input[m]?Array.isArray(l.input[m])?React.createElement("div",{key:g},React.createElement("h4",null,Ze.GenieHelpers.camelCaseToTitleCase(m),":"),React.createElement("div",{className:"getgenie-history-inputs-keywords"},l.input[m].map((w,C)=>React.createElement("p",{key:C}," ",w)))):React.createElement("div",{key:g,className:"getgenie-history-inputs-details"},React.createElement("h4",null,Ze.GenieHelpers.camelCaseToTitleCase(m),":"),React.createElement("p",null,l.input[m])):"")),React.createElement("div",{className:"output-heading"},React.createElement("h4",null,"Outputs:"),Object.entries(l?.usage||{}).map((m,g)=>React.createElement("h5",{key:g},Ze.GenieHelpers.snakeToTitleCase(m?.[0]),": ",m?.[1]))),React.createElement("div",{className:"getgenie-history-card-container-details"},(Array.isArray(l.output)?l.output:[]).map((m,g)=>React.createElement("div",{key:g},l.templateSlug==="keyword-analysis"?React.createElement(fs,{key:g,title:f===g?"Copied":"Click to copy",trigger:"hover",placement:"left"},React.createElement("div",{className:"getgenie-history-keyword-output",onClick:w=>v(w.target.closest("div.getgenie-history-keyword-output")?.innerText,g)},React.createElement("span",{style:{display:"block"}},React.createElement("strong",null,"keyword: "),m.keyword),React.createElement("div",{className:"getgenie-history-search-volume"},React.createElement("strong",null,"Search volume: "),React.createElement("div",null,React.createElement("span",null,"Average in 12 month:"),React.createElement("span",null,m?.searchVolume?.avg12Month)),React.createElement("div",null,React.createElement("span",null,"Competition:"," "),React.createElement("span",null,m?.searchVolume?.competition)),React.createElement("div",null,React.createElement("span",null,"CPC:"," "),React.createElement("span",null,m?.searchVolume?.cpc?.currency+m?.searchVolume?.cpc?.value)),React.createElement("div",null,React.createElement("span",null,"Highest:"," "),React.createElement("span",null,m?.searchVolume?.highest)),React.createElement("div",null,React.createElement("span",null,"Last month:"," "),React.createElement("span",null,m?.searchVolume?.lastMonth)),React.createElement("div",null,React.createElement("span",null,"Lowest:"," "),React.createElement("span",null,m?.searchVolume?.lowest)),React.createElement("div",null,React.createElement("span",null,"Total:"," "),React.createElement("span",null,m?.searchVolume?.total," "))))):m?React.createElement(fs,{key:g,title:f===g?"Copied":"Click to copy",trigger:"hover",placement:"left"},React.createElement("div",{className:"getgenie-history-keyword-output",onClick:()=>v(m,g)},React.createElement("div",{dangerouslySetInnerHTML:{__html:m}}))):"No output found!"))))))))},["setSidebar","userHistoryData"]);var{Alert:jc}=window.antd,{HandleFetch:zc}=window.getGenie.Components.Common.RequestManager,{ComposeComponents:Bc}=window.getGenie.Components.Common.ReduxManager,{useEffect:$c,useState:Kc}=window.React,Zc=Bc(({getInputs:o,type:r="",names:l=[],showIcon:u=!0,color:f="#263e87",backgroundColor:h="#bffdff",sidebar:v})=>{let[m,g]=Kc(null);$c(()=>{if(r=="promotionalNotice"){let C=v.subscriptionStatistics.usagePercentage?.word_generate,S=document.cookie.split(";").filter(y=>y.includes(`getgenie_${r}`));C&&C>=80&&S.length===0&&zc(y=>{y?.status=="success"&&g(React.createElement("div",{dangerouslySetInnerHTML:{__html:y?.data.message}}))},"subscriptionUpdateUrl")}},[v.subscriptionStatistics.usagePercentage]);let w=()=>{let C=new Date;C.setTime(C.getTime()+30*24*60*60*1e3);let S="expires="+C.toUTCString();document.cookie=`getgenie_${r}=1;${S};path=/`};return m?React.createElement("div",{style:{marginBottom:"20px"}},React.createElement(jc,{closable:!0,closeIcon:React.createElement(At,{title:"Close notice for 30 days"},React.createElement("span",{className:"getgenie-icon-close1"})),afterClose:w,style:{backgroundColor:h,color:f},className:"getgenie_promotional_message",message:m,type:"info",showIcon:!1})):""},["sidebar","getInputs"]),xn=Zc;var{Libs:Dn}=window.getGenie.Components.Common,Tn=wp.data.select("getgenie").sidebar(),qc=({newChatHandler:o=void 0,setShowChatList:r=void 0,resetChatHistory:l=void 0})=>React.createElement(React.Fragment,null,o&&React.createElement(Dn.Button,{type:"primary",onClick:o},React.createElement("span",{className:"getgenie-icon-plus"}),Tn.__("New Chat","getgenie")),r&&React.createElement(Dn.Button,{type:"primary",onClick:()=>{r(!0)}},Tn.__("Chat History","getgenie")),l&&React.createElement(Dn.Button,{type:"primary",onClick:l},React.createElement("span",{className:"getgenie-icon-reload"}),Tn.__("Clear All","getgenie"))),mt=qc;var{Libs:Nn,Utilities:Jc}=window.getGenie.Components.Common,{Alert:Qc}=window.antd,{HandleFetch:Xc}=window.getGenie.Components.Common.RequestManager,eu=({oldChatList:o,loading:r,setAllChatData:l,setShowChatList:u,newChatHandler:f,resetChatHistory:h,setOldChatList:v})=>{let m=(w,C)=>{window.getGenie.genieChat={id:C.id},l(C?.messages),u(!1)},g=(w,C)=>{w.stopPropagation();let S=o.filter(y=>y.id!==C);Nn.ConfirmModal("You're removing the selected conversation.","Are you sure you want to remove it?",()=>{v(S),Xc(y=>{},"genieChatClear",{id:C})})};return React.createElement("div",{className:"chat-list"},React.createElement("div",{className:"chat-list-buttons"},React.createElement(mt,{newChatHandler:f,resetChatHistory:o.length>0?h:null})),r?React.createElement(Nn.SkeletonCard,{count:5}):React.createElement(React.Fragment,null,React.createElement(Nn.Card,{list:o,handleClick:m},w=>React.createElement(React.Fragment,null,React.createElement("div",{className:"card-container"},React.createElement("div",{className:"card-heading"},React.createElement("h5",null,w?.messages?.[0]?.content),React.createElement("p",null,Jc.GenieHelpers.getCurrentDateTime(w?.date))),React.createElement("div",{className:"trash-icon"},React.createElement("span",{className:"getgenie-icon-trash trash",onClick:C=>g(C,w?.id)}))))),o?.length===0&&React.createElement(Qc,{className:"no-chat-found",message:"Woops! No chat found.",description:"Create a new chat to start a conversation.",type:"warning"})))},ps=eu;var{useEffect:qe,useState:_e,useRef:gs}=window.React,{HandleFetch:Je,HandleResponse:tu}=window.getGenie.Components.Common.RequestManager,{ComposeComponents:nu}=window.getGenie.Components.Common.ReduxManager,{Libs:Te}=window.getGenie.Components.Common,{Row:au,Col:ws,Button:On,Tooltip:Ut}=window.antd,ys=`${window.getGenie.config.assetsUrl}dist/admin/images/genie-head.svg`,su=`${window.getGenie.config.assetsUrl}dist/admin/images/genie-chat.svg`,ru=`${window.getGenie.config.assetsUrl}dist/admin/audio/click.mp3`,Yn,Uh=nu(({sidebar:o,getInputs:r,setInput:l})=>{let u=gs(null),f=gs(null),h=r.inputMessage||"",[v,m]=_e(""),[g,w]=_e([]),[C,S]=_e(!1),[y,M]=_e(!0),[d,N]=_e(null),[x,_]=_e(null),[F,G]=_e(!1),[V,K]=_e([]),ee={"Write a poem about...":"Write a poem about...","Write a blog post for...":"Write a blog post for...","Help me to create a short story about...":"Help me to create a short story about..."},pt={"Email Subject Line":"Write an engaging email subject line about [your product/service].","Email Preheader":"Write an email preheader about [your product/service], that increases open rate.","Email Body Content":"Write the email copy for the email body about [your product/service] that convinces the potential customers."},Z=g.length===0,[gt,Qe]=_e(!1),se=window.getGenie.config.wizardScreen==="fluentcrm"?pt:ee,Xe=()=>{Qe(!0),Je(b=>{Qe(!1);let R=b.data?.getgenie_chats||[];K(R)},"genieChatList")};qe(()=>{Xe()},[]);let Re=()=>{if(l("inputMessage",null),h!==""){let b=h.replace(/\n$/,""),R=[...g,{id:g.length,role:"user",content:b}];w(R),Ne(R)}},et=b=>{if(C&&b.key==="Enter"){b.stopPropagation();return}b.key==="Enter"&&b.shiftKey||(b.key=="Enter"||b?.which==13)&&Re()},tt=b=>{f.current&&(f.current.innerText=v,l("inputMessage",v)),_(b)},Vt=b=>{g.splice(b);let R=[...g,{id:g.length,role:"user",content:Yn}];w(R),wt(),Ne(R)},wt=()=>{f.current.contentEditable=!1,f.current.innerText=v,_(null)},re=b=>{let R=g.slice(0,b);w(R),Ne(R)},Ne=b=>{let R=b.map(({id:ie,likeStatus:nt,...Oe})=>Oe),q={chatPersonality:r.chatPersonality||o.chatPersonality,maxToken:r.maxToken||o.maxToken,messages:R};S(!0),Je(ie=>{S(!1),tu(ie,()=>{if(!ie.data?.content)return;ie.data.id=b.length,ie.data.likeStatus=null,w([...b,ie.data]),new Audio(ru).play(),Je(Oe=>{window.getGenie.genieChat={id:Oe.data?.conversation_id},Xe()},"genieChatSave",{id:window.getGenie.genieChat?.id||null,messages:[...b,ie.data],templateSlug:"getgenieChat"})})},"genieChat",q)};qe(()=>{if(f.current){m(f.current.innerText),f.current.contentEditable=!0,f.current.focus(),Yn=f.current.innerText;let b=document.createRange(),R=window.getSelection();b.setStart(f.current.childNodes[0],f.current.innerText.length),b.collapse(!0),R.removeAllRanges(),R.addRange(b),f.current.addEventListener("input",q=>{Yn=q.target.innerText})}},[x]),qe(()=>{let b=u.current;b&&b.scrollHeight>b.clientHeight&&(b.scrollTop=b.scrollHeight-b.clientHeight)},[g]);let We=(b,R)=>{b.stopPropagation();let q=R.replace(/<br\s*\/?>\s*/gi,`
`);xe.copyToClipboard(q).then(()=>{N(R),setTimeout(()=>{N(null)},2e3)})},He=()=>{w([]),M(!0),G(!1),window.getGenie.genieChat={}},ke=()=>{Te.ConfirmModal("You're clearing/removing your whole conversation.","Are you sure you want to remove it?",()=>{w([]),M(!0),K([]),G(!1),Je(b=>{},"genieChatClear")})},D=(b,R,q,ie)=>{let nt={input:R,output:q,creativity_level:r.creativity,feedback_type:b,template_name:"getgenie-chat"},Oe=g.map(Ce=>(Ce.id===ie&&(Ce.likeStatus=b),Ce));w(Oe),Je(Ce=>{},"contentFeedback",nt),Je(Ce=>{window.getGenie.genieChat={id:Ce.data?.conversation_id},Xe()},"genieChatSave",{id:window.getGenie.genieChat?.id||null,messages:[...g],templateSlug:"getgenieChat"})};return qe(()=>{xe.saveSidebarControllerOption("getgenie-maxToken",r.maxToken)},[r.maxToken]),qe(()=>{xe.saveSidebarControllerOption("getgenie-chatPersonality",r.chatPersonality)},[r.chatPersonality]),qe(()=>{xe.saveSidebarControllerOption("getgenie-creativity",r.creativity)},[r.creativity]),React.createElement("div",{className:"getgenie-chat"},F?React.createElement(ps,{loading:gt,oldChatList:V,setAllChatData:w,setShowChatList:G,newChatHandler:He,resetChatHistory:ke,setOldChatList:K}):React.createElement(React.Fragment,null,Z&&React.createElement("div",{className:"genie-chat-welcome"},React.createElement("img",{src:su,alt:"genie-chat"}),React.createElement("h5",null,o.__("Welcome to ","getgenie")," Genie ",o.__("Chat","getgenie")),React.createElement("p",null,o.__("All you have to do is ask or instruct your Genie to kick off the ","getgenie")," AI ",o.__("magic!","getgenie")," ")),React.createElement("div",{className:"message-container",ref:u},!C&&!Z&&React.createElement(On,{onClick:()=>G(!0),type:"primary",className:"genie-chat-history-back"},React.createElement("span",{className:"getgenie-icon-arrow-left"})),g.map((b,R)=>React.createElement("div",{key:R},React.createElement("div",{className:`message ${b.role==="user"?"user-message":"assistant-message"}`},b.role==="user"?React.createElement(React.Fragment,null,React.createElement("div",{className:"message-content-user"},React.createElement("div",{className:"message-content",ref:x===b.id?f:void 0},b.content),!C&&React.createElement("span",{className:"getgenie-icon-edit1 edit-content",onClick:()=>tt(b.id)})),React.createElement("div",{className:"user-avatar"},React.createElement("img",{src:window.getGenie.config?.avatarUrl}))):React.createElement(React.Fragment,null,React.createElement("div",{className:"assistant-avatar"},React.createElement("img",{src:ys})),React.createElement("div",{className:"message-content-assistant"},React.createElement("div",{className:"message-content",dangerouslySetInnerHTML:{__html:b.content}}),React.createElement("div",{className:"feedback-area"},React.createElement(Ut,{placement:"bottom",zIndex:9999,title:b?.likeStatus==="like"?"Liked.":"Click to like this result"},React.createElement("span",{onClick:()=>D("like",g[R-1]?.content,b.content,b.id),className:`getgenie-icon-like ${b?.likeStatus==="like"?"liked":""}`})),React.createElement(Ut,{placement:"bottom",zIndex:9999,title:b?.likeStatus==="dislike"?"Disliked.":"Click to dislike this result"},React.createElement("span",{onClick:()=>D("dislike",g[R-1]?.content,b.content,b.id),className:`getgenie-icon-dislike ${b?.likeStatus==="dislike"?"disliked":""}`})),React.createElement(Ut,{placement:"bottom",zIndex:9999,title:"Click to regenerate this response"},React.createElement("span",{onClick:()=>re(b.id),className:"getgenie-icon-refresh"})),React.createElement(Ut,{placement:"bottom",zIndex:9999,title:d===b.content?"Copied":"Copy this content"},React.createElement("span",{onClick:q=>We(q,b.content),className:"copy-icon getgenie-icon-copy"})))))),x===b.id&&React.createElement("div",{className:"edit-button-container"},React.createElement(Te.Button,{className:"save-button",onClick:()=>Vt(b.id)},"Save & Submit"),React.createElement(Te.Button,{className:"cancel-button",onClick:wt},"Cancel")))),C?React.createElement("div",{className:"message assistant-message"},React.createElement("div",{className:"assistant-avatar"},React.createElement("img",{src:ys})),React.createElement("div",{className:"message-content-blinking"})):""),g.length>0&&React.createElement("div",{className:"genie-chat-buttons"},React.createElement(mt,{newChatHandler:He,setShowChatList:G})),Z?React.createElement("div",{className:"prompt-chat-container"},React.createElement("div",{className:"prompt-chat-header"},React.createElement("h5",{onClick:()=>M(!y),className:"prompt-auto-command"},y?"Hide":"Show"," prompts",React.createElement("span",{className:`getgenie-icon-arrow_up1 ${y?"":"hide-prompt"}`})),React.createElement(mt,{setShowChatList:G})),y&&React.createElement("div",{className:"prompt-contents"},Object.entries(se).map(([b,R],q)=>React.createElement(On,{onClick:()=>l("inputMessage",R),key:q,className:"prompt-chat",style:{maxWidth:"100%"}},React.createElement("span",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},b))))):"",React.createElement("div",{style:{backgroundColor:"#f1f3f8"},className:"chat-controller-container"},React.createElement(au,{style:{marginTop:"10px"},gutter:16},React.createElement(ws,{span:12},React.createElement(Te.Select,{name:"chatPersonality",className:"maxToken-field",label:React.createElement(React.Fragment,null,o.__("Chat Personality","getgenie"),React.createElement(Te.Tooltip,{title:o.__("Choose who you want to chat with","getgenie"),placement:"top"})),options:Be.chatCharacters,defaultValue:o.chatPersonality})),React.createElement(ws,{span:12},React.createElement(Te.Select,{name:"maxToken",className:"maxToken-field",label:React.createElement(React.Fragment,null,o.__("Size","getgenie"),React.createElement(Te.Tooltip,{title:o.__("Define the size of the content","getgenie"),placement:"top"})),options:Be.maxToken,defaultValue:o.maxToken}))),React.createElement("div",{className:"input-box-container"},React.createElement(Te.Textarea,{type:"text",className:"chat-input",placeholder:"Enter your question/command here...",onKeyUp:et,name:"inputMessage"}),React.createElement(On,{disabled:C||!r.inputMessage,className:"genie-chat-btn",onClick:Re},React.createElement("span",{className:"getgenie-icon-send chat-btn-icon"}))))))},["sidebar","setSidebar","setInput","getInputs"]);window.getGenie.Components={...window.getGenie.Components,Common:{...window.getGenie.Components.Common||{},Libs:Et,Utilities:Gt,LicenseNotice:bn,ContentFeedback:Cn,StaticData:Be,PromotionalNotice:xn}};})();
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! moment.js
//! momentjs.com
//! version : 2.29.4