iedi.edu.br
Open in
urlscan Pro
34.70.43.125
Public Scan
URL:
https://iedi.edu.br/wp-content/plugins/wp-dark-mode/assets/js/app.min.js?ver=5.1.2
Submission: On October 26 via api from US — Scanned from DE
Submission: On October 26 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
var fn=Object.defineProperty;var mn=(k,b,_)=>b in k?fn(k,b,{enumerable:!0,configurable:!0,writable:!0,value:_}):k[b]=_;var L=(k,b,_)=>(mn(k,typeof b!="symbol"?b+"":b,_),_),Ct=(k,b,_)=>{if(!b.has(k))throw TypeError("Cannot "+_)};var P=(k,b,_)=>(Ct(k,b,"read from private field"),_?_.call(k):b.get(k)),fe=(k,b,_)=>{if(b.has(k))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(k):b.set(k,_)},He=(k,b,_,K)=>(Ct(k,b,"write to private field"),K?K.call(k,_):b.set(k,_),_);(function(){var oe,ae,N,ee;"use strict";const ie=class ie{static set(r,t,n=365){r=`${ie.prefix}${r}`;const s=n?`expires = ${new Date(Date.now()+n*24*60*60*1e3).toUTCString()};`:"";return document.cookie=`${r} = ${encodeURIComponent(t)};${s}path = / `,this}static get(r){r=`${ie.prefix}${r}`;const t=document.cookie.split(";");for(const n of t){const[s,i]=n.split("=").map(o=>o.trim());if(s===r)return decodeURIComponent(i)}return null}static delete(r){return r=`${ie.prefix}${r}`,document.cookie=`${r} = ; expires = Thu, 01 Jan 1970 00:00:00 UTC; path = / ;`,this}};L(ie,"prefix","wp-dark-mode-");let k=ie;const te=class te{constructor(){fe(this,ae,{onChange:[]});fe(this,N,{target:"html",activeAttribute:"data-wp-dark-mode-active",activeClass:"wp-dark-mode-active",ignoreClass:"wp-dark-mode-ignore"})}static getInstance(){return P(te,oe)||He(te,oe,new te),P(te,oe)}onChange(r){return P(this,ae).onChange.push(r),this}get isDeviceDark(){return window.matchMedia("(prefers-color-scheme: dark)").matches}get target(){return document.querySelector(P(this,N).target)}get isActive(){var r;return(r=this.target)==null?void 0:r.hasAttribute(P(this,N).activeAttribute)}toggle(){return this.isActive?this.deactivate():this.activate(),this}updateTarget(r){return r?this.target.setAttribute(P(this,N).activeAttribute,""):this.target.removeAttribute(P(this,N).activeAttribute),r?this.target.classList.add(P(this,N).activeClass):this.target.classList.remove(P(this,N).activeClass),this}activate(r={}){return He(this,N,{...P(this,N),...r}),this.updateTarget(!0),P(this,ae).onChange.forEach(t=>t({isActive:this.isActive})),this}deactivate(){return this.updateTarget(!1),P(this,ae).onChange.forEach(r=>r({isActive:this.isActive})),this}remember(){return k.set("choice",this.isActive?"dark":"light"),this}forget(){return k.delete("choice").delete("device").delete("timezone"),this}};oe=new WeakMap,ae=new WeakMap,N=new WeakMap,fe(te,oe,null);let b=te;const _=b.getInstance();window.WPDarkMode=_;class K{constructor(){L(this,"_el",(r,t=document)=>t.querySelector(r));L(this,"_els",(r,t=document)=>t.querySelectorAll(r));fe(this,ee,{})}isTrue(r){return["1","true","yes","on",1,!0].includes(r)}get isPremium(){return this.isTrue(wp_dark_mode_json.is_ultimate||wp_dark_mode_json.is_pro)}on(r,t){P(this,ee)[r]||(P(this,ee)[r]=[]);try{P(this,ee)[r].push(t)}catch{}return this}emit(r,...t){return P(this,ee)[r]&&P(this,ee)[r].forEach(n=>{n(...t)}),this}init(){this.events(),document.addEventListener("DOMContentLoaded",()=>{this.ready()})}ready(){}events(){}get html(){return document.querySelector("html")}}ee=new WeakMap;function ze(e,r){return function(){return e.apply(r,arguments)}}const{toString:Pt}=Object.prototype,{getPrototypeOf:De}=Object,me=(e=>r=>{const t=Pt.call(r);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),H=e=>(e=e.toLowerCase(),r=>me(r)===e),we=e=>r=>typeof r===e,{isArray:ne}=Array,le=we("undefined");function Ft(e){return e!==null&&!le(e)&&e.constructor!==null&&!le(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ve=H("ArrayBuffer");function Mt(e){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&Ve(e.buffer),r}const jt=we("string"),M=we("function"),Je=we("number"),_e=e=>e!==null&&typeof e=="object",$t=e=>e===!0||e===!1,ge=e=>{if(me(e)!=="object")return!1;const r=De(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Nt=H("Date"),It=H("File"),Ut=H("Blob"),Bt=H("FileList"),qt=e=>_e(e)&&M(e.pipe),Ht=e=>{let r;return e&&(typeof FormData=="function"&&e instanceof FormData||M(e.append)&&((r=me(e))==="formdata"||r==="object"&&M(e.toString)&&e.toString()==="[object FormData]"))},zt=H("URLSearchParams"),Vt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(e,r,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),ne(e))for(n=0,s=e.length;n<s;n++)r.call(null,e[n],n,e);else{const i=t?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(n=0;n<o;n++)c=i[n],r.call(null,e[c],c,e)}}function We(e,r){r=r.toLowerCase();const t=Object.keys(e);let n=t.length,s;for(;n-- >0;)if(s=t[n],r===s.toLowerCase())return s;return null}const Ke=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ge=e=>!le(e)&&e!==Ke;function Re(){const{caseless:e}=Ge(this)&&this||{},r={},t=(n,s)=>{const i=e&&We(r,s)||s;ge(r[i])&&ge(n)?r[i]=Re(r[i],n):ge(n)?r[i]=Re({},n):ne(n)?r[i]=n.slice():r[i]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ue(arguments[n],t);return r}const Jt=(e,r,t,{allOwnKeys:n}={})=>(ue(r,(s,i)=>{t&&M(s)?e[i]=ze(s,t):e[i]=s},{allOwnKeys:n}),e),Wt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Kt=(e,r,t,n)=>{e.prototype=Object.create(r.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:r.prototype}),t&&Object.assign(e.prototype,t)},Gt=(e,r,t,n)=>{let s,i,o;const c={};if(r=r||{},e==null)return r;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!n||n(o,e,r))&&!c[o]&&(r[o]=e[o],c[o]=!0);e=t!==!1&&De(e)}while(e&&(!t||t(e,r))&&e!==Object.prototype);return r},Xt=(e,r,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=r.length;const n=e.indexOf(r,t);return n!==-1&&n===t},Qt=e=>{if(!e)return null;if(ne(e))return e;let r=e.length;if(!Je(r))return null;const t=new Array(r);for(;r-- >0;)t[r]=e[r];return t},Zt=(e=>r=>e&&r instanceof e)(typeof Uint8Array<"u"&&De(Uint8Array)),Yt=(e,r)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const i=s.value;r.call(e,i[0],i[1])}},er=(e,r)=>{let t;const n=[];for(;(t=e.exec(r))!==null;)n.push(t);return n},tr=H("HTMLFormElement"),rr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,s){return n.toUpperCase()+s}),Xe=(({hasOwnProperty:e})=>(r,t)=>e.call(r,t))(Object.prototype),nr=H("RegExp"),Qe=(e,r)=>{const t=Object.getOwnPropertyDescriptors(e),n={};ue(t,(s,i)=>{let o;(o=r(s,i,e))!==!1&&(n[i]=o||s)}),Object.defineProperties(e,n)},sr=e=>{Qe(e,(r,t)=>{if(M(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=e[t];if(M(n)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},ir=(e,r)=>{const t={},n=s=>{s.forEach(i=>{t[i]=!0})};return ne(e)?n(e):n(String(e).split(r)),t},or=()=>{},ar=(e,r)=>(e=+e,Number.isFinite(e)?e:r),Te="abcdefghijklmnopqrstuvwxyz",Ze="0123456789",Ye={DIGIT:Ze,ALPHA:Te,ALPHA_DIGIT:Te+Te.toUpperCase()+Ze},cr=(e=16,r=Ye.ALPHA_DIGIT)=>{let t="";const{length:n}=r;for(;e--;)t+=r[Math.random()*n|0];return t};function dr(e){return!!(e&&M(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const lr=e=>{const r=new Array(10),t=(n,s)=>{if(_e(n)){if(r.indexOf(n)>=0)return;if(!("toJSON"in n)){r[s]=n;const i=ne(n)?[]:{};return ue(n,(o,c)=>{const h=t(o,s+1);!le(h)&&(i[c]=h)}),r[s]=void 0,i}}return n};return t(e,0)},ur=H("AsyncFunction"),a={isArray:ne,isArrayBuffer:Ve,isBuffer:Ft,isFormData:Ht,isArrayBufferView:Mt,isString:jt,isNumber:Je,isBoolean:$t,isObject:_e,isPlainObject:ge,isUndefined:le,isDate:Nt,isFile:It,isBlob:Ut,isRegExp:nr,isFunction:M,isStream:qt,isURLSearchParams:zt,isTypedArray:Zt,isFileList:Bt,forEach:ue,merge:Re,extend:Jt,trim:Vt,stripBOM:Wt,inherits:Kt,toFlatObject:Gt,kindOf:me,kindOfTest:H,endsWith:Xt,toArray:Qt,forEachEntry:Yt,matchAll:er,isHTMLForm:tr,hasOwnProperty:Xe,hasOwnProp:Xe,reduceDescriptors:Qe,freezeMethods:sr,toObjectSet:ir,toCamelCase:rr,noop:or,toFiniteNumber:ar,findKey:We,global:Ke,isContextDefined:Ge,ALPHABET:Ye,generateString:cr,isSpecCompliantForm:dr,toJSONObject:lr,isAsyncFn:ur,isThenable:e=>e&&(_e(e)||M(e))&&M(e.then)&&M(e.catch)};function y(e,r,t,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",r&&(this.code=r),t&&(this.config=t),n&&(this.request=n),s&&(this.response=s)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const et=y.prototype,tt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tt[e]={value:e}}),Object.defineProperties(y,tt),Object.defineProperty(et,"isAxiosError",{value:!0}),y.from=(e,r,t,n,s,i)=>{const o=Object.create(et);return a.toFlatObject(e,o,function(h){return h!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,r,t,n,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const pr=null;function xe(e){return a.isPlainObject(e)||a.isArray(e)}function rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function nt(e,r,t){return e?e.concat(r).map(function(s,i){return s=rt(s),!t&&i?"["+s+"]":s}).join(t?".":""):r}function hr(e){return a.isArray(e)&&!e.some(xe)}const fr=a.toFlatObject(a,{},null,function(r){return/^is[A-Z]/.test(r)});function ke(e,r,t){if(!a.isObject(e))throw new TypeError("target must be an object");r=r||new FormData,t=a.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,A){return!a.isUndefined(A[m])});const n=t.metaTokens,s=t.visitor||u,i=t.dots,o=t.indexes,h=(t.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(r);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!h&&a.isBlob(f))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?h&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,A){let C=f;if(f&&!A&&typeof f=="object"){if(a.endsWith(m,"{}"))m=n?m:m.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&hr(f)||(a.isFileList(f)||a.endsWith(m,"[]"))&&(C=a.toArray(f)))return m=rt(m),C.forEach(function(I,Ee){!(a.isUndefined(I)||I===null)&&r.append(o===!0?nt([m],Ee,i):o===null?m:m+"[]",l(I))}),!1}return xe(f)?!0:(r.append(nt(A,m,i),l(f)),!1)}const d=[],S=Object.assign(fr,{defaultVisitor:u,convertValue:l,isVisitable:xe});function R(f,m){if(!a.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),a.forEach(f,function(C,j){(!(a.isUndefined(C)||C===null)&&s.call(r,C,a.isString(j)?j.trim():j,m,S))===!0&&R(C,m?m.concat(j):[j])}),d.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return R(e),r}function st(e){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return r[n]})}function Le(e,r){this._pairs=[],e&&ke(e,this,r)}const it=Le.prototype;it.append=function(r,t){this._pairs.push([r,t])},it.toString=function(r){const t=r?function(n){return r.call(this,n,st)}:st;return this._pairs.map(function(s){return t(s[0])+"="+t(s[1])},"").join("&")};function mr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ot(e,r,t){if(!r)return e;const n=t&&t.encode||mr,s=t&&t.serialize;let i;if(s?i=s(r,t):i=a.isURLSearchParams(r)?r.toString():new Le(r,t).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class wr{constructor(){this.handlers=[]}use(r,t,n){return this.handlers.push({fulfilled:r,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){a.forEach(this.handlers,function(n){n!==null&&r(n)})}}const at=wr,ct={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_r={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Le,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},dt=typeof window<"u"&&typeof document<"u",gr=(e=>dt&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),kr=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),z={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dt,hasStandardBrowserEnv:gr,hasStandardBrowserWebWorkerEnv:kr},Symbol.toStringTag,{value:"Module"})),..._r};function yr(e,r){return ke(e,new z.classes.URLSearchParams,Object.assign({visitor:function(t,n,s,i){return z.isNode&&a.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},r))}function vr(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(r=>r[0]==="[]"?"":r[1]||r[0])}function br(e){const r={},t=Object.keys(e);let n;const s=t.length;let i;for(n=0;n<s;n++)i=t[n],r[i]=e[i];return r}function lt(e){function r(t,n,s,i){let o=t[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),h=i>=t.length;return o=!o&&a.isArray(s)?s.length:o,h?(a.hasOwnProp(s,o)?s[o]=[s[o],n]:s[o]=n,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),r(t,n,s[o],i)&&a.isArray(s[o])&&(s[o]=br(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const t={};return a.forEachEntry(e,(n,s)=>{r(vr(n),s,t,0)}),t}return null}function Sr(e,r,t){if(a.isString(e))try{return(r||JSON.parse)(e),a.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(e)}const Ce={transitional:ct,adapter:["xhr","http"],transformRequest:[function(r,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=a.isObject(r);if(i&&a.isHTMLForm(r)&&(r=new FormData(r)),a.isFormData(r))return s?JSON.stringify(lt(r)):r;if(a.isArrayBuffer(r)||a.isBuffer(r)||a.isStream(r)||a.isFile(r)||a.isBlob(r))return r;if(a.isArrayBufferView(r))return r.buffer;if(a.isURLSearchParams(r))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let c;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return yr(r,this.formSerializer).toString();if((c=a.isFileList(r))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ke(c?{"files[]":r}:r,h&&new h,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Sr(r)):r}],transformResponse:[function(r){const t=this.transitional||Ce.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(r&&a.isString(r)&&(n&&!this.responseType||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(r)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:z.classes.FormData,Blob:z.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{Ce.headers[e]={}});const Pe=Ce,Er=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ar=e=>{const r={};let t,n,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),t=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!t||r[t]&&Er[t])&&(t==="set-cookie"?r[t]?r[t].push(n):r[t]=[n]:r[t]=r[t]?r[t]+", "+n:n)}),r},ut=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function ye(e){return e===!1||e==null?e:a.isArray(e)?e.map(ye):String(e)}function Or(e){const r=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(e);)r[n[1]]=n[2];return r}const Dr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Fe(e,r,t,n,s){if(a.isFunction(n))return n.call(this,r,t);if(s&&(r=t),!!a.isString(r)){if(a.isString(n))return r.indexOf(n)!==-1;if(a.isRegExp(n))return n.test(r)}}function Rr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,t,n)=>t.toUpperCase()+n)}function Tr(e,r){const t=a.toCamelCase(" "+r);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+t,{value:function(s,i,o){return this[n].call(this,r,s,i,o)},configurable:!0})})}class ve{constructor(r){r&&this.set(r)}set(r,t,n){const s=this;function i(c,h,l){const u=pe(h);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||h]=ye(c))}const o=(c,h)=>a.forEach(c,(l,u)=>i(l,u,h));return a.isPlainObject(r)||r instanceof this.constructor?o(r,t):a.isString(r)&&(r=r.trim())&&!Dr(r)?o(Ar(r),t):r!=null&&i(t,r,n),this}get(r,t){if(r=pe(r),r){const n=a.findKey(this,r);if(n){const s=this[n];if(!t)return s;if(t===!0)return Or(s);if(a.isFunction(t))return t.call(this,s,n);if(a.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,t){if(r=pe(r),r){const n=a.findKey(this,r);return!!(n&&this[n]!==void 0&&(!t||Fe(this,this[n],n,t)))}return!1}delete(r,t){const n=this;let s=!1;function i(o){if(o=pe(o),o){const c=a.findKey(n,o);c&&(!t||Fe(n,n[c],c,t))&&(delete n[c],s=!0)}}return a.isArray(r)?r.forEach(i):i(r),s}clear(r){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const i=t[n];(!r||Fe(this,this[i],i,r,!0))&&(delete this[i],s=!0)}return s}normalize(r){const t=this,n={};return a.forEach(this,(s,i)=>{const o=a.findKey(n,i);if(o){t[o]=ye(s),delete t[i];return}const c=r?Rr(i):String(i).trim();c!==i&&delete t[i],t[c]=ye(s),n[c]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const t=Object.create(null);return a.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=r&&a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,t])=>r+": "+t).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...t){const n=new this(r);return t.forEach(s=>n.set(s)),n}static accessor(r){const n=(this[ut]=this[ut]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=pe(o);n[c]||(Tr(s,o),n[c]=!0)}return a.isArray(r)?r.forEach(i):i(r),this}}ve.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(ve.prototype,({value:e},r)=>{let t=r[0].toUpperCase()+r.slice(1);return{get:()=>e,set(n){this[t]=n}}}),a.freezeMethods(ve);const G=ve;function Me(e,r){const t=this||Pe,n=r||t,s=G.from(n.headers);let i=n.data;return a.forEach(e,function(c){i=c.call(t,i,s.normalize(),r?r.status:void 0)}),s.normalize(),i}function pt(e){return!!(e&&e.__CANCEL__)}function he(e,r,t){y.call(this,e??"canceled",y.ERR_CANCELED,r,t),this.name="CanceledError"}a.inherits(he,y,{__CANCEL__:!0});function xr(e,r,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?e(t):r(new y("Request failed with status code "+t.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const Lr=z.hasStandardBrowserEnv?{write(e,r,t,n,s,i){const o=[e+"="+encodeURIComponent(r)];a.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),a.isString(n)&&o.push("path="+n),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const r=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Cr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Pr(e,r){return r?e.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):e}function ht(e,r){return e&&!Cr(r)?Pr(e,r):r}const Fr=z.hasStandardBrowserEnv?function(){const r=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function s(i){let o=i;return r&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=s(window.location.href),function(o){const c=a.isString(o)?s(o):o;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}();function Mr(e){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return r&&r[1]||""}function jr(e,r){e=e||10;const t=new Array(e),n=new Array(e);let s=0,i=0,o;return r=r!==void 0?r:1e3,function(h){const l=Date.now(),u=n[i];o||(o=l),t[s]=h,n[s]=l;let d=i,S=0;for(;d!==s;)S+=t[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<r)return;const R=u&&l-u;return R?Math.round(S*1e3/R):void 0}}function ft(e,r){let t=0;const n=jr(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,c=i-t,h=n(c),l=i<=o;t=i;const u={loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:h||void 0,estimated:h&&o&&l?(o-i)/h:void 0,event:s};u[r?"download":"upload"]=!0,e(u)}}const je={http:pr,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(t,n){let s=e.data;const i=G.from(e.headers).normalize();let{responseType:o,withXSRFToken:c}=e,h;function l(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}let u;if(a.isFormData(s)){if(z.hasStandardBrowserEnv||z.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((u=i.getContentType())!==!1){const[m,...A]=u?u.split(";").map(C=>C.trim()).filter(Boolean):[];i.setContentType([m||"multipart/form-data",...A].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(m+":"+A))}const S=ht(e.baseURL,e.url);d.open(e.method.toUpperCase(),ot(S,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function R(){if(!d)return;const m=G.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),C={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:e,request:d};xr(function(I){t(I),l()},function(I){n(I),l()},C),d=null}if("onloadend"in d?d.onloadend=R:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(R)},d.onabort=function(){d&&(n(new y("Request aborted",y.ECONNABORTED,e,d)),d=null)},d.onerror=function(){n(new y("Network Error",y.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let A=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const C=e.transitional||ct;e.timeoutErrorMessage&&(A=e.timeoutErrorMessage),n(new y(A,C.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,d)),d=null},z.hasStandardBrowserEnv&&(c&&a.isFunction(c)&&(c=c(e)),c||c!==!1&&Fr(S))){const m=e.xsrfHeaderName&&e.xsrfCookieName&&Lr.read(e.xsrfCookieName);m&&i.set(e.xsrfHeaderName,m)}s===void 0&&i.setContentType(null),"setRequestHeader"in d&&a.forEach(i.toJSON(),function(A,C){d.setRequestHeader(C,A)}),a.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),o&&o!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",ft(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ft(e.onUploadProgress)),(e.cancelToken||e.signal)&&(h=m=>{d&&(n(!m||m.type?new he(null,e,d):m),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h)));const f=Mr(S);if(f&&z.protocols.indexOf(f)===-1){n(new y("Unsupported protocol "+f+":",y.ERR_BAD_REQUEST,e));return}d.send(s||null)})}};a.forEach(je,(e,r)=>{if(e){try{Object.defineProperty(e,"name",{value:r})}catch{}Object.defineProperty(e,"adapterName",{value:r})}});const mt=e=>`- ${e}`,$r=e=>a.isFunction(e)||e===null||e===!1,wt={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:r}=e;let t,n;const s={};for(let i=0;i<r;i++){t=e[i];let o;if(n=t,!$r(t)&&(n=je[(o=String(t)).toLowerCase()],n===void 0))throw new y(`Unknown adapter '${o}'`);if(n)break;s[o||"#"+i]=n}if(!n){const i=Object.entries(s).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=r?i.length>1?`since : `+i.map(mt).join(` `):" "+mt(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:je};function $e(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new he(null,e)}function _t(e){return $e(e),e.headers=G.from(e.headers),e.data=Me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wt.getAdapter(e.adapter||Pe.adapter)(e).then(function(n){return $e(e),n.data=Me.call(e,e.transformResponse,n),n.headers=G.from(n.headers),n},function(n){return pt(n)||($e(e),n&&n.response&&(n.response.data=Me.call(e,e.transformResponse,n.response),n.response.headers=G.from(n.response.headers))),Promise.reject(n)})}const gt=e=>e instanceof G?e.toJSON():e;function se(e,r){r=r||{};const t={};function n(l,u,d){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:d},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,d){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!a.isUndefined(u))return n(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function c(l,u,d){if(d in r)return n(l,u);if(d in e)return n(void 0,l)}const h={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u)=>s(gt(l),gt(u),!0)};return a.forEach(Object.keys(Object.assign({},e,r)),function(u){const d=h[u]||s,S=d(e[u],r[u],u);a.isUndefined(S)&&d!==c||(t[u]=S)}),t}const kt="1.6.7",Ne={};["object","boolean","number","function","string","symbol"].forEach((e,r)=>{Ne[e]=function(n){return typeof n===e||"a"+(r<1?"n ":" ")+e}});const yt={};Ne.transitional=function(r,t,n){function s(i,o){return"[Axios v"+kt+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,c)=>{if(r===!1)throw new y(s(o," has been removed"+(t?" in "+t:"")),y.ERR_DEPRECATED);return t&&!yt[o]&&(yt[o]=!0,console.warn(s(o," has been deprecated since v"+t+" and will be removed in the near future"))),r?r(i,o,c):!0}};function Nr(e,r,t){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],o=r[i];if(o){const c=e[i],h=c===void 0||o(c,i,e);if(h!==!0)throw new y("option "+i+" must be "+h,y.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const Ie={assertOptions:Nr,validators:Ne},Y=Ie.validators;class be{constructor(r){this.defaults=r,this.interceptors={request:new at,response:new at}}async request(r,t){try{return await this._request(r,t)}catch(n){if(n instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+i):n.stack=i}throw n}}_request(r,t){typeof r=="string"?(t=t||{},t.url=r):t=r||{},t=se(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&Ie.assertOptions(n,{silentJSONParsing:Y.transitional(Y.boolean),forcedJSONParsing:Y.transitional(Y.boolean),clarifyTimeoutError:Y.transitional(Y.boolean)},!1),s!=null&&(a.isFunction(s)?t.paramsSerializer={serialize:s}:Ie.assertOptions(s,{encode:Y.function,serialize:Y.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[t.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),t.headers=G.concat(o,i);const c=[];let h=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(h=h&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,d=0,S;if(!h){const f=[_t.bind(this),void 0];for(f.unshift.apply(f,c),f.push.apply(f,l),S=f.length,u=Promise.resolve(t);d<S;)u=u.then(f[d++],f[d++]);return u}S=c.length;let R=t;for(d=0;d<S;){const f=c[d++],m=c[d++];try{R=f(R)}catch(A){m.call(this,A);break}}try{u=_t.call(this,R)}catch(f){return Promise.reject(f)}for(d=0,S=l.length;d<S;)u=u.then(l[d++],l[d++]);return u}getUri(r){r=se(this.defaults,r);const t=ht(r.baseURL,r.url);return ot(t,r.params,r.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(r){be.prototype[r]=function(t,n){return this.request(se(n||{},{method:r,url:t,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(r){function t(n){return function(i,o,c){return this.request(se(c||{},{method:r,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}be.prototype[r]=t(),be.prototype[r+"Form"]=t(!0)});const Se=be;class Ue{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(i){t=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{n.subscribe(c),i=c}).then(s);return o.cancel=function(){n.unsubscribe(i)},o},r(function(i,o,c){n.reason||(n.reason=new he(i,o,c),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const t=this._listeners.indexOf(r);t!==-1&&this._listeners.splice(t,1)}static source(){let r;return{token:new Ue(function(s){r=s}),cancel:r}}}const Ir=Ue;function Ur(e){return function(t){return e.apply(null,t)}}function Br(e){return a.isObject(e)&&e.isAxiosError===!0}const Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Be).forEach(([e,r])=>{Be[r]=e});const qr=Be;function vt(e){const r=new Se(e),t=ze(Se.prototype.request,r);return a.extend(t,Se.prototype,r,{allOwnKeys:!0}),a.extend(t,r,null,{allOwnKeys:!0}),t.create=function(s){return vt(se(e,s))},t}const D=vt(Pe);D.Axios=Se,D.CanceledError=he,D.CancelToken=Ir,D.isCancel=pt,D.VERSION=kt,D.toFormData=ke,D.AxiosError=y,D.Cancel=D.CanceledError,D.all=function(r){return Promise.all(r)},D.spread=Ur,D.isAxiosError=Br,D.mergeConfig=se,D.AxiosHeaders=G,D.formToJSON=e=>lt(a.isHTMLForm(e)?new FormData(e):e),D.getAdapter=wt.getAdapter,D.HttpStatusCode=qr,D.default=D;const Hr=D;class zr{async request(r="GET",t="",n={}){var l;const s=typeof wp_dark_mode_admin_json<"u"?wp_dark_mode_admin_json:wp_dark_mode_json;let i=((l=s==null?void 0:s.url)==null?void 0:l.ajax)+"?action="+t+"&_wpnonce="+s.nonce;const c={method:r,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},credentials:"same-origin"};return r!=="POST"&&Object.keys(n).length>0?i+="&"+this.serialize(n):c.data=n,(await Hr(i,c)).data}async get(r="",t={}){return await this.request("GET",r,t)}async post(r="",t={}){return await this.request("POST",r,t)}serialize(r){var t=[];for(var n in r)r.hasOwnProperty(n)&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return t.join("&")}}const Vr=new zr;class Jr extends K{constructor(){super(...arguments);L(this,"initLargeFont",()=>{if(!wp_dark_mode_json.options.typography_enabled)return;const t=document.querySelectorAll("*:not(.wp-dark-mode-ignore):not(.wp-dark-mode-switch):not(script):not(style):not(link):not(meta):not(title):not(base):not(head):not(.wp-dark-mode-switch)");let n=wp_dark_mode_json.options.typography_font_size;n==="custom"&&(n=wp_dark_mode_json.options.typography_font_size_custom/100),t.forEach(s=>{if(s.closest(".wp-dark-mode-ignore"))return;const i=getComputedStyle(s).fontSize;if(i){const o=this.calculateFontSize(i,n);s.style.setProperty("--wp-dark-mode-large-font-size",o)}})});L(this,"calculateFontSize",(t,n=1)=>{const s=t.replace(/[0-9]/g,""),i=parseFloat(t.replace(/[a-z]/g,""));let o=0;return o=i*n,`${o}${s}`});L(this,"checkLargeFont",()=>{k.get("large-font")==="on"&&(document.querySelector("html").classList.add("wp-dark-mode-large-font"),document.addEventListener("wp-dark-mode-switches-updated",()=>{const n=document.querySelectorAll(".wp-dark-mode-switch ._font");!n||!n.length||n.forEach(s=>{s.classList.add("active")})}))})}ready(){this.trackKeyBoardPress(),this.handleAnimation(),setTimeout(()=>{this.updateVisitor()},1e4),this.isPremium&&(this.initLargeFont(),this.checkLargeFont())}trackKeyBoardPress(){wp_dark_mode_json.options.accessibility_enabled_keyboard_shortcut&&document.addEventListener("keydown",t=>{t.ctrlKey&&t.altKey&&t.keyCode===68&&WPDarkMode.toggle().remember()})}handleAnimation(){wp_dark_mode_json.options.animation_enabled&&(WPDarkMode.isActive&&document.querySelector("html").classList.add("wp-dark-mode-animation"),WPDarkMode.onChange(()=>{WPDarkMode.isActive?document.querySelector("html").classList.add("wp-dark-mode-animation"):document.querySelector("html").classList.remove("wp-dark-mode-animation")}))}toggleFontSize(t){if(!wp_dark_mode_json.options.typography_enabled)return;const n=document.querySelector("html"),s=n.classList.contains("wp-dark-mode-large-font");n.classList[s?"remove":"add"]("wp-dark-mode-large-font");const i=t.classList.contains("active");t.classList[i?"remove":"add"]("active"),k.set("large-font",s?"off":"on");const o=document.querySelectorAll(".wp-dark-mode-switch ._font");!o||!o.length||o.forEach(c=>{c.classList[i?"remove":"add"]("active")})}async updateVisitor(){var i;if(!wp_dark_mode_json.analytics_enabled)return;localStorage.getItem("wp-dark-mode-visitor");const t=localStorage.getItem("wp-dark-mode-visitor")||null,n={visitor_id:t||!1,mode:WPDarkMode.isActive?"dark":"light",nonce:wp_dark_mode_json.nonce};if(!t){n.meta=(i=JSON.stringify({os:navigator.platform,browser:navigator.appCodeName,browser_version:navigator.appVersion,language:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}))==null?void 0:i.replace(";","");try{n.ip=await fetch("https://api.ipify.org?format=json").then(o=>o.json()).then(o=>o.ip)}catch{}}const s=await Vr.post("wp_dark_mode_update_visitor",n);s&&s.success&&!t&&localStorage.setItem("wp-dark-mode-visitor",s.data.visitor_id)}}const bt=new Jr;class Wr extends K{constructor(){super(...arguments);L(this,"isRGB",t=>t.indexOf("rgb")!==-1);L(this,"hexToRGB",(t,n=1)=>{if(this.isRGB(t))return t;const s=document.createElement("div");s.style.color=t;const o=window.getComputedStyle(s).color.match(/(\d+), (\d+), (\d+), (\d+(\.\d+)?)\)/);if(o&&o.length===6){const c=parseInt(o[1]),h=parseInt(o[2]),l=parseInt(o[3]),u=n!==void 0?n:parseFloat(o[4]);return`rgba(${c}, ${h}, ${l}, ${u})`}else return null});L(this,"luminance",t=>{this.isRGB(t)||(t=this.hexToRgb(t)),t=t.replace(/ /g,""),t=t.split(",");const n=t[0],s=t[1],i=t[2];return .299*n+.587*s+.114*i});L(this,"isDarkColor",t=>this.luminance(t)<190);L(this,"getWhitePercentage",t=>{this.isRGB(t)||(t=this.hexToRgb(t)),t=t.replace(/ /g,""),t=t.split(",");const n=t[0],s=t[1],i=t[2];return Math.round((255-n+(255-s)+(255-i))/7.65)});L(this,"isTransparent",t=>{if(!t)return!0;let n=this.hexToRGB(t);return!n||n=="rgba(0, 0, 0, 0)"||n=="rgb(0, 0, 0)"||n=="none"||(n=n.replace(/ /g,""),n=n.split(","),parseFloat(n[3])==0)});L(this,"shouldIgnore",t=>{if(!t)return!0;const n=window.getComputedStyle(t).backgroundColor||"rgba(0, 0, 0, 0)";return t.classList.contains("wp-dark-mode-ignore")||t.classList.contains("wp-dark-mode-switch")||t.classList.contains("wp-dark-mode-background")?!0:this.isTransparent(n)?(t.classList.add("wp-dark-mode-transparent"),!0):!!(window.getComputedStyle(t).backgroundImage!=="none"||this.isDarkColor(n))})}events(){}ready(){this.always(),this.applyDarkMode()}applyDarkMode(){if(this.isAutoColor){const t=document.querySelector("html");t==null||t.setAttribute("data-wp-dark-mode-loading",!0),this.applyAutoDark(),t==null||t.removeAttribute("data-wp-dark-mode-loading")}else this.applyPreset()}always(){const t=document.querySelector("html");t==null||t.removeAttribute("data-wp-dark-mode-loading"),this.isPremium&&(this.handleIncludes(),this.HandleExcludes())}async applyAutoDark(){const t={brightness:wp_dark_mode_json.options.color_filter_brightness||100,contrast:wp_dark_mode_json.options.color_filter_contrast||90,sepia:wp_dark_mode_json.options.color_filter_sepia||10,grayscale:wp_dark_mode_json.options.color_filter_grayscale||0};_.isActive&&(DarkModeAuto.disable(),DarkModeAuto.enable(t,{ignoreInlineStyle:".wp-dark-mode-ignore"})),_.onChange(()=>{_.isActive?DarkModeAuto.enable(t,{ignoreInlineStyle:".wp-dark-mode-ignore"}):DarkModeAuto.disable()})}get presetId(){var n;const t=typeof wp_dark_mode_admin_json<"u"?wp_dark_mode_admin_json:wp_dark_mode_json;return((n=t==null?void 0:t.options)==null?void 0:n.color_preset_id)||!1}get isAutoColor(){return Number(this.presetId)===0}initHandlers(){}applyPreset(){const t=document.querySelectorAll("body *:not(.wp-dark-mode-ignore), body *:not(.wp-dark-mode-ignore *)");!t||!t.length||t.forEach(n=>{if(n.classList.add("wp-dark-mode-transparent"),this.shouldIgnore(n)){const s=window.getComputedStyle(n).backgroundColor||"rgba(0, 0, 0, 0)";this.isTransparent(s)||n.classList.add("wp-dark-mode-ignore"),n.classList.add("wp-dark-mode-transparent")}else n.classList.remove("wp-dark-mode-transparent")})}HandleExcludes(){const t=(wp_dark_mode_json.options.excludes_elements?wp_dark_mode_json.options.excludes_elements+",.wp-dark-mode-ignore":".wp-dark-mode-ignore")+(wp_dark_mode_json.excluded_elements?", "+wp_dark_mode_json.excluded_elements:""),n=document.querySelectorAll(t);if(!(!n||!n.length))return n.forEach(s=>{const i=o=>{if(!o||!(o instanceof HTMLElement)||o.classList.contains("wp-dark-mode-include"))return;o.classList.add("wp-dark-mode-ignore");const{color:c,borderColor:h}=window.getComputedStyle(o)||{};c!=="rgba(0, 0, 0, 0)"&&(o.style.color=`${c} !important`),h!=="rgba(0, 0, 0, 0)"&&(o.style.borderColor=`${h} !important`),o.childNodes&&o.childNodes.length&&o.childNodes.forEach(l=>{i(l)})};i(s)}),this}handleIncludes(){const t=document.querySelectorAll(wp_dark_mode_json.options.excludes_elements_includes||".wp_dark_mode_include");!t||!t.length||t.forEach(n=>{const s=i=>{i&&i instanceof HTMLElement&&(i.classList.add("wp-dark-mode-include"),i.classList.remove("wp-dark-mode-ignore"),i.childNodes&&i.childNodes.length&&i.childNodes.forEach(o=>{s(o)}))};s(n)})}}const Kr=new Wr;class Gr extends K{ready(){this.initImages()}initImages(){document.body.style.setProperty("--wp-dark-mode-img-opacity",1),this.replaceImages(),this.replaceBackgroundImages(),this.excludeFilterImages(),WPDarkMode.onChange(()=>{this.replaceImages(),this.replaceBackgroundImages(),this.excludeFilterImages()})}replaceImages(){const r=document.querySelectorAll("img");!r||!r.length||r.forEach(t=>{if(!t.src)return;let n=t.dataset.lightSrc||t.src;if(WPDarkMode.isActive){const s=this.getDarkSrc(n);s&&(t.dataset.lightSrc=n,t.dataset.darkSrc=s,t.src=s,t.srcset=s)}else{const s=t.dataset.lightSrc;s&&(t.src=s,t.srcset=s)}})}replaceBackgroundImages(){var r=document.querySelectorAll("*");r.forEach(t=>{var n=window.getComputedStyle(t).getPropertyValue("background-image");if(n!=="none")if(n=n.replace(/url\((['"])?(.*?)\1\)/gi,"$2").split(",")[0],t.classList.add("wp-dark-mode-ignore"),WPDarkMode.isActive){const s=this.getDarkSrc(n);s&&(t.style.background=`url(${s})`,t.style.backgroundImage=`url(${s})`,t.dataset.lightSrc=n,t.dataset.darkSrc=s)}else{const s=t.dataset.lightSrc;s&&(t.style.background=`url(${s})`,t.style.backgroundImage=`url(${s})`)}})}getDarkSrc(r){if(!r)return;const t=wp_dark_mode_json.options.image_replaces||!1;if(!t)return!1;const n=t.find(s=>{const i=r.split("?")[0];return s.light===i});return n?n.dark:!1}excludeFilterImages(){const r=wp_dark_mode_json.options.image_enabled_low_brightness?wp_dark_mode_json.options.image_low_brightness_excludes:!1,t=wp_dark_mode_json.options.image_enabled_low_grayscale?wp_dark_mode_json.options.image_low_grayscale_excludes:!1,n=document.querySelectorAll("img");n&&n.length&&n.forEach(s=>{const i=s.src;r&&r.includes(i)&&s.style.setProperty("--wp-dark-mode-img-brightness","100%"),t&&t.includes(i)&&s.style.setProperty("--wp-dark-mode-img-grayscale","0%")})}}const Xr=new Gr;class Qr extends K{constructor(){super(...arguments);L(this,"getVideoHost",t=>{const n=/^(https?:\/\/)?(www\.)?(youtube\.com\/(watch\?v=|embed\/)|youtu\.be\/)[\w-]+/,s=/^(https?:\/\/)?(www\.)?(player\.)?vimeo\.com\/(video\/)?\d+/,i=/\.(mp4|avi|mov|flv|wmv|webm|m4v|mkv|mpg|mpeg|vob|asf|divx|ogv|3gp)$/i;return n.test(t)?"youtube":s.test(t)?"vimeo":i.test(t)?"file":!1});L(this,"getYouTubeVideoID",t=>{const n=/(?:youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i,s=t.match(n);return s?s[1]:null});L(this,"getVimeoVideoID",t=>{const n=/(?:vimeo\.com\/(?:channels\/(?:\w+\/)?|groups\/[^\/]+\/videos\/|album\/\d+\/video\/|video\/|)(\d+)|vimeo\.com\/(?:\w*\/)?(\d+))/i,s=t.match(n);return s?s[1]||s[2]:null})}ready(){this.initVideos()}initVideos(){if(!wp_dark_mode_json.options.video_replaces)return!1;wp_dark_mode_json.options.video_replaces=wp_dark_mode_json.options.video_replaces.map(t=>(["light","dark"].forEach(n=>{const s=this.getVideoHost(t[n]);if(s==="youtube"){const i=this.getYouTubeVideoID(t[n]);if(!i)return;t[n]=`https://www.youtube.com/embed/${i}`}if(s==="vimeo"){const i=this.getVimeoVideoID(t[n]);if(!i)return;t[n]=`https://player.vimeo.com/video/${i}`}}),t)),document.body.style.setProperty("--wp-dark-mode-vid-opacity",1),this.replaceVideos(),this.adjustEmbeds(),this.setVideoFilters(),WPDarkMode.onChange(()=>{this.replaceVideos(),this.setVideoFilters()})}replaceVideos(){const t=document.querySelectorAll("video, iframe, video source");!t||!t.length||t.forEach(n=>{if(!n.src)return;let s=n.dataset.lightSrc||n.src;if(n.classList.add("wp-dark-mode-ignore"),WPDarkMode.isActive){const i=this.getDarkSrc(s);i&&(n.dataset.lightSrc=s,n.dataset.darkSrc=i,n.src=i,n.srcset=i)}else{const i=n.dataset.lightSrc;i&&(n.src=i,n.srcset=i)}})}getDarkSrc(t=null){if(!t)return;const n=wp_dark_mode_json.options.video_replaces||!1;if(!n)return!1;const s=n.find(i=>{const o=t.split("?")[0];return i.light===o});return s?s.dark:!1}adjustEmbeds(){const t=document.querySelectorAll("iframe");if(!t||!t.length)return;const n=Array.from(t).filter(s=>{if(!s.src)return!1;const i=this.getVideoHost(s.src);return i==="youtube"||i==="vimeo"||i==="file"});!n||!n.length||n.forEach(s=>{!s||!s.style||(s.style.filter="brightness(var(--wp-dark-mode-video-brightness, 100%)) grayscale(var(--wp-dark-mode-video-grayscale, 0%))")})}setVideoFilters(){const t=wp_dark_mode_json.options.video_enabled_low_brightness?wp_dark_mode_json.options.video_low_brightness_excludes:[],n=wp_dark_mode_json.options.video_enabled_low_grayscale?wp_dark_mode_json.options.video_low_grayscale_excludes:[],s=document.querySelectorAll("video, iframe, video source");s&&s.length&&s.forEach(i=>{const o=i.src;t&&t.includes(o)&&(i==null||i.style.setProperty("--wp-dark-mode-video-brightness","100%")),n&&n.includes(o)&&(i==null||i.style.setProperty("--wp-dark-mode-video-grayscale","0"))})}}const Zr=new Qr;function Yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var St={exports:{}};(function(e,r){(function(){var t=Math.PI,n=Math.sin,s=Math.cos,i=Math.tan,o=Math.asin,c=Math.atan2,h=Math.acos,l=t/180,u=1e3*60*60*24,d=2440588,S=2451545;function R(p){return p.valueOf()/u-.5+d}function f(p){return new Date((p+.5-d)*u)}function m(p){return R(p)-S}var A=l*23.4397;function C(p,w){return c(n(p)*s(A)-i(w)*n(A),s(p))}function j(p,w){return o(n(w)*s(A)+s(w)*n(A)*n(p))}function I(p,w,g){return c(n(p),s(p)*n(w)-i(g)*s(w))}function Ee(p,w,g){return o(n(w)*n(g)+s(w)*s(g)*s(p))}function Et(p,w){return l*(280.16+360.9856235*p)-w}function dn(p){return p<0&&(p=0),2967e-7/Math.tan(p+.00312536/(p+.08901179))}function At(p){return l*(357.5291+.98560028*p)}function Ot(p){var w=l*(1.9148*n(p)+.02*n(2*p)+3e-4*n(3*p)),g=l*102.9372;return p+w+g+t}function Dt(p){var w=At(p),g=Ot(w);return{dec:j(g,0),ra:C(g,0)}}var U={};U.getPosition=function(p,w,g){var O=l*-g,v=l*w,T=m(p),E=Dt(T),x=Et(T,O)-E.ra;return{azimuth:I(x,v,E.dec),altitude:Ee(x,v,E.dec)}};var qe=U.times=[[-.833,"sunrise","sunset"],[-.3,"sunriseEnd","sunsetStart"],[-6,"dawn","dusk"],[-12,"nauticalDawn","nauticalDusk"],[-18,"nightEnd","night"],[6,"goldenHourEnd","goldenHour"]];U.addTime=function(p,w,g){qe.push([p,w,g])};var Rt=9e-4;function ln(p,w){return Math.round(p-Rt-w/(2*t))}function Tt(p,w,g){return Rt+(p+w)/(2*t)+g}function xt(p,w,g){return S+p+.0053*n(w)-.0069*n(2*g)}function un(p,w,g){return h((n(p)-n(w)*n(g))/(s(w)*s(g)))}function pn(p){return-2.076*Math.sqrt(p)/60}function hn(p,w,g,O,v,T,E){var x=un(p,g,O),F=Tt(x,w,v);return xt(F,T,E)}U.getTimes=function(p,w,g,O){O=O||0;var v=l*-g,T=l*w,E=pn(O),x=m(p),F=ln(x,v),B=Tt(0,v,F),V=At(B),X=Ot(V),re=j(X,0),J=xt(B,V,X),Q,ce,W,q,Z,de,$={solarNoon:f(J),nadir:f(J-.5)};for(Q=0,ce=qe.length;Q<ce;Q+=1)W=qe[Q],q=(W[0]+E)*l,Z=hn(q,v,T,re,F,V,X),de=J-(Z-J),$[W[1]]=f(de),$[W[2]]=f(Z);return $};function Lt(p){var w=l*(218.316+13.176396*p),g=l*(134.963+13.064993*p),O=l*(93.272+13.22935*p),v=w+l*6.289*n(g),T=l*5.128*n(O),E=385001-20905*s(g);return{ra:C(v,T),dec:j(v,T),dist:E}}U.getMoonPosition=function(p,w,g){var O=l*-g,v=l*w,T=m(p),E=Lt(T),x=Et(T,O)-E.ra,F=Ee(x,v,E.dec),B=c(n(x),i(v)*s(E.dec)-n(E.dec)*s(x));return F=F+dn(F),{azimuth:I(x,v,E.dec),altitude:F,distance:E.dist,parallacticAngle:B}},U.getMoonIllumination=function(p){var w=m(p||new Date),g=Dt(w),O=Lt(w),v=149598e3,T=h(n(g.dec)*n(O.dec)+s(g.dec)*s(O.dec)*s(g.ra-O.ra)),E=c(v*n(T),O.dist-v*s(T)),x=c(s(g.dec)*n(g.ra-O.ra),n(g.dec)*s(O.dec)-s(g.dec)*n(O.dec)*s(g.ra-O.ra));return{fraction:(1+s(E))/2,phase:.5+.5*E*(x<0?-1:1)/Math.PI,angle:x}};function Ae(p,w){return new Date(p.valueOf()+w*u/24)}U.getMoonTimes=function(p,w,g,O){var v=new Date(p);O?v.setUTCHours(0,0,0,0):v.setHours(0,0,0,0);for(var T=.133*l,E=U.getMoonPosition(v,w,g).altitude-T,x,F,B,V,X,re,J,Q,ce,W,q,Z,de,$=1;$<=24&&(x=U.getMoonPosition(Ae(v,$),w,g).altitude-T,F=U.getMoonPosition(Ae(v,$+1),w,g).altitude-T,X=(E+F)/2-x,re=(F-E)/2,J=-re/(2*X),Q=(X*J+re)*J+x,ce=re*re-4*X*x,W=0,ce>=0&&(de=Math.sqrt(ce)/(Math.abs(X)*2),q=J-de,Z=J+de,Math.abs(q)<=1&&W++,Math.abs(Z)<=1&&W++,q<-1&&(q=Z)),W===1?E<0?B=$+q:V=$+q:W===2&&(B=$+(Q<0?Z:q),V=$+(Q<0?q:Z)),!(B&&V));$+=2)E=F;var Oe={};return B&&(Oe.rise=Ae(v,B)),V&&(Oe.set=Ae(v,V)),!B&&!V&&(Oe[Q>0?"alwaysUp":"alwaysDown"]=!0),Oe},e.exports=U})()})(St);var en=St.exports;const tn=Yr(en);class rn extends K{async events(){return this.syncStorage(),this.tryApplyingDarkMode(),this.registerEvents(),this}get hasUserChoice(){return k.get("choice")!==null}syncStorage(){if(k.set("device",_.isDeviceDark?"dark":"light"),!this.isPremium)return;let r=new Date().getTimezoneOffset()/60;r>0?r="-"+r:r="+"+Math.abs(Number(r)),k.set("timezone",r),wp_dark_mode_json.options.frontend_mode==="sunset"&&this.syncDeviceLocation()}async syncDeviceLocation(){const r=k.get("location-updated");r&&new Date-new Date().setTime(r)<24*60*60*1e3||!navigator||!navigator.geolocation||navigator.geolocation.getCurrentPosition(t=>{k.set("location",t.coords.latitude+","+t.coords.longitude),k.set("location-updated",new Date().getTime()),wp_dark_mode_json.options.frontend_mode==="sunset"&&this.isPremium&&this.applySunsetMode()})}registerEvents(){Kr.init(),bt.init(),Xr.init(),Zr.init(),this.followDevice()}followDevice(){if(wp_dark_mode_json.options.frontend_mode!=="device"||!window||!window.matchMedia)return;const r=matchMedia("(prefers-color-scheme: dark)");if(!r)return!1;const t=()=>{r.matches?_.activate():_.deactivate()};r.addEventListener("change",function(){k.set("device",r.matches?"dark":"light"),k.get("choice")===null&&t()}),!_.isActive&&!this.hasUserChoice&&t()}async tryApplyingDarkMode(){return new Promise(async r=>{if(this.isPremium){const n=await(await fetch(wp_dark_mode_json.url.ajax+"?action=wp_dark_mode_options&nonce="+wp_dark_mode_json.nonce)).json();if(!this.isTrue(n.data.performance_exclude_cache)){r(!0);return}}if(!this.isTrue(wp_dark_mode_json.options.frontend_enabled)){r(!0);return}if(this.hasUserChoice){k.get("choice")=="dark"?_.activate():_.deactivate(),r(!0);return}switch(wp_dark_mode_json.options.frontend_mode){case"default_light":_.deactivate();break;default:case"default":_.activate();break;case"device":_.isDeviceDark?_.activate():_.deactivate();break;case"time":let s=function(u){const[d,S]=u.split(" ");let[R,f]=d.split(":").map(Number);return S==="PM"&&R!==12?R+=12:S==="AM"&&R===12&&(R=0),R*60+f};if(!this.isPremium){r(!0);return}const t=wp_dark_mode_json.options.frontend_time_starts,n=wp_dark_mode_json.options.frontend_time_ends,i=new Date,o=i.getHours()*60+i.getMinutes(),c=s(t),h=s(n);let l=!1;c<h?o>=c&&o<h&&(l=!0):(o>=c||o<h)&&(l=!0),l?_.activate():_.deactivate();break;case"sunset":if(!this.isPremium){r(!0);return}await this.applySunsetMode();break}r(!0)})}async applySunsetMode(){const r=k.get("location").split(",").map(Number);let{sunrise:t,sunset:n}=tn.getTimes(new Date,r[0],r[1]);const s=new Date;s>n||s<t?_.activate():_.deactivate()}}const nn=new rn,sn=Object.freeze(Object.defineProperty({__proto__:null,Switch_1:(e={})=>`<div class="_track wp-dark-mode-ignore"><div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.HalfMoonFilled}</div><div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonFilled}</div></div>`,Switch_10:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunFilled}</div> <div class="_thumb wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.StarMoonFilled}</div> </div> </div>`,Switch_11:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_thumb wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonFilled}</div> </div> </div>`,Switch_12:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_thumb wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonFilled}</div> </div> </div>`,Switch_13:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.SunOutlined}</div> </div>`,Switch_14:(e={})=>` <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.FullMoonFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.FullMoonFilled}</div> </div> <div class="_font wp-dark-mode-ignore"> <div class="_icon">${e.fontIcon||wp_dark_mode_icons.DoubleUpperT}</div> <div class="_icon wp-dark-mode-ignore">${e.fontIconActive||wp_dark_mode_icons.DoubleUpperT}</div> </div>`,Switch_15:(e={})=>{const r=e.fontIcon?`<img src="${e.fontIcon}"></img>`:"a",t=e.fontIconActive?`<img src="${e.fontIconActive}"></img>`:"A";return` <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonFilled}</div> </div> <div class="_font wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${r}</div> <div class="_icon wp-dark-mode-ignore">${t}</div> </div>`},Switch_16:(e={})=>` <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.StarMoonOutlined}</div> </div> <div class="_font wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.fontIcon?`<img src="${e.fontIcon}"></img>`:wp_dark_mode_icons.DoubleT}</div> <div class="_icon wp-dark-mode-ignore">${e.fontIconActive?`<img src="${e.fontIconActive}"></img>`:wp_dark_mode_icons.DoubleT}</div> </div>`,Switch_17:(e={})=>` <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.RichSunFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.RichMoonFilled}</div> </div> <div class="_font wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.fontIcon||wp_dark_mode_icons.UpperA}</div> <div class="_icon wp-dark-mode-ignore">${e.fontIconActive||wp_dark_mode_icons.UpperA}</div> </div>`,Switch_18:(e={})=>` <div class="_font wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.fontIcon||wp_dark_mode_icons.UpperA}</div> <div class="_icon wp-dark-mode-ignore">${e.fontIconActive||wp_dark_mode_icons.UpperA}</div> </div> <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.FullMoonFilled}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.FullMoonFilled}</div> </div>`,Switch_19:(e={})=>` <div class="_font wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.fontIcon||wp_dark_mode_icons.UpperA}</div> <div class="_icon wp-dark-mode-ignore">${e.fontIconActive||wp_dark_mode_icons.UpperA}</div> </div> <div class="_scheme wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.StarMoonFilled}</div> </div>`,Switch_2:(e={})=>`<div class="_track wp-dark-mode-ignore"><span class="wp-dark-mode-ignore">${e.textLight||"Light"}</span><div class="_thumb wp-dark-mode-ignore"></div><span class="wp-dark-mode-ignore">${e.textDark||"Dark"}</span></div>`,Switch_20:(e={})=>'<div class="_track wp-dark-mode-ignore"> <span class="_thumb wp-dark-mode-ignore"></span> </div>',Switch_21:(e={})=>`<label class="theme-switch _track wp-dark-mode-ignore"><div class="theme-switch__container wp-dark-mode-ignore"><div class="theme-switch__clouds wp-dark-mode-ignore"></div><div class="theme-switch__stars-container wp-dark-mode-ignore">${wp_dark_mode_icons.Stars} </div> <div class="theme-switch__circle-container wp-dark-mode-ignore"> <div class="theme-switch__sun-moon-container wp-dark-mode-ignore"> <div class="theme-switch__moon wp-dark-mode-ignore"> <div class="theme-switch__spot wp-dark-mode-ignore"></div> <div class="theme-switch__spot wp-dark-mode-ignore"></div> <div class="theme-switch__spot wp-dark-mode-ignore"></div> </div> </div> </div> </div> </label> `,Switch_22:(e={})=>`<div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.Halloween.light}</div><div class="_track wp-dark-mode-ignore"><span class="_thumb wp-dark-mode-ignore"></span></div><div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.Halloween.dark}</div>`,Switch_3:(e={})=>`<div class="_track wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> <span class="_thumb wp-dark-mode-ignore"></span> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonOutlined}</div> </div>`,Switch_4:(e={})=>`<div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div><div class="_track wp-dark-mode-ignore"><span class="_thumb wp-dark-mode-ignore"></span></div><div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonOutlined}</div>`,Switch_5:(e={})=>`<div class="_track wp-dark-mode-ignore"><div class="_thumb wp-dark-mode-ignore"><div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.RichSunOutlined}</div><div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.CurvedMoonOutlined}</div></div></div>`,Switch_6:(e={})=>`<span class="wp-dark-mode-ignore">${e.textLight||"Light"}</span><div class="_track wp-dark-mode-ignore"><div class="_thumb wp-dark-mode-ignore"><div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.RichSunOutlined}</div><div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.CurvedMoonOutlined}</div></div></div><span class="wp-dark-mode-ignore">${e.textDark||"Dark"}</span>`,Switch_7:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_thumb wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.RichSunOutlined}</div> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.CurvedMoonOutlined}</div> </div> </div> `,Switch_8:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> <span class="_thumb wp-dark-mode-ignore"></span> <div class="_icon wp-dark-mode-ignore">${e.iconDark||wp_dark_mode_icons.HalfMoonOutlined}</div> </div>`,Switch_9:(e={})=>` <div class="_track wp-dark-mode-ignore"> <div class="_thumb wp-dark-mode-ignore"> <div class="_icon wp-dark-mode-ignore">${e.iconLight||wp_dark_mode_icons.SunOutlined}</div> </div> </div>`},Symbol.toStringTag,{value:"Module"}));class on extends K{constructor(){super(...arguments);L(this,"injectSwitches",()=>{const t=this.getSwitches(".ignore");if(!t||!t.length)return;const n=this;t.forEach(s=>{if(s.querySelector(".wp-dark-mode-switch-styled"))return;const i=["style","size","reactive","textLight","textDark","iconLight","iconDark"],o={};if(i.forEach(h=>{o[h]=s.dataset[h]||null}),!o.style)return;const c=n.buildSwitch(o);s.innerHTML=c})});L(this,"updateSwitches",()=>{const t=this.getSwitches(".dummy");!t||!t.length||t.forEach(n=>{const s=n.querySelector("._scheme");if(s)s.classList[_.isActive?"add":"remove"]("active");else if(n.querySelector(".switch"))n.querySelector(".switch").classList[_.isActive?"add":"remove"]("active");else{let i=n.querySelector("div:not(.light):not(.dark)");i||(i=n),i.classList[_.isActive?"add":"remove"]("active")}})})}getSwitches(t=""){return t!==""?document.querySelectorAll(`.wp-dark-mode-switch:not(${t})`):document.querySelectorAll(".wp-dark-mode-switch")}ready(){const t=typeof window.wp_dark_mode_admin_json<"u"?window.wp_dark_mode_admin_json:window.wp_dark_mode_json;t&&t.is_excluded||(this.injectSwitches(),this.listenSwitches(),this.reactiveSwitches(),this.throttle=!1,t.options.performance_track_dynamic_content&&this.dynamicSwitches(),window.addEventListener("elementor/frontend/init",()=>{this.dynamicSwitches()}))}dynamicSwitches(){if(this.dynamicSwitchesInitialized)return;this.dynamicSwitchesInitialized=!0,new MutationObserver(n=>{n.forEach(s=>{this.throttle||(this.throttle=!0,setTimeout(this.injectSwitches,200),setTimeout(()=>{this.throttle=!1},500))})}).observe(document.body,{childList:!0,subtree:!0,attributes:!1})}listenSwitches(){window==null||window.addEventListener("click",t=>{(t.target.closest(".wp-dark-mode-switch")||t.target.matches(".wp-dark-mode-switch"))&&(t.target.closest(".dummy")||(t.preventDefault(),t.target.closest("._font")||t.target.matches("._font")?(bt.toggleFontSize(t.target.closest(".wp-dark-mode-switch ._font")),this.emit("font-toggled",t)):_.toggle().remember()))}),window==null||window.addEventListener("keydown",t=>{t.key==="Enter"&&(t.target.closest(".wp-dark-mode-switch")||t.target.matches(".wp-dark-mode-switch"))&&(t.preventDefault(),t.target.click())})}reactiveSwitches(){this.updateSwitches(),_.onChange(this.updateSwitches)}buildSwitch(t={}){const n=_.isActive,s=t.reactive!==!1;let i=`<div class="wp-dark-mode-switch-styled wp-dark-mode-switch-${t.style||1} ${n&&s?"active":""}" style="--wp-dark-mode-switch-scale: ${t.size||1}">`;const o="Switch_"+(t.style||1);return t.iconLight=t.iconLight?`<img src="${t.iconLight}" width="100%"></img>`:null,t.iconDark=t.iconDark?`<img src="${t.iconDark}" width="100%"></img>`:null,i+=sn[o](t),i+="</div>",i}}const an=new on,cn=(...e)=>{wp_dark_mode_json.debug&&console.log("%cWPDarkMode","background: #2663eb; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: 500;",...e)};window.Log=cn,window.WPDarkModeApp=nn.init(),console.log("Dark Mode App Initialized"),an.init()})(); //# sourceMappingURL=app.min.js.map