HEX
Server: LiteSpeed
System: Linux s166.bitcommand.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: h340499 (1922)
PHP: 8.2.16
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/h340499/public_html/wp-content/plugins/learnpress/assets/dist/js/admin/edit-course.min.js
(()=>{var e={9455:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});var n=o(1601),s=o.n(n),i=o(6314),a=o.n(i)()(s());a.push([e.id,"/*!\n * Toastify js 1.12.0\n * https://github.com/apvarun/toastify-js\n * @license MIT licensed\n *\n * Copyright (C) 2018 Varun A P\n */\n\n.toastify {\n    padding: 12px 20px;\n    color: #ffffff;\n    display: inline-block;\n    box-shadow: 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3);\n    background: -webkit-linear-gradient(315deg, #73a5ff, #5477f5);\n    background: linear-gradient(135deg, #73a5ff, #5477f5);\n    position: fixed;\n    opacity: 0;\n    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);\n    border-radius: 2px;\n    cursor: pointer;\n    text-decoration: none;\n    max-width: calc(50% - 20px);\n    z-index: 2147483647;\n}\n\n.toastify.on {\n    opacity: 1;\n}\n\n.toast-close {\n    background: transparent;\n    border: 0;\n    color: white;\n    cursor: pointer;\n    font-family: inherit;\n    font-size: 1em;\n    opacity: 0.4;\n    padding: 0 5px;\n}\n\n.toastify-right {\n    right: 15px;\n}\n\n.toastify-left {\n    left: 15px;\n}\n\n.toastify-top {\n    top: -150px;\n}\n\n.toastify-bottom {\n    bottom: -150px;\n}\n\n.toastify-rounded {\n    border-radius: 25px;\n}\n\n.toastify-avatar {\n    width: 1.5em;\n    height: 1.5em;\n    margin: -7px 5px;\n    border-radius: 2px;\n}\n\n.toastify-center {\n    margin-left: auto;\n    margin-right: auto;\n    left: 0;\n    right: 0;\n    max-width: fit-content;\n    max-width: -moz-fit-content;\n}\n\n@media only screen and (max-width: 360px) {\n    .toastify-right, .toastify-left {\n        margin-left: auto;\n        margin-right: auto;\n        left: 0;\n        right: 0;\n        max-width: fit-content;\n    }\n}\n",""]);const r=a},6314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o}).join("")},t.i=function(e,o,n,s,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var r=0;r<this.length;r++){var l=this[r][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var d=[].concat(e[c]);n&&a[d[0]]||(void 0!==i&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=i),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),s&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=s):d[4]="".concat(s)),t.push(d))}},t}},1601:e=>{"use strict";e.exports=function(e){return e[1]}},5072:e=>{"use strict";var t=[];function o(e){for(var o=-1,n=0;n<t.length;n++)if(t[n].identifier===e){o=n;break}return o}function n(e,n){for(var i={},a=[],r=0;r<e.length;r++){var l=e[r],c=n.base?l[0]+n.base:l[0],d=i[c]||0,u="".concat(c," ").concat(d);i[c]=d+1;var p=o(u),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(m);else{var h=s(m,n);n.byIndex=r,t.splice(r,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function s(e,t){var o=t.domAPI(t);return o.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;o.update(e=t)}else o.remove()}}e.exports=function(e,s){var i=n(e=e||[],s=s||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var r=o(i[a]);t[r].references--}for(var l=n(e,s),c=0;c<i.length;c++){var d=o(i[c]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}i=l}}},7659:e=>{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,o)=>{"use strict";e.exports=function(e){var t=o.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(o){!function(e,t,o){var n="";o.supports&&(n+="@supports (".concat(o.supports,") {")),o.media&&(n+="@media ".concat(o.media," {"));var s=void 0!==o.layer;s&&(n+="@layer".concat(o.layer.length>0?" ".concat(o.layer):""," {")),n+=o.css,s&&(n+="}"),o.media&&(n+="}"),o.supports&&(n+="}");var i=o.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,o)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},8465:function(e){e.exports=function(){"use strict";function e(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function t(t,o){return t.get(e(t,o))}function o(e,t,o){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,o)}const n={},s=e=>new Promise(t=>{if(!e)return t();const o=window.scrollX,s=window.scrollY;n.restoreFocusTimeout=setTimeout(()=>{n.previousActiveElement instanceof HTMLElement?(n.previousActiveElement.focus(),n.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(o,s)}),i="swal2-",a=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=i+t,e),{}),r=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=i+t,e),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},u=e=>{console.error(`${l} ${e}`)},p=[],m=(e,t=null)=>{var o;o=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,p.includes(o)||(p.push(o),d(o))},h=e=>"function"==typeof e?e():e,w=e=>e&&"function"==typeof e.toPromise,g=e=>w(e)?e.toPromise():Promise.resolve(e),f=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${a.container}`),b=e=>{const t=v();return t?t.querySelector(e):null},y=e=>b(`.${e}`),S=()=>y(a.popup),k=()=>y(a.icon),C=()=>y(a.title),x=()=>y(a["html-container"]),A=()=>y(a.image),T=()=>y(a["progress-steps"]),E=()=>y(a["validation-message"]),I=()=>b(`.${a.actions} .${a.confirm}`),B=()=>b(`.${a.actions} .${a.cancel}`),_=()=>b(`.${a.actions} .${a.deny}`),D=()=>b(`.${a.loader}`),L=()=>y(a.actions),$=()=>y(a.footer),P=()=>y(a["timer-progress-bar"]),O=()=>y(a.close),M=()=>{const e=S();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),o=Array.from(t).sort((e,t)=>{const o=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return o>n?1:o<n?-1:0}),n=e.querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n'),s=Array.from(n).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(o.concat(s))].filter(e=>ee(e))},N=()=>H(document.body,a.shown)&&!H(document.body,a["toast-shown"])&&!H(document.body,a["no-backdrop"]),q=()=>{const e=S();return!!e&&H(e,a.toast)},j=(e,t)=>{if(e.textContent="",t){const o=(new DOMParser).parseFromString(t,"text/html"),n=o.querySelector("head");n&&Array.from(n.childNodes).forEach(t=>{e.appendChild(t)});const s=o.querySelector("body");s&&Array.from(s.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},H=(e,t)=>{if(!t)return!1;const o=t.split(/\s+/);for(let t=0;t<o.length;t++)if(!e.classList.contains(o[t]))return!1;return!0},X=(e,t,o)=>{if(((e,t)=>{Array.from(e.classList).forEach(o=>{Object.values(a).includes(o)||Object.values(r).includes(o)||Object.values(t.showClass||{}).includes(o)||e.classList.remove(o)})})(e,t),!t.customClass)return;const n=t.customClass[o];n&&("string"==typeof n||n.forEach?J(e,n):d(`Invalid type of customClass.${o}! Expected string or iterable object, got "${typeof n}"`))},z=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${a.popup} > .${a[t]}`);case"checkbox":return e.querySelector(`.${a.popup} > .${a.checkbox} input`);case"radio":return e.querySelector(`.${a.popup} > .${a.radio} input:checked`)||e.querySelector(`.${a.popup} > .${a.radio} input:first-child`);case"range":return e.querySelector(`.${a.popup} > .${a.range} input`);default:return e.querySelector(`.${a.popup} > .${a.input}`)}},F=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},R=(e,t,o)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{o?e.classList.add(t):e.classList.remove(t)}):o?e.classList.add(t):e.classList.remove(t)}))},J=(e,t)=>{R(e,t,!0)},V=(e,t)=>{R(e,t,!1)},Y=(e,t)=>{const o=Array.from(e.children);for(let e=0;e<o.length;e++){const n=o[e];if(n instanceof HTMLElement&&H(n,t))return n}},G=(e,t,o)=>{o===`${parseInt(`${o}`)}`&&(o=parseInt(o)),o||0===parseInt(`${o}`)?e.style.setProperty(t,"number"==typeof o?`${o}px`:o):e.style.removeProperty(t)},W=(e,t="flex")=>{e&&(e.style.display=t)},U=e=>{e&&(e.style.display="none")},Z=(e,t="block")=>{e&&new MutationObserver(()=>{Q(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},K=(e,t,o,n)=>{const s=e.querySelector(t);s&&s.style.setProperty(o,n)},Q=(e,t,o="flex")=>{t?W(e,o):U(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>!!(e.scrollHeight>e.clientHeight),oe=e=>{const t=window.getComputedStyle(e),o=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return o>0||n>0},ne=(e,t=!1)=>{const o=P();o&&ee(o)&&(t&&(o.style.transition="none",o.style.width="100%"),setTimeout(()=>{o.style.transition=`width ${e/1e3}s linear`,o.style.width="0%"},10))},se=`\n <div aria-labelledby="${a.title}" aria-describedby="${a["html-container"]}" class="${a.popup}" tabindex="-1">\n   <button type="button" class="${a.close}"></button>\n   <ul class="${a["progress-steps"]}"></ul>\n   <div class="${a.icon}"></div>\n   <img class="${a.image}" />\n   <h2 class="${a.title}" id="${a.title}"></h2>\n   <div class="${a["html-container"]}" id="${a["html-container"]}"></div>\n   <input class="${a.input}" id="${a.input}" />\n   <input type="file" class="${a.file}" />\n   <div class="${a.range}">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="${a.select}" id="${a.select}"></select>\n   <div class="${a.radio}"></div>\n   <label class="${a.checkbox}">\n     <input type="checkbox" id="${a.checkbox}" />\n     <span class="${a.label}"></span>\n   </label>\n   <textarea class="${a.textarea}" id="${a.textarea}"></textarea>\n   <div class="${a["validation-message"]}" id="${a["validation-message"]}"></div>\n   <div class="${a.actions}">\n     <div class="${a.loader}"></div>\n     <button type="button" class="${a.confirm}"></button>\n     <button type="button" class="${a.deny}"></button>\n     <button type="button" class="${a.cancel}"></button>\n   </div>\n   <div class="${a.footer}"></div>\n   <div class="${a["timer-progress-bar-container"]}">\n     <div class="${a["timer-progress-bar"]}"></div>\n   </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ie=()=>{n.currentInstance.resetValidationMessage()},ae=e=>{const t=(()=>{const e=v();return!!e&&(e.remove(),V([document.documentElement,document.body],[a["no-backdrop"],a["toast-shown"],a["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void u("SweetAlert2 requires document to initialize");const o=document.createElement("div");o.className=a.container,t&&J(o,a["no-transition"]),j(o,se),o.dataset.swal2Theme=e.theme;const n="string"==typeof(s=e.target)?document.querySelector(s):s;var s;n.appendChild(o),e.topLayer&&(o.setAttribute("popover",""),o.showPopover()),(e=>{const t=S();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&J(v(),a.rtl)})(n),(()=>{const e=S(),t=Y(e,a.input),o=Y(e,a.file),n=e.querySelector(`.${a.range} input`),s=e.querySelector(`.${a.range} output`),i=Y(e,a.select),r=e.querySelector(`.${a.checkbox} input`),l=Y(e,a.textarea);t.oninput=ie,o.onchange=ie,i.onchange=ie,r.onchange=ie,l.oninput=ie,n.oninput=()=>{ie(),s.value=n.value},n.onchange=()=>{ie(),s.value=n.value}})()},re=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&j(t,e)},le=(e,t)=>{e.jquery?ce(t,e):j(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let o=0;o in t;o++)e.appendChild(t[o].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(e,t)=>{const o=L(),n=D();o&&n&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?W(o):U(o),X(o,t,"actions"),function(e,t,o){const n=I(),s=_(),i=B();n&&s&&i&&(pe(n,"confirm",o),pe(s,"deny",o),pe(i,"cancel",o),function(e,t,o,n){n.buttonsStyling?(J([e,t,o],a.styled),n.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",n.confirmButtonColor),n.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",n.denyButtonColor),n.cancelButtonColor&&o.style.setProperty("--swal2-cancel-button-background-color",n.cancelButtonColor),ue(e),ue(t),ue(o)):V([e,t,o],a.styled)}(n,s,i,o),o.reverseButtons&&(o.toast?(e.insertBefore(i,n),e.insertBefore(s,n)):(e.insertBefore(i,t),e.insertBefore(s,t),e.insertBefore(n,t))))}(o,n,t),j(n,t.loaderHtml||""),X(n,t,"loader"))};function ue(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const o=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${o}`))}function pe(e,t,o){const n=c(t);Q(e,o[`show${n}Button`],"inline-block"),j(e,o[`${t}ButtonText`]||""),e.setAttribute("aria-label",o[`${t}ButtonAriaLabel`]||""),e.className=a[t],X(e,o,`${t}Button`)}const me=(e,t)=>{const o=v();o&&(function(e,t){"string"==typeof t?e.style.background=t:t||J([document.documentElement,document.body],a["no-backdrop"])}(o,t.backdrop),function(e,t){t&&(t in a?J(e,a[t]):(d('The "position" parameter is not valid, defaulting to "center"'),J(e,a.center)))}(o,t.position),function(e,t){t&&J(e,a[`grow-${t}`])}(o,t.grow),X(o,t,"container"))};var he={innerParams:new WeakMap,domCache:new WeakMap};const we=["input","file","range","select","radio","checkbox","textarea"],ge=e=>{if(!e.input)return;if(!Ce[e.input])return void u(`Unexpected type of input! Expected ${Object.keys(Ce).join(" | ")}, got "${e.input}"`);const t=Se(e.input);if(!t)return;const o=Ce[e.input](t,e);W(t),e.inputAutoFocus&&setTimeout(()=>{F(o)})},fe=(e,t)=>{const o=S();if(!o)return;const n=z(o,e);if(n){(e=>{for(let t=0;t<e.attributes.length;t++){const o=e.attributes[t].name;["id","type","value","style"].includes(o)||e.removeAttribute(o)}})(n);for(const e in t)n.setAttribute(e,t[e])}},ve=e=>{if(!e.input)return;const t=Se(e.input);t&&X(t,e,"input")},be=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},ye=(e,t,o)=>{if(o.inputLabel){const n=document.createElement("label"),s=a["input-label"];n.setAttribute("for",e.id),n.className=s,"object"==typeof o.customClass&&J(n,o.customClass.inputLabel),n.innerText=o.inputLabel,t.insertAdjacentElement("beforebegin",n)}},Se=e=>{const t=S();if(t)return Y(t,a[e]||a.input)},ke=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:f(t)||d(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=Ce.search=Ce.date=Ce["datetime-local"]=Ce.time=Ce.week=Ce.month=(e,t)=>(ke(e,t.inputValue),ye(e,e,t),be(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ye(e,e,t),be(e,t),e),Ce.range=(e,t)=>{const o=e.querySelector("input"),n=e.querySelector("output");return ke(o,t.inputValue),o.type=t.input,ke(n,t.inputValue),ye(o,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const o=document.createElement("option");j(o,t.inputPlaceholder),o.value="",o.disabled=!0,o.selected=!0,e.appendChild(o)}return ye(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const o=z(S(),"checkbox");o.value="1",o.checked=Boolean(t.inputValue);const n=e.querySelector("span");return j(n,t.inputPlaceholder||t.inputLabel),o},Ce.textarea=(e,t)=>{ke(e,t.inputValue),be(e,t),ye(e,e,t);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(S()).width);new MutationObserver(()=>{if(!document.body.contains(e))return;const n=e.offsetWidth+(s=e,parseInt(window.getComputedStyle(s).marginLeft)+parseInt(window.getComputedStyle(s).marginRight));var s;n>o?S().style.width=`${n}px`:G(S(),"width",t.width)}).observe(e,{attributes:!0,attributeFilter:["style"]})}}),e};const xe=(e,t)=>{const o=x();o&&(Z(o),X(o,t,"htmlContainer"),t.html?(re(t.html,o),W(o,"block")):t.text?(o.textContent=t.text,W(o,"block")):U(o),((e,t)=>{const o=S();if(!o)return;const n=he.innerParams.get(e),s=!n||t.input!==n.input;we.forEach(e=>{const n=Y(o,a[e]);n&&(fe(e,t.inputAttributes),n.className=a[e],s&&U(n))}),t.input&&(s&&ge(t),ve(t))})(e,t))},Ae=(e,t)=>{for(const[o,n]of Object.entries(r))t.icon!==o&&V(e,n);J(e,t.icon&&r[t.icon]),Ie(e,t),Te(),X(e,t,"icon")},Te=()=>{const e=S();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),o=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<o.length;e++)o[e].style.backgroundColor=t},Ee=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let o=e.innerHTML,n="";t.iconHtml?n=Be(t.iconHtml):"success"===t.icon?(n=(e=>`\n  ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div>\n  ${e.animation?'<div class="swal2-success-fix"></div>':""}\n  ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`)(t),o=o.replace(/ style=".*?"/g,"")):"error"===t.icon?n='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n':t.icon&&(n=Be({question:"?",warning:"!",info:"i"}[t.icon])),o.trim()!==n.trim()&&j(e,n)},Ie=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const o of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])K(e,o,"background-color",t.iconColor);K(e,".swal2-success-ring","border-color",t.iconColor)}},Be=e=>`<div class="${a["icon-content"]}">${e}</div>`;let _e=!1,De=0,Le=0,$e=0,Pe=0;const Oe=e=>{const t=S();if(e.target===t||k().contains(e.target)){_e=!0;const o=qe(e);De=o.clientX,Le=o.clientY,$e=parseInt(t.style.insetInlineStart)||0,Pe=parseInt(t.style.insetBlockStart)||0,J(t,"swal2-dragging")}},Me=e=>{const t=S();if(_e){let{clientX:o,clientY:n}=qe(e);t.style.insetInlineStart=`${$e+(o-De)}px`,t.style.insetBlockStart=`${Pe+(n-Le)}px`}},Ne=()=>{const e=S();_e=!1,V(e,"swal2-dragging")},qe=e=>{let t=0,o=0;return e.type.startsWith("mouse")?(t=e.clientX,o=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,o=e.touches[0].clientY),{clientX:t,clientY:o}},je=(e,t)=>{const o=v(),n=S();if(o&&n){if(t.toast){G(o,"width",t.width),n.style.width="100%";const e=D();e&&n.insertBefore(e,k())}else G(n,"width",t.width);G(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),U(E()),He(n,t),t.draggable&&!t.toast?(J(n,a.draggable),(e=>{e.addEventListener("mousedown",Oe),document.body.addEventListener("mousemove",Me),e.addEventListener("mouseup",Ne),e.addEventListener("touchstart",Oe),document.body.addEventListener("touchmove",Me),e.addEventListener("touchend",Ne)})(n)):(V(n,a.draggable),(e=>{e.removeEventListener("mousedown",Oe),document.body.removeEventListener("mousemove",Me),e.removeEventListener("mouseup",Ne),e.removeEventListener("touchstart",Oe),document.body.removeEventListener("touchmove",Me),e.removeEventListener("touchend",Ne)})(n))}},He=(e,t)=>{const o=t.showClass||{};e.className=`${a.popup} ${ee(e)?o.popup:""}`,t.toast?(J([document.documentElement,document.body],a["toast-shown"]),J(e,a.toast)):J(e,a.modal),X(e,t,"popup"),"string"==typeof t.customClass&&J(e,t.customClass),t.icon&&J(e,a[`icon-${t.icon}`])},Xe=e=>{const t=document.createElement("li");return J(t,a["progress-step"]),j(t,e),t},ze=e=>{const t=document.createElement("li");return J(t,a["progress-step-line"]),e.progressStepsDistance&&G(t,"width",e.progressStepsDistance),t},Fe=(e,t)=>{je(0,t),me(0,t),((e,t)=>{const o=T();if(!o)return;const{progressSteps:n,currentProgressStep:s}=t;n&&0!==n.length&&void 0!==s?(W(o),o.textContent="",s>=n.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),n.forEach((e,i)=>{const r=Xe(e);if(o.appendChild(r),i===s&&J(r,a["active-progress-step"]),i!==n.length-1){const e=ze(t);o.appendChild(e)}})):U(o)})(0,t),((e,t)=>{const o=he.innerParams.get(e),n=k();if(n){if(o&&t.icon===o.icon)return Ee(n,t),void Ae(n,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(r).indexOf(t.icon))return u(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void U(n);W(n),Ee(n,t),Ae(n,t),J(n,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Te)}else U(n)}})(e,t),((e,t)=>{const o=A();o&&(t.imageUrl?(W(o,""),o.setAttribute("src",t.imageUrl),o.setAttribute("alt",t.imageAlt||""),G(o,"width",t.imageWidth),G(o,"height",t.imageHeight),o.className=a.image,X(o,t,"image")):U(o))})(0,t),((e,t)=>{const o=C();o&&(Z(o),Q(o,Boolean(t.title||t.titleText),"block"),t.title&&re(t.title,o),t.titleText&&(o.innerText=t.titleText),X(o,t,"title"))})(0,t),((e,t)=>{const o=O();o&&(j(o,t.closeButtonHtml||""),X(o,t,"closeButton"),Q(o,t.showCloseButton),o.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),xe(e,t),de(0,t),((e,t)=>{const o=$();o&&(Z(o),Q(o,Boolean(t.footer),"block"),t.footer&&re(t.footer,o),X(o,t,"footer"))})(0,t);const o=S();"function"==typeof t.didRender&&o&&t.didRender(o),n.eventEmitter.emit("didRender",o)},Re=()=>{var e;return null===(e=I())||void 0===e?void 0:e.click()},Je=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Ve=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Ye=(e,t)=>{var o;const n=M();if(n.length)return-2===(e+=t)&&(e=n.length-1),e===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();null===(o=S())||void 0===o||o.focus()},Ge=["ArrowRight","ArrowDown"],We=["ArrowLeft","ArrowUp"],Ue=(e,t,o)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Ze(t,e):"Tab"===t.key?Ke(t):[...Ge,...We].includes(t.key)?Qe(t.key):"Escape"===t.key&&et(t,e,o)))},Ze=(e,t)=>{if(!h(t.allowEnterKey))return;const o=z(S(),t.input);if(e.target&&o&&e.target instanceof HTMLElement&&e.target.outerHTML===o.outerHTML){if(["textarea","file"].includes(t.input))return;Re(),e.preventDefault()}},Ke=e=>{const t=e.target,o=M();let n=-1;for(let e=0;e<o.length;e++)if(t===o[e]){n=e;break}e.shiftKey?Ye(n,-1):Ye(n,1),e.stopPropagation(),e.preventDefault()},Qe=e=>{const t=L(),o=I(),n=_(),s=B();if(!(t&&o&&n&&s))return;const i=[o,n,s];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const a=Ge.includes(e)?"nextElementSibling":"previousElementSibling";let r=document.activeElement;if(r){for(let e=0;e<t.children.length;e++){if(r=r[a],!r)return;if(r instanceof HTMLButtonElement&&ee(r))break}r instanceof HTMLButtonElement&&r.focus()}},et=(e,t,o)=>{e.preventDefault(),h(t.allowEscapeKey)&&o(Je.esc)};var tt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const ot=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},nt="undefined"!=typeof window&&!!window.GestureEvent,st=()=>{const e=v();if(!e)return;let t;e.ontouchstart=e=>{t=it(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},it=e=>{const t=e.target,o=v(),n=x();return!(!o||!n||at(e)||rt(e)||t!==o&&(te(o)||!(t instanceof HTMLElement)||((e,t)=>{let o=e;for(;o&&o!==t;){if(te(o))return!0;o=o.parentElement}return!1})(t,n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||te(n)&&n.contains(t)))},at=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,rt=e=>e.touches&&e.touches.length>1;let lt=null;const ct=e=>{null===lt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(lt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${lt+(()=>{const e=document.createElement("div");e.className=a["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function dt(e,t,o,i){q()?vt(e,i):(s(o).then(()=>vt(e,i)),Ve(n)),nt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),N()&&(null!==lt&&(document.body.style.paddingRight=`${lt}px`,lt=null),(()=>{if(H(document.body,a.iosfix)){const e=parseInt(document.body.style.top,10);V(document.body,a.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),ot()),V([document.documentElement,document.body],[a.shown,a["height-auto"],a["no-backdrop"],a["toast-shown"]])}function ut(e){e=wt(e);const t=tt.swalPromiseResolve.get(this),o=pt(this);this.isAwaitingPromise?e.isDismissed||(ht(this),t(e)):o&&t(e)}const pt=e=>{const t=S();if(!t)return!1;const o=he.innerParams.get(e);if(!o||H(t,o.hideClass.popup))return!1;V(t,o.showClass.popup),J(t,o.hideClass.popup);const n=v();return V(n,o.showClass.backdrop),J(n,o.hideClass.backdrop),gt(e,t,o),!0};function mt(e){const t=tt.swalPromiseReject.get(this);ht(this),t&&t(e)}const ht=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,he.innerParams.get(e)||e._destroy())},wt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),gt=(e,t,o)=>{var s;const i=v(),a=oe(t);"function"==typeof o.willClose&&o.willClose(t),null===(s=n.eventEmitter)||void 0===s||s.emit("willClose",t),a?ft(e,t,i,o.returnFocus,o.didClose):dt(e,i,o.returnFocus,o.didClose)},ft=(e,t,o,s,i)=>{n.swalCloseEventFinishedCallback=dt.bind(null,e,o,s,i);const a=function(e){var o;e.target===t&&(null===(o=n.swalCloseEventFinishedCallback)||void 0===o||o.call(n),delete n.swalCloseEventFinishedCallback,t.removeEventListener("animationend",a),t.removeEventListener("transitionend",a))};t.addEventListener("animationend",a),t.addEventListener("transitionend",a)},vt=(e,t)=>{setTimeout(()=>{var o;"function"==typeof t&&t.bind(e.params)(),null===(o=n.eventEmitter)||void 0===o||o.emit("didClose"),e._destroy&&e._destroy()})},bt=e=>{let t=S();if(t||new Qo,t=S(),!t)return;const o=D();q()?U(k()):yt(t,e),W(o),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},yt=(e,t)=>{const o=L(),n=D();o&&n&&(!t&&ee(I())&&(t=I()),W(o),t&&(U(t),n.setAttribute("data-button-to-replace",t.className),o.insertBefore(n,t)),J([e,o],a.loading))},St=e=>e.checked?1:0,kt=e=>e.checked?e.value:null,Ct=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,xt=(e,t)=>{const o=S();if(!o)return;const n=e=>{"select"===t.input?function(e,t,o){const n=Y(e,a.select);if(!n)return;const s=(e,t,n)=>{const s=document.createElement("option");s.value=n,j(s,t),s.selected=Et(n,o.inputValue),e.appendChild(s)};t.forEach(e=>{const t=e[0],o=e[1];if(Array.isArray(o)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),o.forEach(t=>s(e,t[1],t[0]))}else s(n,o,t)}),n.focus()}(o,Tt(e),t):"radio"===t.input&&function(e,t,o){const n=Y(e,a.radio);if(!n)return;t.forEach(e=>{const t=e[0],s=e[1],i=document.createElement("input"),r=document.createElement("label");i.type="radio",i.name=a.radio,i.value=t,Et(t,o.inputValue)&&(i.checked=!0);const l=document.createElement("span");j(l,s),l.className=a.label,r.appendChild(i),r.appendChild(l),n.appendChild(r)});const s=n.querySelectorAll("input");s.length&&s[0].focus()}(o,Tt(e),t)};w(t.inputOptions)||f(t.inputOptions)?(bt(I()),g(t.inputOptions).then(t=>{e.hideLoading(),n(t)})):"object"==typeof t.inputOptions?n(t.inputOptions):u("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},At=(e,t)=>{const o=e.getInput();o&&(U(o),g(t.inputValue).then(n=>{o.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,W(o),o.focus(),e.hideLoading()}).catch(t=>{u(`Error in inputValue promise: ${t}`),o.value="",W(o),o.focus(),e.hideLoading()}))};const Tt=e=>{const t=[];return e instanceof Map?e.forEach((e,o)=>{let n=e;"object"==typeof n&&(n=Tt(n)),t.push([o,n])}):Object.keys(e).forEach(o=>{let n=e[o];"object"==typeof n&&(n=Tt(n)),t.push([o,n])}),t},Et=(e,t)=>!!t&&t.toString()===e.toString(),It=(e,t)=>{const o=he.innerParams.get(e);if(!o.input)return void u(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const n=e.getInput(),s=((e,t)=>{const o=e.getInput();if(!o)return null;switch(t.input){case"checkbox":return St(o);case"radio":return kt(o);case"file":return Ct(o);default:return t.inputAutoTrim?o.value.trim():o.value}})(e,o);o.inputValidator?Bt(e,s,t):n&&!n.checkValidity()?(e.enableButtons(),e.showValidationMessage(o.validationMessage||n.validationMessage)):"deny"===t?_t(e,s):$t(e,s)},Bt=(e,t,o)=>{const n=he.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>g(n.inputValidator(t,n.validationMessage))).then(n=>{e.enableButtons(),e.enableInput(),n?e.showValidationMessage(n):"deny"===o?_t(e,t):$t(e,t)})},_t=(e,t)=>{const o=he.innerParams.get(e||void 0);o.showLoaderOnDeny&&bt(_()),o.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(o.preDeny(t,o.validationMessage))).then(o=>{!1===o?(e.hideLoading(),ht(e)):e.close({isDenied:!0,value:void 0===o?t:o})}).catch(t=>Lt(e||void 0,t))):e.close({isDenied:!0,value:t})},Dt=(e,t)=>{e.close({isConfirmed:!0,value:t})},Lt=(e,t)=>{e.rejectPromise(t)},$t=(e,t)=>{const o=he.innerParams.get(e||void 0);o.showLoaderOnConfirm&&bt(),o.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>g(o.preConfirm(t,o.validationMessage))).then(o=>{ee(E())||!1===o?(e.hideLoading(),ht(e)):Dt(e,void 0===o?t:o)}).catch(t=>Lt(e||void 0,t))):Dt(e,t)};function Pt(){const e=he.innerParams.get(this);if(!e)return;const t=he.domCache.get(this);U(t.loader),q()?e.icon&&W(k()):Ot(t),V([t.popup,t.actions],a.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const Ot=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?W(t[0],"inline-block"):!ee(I())&&!ee(_())&&!ee(B())&&U(e.actions)};function Mt(){const e=he.innerParams.get(this),t=he.domCache.get(this);return t?z(t.popup,e.input):null}function Nt(e,t,o){const n=he.domCache.get(e);t.forEach(e=>{n[e].disabled=o})}function qt(e,t){const o=S();if(o&&e)if("radio"===e.type){const e=o.querySelectorAll(`[name="${a.radio}"]`);for(let o=0;o<e.length;o++)e[o].disabled=t}else e.disabled=t}function jt(){Nt(this,["confirmButton","denyButton","cancelButton"],!1)}function Ht(){Nt(this,["confirmButton","denyButton","cancelButton"],!0)}function Xt(){qt(this.getInput(),!1)}function zt(){qt(this.getInput(),!0)}function Ft(e){const t=he.domCache.get(this),o=he.innerParams.get(this);j(t.validationMessage,e),t.validationMessage.className=a["validation-message"],o.customClass&&o.customClass.validationMessage&&J(t.validationMessage,o.customClass.validationMessage),W(t.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid","true"),n.setAttribute("aria-describedby",a["validation-message"]),F(n),J(n,a.inputerror))}function Rt(){const e=he.domCache.get(this);e.validationMessage&&U(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),V(t,a.inputerror))}const Jt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},Vt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Yt={allowEnterKey:void 0},Gt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Wt=e=>Object.prototype.hasOwnProperty.call(Jt,e),Ut=e=>-1!==Vt.indexOf(e),Zt=e=>Yt[e],Kt=e=>{Wt(e)||d(`Unknown parameter "${e}"`)},Qt=e=>{Gt.includes(e)&&d(`The parameter "${e}" is incompatible with toasts`)},eo=e=>{const t=Zt(e);t&&m(e,t)},to=e=>{!1===e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&d(`Invalid theme "${e.theme}"`);for(const t in e)Kt(t),e.toast&&Qt(t),eo(t)};function oo(e){const t=v(),o=S(),n=he.innerParams.get(this);if(!o||H(o,n.hideClass.popup))return void d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s=no(e),i=Object.assign({},n,s);to(i),t.dataset.swal2Theme=i.theme,Fe(this,i),he.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const no=e=>{const t={};return Object.keys(e).forEach(o=>{Ut(o)?t[o]=e[o]:d(`Invalid parameter to update: ${o}`)}),t};function so(){const e=he.domCache.get(this),t=he.innerParams.get(this);t?(e.popup&&n.swalCloseEventFinishedCallback&&(n.swalCloseEventFinishedCallback(),delete n.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),n.eventEmitter.emit("didDestroy"),io(this)):ao(this)}const io=e=>{ao(e),delete e.params,delete n.keydownHandler,delete n.keydownTarget,delete n.currentInstance},ao=e=>{e.isAwaitingPromise?(ro(he,e),e.isAwaitingPromise=!0):(ro(tt,e),ro(he,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},ro=(e,t)=>{for(const o in e)e[o].delete(t)};var lo=Object.freeze({__proto__:null,_destroy:so,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Ht,disableInput:zt,disableLoading:Pt,enableButtons:jt,enableInput:Xt,getInput:Mt,handleAwaitingPromise:ht,hideLoading:Pt,rejectPromise:mt,resetValidationMessage:Rt,showValidationMessage:Ft,update:oo});const co=(e,t,o)=>{t.popup.onclick=()=>{e&&(uo(e)||e.timer||e.input)||o(Je.close)}},uo=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let po=!1;const mo=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(po=!0)}}},ho=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(po=!0)}}},wo=(e,t,o)=>{t.container.onclick=n=>{po?po=!1:n.target===t.container&&h(e.allowOutsideClick)&&o(Je.backdrop)}},go=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const fo=()=>{if(n.timeout)return(()=>{const e=P();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const o=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${o}%`})(),n.timeout.stop()},vo=()=>{if(n.timeout){const e=n.timeout.start();return ne(e),e}};let bo=!1;const yo={};const So=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in yo){const o=t.getAttribute(e);if(o)return void yo[e].fire({template:o})}};n.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const o=this._getHandlersByEventName(e);o.includes(t)||o.push(t)}once(e,t){const o=(...n)=>{this.removeListener(e,o),t.apply(this,n)};this.on(e,o)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const o=this._getHandlersByEventName(e),n=o.indexOf(t);n>-1&&o.splice(n,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var ko=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||go(e[0])?["title","html","icon"].forEach((o,n)=>{const s=e[n];"string"==typeof s||go(s)?t[o]=s:void 0!==s&&u(`Unexpected type of ${o}! Expected "string" or "Element", got ${typeof s}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){yo[e]=this,bo||(document.body.addEventListener("click",So),bo=!0)},clickCancel:()=>{var e;return null===(e=B())||void 0===e?void 0:e.click()},clickConfirm:Re,clickDeny:()=>{var e;return null===(e=_())||void 0===e?void 0:e.click()},enableLoading:bt,fire:function(...e){return new this(...e)},getActions:L,getCancelButton:B,getCloseButton:O,getConfirmButton:I,getContainer:v,getDenyButton:_,getFocusableElements:M,getFooter:$,getHtmlContainer:x,getIcon:k,getIconContent:()=>y(a["icon-content"]),getImage:A,getInputLabel:()=>y(a["input-label"]),getLoader:D,getPopup:S,getProgressSteps:T,getTimerLeft:()=>n.timeout&&n.timeout.getTimerLeft(),getTimerProgressBar:P,getTitle:C,getValidationMessage:E,increaseTimer:e=>{if(n.timeout){const t=n.timeout.increase(e);return ne(t,!0),t}},isDeprecatedParameter:Zt,isLoading:()=>{const e=S();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!n.timeout||!n.timeout.isRunning()),isUpdatableParameter:Ut,isValidParameter:Wt,isVisible:()=>ee(S()),mixin:function(e){return class extends(this){_main(t,o){return super._main(t,Object.assign({},e,o))}}},off:(e,t)=>{e?t?n.eventEmitter.removeListener(e,t):n.eventEmitter.removeAllListeners(e):n.eventEmitter.reset()},on:(e,t)=>{n.eventEmitter.on(e,t)},once:(e,t)=>{n.eventEmitter.once(e,t)},resumeTimer:vo,showLoading:bt,stopTimer:fo,toggleTimer:()=>{const e=n.timeout;return e&&(e.running?fo():vo())}});class Co{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const xo=["swal-title","swal-html","swal-footer"],Ao=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{$o(e,["name","value"]);const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&(t[o]="boolean"==typeof Jt[o]?"false"!==n:"object"==typeof Jt[o]?JSON.parse(n):n)}),t},To=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const o=e.getAttribute("name"),n=e.getAttribute("value");o&&n&&(t[o]=new Function(`return ${n}`)())}),t},Eo=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{$o(e,["type","color","aria-label"]);const o=e.getAttribute("type");o&&["confirm","cancel","deny"].includes(o)&&(t[`${o}ButtonText`]=e.innerHTML,t[`show${c(o)}Button`]=!0,e.hasAttribute("color")&&(t[`${o}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${o}ButtonAriaLabel`]=e.getAttribute("aria-label")))}),t},Io=e=>{const t={},o=e.querySelector("swal-image");return o&&($o(o,["src","width","height","alt"]),o.hasAttribute("src")&&(t.imageUrl=o.getAttribute("src")||void 0),o.hasAttribute("width")&&(t.imageWidth=o.getAttribute("width")||void 0),o.hasAttribute("height")&&(t.imageHeight=o.getAttribute("height")||void 0),o.hasAttribute("alt")&&(t.imageAlt=o.getAttribute("alt")||void 0)),t},Bo=e=>{const t={},o=e.querySelector("swal-icon");return o&&($o(o,["type","color"]),o.hasAttribute("type")&&(t.icon=o.getAttribute("type")),o.hasAttribute("color")&&(t.iconColor=o.getAttribute("color")),t.iconHtml=o.innerHTML),t},_o=e=>{const t={},o=e.querySelector("swal-input");o&&($o(o,["type","label","placeholder","value"]),t.input=o.getAttribute("type")||"text",o.hasAttribute("label")&&(t.inputLabel=o.getAttribute("label")),o.hasAttribute("placeholder")&&(t.inputPlaceholder=o.getAttribute("placeholder")),o.hasAttribute("value")&&(t.inputValue=o.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach(e=>{$o(e,["value"]);const o=e.getAttribute("value");if(!o)return;const n=e.innerHTML;t.inputOptions[o]=n})),t},Do=(e,t)=>{const o={};for(const n in t){const s=t[n],i=e.querySelector(s);i&&($o(i,[]),o[s.replace(/^swal-/,"")]=i.innerHTML.trim())}return o},Lo=e=>{const t=xo.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const o=e.tagName.toLowerCase();t.includes(o)||d(`Unrecognized element <${o}>`)})},$o=(e,t)=>{Array.from(e.attributes).forEach(o=>{-1===t.indexOf(o.name)&&d([`Unrecognized attribute "${o.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])})},Po=e=>{const t=v(),o=S();"function"==typeof e.willOpen&&e.willOpen(o),n.eventEmitter.emit("willOpen",o);const s=window.getComputedStyle(document.body).overflowY;qo(t,o,e),setTimeout(()=>{Mo(t,o)},10),N()&&(No(t,e.scrollbarPadding,s),(()=>{const e=v();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))})})()),q()||n.previousActiveElement||(n.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(o)),n.eventEmitter.emit("didOpen",o)},Oo=e=>{const t=S();if(e.target!==t)return;const o=v();t.removeEventListener("animationend",Oo),t.removeEventListener("transitionend",Oo),o.style.overflowY="auto",V(o,a["no-transition"])},Mo=(e,t)=>{oe(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Oo),t.addEventListener("transitionend",Oo)):e.style.overflowY="auto"},No=(e,t,o)=>{(()=>{if(nt&&!H(document.body,a.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",J(document.body,a.iosfix),st()}})(),t&&"hidden"!==o&&ct(o),setTimeout(()=>{e.scrollTop=0})},qo=(e,t,o)=>{J(e,o.showClass.backdrop),o.animation?(t.style.setProperty("opacity","0","important"),W(t,"grid"),setTimeout(()=>{J(t,o.showClass.popup),t.style.removeProperty("opacity")},10)):W(t,"grid"),J([document.documentElement,document.body],a.shown),o.heightAuto&&o.backdrop&&!o.toast&&J([document.documentElement,document.body],a["height-auto"])};var jo=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),Ho=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Xo(e){(function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=jo),"url"===e.input&&(e.inputValidator=Ho))})(e),e.showLoaderOnConfirm&&!e.preConfirm&&d("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),ae(e)}let zo;var Fo=new WeakMap;class Ro{constructor(...t){if(o(this,Fo,void 0),"undefined"==typeof window)return;zo=this;const n=Object.freeze(this.constructor.argsToParams(t));var s,i,a;this.params=n,this.isAwaitingPromise=!1,s=Fo,i=this,a=this._main(zo.params),s.set(e(s,i),a)}_main(e,t={}){if(to(Object.assign({},t,e)),n.currentInstance){const e=tt.swalPromiseResolve.get(n.currentInstance),{isAwaitingPromise:t}=n.currentInstance;n.currentInstance._destroy(),t||e({isDismissed:!0}),N()&&ot()}n.currentInstance=zo;const o=Vo(e,t);Xo(o),Object.freeze(o),n.timeout&&(n.timeout.stop(),delete n.timeout),clearTimeout(n.restoreFocusTimeout);const s=Yo(zo);return Fe(zo,o),he.innerParams.set(zo,o),Jo(zo,s,o)}then(e){return t(Fo,this).then(e)}finally(e){return t(Fo,this).finally(e)}}const Jo=(e,t,o)=>new Promise((s,i)=>{const a=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};tt.swalPromiseResolve.set(e,s),tt.swalPromiseReject.set(e,i),t.confirmButton.onclick=()=>{(e=>{const t=he.innerParams.get(e);e.disableButtons(),t.input?It(e,"confirm"):$t(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=he.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?It(e,"deny"):_t(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Je.cancel)})(e,a)},t.closeButton.onclick=()=>{a(Je.close)},((e,t,o)=>{e.toast?co(e,t,o):(mo(t),ho(t),wo(e,t,o))})(o,t,a),((e,t,o)=>{Ve(e),t.toast||(e.keydownHandler=e=>Ue(t,e,o),e.keydownTarget=t.keydownListenerCapture?window:S(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(n,o,a),((e,t)=>{"select"===t.input||"radio"===t.input?xt(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(w(t.inputValue)||f(t.inputValue))&&(bt(I()),At(e,t))})(e,o),Po(o),Go(n,o,a),Wo(t,o),setTimeout(()=>{t.container.scrollTop=0})}),Vo=(e,t)=>{const o=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const o=t.content;return Lo(o),Object.assign(Ao(o),To(o),Eo(o),Io(o),Bo(o),_o(o),Do(o,xo))})(e),n=Object.assign({},Jt,t,o,e);return n.showClass=Object.assign({},Jt.showClass,n.showClass),n.hideClass=Object.assign({},Jt.hideClass,n.hideClass),!1===n.animation&&(n.showClass={backdrop:"swal2-noanimation"},n.hideClass={}),n},Yo=e=>{const t={popup:S(),container:v(),actions:L(),confirmButton:I(),denyButton:_(),cancelButton:B(),loader:D(),closeButton:O(),validationMessage:E(),progressSteps:T()};return he.domCache.set(e,t),t},Go=(e,t,o)=>{const n=P();U(n),t.timer&&(e.timeout=new Co(()=>{o("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(W(n),X(n,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},Wo=(e,t)=>{if(!t.toast)return h(t.allowEnterKey)?void(Uo(e)||Zo(e,t)||Ye(-1,1)):(m("allowEnterKey"),void Ko())},Uo=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Zo=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton)||(e.confirmButton.focus(),0)),Ko=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};Ro.prototype.disableButtons=Ht,Ro.prototype.enableButtons=jt,Ro.prototype.getInput=Mt,Ro.prototype.disableInput=zt,Ro.prototype.enableInput=Xt,Ro.prototype.hideLoading=Pt,Ro.prototype.disableLoading=Pt,Ro.prototype.showValidationMessage=Ft,Ro.prototype.resetValidationMessage=Rt,Ro.prototype.close=ut,Ro.prototype.closePopup=ut,Ro.prototype.closeModal=ut,Ro.prototype.closeToast=ut,Ro.prototype.rejectPromise=mt,Ro.prototype.update=oo,Ro.prototype._destroy=so,Object.assign(Ro,ko),Object.keys(lo).forEach(e=>{Ro[e]=function(...t){return zo&&zo[e]?zo[e](...t):null}}),Ro.DismissReason=Je,Ro.version="11.26.3";const Qo=Ro;return Qo.default=Qo,Qo}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var o=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(o),o.styleSheet)o.styleSheet.disabled||(o.styleSheet.cssText=t);else try{o.innerHTML=t}catch(e){o.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')},7736:function(e){var t;t=function(e){var t=function(e){return new t.lib.init(e)};function o(e,t){return t.offset[e]?isNaN(t.offset[e])?t.offset[e]:t.offset[e]+"px":"0px"}function n(e,t){return!(!e||"string"!=typeof t||!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1))}return t.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},t.lib=t.prototype={toastify:"1.12.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||t.defaults.text,this.options.node=e.node||t.defaults.node,this.options.duration=0===e.duration?0:e.duration||t.defaults.duration,this.options.selector=e.selector||t.defaults.selector,this.options.callback=e.callback||t.defaults.callback,this.options.destination=e.destination||t.defaults.destination,this.options.newWindow=e.newWindow||t.defaults.newWindow,this.options.close=e.close||t.defaults.close,this.options.gravity="bottom"===e.gravity?"toastify-bottom":t.defaults.gravity,this.options.positionLeft=e.positionLeft||t.defaults.positionLeft,this.options.position=e.position||t.defaults.position,this.options.backgroundColor=e.backgroundColor||t.defaults.backgroundColor,this.options.avatar=e.avatar||t.defaults.avatar,this.options.className=e.className||t.defaults.className,this.options.stopOnFocus=void 0===e.stopOnFocus?t.defaults.stopOnFocus:e.stopOnFocus,this.options.onClick=e.onClick||t.defaults.onClick,this.options.offset=e.offset||t.defaults.offset,this.options.escapeMarkup=void 0!==e.escapeMarkup?e.escapeMarkup:t.defaults.escapeMarkup,this.options.ariaLive=e.ariaLive||t.defaults.ariaLive,this.options.style=e.style||t.defaults.style,e.backgroundColor&&(this.options.style.background=e.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");for(var t in e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.'),this.options.style)e.style[t]=this.options.style[t];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,""!==this.options.avatar){var n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(!0===this.options.close){var s=document.createElement("button");s.type="button",s.setAttribute("aria-label","Close"),s.className="toast-close",s.innerHTML="&#10006;",s.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var i=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&i>360?e.insertAdjacentElement("afterbegin",s):e.appendChild(s)}if(this.options.stopOnFocus&&this.options.duration>0){var a=this;e.addEventListener("mouseover",function(t){window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",function(){e.timeOutValue=window.setTimeout(function(){a.removeElement(e)},a.options.duration)})}if(void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var r=o("x",this.options),l=o("y",this.options),c="left"==this.options.position?r:"-"+r,d="toastify-top"==this.options.gravity?l:"-"+l;e.style.transform="translate("+c+","+d+")"}return e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e="string"==typeof this.options.selector?document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||"undefined"!=typeof ShadowRoot&&this.options.selector instanceof ShadowRoot?this.options.selector:document.body))throw"Root element is not defined";var o=t.defaults.oldestFirst?e.firstChild:e.lastChild;return e.insertBefore(this.toastElement,o),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},o={top:15,bottom:15},s={top:15,bottom:15},i=document.getElementsByClassName("toastify"),a=0;a<i.length;a++){e=!0===n(i[a],"toastify-top")?"toastify-top":"toastify-bottom";var r=i[a].offsetHeight;e=e.substr(9,e.length-1),(window.innerWidth>0?window.innerWidth:screen.width)<=360?(i[a].style[e]=s[e]+"px",s[e]+=r+15):!0===n(i[a],"toastify-left")?(i[a].style[e]=t[e]+"px",t[e]+=r+15):(i[a].style[e]=o[e]+"px",o[e]+=r+15)}return this},t.lib.init.prototype=t.lib,t},e.exports?e.exports=t():this.Toastify=t()}},t={};function o(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={id:n,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nc=void 0,(()=>{"use strict";var e=o(8465),t=o.n(e);function n(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){a(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},r.apply(this,arguments)}function l(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var c=l(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=l(/Edge/i),u=l(/firefox/i),p=l(/safari/i)&&!l(/chrome/i)&&!l(/android/i),m=l(/iP(ad|od|hone)/i),h=l(/chrome/i)&&l(/android/i),w={capture:!1,passive:!1};function g(e,t,o){e.addEventListener(t,o,!c&&w)}function f(e,t,o){e.removeEventListener(t,o,!c&&w)}function v(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function b(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function y(e,t,o,n){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&v(e,t):v(e,t))||n&&e===o)return e;if(e===o)break}while(e=b(e))}return null}var S,k=/\s+/g;function C(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(k," ").replace(" "+t+" "," ");e.className=(n+(o?" "+t:"")).replace(k," ")}}function x(e,t,o){var n=e&&e.style;if(n){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in n||-1!==t.indexOf("webkit")||(t="-webkit-"+t),n[t]=o+("string"==typeof o?"":"px")}}function A(e,t){var o="";if("string"==typeof e)o=e;else do{var n=x(e,"transform");n&&"none"!==n&&(o=n+" "+o)}while(!t&&(e=e.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(o)}function T(e,t,o){if(e){var n=e.getElementsByTagName(t),s=0,i=n.length;if(o)for(;s<i;s++)o(n[s],s);return n}return[]}function E(){return document.scrollingElement||document.documentElement}function I(e,t,o,n,s){if(e.getBoundingClientRect||e===window){var i,a,r,l,d,u,p;if(e!==window&&e.parentNode&&e!==E()?(a=(i=e.getBoundingClientRect()).top,r=i.left,l=i.bottom,d=i.right,u=i.height,p=i.width):(a=0,r=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,p=window.innerWidth),(t||o)&&e!==window&&(s=s||e.parentNode,!c))do{if(s&&s.getBoundingClientRect&&("none"!==x(s,"transform")||o&&"static"!==x(s,"position"))){var m=s.getBoundingClientRect();a-=m.top+parseInt(x(s,"border-top-width")),r-=m.left+parseInt(x(s,"border-left-width")),l=a+i.height,d=r+i.width;break}}while(s=s.parentNode);if(n&&e!==window){var h=A(s||e),w=h&&h.a,g=h&&h.d;h&&(l=(a/=g)+(u/=g),d=(r/=w)+(p/=w))}return{top:a,left:r,bottom:l,right:d,width:p,height:u}}}function B(e,t,o){for(var n=P(e,!0),s=I(e)[t];n;){var i=I(n)[o];if(!("top"===o||"left"===o?s>=i:s<=i))return n;if(n===E())break;n=P(n,!1)}return!1}function _(e,t,o,n){for(var s=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==Ne.ghost&&(n||a[i]!==Ne.dragged)&&y(a[i],o.draggable,e,!1)){if(s===t)return a[i];s++}i++}return null}function D(e,t){for(var o=e.lastElementChild;o&&(o===Ne.ghost||"none"===x(o,"display")||t&&!v(o,t));)o=o.previousElementSibling;return o||null}function L(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ne.clone||t&&!v(e,t)||o++;return o}function $(e){var t=0,o=0,n=E();if(e)do{var s=A(e),i=s.a,a=s.d;t+=e.scrollLeft*i,o+=e.scrollTop*a}while(e!==n&&(e=e.parentNode));return[t,o]}function P(e,t){if(!e||!e.getBoundingClientRect)return E();var o=e,n=!1;do{if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var s=x(o);if(o.clientWidth<o.scrollWidth&&("auto"==s.overflowX||"scroll"==s.overflowX)||o.clientHeight<o.scrollHeight&&("auto"==s.overflowY||"scroll"==s.overflowY)){if(!o.getBoundingClientRect||o===document.body)return E();if(n||t)return o;n=!0}}}while(o=o.parentNode);return E()}function O(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function M(e,t){return function(){if(!S){var o=arguments;1===o.length?e.call(this,o[0]):e.apply(this,o),S=setTimeout(function(){S=void 0},t)}}}function N(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function q(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function j(e,t,o){var n={};return Array.from(e.children).forEach(function(s){var i,a,r,l;if(y(s,t.draggable,e,!1)&&!s.animated&&s!==o){var c=I(s);n.left=Math.min(null!==(i=n.left)&&void 0!==i?i:1/0,c.left),n.top=Math.min(null!==(a=n.top)&&void 0!==a?a:1/0,c.top),n.right=Math.max(null!==(r=n.right)&&void 0!==r?r:-1/0,c.right),n.bottom=Math.max(null!==(l=n.bottom)&&void 0!==l?l:-1/0,c.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var H="Sortable"+(new Date).getTime();var X=[],z={initializeByDefault:!0},F={mount:function(e){for(var t in z)z.hasOwnProperty(t)&&!(t in e)&&(e[t]=z[t]);X.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),X.push(e)},pluginEvent:function(e,t,o){var n=this;this.eventCanceled=!1,o.cancel=function(){n.eventCanceled=!0};var i=e+"Global";X.forEach(function(n){t[n.pluginName]&&(t[n.pluginName][i]&&t[n.pluginName][i](s({sortable:t},o)),t.options[n.pluginName]&&t[n.pluginName][e]&&t[n.pluginName][e](s({sortable:t},o)))})},initializePlugins:function(e,t,o,n){for(var s in X.forEach(function(n){var s=n.pluginName;if(e.options[s]||n.initializeByDefault){var i=new n(e,t,e.options);i.sortable=e,i.options=e.options,e[s]=i,r(o,i.defaults)}}),e.options)if(e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);void 0!==i&&(e.options[s]=i)}},getEventProperties:function(e,t){var o={};return X.forEach(function(n){"function"==typeof n.eventProperties&&r(o,n.eventProperties.call(t[n.pluginName],e))}),o},modifyOption:function(e,t,o){var n;return X.forEach(function(s){e[s.pluginName]&&s.optionListeners&&"function"==typeof s.optionListeners[t]&&(n=s.optionListeners[t].call(e[s.pluginName],o))}),n}};var R=["evt"],J=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=o.evt,i=function(e,t){if(null==e)return{};var o,n,s=function(e,t){if(null==e)return{};var o,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(s[o]=e[o]);return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}(o,R);F.pluginEvent.bind(Ne)(e,t,s({dragEl:Y,parentEl:G,ghostEl:W,rootEl:U,nextEl:Z,lastDownEl:K,cloneEl:Q,cloneHidden:ee,dragStarted:me,putSortable:ae,activeSortable:Ne.active,originalEvent:n,oldIndex:te,oldDraggableIndex:ne,newIndex:oe,newDraggableIndex:se,hideGhostForTarget:$e,unhideGhostForTarget:Pe,cloneNowHidden:function(){ee=!0},cloneNowShown:function(){ee=!1},dispatchSortableEvent:function(e){V({sortable:t,name:e,originalEvent:n})}},i))};function V(e){!function(e){var t=e.sortable,o=e.rootEl,n=e.name,i=e.targetEl,a=e.cloneEl,r=e.toEl,l=e.fromEl,u=e.oldIndex,p=e.newIndex,m=e.oldDraggableIndex,h=e.newDraggableIndex,w=e.originalEvent,g=e.putSortable,f=e.extraEventProperties;if(t=t||o&&o[H]){var v,b=t.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||c||d?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=r||o,v.from=l||o,v.item=i||o,v.clone=a,v.oldIndex=u,v.newIndex=p,v.oldDraggableIndex=m,v.newDraggableIndex=h,v.originalEvent=w,v.pullMode=g?g.lastPutMode:void 0;var S=s(s({},f),F.getEventProperties(n,t));for(var k in S)v[k]=S[k];o&&o.dispatchEvent(v),b[y]&&b[y].call(t,v)}}(s({putSortable:ae,cloneEl:Q,targetEl:Y,rootEl:U,oldIndex:te,oldDraggableIndex:ne,newIndex:oe,newDraggableIndex:se},e))}var Y,G,W,U,Z,K,Q,ee,te,oe,ne,se,ie,ae,re,le,ce,de,ue,pe,me,he,we,ge,fe,ve=!1,be=!1,ye=[],Se=!1,ke=!1,Ce=[],xe=!1,Ae=[],Te="undefined"!=typeof document,Ee=m,Ie=d||c?"cssFloat":"float",Be=Te&&!h&&!m&&"draggable"in document.createElement("div"),_e=function(){if(Te){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),De=function(e,t){var o=x(e),n=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),s=_(e,0,t),i=_(e,1,t),a=s&&x(s),r=i&&x(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+I(s).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+I(i).width;if("flex"===o.display)return"column"===o.flexDirection||"column-reverse"===o.flexDirection?"vertical":"horizontal";if("grid"===o.display)return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&"none"!==a.float){var d="left"===a.float?"left":"right";return!i||"both"!==r.clear&&r.clear!==d?"horizontal":"vertical"}return s&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=n&&"none"===o[Ie]||i&&"none"===o[Ie]&&l+c>n)?"vertical":"horizontal"},Le=function(e){function t(e,o){return function(n,s,i,a){var r=n.options.group.name&&s.options.group.name&&n.options.group.name===s.options.group.name;if(null==e&&(o||r))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(n,s,i,a),o)(n,s,i,a);var l=(o?n:s).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var o={},n=e.group;n&&"object"==i(n)||(n={name:n}),o.name=n.name,o.checkPull=t(n.pull,!0),o.checkPut=t(n.put),o.revertClone=n.revertClone,e.group=o},$e=function(){!_e&&W&&x(W,"display","none")},Pe=function(){!_e&&W&&x(W,"display","")};Te&&!h&&document.addEventListener("click",function(e){if(be)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),be=!1,!1},!0);var Oe=function(e){if(Y){e=e.touches?e.touches[0]:e;var t=(s=e.clientX,i=e.clientY,ye.some(function(e){var t=e[H].options.emptyInsertThreshold;if(t&&!D(e)){var o=I(e),n=s>=o.left-t&&s<=o.right+t,r=i>=o.top-t&&i<=o.bottom+t;return n&&r?a=e:void 0}}),a);if(t){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[H]._onDragOver(o)}}var s,i,a},Me=function(e){Y&&Y.parentNode[H]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r({},t),e[H]=this;var o,n,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return De(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window&&(!p||m),emptyInsertThreshold:5};for(var a in F.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var l in Le(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Be,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?g(e,"pointerdown",this._onTapStart):(g(e,"mousedown",this._onTapStart),g(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(e,"dragover",this),g(e,"dragenter",this)),ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r(this,(n=[],{captureAnimationState:function(){n=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==x(e,"display")&&e!==Ne.ghost){n.push({target:e,rect:I(e)});var t=s({},n[n.length-1].rect);if(e.thisAnimationDuration){var o=A(e,!0);o&&(t.top-=o.f,t.left-=o.e)}e.fromRect=t}})},addAnimationState:function(e){n.push(e)},removeAnimationState:function(e){n.splice(function(e,t){for(var o in e)if(e.hasOwnProperty(o))for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[o][n])return Number(o);return-1}(n,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(o),void("function"==typeof e&&e());var s=!1,i=0;n.forEach(function(e){var o=0,n=e.target,a=n.fromRect,r=I(n),l=n.prevFromRect,c=n.prevToRect,d=e.rect,u=A(n,!0);u&&(r.top-=u.f,r.left-=u.e),n.toRect=r,n.thisAnimationDuration&&O(l,r)&&!O(a,r)&&(d.top-r.top)/(d.left-r.left)===(a.top-r.top)/(a.left-r.left)&&(o=function(e,t,o,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*n.animation}(d,l,c,t.options)),O(r,a)||(n.prevFromRect=a,n.prevToRect=r,o||(o=t.options.animation),t.animate(n,d,r,o)),o&&(s=!0,i=Math.max(i,o),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},o),n.thisAnimationDuration=o)}),clearTimeout(o),s?o=setTimeout(function(){"function"==typeof e&&e()},i):"function"==typeof e&&e(),n=[]},animate:function(e,t,o,n){if(n){x(e,"transition",""),x(e,"transform","");var s=A(this.el),i=s&&s.a,a=s&&s.d,r=(t.left-o.left)/(i||1),l=(t.top-o.top)/(a||1);e.animatingX=!!r,e.animatingY=!!l,x(e,"transform","translate3d("+r+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),x(e,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),x(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){x(e,"transition",""),x(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},n)}}}))}function qe(e,t,o,n,s,i,a,r){var l,u,p=e[H],m=p.options.onMove;return!window.CustomEvent||c||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=o,l.draggedRect=n,l.related=s||t,l.relatedRect=i||I(t),l.willInsertAfter=r,l.originalEvent=a,e.dispatchEvent(l),m&&(u=m.call(p,l,a)),u}function je(e){e.draggable=!1}function He(){xe=!1}function Xe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,n=0;o--;)n+=t.charCodeAt(o);return n.toString(36)}function ze(e){return setTimeout(e,0)}function Fe(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(he=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Y):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,n=this.options,s=n.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,r=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||r,c=n.filter;if(function(e){Ae.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var n=t[o];n.checked&&Ae.push(n)}}(o),!Y&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=y(r,n.draggable,o,!1))&&r.animated||K===r)){if(te=L(r),ne=L(r,n.draggable),"function"==typeof c){if(c.call(this,e,r,this))return V({sortable:t,rootEl:l,name:"filter",targetEl:r,toEl:o,fromEl:o}),J("filter",t,{evt:e}),void(s&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(n){if(n=y(l,n.trim(),o,!1))return V({sortable:t,rootEl:n,name:"filter",targetEl:r,fromEl:o,toEl:o}),J("filter",t,{evt:e}),!0})))return void(s&&e.preventDefault());n.handle&&!y(l,n.handle,o,!1)||this._prepareDragStart(e,a,r)}}},_prepareDragStart:function(e,t,o){var n,s=this,i=s.el,a=s.options,r=i.ownerDocument;if(o&&!Y&&o.parentNode===i){var l=I(o);if(U=i,G=(Y=o).parentNode,Z=Y.nextSibling,K=o,ie=a.group,Ne.dragged=Y,re={target:Y,clientX:(t||e).clientX,clientY:(t||e).clientY},ue=re.clientX-l.left,pe=re.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Y.style["will-change"]="all",n=function(){J("delayEnded",s,{evt:e}),Ne.eventCanceled?s._onDrop():(s._disableDelayedDragEvents(),!u&&s.nativeDraggable&&(Y.draggable=!0),s._triggerDragStart(e,t),V({sortable:s,name:"choose",originalEvent:e}),C(Y,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){T(Y,e.trim(),je)}),g(r,"dragover",Oe),g(r,"mousemove",Oe),g(r,"touchmove",Oe),a.supportPointer?(g(r,"pointerup",s._onDrop),!this.nativeDraggable&&g(r,"pointercancel",s._onDrop)):(g(r,"mouseup",s._onDrop),g(r,"touchend",s._onDrop),g(r,"touchcancel",s._onDrop)),u&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Y.draggable=!0),J("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||c))n();else{if(Ne.eventCanceled)return void this._onDrop();a.supportPointer?(g(r,"pointerup",s._disableDelayedDrag),g(r,"pointercancel",s._disableDelayedDrag)):(g(r,"mouseup",s._disableDelayedDrag),g(r,"touchend",s._disableDelayedDrag),g(r,"touchcancel",s._disableDelayedDrag)),g(r,"mousemove",s._delayedDragTouchMoveHandler),g(r,"touchmove",s._delayedDragTouchMoveHandler),a.supportPointer&&g(r,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(n,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Y&&je(Y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"pointerup",this._disableDelayedDrag),f(e,"pointercancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,t?"touchmove":"mousemove",this._onTouchMove):(g(Y,"dragend",this),g(U,"dragstart",this._onDragStart));try{document.selection?ze(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ve=!1,U&&Y){J("dragStarted",this,{evt:t}),this.nativeDraggable&&g(document,"dragover",Me);var o=this.options;!e&&C(Y,o.dragClass,!1),C(Y,o.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,$e();for(var e=document.elementFromPoint(le.clientX,le.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==t;)t=e;if(Y.parentNode[H]._isOutsideThisEl(e),t)do{if(t[H]&&t[H]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=b(t));Pe()}},_onTouchMove:function(e){if(re){var t=this.options,o=t.fallbackTolerance,n=t.fallbackOffset,s=e.touches?e.touches[0]:e,i=W&&A(W,!0),a=W&&i&&i.a,r=W&&i&&i.d,l=Ee&&fe&&$(fe),c=(s.clientX-re.clientX+n.x)/(a||1)+(l?l[0]-Ce[0]:0)/(a||1),d=(s.clientY-re.clientY+n.y)/(r||1)+(l?l[1]-Ce[1]:0)/(r||1);if(!Ne.active&&!ve){if(o&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(W){i?(i.e+=c-(ce||0),i.f+=d-(de||0)):i={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");x(W,"webkitTransform",u),x(W,"mozTransform",u),x(W,"msTransform",u),x(W,"transform",u),ce=c,de=d,le=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!W){var e=this.options.fallbackOnBody?document.body:U,t=I(Y,!0,Ee,!0,e),o=this.options;if(Ee){for(fe=e;"static"===x(fe,"position")&&"none"===x(fe,"transform")&&fe!==document;)fe=fe.parentNode;fe!==document.body&&fe!==document.documentElement?(fe===document&&(fe=E()),t.top+=fe.scrollTop,t.left+=fe.scrollLeft):fe=E(),Ce=$(fe)}C(W=Y.cloneNode(!0),o.ghostClass,!1),C(W,o.fallbackClass,!0),C(W,o.dragClass,!0),x(W,"transition",""),x(W,"transform",""),x(W,"box-sizing","border-box"),x(W,"margin",0),x(W,"top",t.top),x(W,"left",t.left),x(W,"width",t.width),x(W,"height",t.height),x(W,"opacity","0.8"),x(W,"position",Ee?"absolute":"fixed"),x(W,"zIndex","100000"),x(W,"pointerEvents","none"),Ne.ghost=W,e.appendChild(W),x(W,"transform-origin",ue/parseInt(W.style.width)*100+"% "+pe/parseInt(W.style.height)*100+"%")}},_onDragStart:function(e,t){var o=this,n=e.dataTransfer,s=o.options;J("dragStart",this,{evt:e}),Ne.eventCanceled?this._onDrop():(J("setupClone",this),Ne.eventCanceled||((Q=q(Y)).removeAttribute("id"),Q.draggable=!1,Q.style["will-change"]="",this._hideClone(),C(Q,this.options.chosenClass,!1),Ne.clone=Q),o.cloneId=ze(function(){J("clone",o),Ne.eventCanceled||(o.options.removeCloneOnHide||U.insertBefore(Q,Y),o._hideClone(),V({sortable:o,name:"clone"}))}),!t&&C(Y,s.dragClass,!0),t?(be=!0,o._loopId=setInterval(o._emulateDragOver,50)):(f(document,"mouseup",o._onDrop),f(document,"touchend",o._onDrop),f(document,"touchcancel",o._onDrop),n&&(n.effectAllowed="move",s.setData&&s.setData.call(o,n,Y)),g(document,"drop",o),x(Y,"transform","translateZ(0)")),ve=!0,o._dragStartId=ze(o._dragStarted.bind(o,t,e)),g(document,"selectstart",o),me=!0,window.getSelection().removeAllRanges(),p&&x(document.body,"user-select","none"))},_onDragOver:function(e){var t,o,n,i,a=this.el,r=e.target,l=this.options,c=l.group,d=Ne.active,u=ie===c,p=l.sort,m=ae||d,h=this,w=!1;if(!xe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),r=y(r,l.draggable,a,!0),X("dragOver"),Ne.eventCanceled)return w;if(Y.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return F(!1);if(be=!1,d&&!l.disabled&&(u?p||(n=G!==U):ae===this||(this.lastPutMode=ie.checkPull(this,d,Y,e))&&c.checkPut(this,d,Y,e))){if(i="vertical"===this._getDirection(e,r),t=I(Y),X("dragOverValid"),Ne.eventCanceled)return w;if(n)return G=U,z(),this._hideClone(),X("revert"),Ne.eventCanceled||(Z?U.insertBefore(Y,Z):U.appendChild(Y)),F(!0);var g=D(a,l.draggable);if(!g||function(e,t,o){var n=I(D(o.el,o.options.draggable)),s=j(o.el,o.options,W);return t?e.clientX>s.right+10||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>s.bottom+10||e.clientX>n.right&&e.clientY>n.top}(e,i,this)&&!g.animated){if(g===Y)return F(!1);if(g&&a===e.target&&(r=g),r&&(o=I(r)),!1!==qe(U,a,Y,t,r,o,e,!!r))return z(),g&&g.nextSibling?a.insertBefore(Y,g.nextSibling):a.appendChild(Y),G=a,R(),F(!0)}else if(g&&function(e,t,o){var n=I(_(o.el,0,o.options,!0)),s=j(o.el,o.options,W);return t?e.clientX<s.left-10||e.clientY<n.top&&e.clientX<n.right:e.clientY<s.top-10||e.clientY<n.bottom&&e.clientX<n.left}(e,i,this)){var f=_(a,0,l,!0);if(f===Y)return F(!1);if(o=I(r=f),!1!==qe(U,a,Y,t,r,o,e,!1))return z(),a.insertBefore(Y,f),G=a,R(),F(!0)}else if(r.parentNode===a){o=I(r);var v,b,S,k=Y.parentNode!==a,A=!function(e,t,o){var n=o?e.left:e.top,s=o?e.right:e.bottom,i=o?e.width:e.height,a=o?t.left:t.top,r=o?t.right:t.bottom,l=o?t.width:t.height;return n===a||s===r||n+i/2===a+l/2}(Y.animated&&Y.toRect||t,r.animated&&r.toRect||o,i),T=i?"top":"left",E=B(r,"top","top")||B(Y,"top","top"),$=E?E.scrollTop:void 0;if(he!==r&&(b=o[T],Se=!1,ke=!A&&l.invertSwap||k),v=function(e,t,o,n,s,i,a,r){var l=n?e.clientY:e.clientX,c=n?o.height:o.width,d=n?o.top:o.left,u=n?o.bottom:o.right,p=!1;if(!a)if(r&&ge<c*s){if(!Se&&(1===we?l>d+c*i/2:l<u-c*i/2)&&(Se=!0),Se)p=!0;else if(1===we?l<d+ge:l>u-ge)return-we}else if(l>d+c*(1-s)/2&&l<u-c*(1-s)/2)return function(e){return L(Y)<L(e)?1:-1}(t);return(p=p||a)&&(l<d+c*i/2||l>u-c*i/2)?l>d+c/2?1:-1:0}(e,r,o,i,A?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,ke,he===r),0!==v){var P=L(Y);do{P-=v,S=G.children[P]}while(S&&("none"===x(S,"display")||S===W))}if(0===v||S===r)return F(!1);he=r,we=v;var O=r.nextElementSibling,M=!1,q=qe(U,a,Y,t,r,o,e,M=1===v);if(!1!==q)return 1!==q&&-1!==q||(M=1===q),xe=!0,setTimeout(He,30),z(),M&&!O?a.appendChild(Y):r.parentNode.insertBefore(Y,M?O:r),E&&N(E,0,$-E.scrollTop),G=Y.parentNode,void 0===b||ke||(ge=Math.abs(b-I(r)[T])),R(),F(!0)}if(a.contains(Y))return F(!1)}return!1}function X(l,c){J(l,h,s({evt:e,isOwner:u,axis:i?"vertical":"horizontal",revert:n,dragRect:t,targetRect:o,canSort:p,fromSortable:m,target:r,completed:F,onMove:function(o,n){return qe(U,a,Y,t,o,I(o),e,n)},changed:R},c))}function z(){X("dragOverAnimationCapture"),h.captureAnimationState(),h!==m&&m.captureAnimationState()}function F(t){return X("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(h),h!==m&&(C(Y,ae?ae.options.ghostClass:d.options.ghostClass,!1),C(Y,l.ghostClass,!0)),ae!==h&&h!==Ne.active?ae=h:h===Ne.active&&ae&&(ae=null),m===h&&(h._ignoreWhileAnimating=r),h.animateAll(function(){X("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(r===Y&&!Y.animated||r===a&&!r.animated)&&(he=null),l.dragoverBubble||e.rootEl||r===document||(Y.parentNode[H]._isOutsideThisEl(e.target),!t&&Oe(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),w=!0}function R(){oe=L(Y),se=L(Y,l.draggable),V({sortable:h,name:"change",toEl:a,newIndex:oe,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Oe),f(document,"mousemove",Oe),f(document,"touchmove",Oe)},_offUpEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._onDrop),f(e,"touchend",this._onDrop),f(e,"pointerup",this._onDrop),f(e,"pointercancel",this._onDrop),f(e,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;oe=L(Y),se=L(Y,o.draggable),J("drop",this,{evt:e}),G=Y&&Y.parentNode,oe=L(Y),se=L(Y,o.draggable),Ne.eventCanceled||(ve=!1,ke=!1,Se=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Fe(this.cloneId),Fe(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&x(document.body,"user-select",""),x(Y,"transform",""),e&&(me&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),W&&W.parentNode&&W.parentNode.removeChild(W),(U===G||ae&&"clone"!==ae.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),Y&&(this.nativeDraggable&&f(Y,"dragend",this),je(Y),Y.style["will-change"]="",me&&!ve&&C(Y,ae?ae.options.ghostClass:this.options.ghostClass,!1),C(Y,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:e}),U!==G?(oe>=0&&(V({rootEl:G,name:"add",toEl:G,fromEl:U,originalEvent:e}),V({sortable:this,name:"remove",toEl:G,originalEvent:e}),V({rootEl:G,name:"sort",toEl:G,fromEl:U,originalEvent:e}),V({sortable:this,name:"sort",toEl:G,originalEvent:e})),ae&&ae.save()):oe!==te&&oe>=0&&(V({sortable:this,name:"update",toEl:G,originalEvent:e}),V({sortable:this,name:"sort",toEl:G,originalEvent:e})),Ne.active&&(null!=oe&&-1!==oe||(oe=te,se=ne),V({sortable:this,name:"end",toEl:G,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){J("nulling",this),U=Y=G=W=Z=Q=K=ee=re=le=me=oe=se=te=ne=he=we=ae=ie=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Ae.forEach(function(e){e.checked=!0}),Ae.length=ce=de=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Y&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,n=0,s=o.length,i=this.options;n<s;n++)y(e=o[n],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||Xe(e));return t},sort:function(e,t){var o={},n=this.el;this.toArray().forEach(function(e,t){var s=n.children[t];y(s,this.options.draggable,n,!1)&&(o[e]=s)},this),t&&this.captureAnimationState(),e.forEach(function(e){o[e]&&(n.removeChild(o[e]),n.appendChild(o[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return y(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var o=this.options;if(void 0===t)return o[e];var n=F.modifyOption(this,e,t);o[e]=void 0!==n?n:t,"group"===e&&Le(o)},destroy:function(){J("destroy",this);var e=this.el;e[H]=null,f(e,"mousedown",this._onTapStart),f(e,"touchstart",this._onTapStart),f(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(e,"dragover",this),f(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ye.splice(ye.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ee){if(J("hideClone",this),Ne.eventCanceled)return;x(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),ee=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ee){if(J("showClone",this),Ne.eventCanceled)return;Y.parentNode!=U||this.options.group.revertClone?Z?U.insertBefore(Q,Z):U.appendChild(Q):U.insertBefore(Q,Y),this.options.group.revertClone&&this.animate(Y,Q),x(Q,"display",""),ee=!1}}else this._hideClone()}},Te&&g(document,"touchmove",function(e){(Ne.active||ve)&&e.cancelable&&e.preventDefault()}),Ne.utils={on:g,off:f,css:x,find:T,is:function(e,t){return!!y(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e},throttle:M,closest:y,toggleClass:C,clone:q,index:L,nextTick:ze,cancelNextTick:Fe,detectDirection:De,getChild:_,expando:H},Ne.get=function(e){return e[H]},Ne.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ne.utils=s(s({},Ne.utils),e.utils)),F.mount(e)})},Ne.create=function(e,t){return new Ne(e,t)},Ne.version="1.15.6";var Re,Je,Ve,Ye,Ge,We,Ue=[],Ze=!1;function Ke(){Ue.forEach(function(e){clearInterval(e.pid)}),Ue=[]}function Qe(){clearInterval(We)}var et=M(function(e,t,o,n){if(t.scroll){var s,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=t.scrollSensitivity,l=t.scrollSpeed,c=E(),d=!1;Je!==o&&(Je=o,Ke(),Re=t.scroll,s=t.scrollFn,!0===Re&&(Re=P(o,!0)));var u=0,p=Re;do{var m=p,h=I(m),w=h.top,g=h.bottom,f=h.left,v=h.right,b=h.width,y=h.height,S=void 0,k=void 0,C=m.scrollWidth,A=m.scrollHeight,T=x(m),B=m.scrollLeft,_=m.scrollTop;m===c?(S=b<C&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),k=y<A&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(S=b<C&&("auto"===T.overflowX||"scroll"===T.overflowX),k=y<A&&("auto"===T.overflowY||"scroll"===T.overflowY));var D=S&&(Math.abs(v-i)<=r&&B+b<C)-(Math.abs(f-i)<=r&&!!B),L=k&&(Math.abs(g-a)<=r&&_+y<A)-(Math.abs(w-a)<=r&&!!_);if(!Ue[u])for(var $=0;$<=u;$++)Ue[$]||(Ue[$]={});Ue[u].vx==D&&Ue[u].vy==L&&Ue[u].el===m||(Ue[u].el=m,Ue[u].vx=D,Ue[u].vy=L,clearInterval(Ue[u].pid),0==D&&0==L||(d=!0,Ue[u].pid=setInterval(function(){n&&0===this.layer&&Ne.active._onTouchMove(Ge);var t=Ue[this.layer].vy?Ue[this.layer].vy*l:0,o=Ue[this.layer].vx?Ue[this.layer].vx*l:0;"function"==typeof s&&"continue"!==s.call(Ne.dragged.parentNode[H],o,t,e,Ge,Ue[this.layer].el)||N(Ue[this.layer].el,o,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==c&&(p=P(p,!1)));Ze=d}},30),tt=function(e){var t=e.originalEvent,o=e.putSortable,n=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,r=e.unhideGhostForTarget;if(t){var l=o||s;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);r(),l&&!l.el.contains(d)&&(i("spill"),this.onSpill({dragEl:n,putSortable:o}))}};function ot(){}function nt(){}ot.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var n=_(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),o&&o.animateAll()},drop:tt},r(ot,{pluginName:"revertOnSpill"}),nt.prototype={onSpill:function(e){var t=e.dragEl,o=e.putSortable||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:tt},r(nt,{pluginName:"removeOnSpill"}),Ne.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?g(document,"dragover",this._handleAutoScroll):this.options.supportPointer?g(document,"pointermove",this._handleFallbackAutoScroll):t.touches?g(document,"touchmove",this._handleFallbackAutoScroll):g(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),Qe(),Ke(),clearTimeout(S),S=void 0},nulling:function(){Ge=Je=Re=Ze=We=Ve=Ye=null,Ue.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var o=this,n=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(n,s);if(Ge=e,t||this.options.forceAutoScrollFallback||d||c||p){et(e,this.options,i,t);var a=P(i,!0);!Ze||We&&n===Ve&&s===Ye||(We&&Qe(),We=setInterval(function(){var i=P(document.elementFromPoint(n,s),!0);i!==a&&(a=i,Ke()),et(e,o.options,i,t)},10),Ve=n,Ye=s)}else{if(!this.options.bubbleScroll||P(i,!0)===E())return void Ke();et(e,this.options,P(i,!1),!1)}}},r(e,{pluginName:"scroll",initializeByDefault:!0})}),Ne.mount(nt,ot);const st=Ne,it="lp-hidden",at="loading",rt=(e,t)=>{const o=document.querySelector(e);if(o)return void t(o);const n=new MutationObserver((o,n)=>{const s=document.querySelector(e);s&&(n.disconnect(),t(s))});n.observe(document.documentElement,{childList:!0,subtree:!0})},lt=(e,t=0)=>{e&&(t?e.classList.remove(it):e.classList.add(it))},ct=(e,t)=>{e&&(t?e.classList.add(at):e.classList.remove(at))},dt=(e,t)=>{const o=(e=>{const t={},o=new FormData(e);for(const e of o.entries()){const n=e[0],s=o.getAll(n);t.hasOwnProperty(n)||(t[n]=s.join(","))}return t})(e);return(e=>{const t=[],o=e.elements;for(let e=0;e<o.length;e++){const n=o[e].name;n&&!t.includes(n)&&t.push(n)}return t})(e).forEach(e=>{o.hasOwnProperty(e)?""===o[e][0]&&(delete o[e],delete t[e]):delete t[e]}),t={...t,...o}},ut=(e,t)=>{document.addEventListener(e,o=>{const n=o.target;let s={e:o,target:n};t.forEach(t=>{s={...s,...t},t.conditionBeforeCallBack&&!0!==t.conditionBeforeCallBack(s)||"keydown"===e&&t.checkIsEventEnter&&"Enter"!==o.key||n.closest(t.selector)&&(t.class?t.class[t.callBack](s):t.callBack(s))})})};var pt=o(7736),mt=o.n(pt),ht=o(5072),wt=o.n(ht),gt=o(7825),ft=o.n(gt),vt=o(7659),bt=o.n(vt),yt=o(5056),St=o.n(yt),kt=o(540),Ct=o.n(kt),xt=o(1113),At=o.n(xt),Tt=o(9455),Et={};Et.styleTagTransform=At(),Et.setAttributes=St(),Et.insert=bt().bind(null,"head"),Et.domAPI=ft(),Et.insertStyleElement=Ct(),wt()(Tt.A,Et),Tt.A&&Tt.A.locals&&Tt.A.locals;const It={text:"",gravity:lpData.toast.gravity,position:lpData.toast.position,className:`${lpData.toast.classPrefix}`,close:1==lpData.toast.close,stopOnFocus:1==lpData.toast.stopOnFocus,duration:lpData.toast.duration},Bt=(e,t="success",o)=>{let n=It;o&&(n={...n,...o}),new(mt())({...n,text:e,className:`${lpData.toast.classPrefix} ${t}`}).showToast()};let _t,Dt,Lt=[];class $t{constructor(){this.init()}static selectors={elBtnShowPopupItemsToSelect:".lp-btn-show-popup-items-to-select",elBtnAddItemsSelected:".lp-btn-add-items-selected",elBtnCountItemsSelected:".lp-btn-count-items-selected",elHeaderCountItemSelected:".header-count-items-selected",elSelectItem:".lp-select-item",elListItems:".list-items",elPopupItemsToSelect:".lp-popup-items-to-select",elSearchTitleItem:".lp-search-title-item",elBtnBackListItems:".lp-btn-back-to-select-items",elListItemsWrap:".list-items-wrap",elListItemsSelected:".list-items-selected",elItemSelectedClone:".li-item-selected.clone",elItemSelected:".li-item-selected",LPTarget:".lp-target"};init(){this.events()}events=()=>{$t._loadedEvents||($t._loadedEvents=!0,ut("click",[{selector:$t.selectors.elBtnShowPopupItemsToSelect,callBack:this.showPopupItemsToSelect.name,class:this},{selector:$t.selectors.elSelectItem,callBack:this.selectItemsFromList.name,class:this},{selector:$t.selectors.elBtnCountItemsSelected,callBack:this.showItemsSelected.name,class:this},{selector:$t.selectors.elBtnBackListItems,callBack:this.backToSelectItems.name,class:this},{selector:$t.selectors.elItemSelected,callBack:this.removeItemSelected.name,class:this},{selector:".tabs .tab",callBack:this.chooseTabItemsType.name,class:this}]),ut("keyup",[{selector:$t.selectors.elSearchTitleItem,callBack:this.searchTitleItemToSelect.name,class:this}]))};showPopupItemsToSelect=e=>{const{e:o,target:n=!1,callBack:s}=e;if(!n.closest(`${$t.selectors.elBtnShowPopupItemsToSelect}`))return;const i=n.dataset.template||"",a=document.querySelector(i);t().fire({html:a.innerHTML,showConfirmButton:!1,showCloseButton:!0,width:"60%",customClass:{popup:"lp-select-items-popup",htmlContainer:"lp-select-items-html-container",container:"lp-select-items-container"},willOpen:()=>{_t=t().getPopup();const e=_t.querySelector(`${$t.selectors.LPTarget}`);if(e){const t=window.lpAJAXG.getDataSetCurrent(e);t.args.paged=1,t.args.item_selecting=Lt||[],window.lpAJAXG.setDataSetCurrent(e,t),window.lpAJAXG.fetchAJAX(t,{success:t=>{const{data:o}=t;_t.querySelector(".lp-skeleton-animation").remove(),e.innerHTML=o.content||"",this.watchItemsSelectedDataChange()}})}}}).then(e=>{e.isDismissed})};chooseTabItemsType=e=>{const{e:t,target:o,callBack:n}=e,s=o.closest(".tab");if(!s)return;t.preventDefault();const i=s.closest(".tabs");if(!i)return;const a=i.closest(`${$t.selectors.elPopupItemsToSelect}`),r=a.querySelector(`${$t.selectors.elSearchTitleItem}`),l=s.dataset.type;i.querySelectorAll(".tab").forEach(e=>{e.classList.contains("active")&&e.classList.remove("active")}),s.classList.add("active"),r.value="";const c=a.querySelector(`${$t.selectors.LPTarget}`),d=window.lpAJAXG.getDataSetCurrent(c);d.args.item_type=l,d.args.paged=1,d.args.item_selecting=Lt||[],window.lpAJAXG.setDataSetCurrent(c,d),window.lpAJAXG.showHideLoading(c,1),window.lpAJAXG.fetchAJAX(d,{success:e=>{const{data:t}=e;c.innerHTML=t.content||""},error:e=>{Bt(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(c,0),this.watchItemsSelectedDataChange()}})};selectItemsFromList=e=>{const{e:t,target:o}=e,n=o.closest(`${$t.selectors.elSelectItem}`);if(!n)return;const s=n.querySelector('input[type="checkbox"]');if("INPUT"!==o.tagName)return void s.click();if(!n.closest(`${$t.selectors.elListItems}`))return;const i={...s.dataset};if(s.checked)Lt.some(e=>e.id===i.id)||Lt.push(i);else{const e=Lt.findIndex(e=>e.id===i.id);-1!==e&&Lt.splice(e,1)}this.watchItemsSelectedDataChange()};searchTitleItemToSelect=e=>{const{e:t,target:o}=e,n=o.closest($t.selectors.elSearchTitleItem);if(!n)return;const s=_t.querySelector(`${$t.selectors.LPTarget}`);clearTimeout(Dt),Dt=setTimeout(()=>{const e=window.lpAJAXG.getDataSetCurrent(s);e.args.search_title=n.value.trim(),e.args.item_selecting=Lt,e.args.paged=1,window.lpAJAXG.setDataSetCurrent(s,e),window.lpAJAXG.showHideLoading(s,1),window.lpAJAXG.fetchAJAX(e,{success:e=>{const{data:t}=e;s.innerHTML=t.content||""},error:e=>{Bt(e,"error")},completed:()=>{window.lpAJAXG.showHideLoading(s,0)}})},800)};showItemsSelected=e=>{const{e:t,target:o}=e,n=o.closest(`${$t.selectors.elBtnCountItemsSelected}`);if(!n)return;const s=_t.querySelector(`${$t.selectors.elBtnBackListItems}`),i=_t.querySelector(".tabs"),a=_t.querySelector(`${$t.selectors.elListItemsWrap}`),r=_t.querySelector(`${$t.selectors.elHeaderCountItemSelected}`),l=_t.querySelector(`${$t.selectors.elListItemsSelected}`),c=l.querySelector(`${$t.selectors.elItemSelectedClone}`);r.innerHTML=n.innerHTML,lt(a,0),lt(n,0),lt(i,0),lt(s,1),lt(r,1),lt(l,1),l.querySelectorAll(`${$t.selectors.elItemSelected}:not(.clone)`).forEach(e=>{e.remove()}),Lt.forEach(e=>{const t=c.cloneNode(!0);t.classList.remove("clone"),Object.entries(e).forEach(([e,o])=>{t.dataset[e]=o}),t.querySelector(".title-display").innerHTML=e.title,lt(t,1),c.insertAdjacentElement("beforebegin",t)})};backToSelectItems=e=>{const{e:t,target:o}=e,n=o.closest(`${$t.selectors.elBtnBackListItems}`);if(!n)return;const s=_t.querySelector(`${$t.selectors.elBtnCountItemsSelected}`),i=_t.querySelector(".tabs"),a=_t.querySelector(`${$t.selectors.elListItemsWrap}`),r=_t.querySelector(`${$t.selectors.elHeaderCountItemSelected}`),l=_t.querySelector(`${$t.selectors.elListItemsSelected}`);lt(s,1),lt(a,1),lt(i,1),lt(n,0),lt(r,0),lt(l,0)};removeItemSelected=e=>{const{e:t,target:o}=e,n=o.closest(`${$t.selectors.elItemSelected}`);if(!n)return;const s=n.dataset,i=Lt.findIndex(e=>e.id===s.id);-1!==i&&Lt.splice(i,1),n.remove(),this.watchItemsSelectedDataChange()};watchItemsSelectedDataChange=()=>{const e=_t.querySelector(`${$t.selectors.elBtnAddItemsSelected}`),t=_t.querySelector(`${$t.selectors.elBtnCountItemsSelected}`),o=t.querySelector("span"),n=_t.querySelector(`${$t.selectors.elHeaderCountItemSelected}`),s=_t.querySelector(`${$t.selectors.LPTarget}`);0!==Lt.length?(t.disabled=!1,e.disabled=!1,e.classList.add("active"),o.textContent=`(${Lt.length})`,n.innerHTML=t.innerHTML):(t.disabled=!0,e.disabled=!0,e.classList.remove("active"),o.textContent="",n.textContent=""),_t.querySelector(`${$t.selectors.elListItems}`).querySelectorAll('input[type="checkbox"]').forEach(e=>{const t=e.dataset,o=Lt.some(e=>e.id===t.id);e.checked=o});const i=window.lpAJAXG.getDataSetCurrent(s);i.args.item_selecting=Lt,window.lpAJAXG.setDataSetCurrent(s,i)};addItemsSelectedToSection=e=>{const{e:o,target:n,callBackHandle:s}=e;_t&&(t().close(),"function"==typeof s&&(s(Lt),Lt=[]))}}const Pt="edit-course-curriculum",Ot=new $t;class Mt{constructor(){this.courseId=null,this.elCurriculumSections=null,this.sectionIdSelected=null}static selectors={elSectionListItems:".section-list-items",elItemClone:".section-item.clone",elSectionItem:".section-item",elBtnSelectItemType:".lp-btn-select-item-type",elAddItemTypeClone:".lp-add-item-type.clone",elSectionActions:".section-actions",elAddItemType:".lp-add-item-type",elAddItemTypeTitleInput:".lp-add-item-type-title-input",elBtnAddItemCancel:".lp-btn-add-item-cancel",elBtnAddItem:".lp-btn-add-item",elItemTitleInput:".lp-item-title-input",elBtnUpdateItemTitle:".lp-btn-update-item-title",elBtnCancelUpdateTitle:".lp-btn-cancel-update-item-title",elBtnDeleteItem:".lp-btn-delete-item",elBtnSetPreviewItem:".lp-btn-set-preview-item"};init(){this.elEditCurriculum=document.querySelector(`${Ht.selectors.idElEditCurriculum}`),this.elCurriculumSections=this.elEditCurriculum.querySelector(`${Ht.selectors.elCurriculumSections}`);const e=this.elEditCurriculum.closest(`${Ht.selectors.LPTarget}`),t=window.lpAJAXG.getDataSetCurrent(e);this.courseId=t.args.course_id,this.events(),this.sortAbleItem(),Ot.init()}events(){Mt._loadedEvents||(Mt._loadedEvents=this,ut("click",[{selector:Mt.selectors.elBtnSelectItemType,class:this,callBack:this.addItemType.name},{selector:Mt.selectors.elBtnAddItem,class:this,callBack:this.addItemToSection.name},{selector:Mt.selectors.elBtnAddItemCancel,class:this,callBack:this.cancelAddItemType.name},{selector:Mt.selectors.elBtnUpdateItemTitle,class:this,callBack:this.updateTitle.name},{selector:Mt.selectors.elBtnCancelUpdateTitle,class:this,callBack:this.cancelUpdateTitle.name},{selector:Mt.selectors.elBtnDeleteItem,class:this,callBack:this.deleteItem.name},{selector:$t.selectors.elBtnShowPopupItemsToSelect,callBack:e=>{const{e:t,target:o}=e,n=o.closest(Nt.selectors.elSection);this.sectionIdSelected=n.dataset.sectionId}},{selector:$t.selectors.elBtnAddItemsSelected,class:Ot,callBack:Ot.addItemsSelectedToSection.name,callBackHandle:this.addItemsSelectedToSection.bind(this)},{selector:Mt.selectors.elBtnSetPreviewItem,class:this,callBack:this.updatePreviewItem.name}]),ut("keyup",[{selector:Mt.selectors.elItemTitleInput,class:this,callBack:this.changeTitle.name},{selector:Mt.selectors.elAddItemTypeTitleInput,class:this,callBack:this.changeTitleAddNew.name}]),ut("keydown",[{selector:Mt.selectors.elAddItemTypeTitleInput,class:this,callBack:this.addItemToSection.name,checkIsEventEnter:!0},{selector:Mt.selectors.elItemTitleInput,class:this,callBack:this.updateTitle.name,checkIsEventEnter:!0}]),ut("focusin",[{selector:Mt.selectors.elItemTitleInput,class:this,callBack:this.focusTitleInput.name}]),ut("focusout",[{selector:Mt.selectors.elItemTitleInput,class:this,callBack:this.focusTitleInput.name,focusIn:!1}]))}addItemType(e){const{e:t,target:o}=e,n=o,s=n.dataset.itemType,i=n.dataset.placeholder,a=n.dataset.buttonAddText,r=n.closest(`${Nt.selectors.elSection}`).querySelector(`${Mt.selectors.elSectionActions}`),l=r.querySelector(`${Mt.selectors.elAddItemTypeClone}`).cloneNode(!0),c=l.querySelector(`${Mt.selectors.elAddItemTypeTitleInput}`),d=l.querySelector(`${Mt.selectors.elBtnAddItem}`);l.classList.remove("clone"),l.classList.add(s),lt(l,1),c.setAttribute("placeholder",i),c.dataset.itemType=s,d.textContent=a,r.insertAdjacentElement("beforebegin",l),c.focus()}cancelAddItemType(e){const{e:t,target:o}=e,n=o.closest(`${Mt.selectors.elAddItemType}`);n&&n.remove()}addItemToSection(e){const{e:t,target:o,callBackNest:n}=e;t.preventDefault();const s=o.closest(`${Mt.selectors.elAddItemType}`),i=s.closest(`${Nt.selectors.elSection}`),a=i.dataset.sectionId,r=s.querySelector(`${Mt.selectors.elAddItemTypeTitleInput}`),l=r.value.trim(),c=r.dataset.itemType,d=r.dataset.messEmptyTitle;if(0===l.length)return void Bt(d,"error");const u=i.querySelector(`${Mt.selectors.elItemClone}`),p=u.cloneNode(!0),m=p.querySelector(`${Mt.selectors.elItemTitleInput}`);p.classList.remove("clone"),p.classList.add(c),p.dataset.itemType=c,lt(p,1),ct(p,1),m.value=l,m.dataset.old=l,u.insertAdjacentElement("beforebegin",p),s.remove();const h={success:t=>{const{message:o,status:s,data:i}=t;if(Bt(o,s),"error"===s)p.remove();else if("success"===s){const{section_item:t,item_link:o}=i||{};p.dataset.itemId=t.item_id||0,p.querySelector(".edit-link").setAttribute("href",o||""),n&&"function"==typeof n.success&&(e.elItemNew=p,n.success(e))}},error:e=>{Bt(e,"error"),p.remove()},completed:()=>{ct(p,0),this.updateCountItems(i),n&&"function"==typeof n.completed&&(e.elItemNew=p,n.completed(e))}},w={course_id:this.courseId,action:"create_item_add_to_section",section_id:a,item_title:l,item_type:c,args:{id_url:Pt}};window.lpAJAXG.fetchAJAX(w,h)}changeTitle(e){const{target:t}=e,o=t.closest(`${Mt.selectors.elItemTitleInput}`);if(!o)return;const n=o.closest(`${Mt.selectors.elSectionItem}`);n&&(o.value.trim()===(o.dataset.old||"")?n.classList.remove("editing"):n.classList.add("editing"))}focusTitleInput(e){const{target:t,focusIn:o=!0}=e,n=t.closest(`${Mt.selectors.elItemTitleInput}`);if(!n)return;const s=n.closest(`${Mt.selectors.elSectionItem}`);s&&(o?s.classList.add("focus"):s.classList.remove("focus"))}changeTitleAddNew(e){const{target:t}=e,o=t.closest(`${Mt.selectors.elAddItemTypeTitleInput}`);if(!o)return;const n=o.closest(`${Mt.selectors.elAddItemType}`);if(!n)return;const s=n.querySelector(`${Mt.selectors.elBtnAddItem}`);s&&(0===o.value.trim().length?s.classList.remove("active"):s.classList.add("active"))}updateTitle(e){const{e:t,target:o}=e;t.preventDefault();const n=o.closest(`${Mt.selectors.elSectionItem}`);if(!n)return;const s=n.closest(`${Nt.selectors.elSection}`);if(!s)return;const i=n.querySelector(`${Mt.selectors.elItemTitleInput}`);if(!i)return;const a=n.dataset.itemId,r=n.dataset.itemType,l=i.value.trim(),c=i.dataset.old,d=i.dataset.messEmptyTitle;if(0===l.length)return void Bt(d,"error");if(l===c)return;i.blur(),ct(n,1);const u={success:e=>{const{message:t,status:o}=e;"success"===o?i.dataset.old=l:i.value=c,Bt(t,o)},error:e=>{Bt(e,"error")},completed:()=>{ct(n,0),n.classList.remove("editing")}},p={course_id:this.courseId,action:"update_item_of_section",section_id:s.dataset.sectionId,item_id:a,item_type:r,item_title:l,args:{id_url:Pt}};window.lpAJAXG.fetchAJAX(p,u)}cancelUpdateTitle(e){const{e:t,target:o}=e,n=o.closest(`${Mt.selectors.elBtnCancelUpdateTitle}`);if(!n)return;const s=n.closest(`${Mt.selectors.elSectionItem}`),i=s.querySelector(`${Mt.selectors.elItemTitleInput}`);i.value=i.dataset.old||"",s.classList.remove("editing")}deleteItem(e){const{e:o,target:n}=e,s=n.closest(`${Mt.selectors.elBtnDeleteItem}`);if(!s)return;const i=s.closest(`${Mt.selectors.elSectionItem}`);if(!i)return;const a=i.dataset.itemId,r=i.closest(`${Nt.selectors.elSection}`),l=r.dataset.sectionId;t().fire({title:s.dataset.title,text:s.dataset.content,icon:"warning",showCloseButton:!0,showCancelButton:!0,cancelButtonText:lpDataAdmin.i18n.cancel,confirmButtonText:lpDataAdmin.i18n.yes,reverseButtons:!0}).then(e=>{if(e.isConfirmed){ct(i,1);const e={success:e=>{const{message:t,status:o}=e;Bt(t,o),"success"===o&&i.remove()},error:e=>{Bt(e,"error")},completed:()=>{ct(i,0),this.updateCountItems(r)}},t={course_id:this.courseId,action:"delete_item_from_section",section_id:l,item_id:a,args:{id_url:Pt}};window.lpAJAXG.fetchAJAX(t,e)}})}sortAbleItem(){const e=this.elCurriculumSections.querySelectorAll(`${Mt.selectors.elSectionListItems}`);let t,o=0,n=0,s=0;e.forEach(e=>{new st(e,{handle:".drag",animation:150,group:{name:"shared"},onEnd:e=>{const i=[],a=e.item;s=a.closest(`${Nt.selectors.elSection}`).dataset.sectionId;const r={course_id:this.courseId,args:{id_url:Pt},action:"update_item_section_and_position"};r.item_id_change=o,r.section_id_new_of_item=s,r.section_id_old_of_item=n;const l=this.elCurriculumSections.querySelector(`.section[data-section-id="${s}"]`);l.querySelectorAll(`${Mt.selectors.elSectionItem}`).forEach(e=>{const t=parseInt(e.dataset.itemId||0);0!==t&&i.push(t)}),r.items_position=i;const c={success:e=>{const{message:t,status:o}=e;Bt(t,o)},error:e=>{Bt(e,"error")},completed:()=>{ct(a,0),this.updateCountItems(l),n!==s&&this.updateCountItems(t)}};ct(a,1),window.lpAJAXG.fetchAJAX(r,c)},onMove:()=>{},onChoose:e=>{const s=e.item;o=s.dataset.itemId,t=s.closest(`${Nt.selectors.elSection}`),n=t.dataset.sectionId},onUpdate:()=>{}})})}addItemsSelectedToSection(e){const o=document.querySelector(`.section[data-section-id="${this.sectionIdSelected}"]`),n=o.querySelector(`${Mt.selectors.elItemClone}`);e.forEach(e=>{const t=n.cloneNode(!0),o=t.querySelector(`${Mt.selectors.elItemTitleInput}`);t.dataset.itemId=e.id,t.classList.add(e.type),t.classList.remove("clone"),t.dataset.itemType=e.type,t.querySelector(".edit-link").setAttribute("href",e.editLink||""),o.value=e.titleSelected||"",ct(t,1),lt(t,1),n.insertAdjacentElement("beforebegin",t)}),t().close();const s={course_id:this.courseId,action:"add_items_to_section",section_id:this.sectionIdSelected,items:e,args:{id_url:Pt}};window.lpAJAXG.fetchAJAX(s,{success:t=>{const{message:s,status:i,data:a}=t,{html:r}=a||"";Bt(s,i),e.forEach(e=>{const t=o.querySelector(`${Mt.selectors.elSectionItem}[data-item-id="${e.id}"]`);t&&t.remove()}),"success"===i&&n.insertAdjacentHTML("beforebegin",r)},error:e=>{Bt(e,"error")},completed:()=>{this.updateCountItems(o)}})}updatePreviewItem(e){const{e:t,target:o}=e,n=o.closest(`${Mt.selectors.elBtnSetPreviewItem}`);if(!n)return;const s=n.closest(`${Mt.selectors.elSectionItem}`);if(!s)return;const i=n.querySelector("a");i.classList.toggle("lp-icon-eye"),i.classList.toggle("lp-icon-eye-slash");const a=!i.classList.contains("lp-icon-eye-slash"),r=s.dataset.itemId,l=s.dataset.itemType;ct(s,1);const c={success:e=>{const{message:t,status:o}=e;Bt(t,o),"error"===o&&(i.classList.toggle("lp-icon-eye"),i.classList.toggle("lp-icon-eye-slash"))},error:e=>{Bt(e,"error"),i.classList.toggle("lp-icon-eye"),i.classList.toggle("lp-icon-eye-slash")},completed:()=>{ct(s,0)}},d={course_id:this.courseId,action:"update_item_preview",item_id:r,item_type:l,enable_preview:a?1:0,args:{id_url:Pt}};window.lpAJAXG.fetchAJAX(d,c)}updateCountItems(e){const t=this.elEditCurriculum,o=t.querySelector(".total-items"),n=t.querySelectorAll(`${Mt.selectors.elSectionItem}:not(.clone)`).length;o.dataset.count=n,o.querySelector(".count").textContent=n;const s=e.querySelector(".section-items-counts"),i=e.querySelectorAll(`${Mt.selectors.elSectionItem}:not(.clone)`).length;s.dataset.count=i,s.querySelector(".count").textContent=i}}class Nt{constructor(){this.courseId=null,this.elEditCurriculum=null,this.elCurriculumSections=null,this.editSectionItem=new Mt}static selectors={elSection:".section",elDivAddNewSection:".add-new-section",elSectionClone:".section.clone",elSectionTitleNewInput:".lp-section-title-new-input",elSectionTitleInput:".lp-section-title-input",etBtnEditTitle:".lp-btn-edit-section-title",elSectionDesInput:".lp-section-description-input",elBtnAddSection:".lp-btn-add-section",elBtnUpdateTitle:".lp-btn-update-section-title",elBtnUpdateDes:".lp-btn-update-section-description",elBtnCancelUpdateTitle:".lp-btn-cancel-update-section-title",elBtnCancelUpdateDes:".lp-btn-cancel-update-section-description",elBtnDeleteSection:".lp-btn-delete-section",elSectionDesc:".section-description",elSectionToggle:".section-toggle",elCountSections:".count-sections"};init(){this.elEditCurriculum=document.querySelector(`${Ht.selectors.idElEditCurriculum}`),this.elCurriculumSections=this.elEditCurriculum.querySelector(`${Ht.selectors.elCurriculumSections}`);const e=this.elEditCurriculum.closest(`${Ht.selectors.LPTarget}`),t=window.lpAJAXG.getDataSetCurrent(e);this.courseId=t.args.course_id,this.editSectionItem.init(),this.events(),this.sortAbleSection()}events(){Nt._loadedEvents||(Nt._loadedEvents=this,ut("click",[{selector:Nt.selectors.elBtnAddSection,class:this,callBack:this.addSection.name},{selector:`${Nt.selectors.elBtnUpdateDes}`,class:this,callBack:this.updateSectionDescription.name},{selector:`${Nt.selectors.etBtnEditTitle}`,class:this,callBack:this.setFocusTitleInput.name},{selector:`${Nt.selectors.elSectionToggle}`,class:this,callBack:this.toggleSection.name},{selector:`${Nt.selectors.elBtnCancelUpdateDes}`,class:this,callBack:this.cancelSectionDescription.name},{selector:`${Nt.selectors.elBtnDeleteSection}`,class:this,callBack:this.deleteSection.name},{selector:`${Nt.selectors.elBtnUpdateTitle}`,class:this,callBack:this.updateSectionTitle.name},{selector:`${Nt.selectors.elBtnCancelUpdateTitle}`,class:this,callBack:this.cancelSectionTitle.name},{selector:Ht.selectors.elToggleAllSections,class:this,callBack:this.toggleSectionAll.name}]),ut("keyup",[{selector:Nt.selectors.elSectionTitleNewInput,class:this,callBack:this.changeTitleBeforeAdd.name},{selector:Nt.selectors.elSectionTitleInput,class:this,callBack:this.changeTitle.name},{selector:Nt.selectors.elSectionDesInput,class:this,callBack:this.changeDescription.name}]),ut("keydown",[{selector:Nt.selectors.elSectionTitleNewInput,class:this,callBack:this.addSection.name,checkIsEventEnter:!0},{selector:Nt.selectors.elSectionDesInput,class:this,callBack:this.updateSectionDescription.name,checkIsEventEnter:!0},{selector:Nt.selectors.elSectionTitleInput,class:this,callBack:this.updateSectionTitle.name,checkIsEventEnter:!0}]),ut("focusin",[{selector:Nt.selectors.elSectionTitleNewInput,class:this,callBack:this.focusTitleNewInput.name},{selector:Nt.selectors.elSectionTitleInput,class:this,callBack:this.focusTitleInput.name}]),ut("focusout",[{selector:Nt.selectors.elSectionTitleNewInput,class:this,callBack:this.focusTitleNewInput.name,focusIn:!1},{selector:`${Nt.selectors.elSectionTitleInput}`,class:this,callBack:this.focusTitleInput.name,focusIn:!1}]))}changeTitleBeforeAdd(e){const{e:t,target:o}=e,n=o,s=n.closest(`${Nt.selectors.elDivAddNewSection}`);if(!s)return;const i=s.querySelector(`${Nt.selectors.elBtnAddSection}`);0===n.value.trim().length?i.classList.remove("active"):i.classList.add("active")}focusTitleNewInput(e){const{e:t,target:o,focusIn:n=!0}=e,s=o.closest(`${Nt.selectors.elDivAddNewSection}`);s&&(n?s.classList.add("focus"):s.classList.remove("focus"))}addSection(e){const{e:t,target:o,callBackNest:n}=e,s=o.closest(`${Nt.selectors.elDivAddNewSection}`);if(!s)return;t.preventDefault();const i=s.querySelector(`${Nt.selectors.elSectionTitleNewInput}`),a=i.value.trim(),r=i.dataset.messEmptyTitle;if(0===a.length)return void Bt(r,"error");i.value="",i.blur();const l=this.elCurriculumSections.querySelector(`${Nt.selectors.elSectionClone}`).cloneNode(!0);l.classList.remove("clone"),lt(l,1),ct(l,1),l.querySelector(`${Nt.selectors.elSectionTitleInput}`).value=a,this.elCurriculumSections.insertAdjacentElement("beforeend",l);const c={success:t=>{const{message:o,status:s,data:i}=t;if("error"===s)throw l.remove(),o;if("success"===s){const{section:o}=i;l.dataset.sectionId=o.section_id||"",this.editSectionItem.sortAbleItem(),n&&"function"==typeof n.success&&(e.elSection=l,e.response=t,n.success(e))}Bt(o,s)},error:t=>{l.remove(),Bt(t,"error"),n&&"function"==typeof n.error&&(e.error=t,n.error(e))},completed:()=>{ct(l,0),l.classList.remove(`${Ht.selectors.elCollapse}`),l.querySelector(`${Nt.selectors.elSectionDesInput}`).focus(),this.updateCountSections(this.elEditCurriculum),n&&"function"==typeof n.completed&&(e.elSection=l,n.completed(e))}},d=JSON.parse(i.dataset.send);d.section_name=a,window.lpAJAXG.fetchAJAX(d,c)}deleteSection(e){const{e:o,target:n}=e,s=n,i=s.closest(`${Ht.selectors.idElEditCurriculum}`);t().fire({title:s.dataset.title,text:s.dataset.content,icon:"warning",showCloseButton:!0,showCancelButton:!0,cancelButtonText:lpData.i18n.cancel,confirmButtonText:lpData.i18n.yes,reverseButtons:!0}).then(e=>{if(e.isConfirmed){const e=s.closest(".section"),t=e.dataset.sectionId;ct(e,1);const o={success:e=>{const{message:t,status:o}=e;Bt(t,o)},error:e=>{Bt(e,"error")},completed:()=>{ct(e,0),e.remove(),this.editSectionItem.updateCountItems(e),this.updateCountSections(i)}},n=JSON.parse(s.dataset.send);n.section_id=t,window.lpAJAXG.fetchAJAX(n,o)}})}focusTitleInput(e){const{e:t,target:o,focusIn:n=!0}=e,s=o.closest(`${Nt.selectors.elSection}`);s&&(n?s.classList.add("focus"):s.classList.remove("focus"))}setFocusTitleInput(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elSection}`);if(!n)return;const s=n.querySelector(`${Nt.selectors.elSectionTitleInput}`);s.setSelectionRange(s.value.length,s.value.length),s.focus()}changeTitle(e){const{e:t,target:o}=e,n=o,s=n.closest(`${Nt.selectors.elSection}`);n.value.trim()===(n.dataset.old||"")?s.classList.remove("editing"):s.classList.add("editing")}updateSectionTitle(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elSection}`);if(!n)return;t.preventDefault();const s=n.querySelector(`${Nt.selectors.elSectionTitleInput}`);if(!s)return;const i=n.dataset.sectionId,a=s.value.trim(),r=s.dataset.old||"",l=s.dataset.messEmptyTitle;if(0===a.length)return void Bt(l,"error");if(a===r)return;s.blur(),ct(n,1);const c={success:e=>{const{message:t,status:o}=e;Bt(t,o),"success"===o&&(s.dataset.old=a)},error:e=>{Bt(e,"error")},completed:()=>{ct(n,0),n.classList.remove("editing")}},d=JSON.parse(s.dataset.send);d.section_id=i,d.section_name=a,window.lpAJAXG.fetchAJAX(d,c)}cancelSectionTitle(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elBtnCancelUpdateTitle}`);if(!n)return;const s=n.closest(`${Nt.selectors.elSection}`),i=s.querySelector(`${Nt.selectors.elSectionTitleInput}`);i.value=i.dataset.old||"",s.classList.remove("editing")}updateSectionDescription(e){const{e:t,target:o,callBackNest:n}=e,s=o.closest(`${Nt.selectors.elSectionDesc}`);if(!s)return;const i=s.querySelector(`${Nt.selectors.elSectionDesInput}`);if(!i)return;t.preventDefault();const a=i.closest(`${Nt.selectors.elSection}`),r=a.dataset.sectionId,l=i.value.trim(),c=i.dataset.old||"";if(l===c)return;ct(a,1);const d={success:t=>{const{message:o,status:s}=t;n&&"function"==typeof n.success&&(e.elSection=a,e.response=t,n.success(e)),Bt(o,s)},error:e=>{Bt(e,"error"),n&&"function"==typeof n.error&&n.error(a,e)},completed:()=>{ct(a,0),i.closest(`${Nt.selectors.elSectionDesc}`).classList.remove("editing"),i.dataset.old=l,n&&"function"==typeof n.completed&&n.completed(a)}},u=JSON.parse(i.dataset.send);u.section_id=r,u.section_description=l,window.lpAJAXG.fetchAJAX(u,d)}cancelSectionDescription(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elSectionDesc}`),s=n.querySelector(`${Nt.selectors.elSectionDesInput}`);s.value=s.dataset.old||"",n.classList.remove("editing")}changeDescription(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elSectionDesInput}`);if(!n)return;const s=n.closest(`${Nt.selectors.elSectionDesc}`);n.value.trim()===(n.dataset.old||"")?s.classList.remove("editing"):s.classList.add("editing")}toggleSectionAll(e){const{e:t,target:o}=e,n=o.closest(`${Ht.selectors.elToggleAllSections}`);if(!n)return;const s=n.closest(`${Ht.selectors.idElEditCurriculum}`).querySelectorAll(`${Nt.selectors.elSection}:not(.clone)`);n.classList.toggle(`${Ht.selectors.elCollapse}`),s.forEach(e=>{const t=n.classList.contains(`${Ht.selectors.elCollapse}`);e.classList.toggle(`${Ht.selectors.elCollapse}`,t)})}toggleSection(e){const{e:t,target:o}=e,n=o.closest(`${Nt.selectors.elSection}`);n.closest(`${Ht.selectors.elCurriculumSections}`)&&(n.classList.toggle(`${Ht.selectors.elCollapse}`),this.checkAllSectionsCollapsed())}checkAllSectionsCollapsed(){const e=this.elEditCurriculum.querySelectorAll(`${Nt.selectors.elSection}:not(.clone)`),t=this.elEditCurriculum.querySelector(`${Ht.selectors.elToggleAllSections}`);let o=!0;e.forEach(e=>{if(e.classList.contains(`${Ht.selectors.elCollapse}`))return o=!1,!1}),o?t.classList.remove(`${Ht.selectors.elCollapse}`):t.classList.add(`${Ht.selectors.elCollapse}`)}sortAbleSection(){let e,t=0;new st(this.elCurriculumSections,{handle:".drag",animation:150,onEnd:o=>{const n=o.item;if(!t)return;const s=n.closest(`${Nt.selectors.elSection}`),i=this.elCurriculumSections.querySelectorAll(`${Nt.selectors.elSection}`),a=[];i.forEach(e=>{const t=e.dataset.sectionId;a.push(t)});const r={success:e=>{const{message:t,status:o}=e;Bt(t,o)},error:e=>{Bt(e,"error")},completed:()=>{ct(s,0),t=0}},l={action:"course_update_section_position",course_id:this.courseId,new_position:a,args:{id_url:"course-update-section-position"}};clearTimeout(e),e=setTimeout(()=>{ct(s,1),window.lpAJAXG.fetchAJAX(l,r)},1e3)},onMove:t=>{clearTimeout(e)},onUpdate:e=>{t=1}})}updateCountSections(e){const t=e.querySelector(`${Nt.selectors.elCountSections}`),o=e.querySelectorAll(`${Nt.selectors.elSection}:not(.clone)`).length;t.dataset.count=o,t.querySelector(".count").textContent=o}}const qt=new Nt,jt=new Mt;class Ht{constructor(){this.init()}static selectors={idElEditCurriculum:"#lp-course-edit-curriculum",elCurriculumSections:".curriculum-sections",elToggleAllSections:".course-toggle-all-sections",LPTarget:".lp-target",elCollapse:"lp-collapse"};init(){rt(`${Ht.selectors.idElEditCurriculum}`,e=>{qt.init(),jt.init()})}}let Xt,zt=null,Ft=!1;const Rt=JSON.parse(localStorage.getItem("lp_course_ai_setting"))||{};let Jt,Vt,Yt,Gt=!1;class Wt{constructor(){this.init()}static selectors={elBtnGenerateWithAi:".lp-btn-generate-with-ai",elGenerateDataAiWrap:".lp-generate-data-ai-wrap"};init(){lpData?.enable_open_ai&&(rt("#titlewrap",e=>{e.insertAdjacentHTML("afterend",`<button type="button"\n\t\t\t\t\tclass="lp-btn-generate-with-ai lp-btn-ai-style"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-title-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>${lpData.i18n.generate_with_ai}</span>\n\t\t\t\t</button>`)}),rt("#wp-content-media-buttons",e=>{e.insertAdjacentHTML("beforeend",`<button type="button"\n\t\t\t\t\tclass="lp-btn-generate-with-ai lp-btn-ai-style"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-description-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>${lpData.i18n.generate_with_ai}</span>\n\t\t\t\t</button>`)}),rt("#postimagediv",e=>{e.querySelector(".postbox-header").insertAdjacentHTML("afterend",`<button type="button"\n\t\t\t\t\tstyle="margin: 12px 12px 0 12px;"\n\t\t\t\t\tclass="lp-btn-generate-with-ai lp-btn-ai-style"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-image-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>${lpData.i18n.generate_with_ai}</span>\n\t\t\t\t</button>`)}),wp.data&&wp.data.select("core/editor")&&(Gt=!0,Jt=wp.data.select,Vt=wp.data.dispatch,Yt=Jt("core/editor"),rt(".editor-document-bar",e=>{e.insertAdjacentHTML("afterend",`<button type="button"\n\t\t\t\t\tstyle="margin-left: 5px"\n\t\t\t\t\tclass="lp-btn-generate-with-ai"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-title-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>${lpData.i18n.generate_with_ai}</span>\n\t\t\t\t</button>`)}),rt(".editor-post-featured-image",e=>{e.insertAdjacentHTML("beforebegin",'<button type="button"\n\t\t\t\t\tstyle="padding: 5px 10px; justify-content: center;"\n\t\t\t\t\tclass="lp-btn-generate-with-ai"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-description-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>Generate description with AI</span>\n\t\t\t\t</button>')}),rt(".editor-post-featured-image",e=>{e.insertAdjacentHTML("afterend",`<button type="button"\n\t\t\t\t\tstyle="padding: 5px 10px; justify-content: center;"\n\t\t\t\t\tclass="lp-btn-generate-with-ai"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-image-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>${lpData.i18n.generate_with_ai}</span>\n\t\t\t\t</button>`)})),this.events())}events(){ut("click",[{selector:Wt.selectors.elBtnGenerateWithAi,class:this,callBack:this.showPopup.name},{selector:".lp-btn-step",class:this,callBack:this.showStep.name},{selector:".lp-btn-generate-prompt",class:this,callBack:this.generatePrompt.name},{selector:".lp-btn-call-open-ai",class:this,callBack:this.generateData.name},{selector:".lp-btn-copy",class:this,callBack:this.copyGeneratedData.name},{selector:".lp-btn-apply",class:this,callBack:this.applyGeneratedData.name},{selector:".lp-btn-ai-apply-image",class:this,callBack:this.applyImageData.name},{selector:".lp-btn-close-ai-popup",callBack:e=>{const{e:o,target:n}=e,s=lpData.i18n.confirm_close_ai;Ft?confirm(s)&&t().close():t().close()}}])}showPopup(e){const{e:o,target:n}=e,s=n.dataset.template||n.closest(".lp-btn-generate-with-ai").dataset.template||n.closest(".lp-generate-data-ai-wrap").dataset.template||"",i=document.querySelector(s);i?t().fire({html:i.innerHTML,width:"60%",showCloseButton:!1,showConfirmButton:!1,allowOutsideClick:!1,allowEscapeKey:!1,didOpen:()=>{zt=t().getPopup(),zt.click();const e=document.querySelector("input[name=post_title]");let o="";if(e)o=e.value;else if(Gt){const e=document.querySelector(".editor-post-card-panel__title-name");e&&(o=e.textContent)}let n="";n=Gt?Yt.getEditedPostContent().replace(/(<([^>]+)>)/gi,""):window.tinymce&&window.tinymce.get("content")?window.tinymce.get("content").getContent({format:"text"}):document.querySelector("#content").value;const s=zt.querySelector("form"),i=s.querySelector("[name=post-title]");if(i&&(i.value=o,!o)){const e=i.closest(".form-group").querySelector(".lp-ai-warning-refer");e&&lt(e,1)}const a=s.querySelector("[name=post-content]");if(a&&(a.value=n,n.length<2)){const e=a.closest(".form-group").querySelector(".lp-ai-warning-refer");e&&lt(e,1)}const r=zt.querySelector('select[name="target_audience"]');r&&(Rt?.target_audience&&r.tomselect.setValue(Rt.target_audience),r.addEventListener("change",e=>{Rt.target_audience=r.tomselect.getValue(),localStorage.setItem("lp_course_ai_setting",JSON.stringify(Rt))}));const l=zt.querySelector('select[name="tone"]');l&&(Rt?.tone&&l.tomselect.setValue(Rt.tone),l.addEventListener("change",e=>{Rt.tone=l.tomselect.getValue(),localStorage.setItem("lp_course_ai_setting",JSON.stringify(Rt))}));const c=zt.querySelector('select[name="language"]');c&&(Rt?.language&&c.tomselect.setValue(Rt.language),c.addEventListener("change",e=>{const t=c.tomselect.getValue();Rt.language=t?[t]:[],localStorage.setItem("lp_course_ai_setting",JSON.stringify(Rt))}))}}).then(e=>{e.isDismissed&&Ft&&(Ft=!1)}):console.error(`Template ${s} not found!`)}showStep(e){const{e:t,target:o}=e;t.preventDefault();const n=o.closest(".button-actions"),s=n.closest(Wt.selectors.elGenerateDataAiWrap);let i=parseInt(n.dataset.step);const a=o.dataset.action;"next"===a?i++:"prev"===a&&i--,n.dataset.step=i;const r=o.closest("form"),l=r.querySelector(`.step-content[data-step="${i}"]`),c=s.querySelector(`.step-item[data-step="${i}"]`);r.querySelectorAll(".step-content").forEach(e=>e.classList.remove("active")),l.classList.add("active"),s.querySelectorAll(".step-item").forEach(e=>e.classList.remove("active")),c.classList.add("active"),o.closest("form").querySelectorAll("button[data-step-show]").forEach(e=>{e.dataset.stepShow.split(",").map(e=>parseInt(e.trim())).includes(i)?lt(e,1):lt(e,0)})}generatePrompt(e){const{e:t,target:o}=e;t.preventDefault(),ct(o,!0);const n=o.closest("form");let s=JSON.parse(o.dataset.send);s=dt(n,s);const i={success:e=>{const{message:t,status:o,data:s}=e;Bt(t,o),"success"===o&&(n.querySelector("textarea[name=lp-openai-prompt-generated-field]").value=s,n.querySelector(".lp-btn-step[data-action=next]").click())},error:e=>{Bt(e,"error")},completed:()=>{ct(o,!1)}};window.lpAJAXG.fetchAJAX(s,i)}generateData(e){const{e:t,target:o}=e;t.preventDefault(),ct(o,!0);const n=o.closest("form");let s=JSON.parse(o.dataset.send);s=dt(n,s);const i=n.querySelector(".lp-btn-step[data-action=prev]");lt(i,0);const a={success:e=>{const{message:t,status:o,data:s}=e;Ft&&Bt(t,o),"success"===o&&(Xt=s.lp_structure_course,n.querySelector(".lp-ai-generated-results").innerHTML=s.lp_html_preview,n.querySelector(".lp-btn-step[data-action=next]").click())},error:e=>{Bt(e,"error")},completed:()=>{ct(o,!1),lt(i,1),Ft=!1}};Ft=!0,window.lpAJAXG.fetchAJAX(s,a)}applyGeneratedData(e){const{e:o,target:n}=e;o.preventDefault();const s=n.dataset.apply,i=n.dataset.target;if(i)if(Gt)"set-wp-editor-content"===i?Vt("core/editor").editPost({content:s}):"set-wp-title"===i&&Vt("core/editor").editPost({title:s});else if("set-wp-editor-content"===i)this.setWPEditorContent(s);else if("set-wp-title"===i){const e=document.querySelector("input[name=post_title]");e&&(e.value=s)}zt&&t().close()}copyGeneratedData(e){const{e:t,target:o}=e;t.preventDefault();const n=o.dataset.copy;if(navigator.clipboard)navigator.clipboard.writeText(n).then(()=>{Bt("Copied to clipboard!","success")}).catch(e=>{Bt("Failed to copy text: "+e,"error")});else{const e=document.createElement("textarea");e.value=n,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select();try{const e=document.execCommand("copy");Bt(e?"Copied to clipboard!":"Failed to copy text",e?"success":"error")}catch(e){Bt("Failed to copy text: "+e,"error")}document.body.removeChild(e)}}setWPEditorContent(e){window.tinymce.get("content").setContent(e)}applyImageData(e){const{e:o,target:n}=e;let s=JSON.parse(n.dataset.send);s=dt(n.closest("form"),s),ct(n,!0);const i={success:e=>{const{message:o,status:n,data:s}=e;Bt(o,n),"success"===n&&(Gt?Vt("core/editor").editPost({featured_media:s.attachment_id}):document.querySelector("#postimagediv .inside").outerHTML=s.html_image,zt&&t().close())},error:e=>{Bt(e,"error")},completed:()=>{ct(n,!1)}};window.lpAJAXG.fetchAJAX(s,i)}}let Ut=null,Zt=null;class Kt{constructor(){this.init()}static selectors={elBtnApplyCurriculum:".lp-btn-apply-curriculum"};init(){lpData?.enable_open_ai&&(rt(Ht.selectors.idElEditCurriculum,e=>{e.querySelector(Nt.selectors.elCountSections).insertAdjacentHTML("afterend",'<button type="button"\n\t\t\t\t\tclass="lp-btn-generate-with-ai lp-btn-ai-style"\n\t\t\t\t\tdata-template="#lp-tmpl-edit-course-curriculum-ai">\n\t\t\t\t\t<i class="lp-ico-ai"></i><span>Generate with AI</span>\n\t\t\t\t</button>')}),this.events())}events(){Kt._loadedEvents||(Kt._loadedEvents=!0,ut("click",[{selector:Kt.selectors.elBtnApplyCurriculum,class:this,callBack:this.applyData.name}]))}async applyData(e){const{e:o,target:n}=e;let s=JSON.parse(n.dataset.send);if(s=dt(n.closest("form"),s),!s["lp-openai-generated-data"])return;const i=JSON.parse(s["lp-openai-generated-data"])[0].sections;i&&0!==i.length||Bt("No sections found in the generated data.","error"),console.log("Generated Sections:",i),t().close(),await new Promise(e=>setTimeout(e,500)),Ut=new Nt,Ut.init(),Zt=new Mt,Zt.init();const a=document.querySelector(Ht.selectors.idElEditCurriculum);a.querySelector(Nt.selectors.elDivAddNewSection).scrollIntoView({behavior:"smooth",block:"center"}),await new Promise(e=>setTimeout(e,800));for(const e of i){const t=a.querySelector(Nt.selectors.elSectionTitleNewInput),o=a.querySelector(Nt.selectors.elBtnAddSection);t.value=e.section_title||"",await new Promise(t=>{Ut.addSection({e:new PointerEvent("click"),target:o,callBackNest:this.updateSectionDescription({sectionData:e,elEditCurriculum:a}),resolve:t})})}}updateSectionDescription(e){const{sectionData:t,elEditCurriculum:o}=e;return{success:async e=>{const{elSection:n}=e;await new Promise(e=>setTimeout(e,1e3));const s=n.querySelector(Nt.selectors.elSectionDesInput);s.value=t.section_description||"",await new Promise(e=>{Ut.updateSectionDescription({e:new PointerEvent("click"),target:s,callBackNest:this.addSectionItems({sectionData:t,elEditCurriculum:o}),resolve:e})}),setTimeout(e.resolve,1)},error:e=>{},completed:()=>{}}}addSectionItems(e){const{sectionData:t,elEditCurriculum:o}=e,n=t.lessons||[],s=t.quizzes||[];return{success:async e=>{const{elSection:t}=e,i=t.querySelector(`${Mt.selectors.elBtnSelectItemType}[data-item-type=lp_lesson]`),a=t.querySelector(`${Mt.selectors.elBtnSelectItemType}[data-item-type=lp_quiz]`);for(const e of n)i.click(),await this.addItemToSection({itemData:e,elSection:t,elEditCurriculum:o});for(const e of s)a.click(),await this.addItemToSection({itemData:e,elSection:t,elEditCurriculum:o});setTimeout(e.resolve,1)},error:e=>{},completed:()=>{}}}async addItemToSection(e){const{itemData:t,elSection:o,elEditCurriculum:n}=e,s=o.querySelector(Mt.selectors.elBtnAddItem);o.querySelector(Mt.selectors.elAddItemTypeTitleInput).value=t.lesson_title||t.quiz_title||"",s.scrollIntoView({behavior:"smooth",block:"center"}),await new Promise(e=>{Zt.addItemToSection({e:new PointerEvent("click"),target:s,resolve:e,callBackNest:{completed:async t=>{setTimeout(e,1e3)}}})}),setTimeout(e.resolve,1)}}new Ht,new Wt,new Kt})()})();