File: /home/citaqlmd/nt.lmskreators.com/wp-content/plugins/code-snippets/dist/settings.js
/*! For license information please see settings.js.LICENSE.txt */
(self.webpackChunkcode_snippets=self.webpackChunkcode_snippets||[]).push([[6472],{2065:(t,e,r)=>{"use strict";var n=r(2284),o=r(5501),i=r(3662);function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(t,e){return new r(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function r(t,n,o){var a=RegExp(t,n);return e.set(a,o||e.get(t)),(0,i.A)(a,r.prototype)}function a(t,r){var n=e.get(r);return Object.keys(n).reduce((function(e,r){var o=n[r];if("number"==typeof o)e[r]=t[o];else{for(var i=0;void 0===t[o[i]]&&i+1<o.length;)i++;e[r]=t[o[i]]}return e}),Object.create(null))}return(0,o.A)(r,RegExp),r.prototype.exec=function(e){var r=t.exec.call(this,e);if(r){r.groups=a(r,this);var n=r.indices;n&&(n.groups=a(n,this))}return r},r.prototype[Symbol.replace]=function(r,o){if("string"==typeof o){var i=e.get(this);return t[Symbol.replace].call(this,r,o.replace(/\$<([^>]+)(>|$)/g,(function(t,e,r){if(""===r)return t;var n=i[e];return Array.isArray(n)?"$"+n.join("$"):"number"==typeof n?"$"+n:""})))}if("function"==typeof o){var c=this;return t[Symbol.replace].call(this,r,(function(){var t=arguments;return"object"!=(0,n.A)(t[t.length-1])&&(t=[].slice.call(t)).push(a(t,c)),o.apply(this,t)}))}return t[Symbol.replace].call(this,r,o)},c.apply(this,arguments)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}r(3099);var s,l,f,p,d,h,v,y,m,g=r(467),w=r(4756),b=r.n(w),x=function(t){return document.getElementById(t)},_=function(t,e){var r,n;return null!==(r=null===(n=window.__code_snippets_i18n)||void 0===n?void 0:n[t])&&void 0!==r?r:e},L=function(){var t=(0,g.A)(b().mark((function t(e,r){var n,o,i,a;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new URLSearchParams,Object.keys(e).forEach((function(t){return o.append(t,e[t])})),t.next=4,fetch(null!==(n=r.ajaxurl)&&void 0!==n?n:"/wp-admin/admin-ajax.php",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:o.toString(),credentials:"same-origin"});case 4:return i=t.sent,t.next=7,i.json();case 7:return a=t.sent,t.abrupt("return",a);case 9:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();!function(){var t=document.getElementById("settings-sections-tabs");if(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}(t.querySelectorAll(".nav-tab"));try{var n=function(){var r=e.value;r.addEventListener("click",(function(e){e.preventDefault();var n=r.getAttribute("data-section");n&&(function(t,e,r){var n,o;null===(n=t.querySelector(".nav-tab-active"))||void 0===n||n.classList.remove("nav-tab-active"),e.classList.add("nav-tab-active"),null===(o=t.closest(".wrap"))||void 0===o||o.setAttribute("data-active-tab",r)}(t,r,n),function(t){var e;"editor"===t&&(null===(e=window.code_snippets_editor_preview)||void 0===e||e.codemirror.refresh())}(n),function(t){var e=document.querySelector("input[name=_wp_http_referer]");if(e){var r=e.value.replace(c(/([&?]section=)[^&]+/,{base:1}),"$1".concat(t));e.value=r+(r===e.value?"§ion=".concat(t):"")}else console.error("could not find http referer")}(n))}))};for(r.s();!(e=r.n()).done;)n()}catch(t){r.e(t)}finally{r.f()}}else console.error("Could not find snippets tabs")}(),function(){var t,e=function(){var t=window.wp.codeEditor,e=document.getElementById("code_snippets_editor_preview");if(e)return window.code_snippets_editor_preview=t.initialize(e),window.code_snippets_editor_preview.codemirror;console.error("Could not initialise CodeMirror on textarea.",e)}(),r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(window.code_snippets_editor_settings);try{var n=function(){var r=t.value,n=document.querySelector('[name="code_snippets_settings[editor]['.concat(r.name,']"]'));null==n||n.addEventListener("change",(function(){var t=r.codemirror,o=function(){switch(r.type){case"select":return(t=n).options[t.selectedIndex].value;case"checkbox":return n.checked;case"number":return parseInt(n.value,10);default:return null}var t}();if(null!==o)if("font_size"===r.name){var i=document.querySelector(".CodeMirror-code");i&&i instanceof HTMLElement&&(i.style.fontSize="".concat(o,"px"))}else null==e||e.setOption(t,o)}))};for(r.s();!(t=r.n()).done;)n()}catch(t){r.e(t)}finally{r.f()}}(),p=null!==(s=window.code_snippets_version_switch)&&void 0!==s?s:{},d=(null!==(l=null===(f=document.querySelector(".current-version"))||void 0===f?void 0:f.textContent)&&void 0!==l?l:"").trim(),h=x("switch-version-btn"),v=x("target_version"),y=x("version-switch-result"),m=x("refresh-versions-btn"),v&&function(t,e,r){t.addEventListener("change",(function(){var n=t.value;if(e)if(n&&n!==r){e.disabled=!1;var o=x("version-switch-warning");o&&o.setAttribute("style","")}else{e.disabled=!0;var i=x("version-switch-warning");i&&i.setAttribute("style","display: none;")}}))}(v,h,d),h&&v&&y&&function(t,e,r,n,o){t.addEventListener("click",(function(){(0,g.A)(b().mark((function i(){var a,c,u,s,l,f,p,d,h;return b().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if((c=e.value)&&c!==o){i.next=6;break}return r.className="notice notice-warning",r.innerHTML="<p>".concat(_("selectDifferent","Please select a different version to switch to."),"</p>"),r.style.display="",i.abrupt("return");case 6:return t.disabled=!0,u=null!==(a=t.textContent)&&void 0!==a?a:"",t.textContent=_("switching","Switching..."),r.className="notice notice-info",r.innerHTML="<p>".concat(_("processing","Processing version switch. Please wait..."),"</p>"),r.style.display="",i.prev=12,i.next=15,L({action:"code_snippets_switch_version",target_version:c,nonce:null!==(s=n.nonce_switch)&&void 0!==s?s:""},n);case 15:if(!(p=i.sent).success){i.next=21;break}return r.className="notice notice-success",r.innerHTML="<p>".concat(null!==(d=null===(h=p.data)||void 0===h?void 0:h.message)&&void 0!==d?d:"","</p>"),setTimeout((function(){return window.location.reload()}),3e3),i.abrupt("return");case 21:r.className="notice notice-error",r.innerHTML="<p>".concat(null!==(l=null===(f=p.data)||void 0===f?void 0:f.message)&&void 0!==l?l:_("error","An error occurred."),"</p>"),t.disabled=!1,t.textContent=u,i.next=33;break;case 27:i.prev=27,i.t0=i.catch(12),r.className="notice notice-error",r.innerHTML="<p>".concat(_("errorSwitch","An error occurred while switching versions. Please try again."),"</p>"),t.disabled=!1,t.textContent=u;case 33:case"end":return i.stop()}}),i,null,[[12,27]])})))()}))}(h,v,y,p,d),m&&function(t,e){t.addEventListener("click",(function(){(0,g.A)(b().mark((function r(){var n,o,i;return b().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=null!==(n=t.textContent)&&void 0!==n?n:"",t.disabled=!0,t.textContent=_("refreshing","Refreshing..."),r.prev=3,r.next=6,L({action:"code_snippets_refresh_versions",nonce:null!==(i=e.nonce_refresh)&&void 0!==i?i:""},e);case 6:t.textContent=_("refreshed","Refreshed!"),setTimeout((function(){t.disabled=!1,t.textContent=o,window.location.reload()}),1e3),r.next=14;break;case 10:r.prev=10,r.t0=r.catch(3),t.disabled=!1,t.textContent=o;case 14:case"end":return r.stop()}}),r,null,[[3,10]])})))()}))}(m,p)},4633:(t,e,r)=>{var n=r(3738).default;function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,c=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),a=new M(n||[]);return c(i,"_invoke",{value:O(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",m="executing",g="completed",w={};function b(){}function x(){}function _(){}var L={};p(L,s,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(I([])));S&&S!==i&&a.call(S,s)&&(L=S);var A=_.prototype=b.prototype=Object.create(L);function j(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,c,u){var s=h(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var o;c(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function O(t,r,n){var o=v;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=T(c,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=h(t,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===w)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return x.prototype=_,c(A,"constructor",{value:_,configurable:!0}),c(_,"constructor",{value:x,configurable:!0}),x.displayName=p(_,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,p(t,f,"GeneratorFunction")),t.prototype=Object.create(A),t},r.awrap=function(t){return{__await:t}},j(k.prototype),p(k.prototype,l,(function(){return this})),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(A),p(A,f,"Generator"),p(A,s,(function(){return this})),p(A,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=I,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return c.type="throw",c.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,w):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),w},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),w}},r}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},3738:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:(t,e,r)=>{var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},467:(t,e,r)=>{"use strict";function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}r.d(e,{A:()=>o})},5501:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var n=r(3662);function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&(0,n.A)(t,e)}},3662:(t,e,r)=>{"use strict";function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}r.d(e,{A:()=>n})}},t=>{t(t.s=2065)}]);