%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/t/r/a/tradesc/www/relax/wp-content/plugins/insert-headers-and-footers/build/
Upload File :
Create Path :
Current File : /home/t/r/a/tradesc/www/relax/wp-content/plugins/insert-headers-and-footers/build/admin.js

!function(){var e={233:function(){(window.WPCodeAdminCodeEditor||function(e,t,n){const i={l18n:wpcode,init(){t.WPCodeAdminCodeEditor=i},switch_code_mode(e,t){const n=i.get_editor(e);if(void 0===n)return!1;n.setOption("mode",i.get_mime_for_code_type(t)),n.setOption("lint",i.get_lint_for_code_type(t)),jQuery(n.getTextArea()).closest(".wpcode-code-textarea").attr("data-code-type",t)},get_editor(e){if("undefined"!=typeof wpcode_editor)return wpcode_editor[e]?wpcode_editor[e].codemirror:void 0},set_value(e,t){const n=i.get_editor(e);if(void 0===n)return!1;n.getDoc().setValue(t)},get_mime_for_code_type:e=>i.l18n.code_type_options[e].mime,get_lint_for_code_type:e=>i.l18n.code_type_options[e].lint,refresh(e){"undefined"!=typeof wpcode_editor&&i.get_editor(e).refresh()},get_value:e=>void 0===i.get_editor(e)?n("#"+e).val():i.get_editor(e).getValue(),refresh_all(){"undefined"!=typeof wpcode_editor&&n.each(wpcode_editor,(function(e,t){t.codemirror.refresh()}))}};return i}(document,window,jQuery)).init()},560:function(){(window.WPCodeSnippetsTable||function(e,t,n){const i={l10n:wpcode,init:function(){i.should_init()&&(i.init_status_toggle(),i.move_screen_options(),i.init_copy())},should_init:function(){return null!==e.getElementById("wpcode-code-snippets-table")},init_status_toggle:function(){n(".wpcode-status-toggle").on("change",(function(){const e=n(this),t=e.is(":checked"),o=e.data("id");i.update_status(t,o).fail((function(){e.prop("checked",!1)})).done((function(n){!1===n.success&&(e.prop("checked",!t),n.data.message&&WPCodeAdminNotices.add_notice(n.data.message,"error"))})).fail((function(e){e.responseText&&WPCodeAdminNotices.add_notice(e.responseText,"error")}))}))},update_status:function(e,t){return n.post(ajaxurl,{_wpnonce:i.l10n.nonce,action:"wpcode_update_snippet_status",snippet_id:t,active:e,multisite:i.l10n.multisite})},move_screen_options:function(){n("#screen-meta-links, #screen-meta").prependTo("#wpcode-header-between").show()},init_copy:function(){n(".wpcode-copy").on("click",(function(e){e.preventDefault();const t=n(this).data("copy-value"),i=n(this);t&&(navigator.clipboard.writeText(t),i.addClass("wpcode-show-success-icon"),setTimeout((function(){i.removeClass("wpcode-show-success-icon")}),500))}))}};return i}(document,window,jQuery)).init()},691:function(){jQuery((function(e){WPCodeCodeTypePicker.init()})),window.WPCodeCodeTypePicker=function(e,t,n){const i={hidePicker:function(){i.body.removeClass("wpcode-code-type-picker-visible")},findElements:function(){i.snippet_type_dropdown=n("#wpcode_snippet_type"),i.snippet_type_holder=n("#wpcode_snippet_type-holder"),i.backdrop=n("#wpcode-code-type-picker-backdrop"),i.close=n("#wpcode-close-code-type-picker"),i.body=n("body"),i.code_type_list=n("#wpcode-code-type-list")},init:function(){i.findElements();const e=new URLSearchParams(t.location.search);i.body.hasClass("wpcode-new-snippet")&&!e.has("ai_generate")&&i.showPicker(),i.snippet_type_holder.click((function(e){e.preventDefault(),e.stopPropagation(),i.showPicker()})),i.backdrop.click((function(){i.hidePicker()})),i.close.click((function(){i.hidePicker()})),i.code_type_list.on("click",".wpcode-code-type",(function(e){e.preventDefault();const t=n(this).data("code-type");i.snippet_type_dropdown.val(t).trigger("change"),n(".wpcode-code-type").removeClass("wpcode-code-type-selected"),n(this).addClass("wpcode-code-type-selected"),i.hidePicker()}))},showPicker:function(){i.code_type_list.find(".wpcode-code-type").each((function(){n(this).data("code-type")===i.snippet_type_dropdown.val()?n(this).addClass("wpcode-code-type-selected"):n(this).removeClass("wpcode-code-type-selected")})),i.body.addClass("wpcode-code-type-picker-visible")}};return i}(document,window,jQuery)},707:function(){jconfirm.defaults={closeIcon:!1,backgroundDismiss:!1,escapeKey:!0,animationBounce:1,useBootstrap:!1,theme:"modern",boxWidth:"560px",type:"blue",animateFromElement:!1}},786:function(){(window.WPCodeAdminGenerator||function(e,t,n){const i={doing_ajax_call:!1,ajax_snippet_update:!1,editor_id:"wpcode_generator_code_preview",init:function(){i.should_init()&&(i.find_elements(),i.init_generator_form(),i.init_code_editor(),i.init_tabs(),i.init_use_snippet(),i.init_copy_editor(),i.init_repeater(),i.do_spacer(),n(e).ready((function(){i.init_autocomplete()})))},should_init:()=>(i.generator_form=n("#wpcode_generator_form"),i.generator_form.length>0),find_elements(){i.tabs_buttons=n(".wpcode-items-tabs"),i.tabs_content=n(".wpcode-items-list .wpcode-form-tab"),i.use_snippet=n("#wpcode-generator-use-snippet"),i.update_button=n("#wpcode-generator-update-code"),i.repeater_row=n("#wpcode-generator-repeater-row").html()},init_generator_form(){i.generator_form.on("submit",(function(e){e.preventDefault(),i.update_snippet()})),i.generator_form.on("change","input, select",(function(){i.update_snippet()})),i.update_snippet()},update_snippet(){i.doing_ajax_call||(i.ajax_snippet_update&&i.ajax_snippet_update.abort(),i.show_button_spinner(i.update_button),i.ajax_snippet_update=n.post(ajaxurl,n(i.generator_form).serialize()).done((function(e){i.ajax_snippet_update=!1,WPCodeAdminCodeEditor.set_value(i.editor_id,e),i.hide_button_spinner(i.update_button)})))},init_tabs(){i.tabs_buttons.on("click","button",(function(e){e.preventDefault(),i.switch_active_tab(n(this))}))},switch_active_tab(e){i.tabs_buttons.find("button").removeClass("wpcode-active"),e.addClass("wpcode-active");const t=e.data("category");i.tabs_content.hide(),i.tabs_content.filter((function(){return n(this).data("tab")===t})).show(),i.do_spacer(),WPCodeAdminCodeEditor.refresh(i.editor_id)},init_use_snippet(){i.use_snippet.on("click",(function(e){if(e.preventDefault(),i.doing_ajax_call)return;i.doing_ajax_call=!0;const o=i.generator_form.serializeArray(),r=n(this);n.each(o,(function(e,t){"action"===t.name&&(o[e].value="wpcode_save_generated_snippet")})),i.show_button_spinner(r),n.post(ajaxurl,n.param(o)).done((function(e){i.doing_ajax_call=!1,i.hide_button_spinner(r),e.success&&e.data.url&&(t.location=e.data.url)}))}))},show_button_spinner(e){t.WPCodeSpinner.show_button_spinner(e)},hide_button_spinner(e){t.WPCodeSpinner.hide_button_spinner(e)},init_copy_editor:function(){n(".wpcode-copy-target").on("click",(function(e){e.preventDefault();const t=n(this),o=WPCodeAdminCodeEditor.get_value(i.editor_id);o&&(navigator.clipboard.writeText(o),t.addClass("wpcode-show-success-icon"),setTimeout((function(){t.removeClass("wpcode-show-success-icon")}),500))}))},init_repeater(){i.row_id=0,i.tabs_content.on("click",".wpcode-repeater-button",(function(){const e=n(this).data("target"),t=n(n('.wpcode-generator-column > [data-repeater="'+e+'"]').get().reverse());let o,r,a=0;i.row_id++,t.each((function(){const e=n(this).closest(".wpcode-generator-column");e.is(o)||(a++,o=e,r=n(i.repeater_row),a>1?r.find("button").remove():r.find("button").data("target",i.row_id),r.attr("data-id",i.row_id),e.append(r)),n(this).clone().attr("data-repeater",null).prependTo(r).find("input").val(null)}));let s=0,c=n('.wpcode-repeater-group[data-id="'+i.row_id+'"]');c.each((function(){const e=n(this).height();e>s&&(s=e)})),c.height(s),c.first().find("input").first().focus()})),i.tabs_content.on("click",".wpcode-remove-row",(function(){const e=n(this).data("target");n('.wpcode-repeater-group[data-id="'+e+'"]').remove()}))},do_spacer(){n(".wpcode-generator-field-spacer").each((function(){const e=n(this).closest(".wpcode-generator-column"),t=n(this).closest(".wpcode-generator-column").outerHeight();let i=0;e.siblings(".wpcode-generator-column").each((function(){const e=n(this).height();e>i&&(i=e)})),i>t&&n(this).height(i-t+3)}))},init_autocomplete(){n(".wpcode-generator-field-autocomplete").each((function(){const e=n(this).find('input[type="text"]'),t=n(this).find(".wpcode-field-autocomplete").text();e.autocomplete({source:JSON.parse(t)})}))},init_code_editor(){const e=n(".wpcode-generator-code");if(0===e.length)return;const t=wp.codeEditor.initialize(e);i.CodeMirror=t.codemirror,i.CodeMirror.setOption("readOnly",!1),i.CodeMirror.on("change",(function(e){clearTimeout(i.editor_change_handler),i.editor_change_handler=setTimeout((function(){jQuery(e.getTextArea()).val(e.getValue()).change(),i.update_snippet()}),300)}))}};return i}(document,window,jQuery)).init()},448:function(){(window.WPCodeHeader||function(e,t,n){const i={init(){i.should_init()&&n(e).ready((function(){i.init_sticky_header()}))},should_init:()=>n("#wpcode_snippet_code").length>0||n("#ihaf_insert_header").length>0,init_sticky_header(){const e=n(".wpcode-header-bottom"),i=e.height(),o=e.offset().top,r=e.parent();n(t).scroll((function(){const a=n(t).scrollTop();o<a+32?(e.addClass("wpcode-sticky"),r.css("paddingBottom",i+"px")):(e.removeClass("wpcode-sticky"),r.css("paddingBottom",0))}))}};return i}(document,window,jQuery)).init()},847:function(){(window.WPCodeHelp||function(e,t,n){const i={init:function(){i.should_init()&&(i.find_elements(),i.init_show(),i.init_close_button(),i.init_search(),i.init_accordion())},should_init:()=>(i.$overlay=n("#wpcode-docs-overlay"),i.$overlay.length>0),find_elements(){i.$close_button=n("#wpcode-help-close"),i.$search=n("#wpcode-help-search"),i.$no_result=n("#wpcode-help-no-result"),i.$search_results=n("#wpcode-help-result ul"),i.$categories=n("#wpcode-help-categories")},init_close_button(){i.$close_button.on("click",(function(e){e.preventDefault(),i.$overlay.fadeOut(200)}))},init_show(){n(e).on("click",".wpcode-show-help",(function(e){e.preventDefault(),i.$overlay.fadeIn(200)}))},init_accordion(){i.$categories.on("click",".wpcode-help-category header",(function(){const e=n(this).closest(".wpcode-help-category");i.toggle_category(e)})),i.$categories.on("click",".viewall",(function(e){e.preventDefault(),n(this).closest(".wpcode-help-docs").find("div").slideDown(),n(this).hide()}))},toggle_category(e){e.toggleClass("open"),e.find(".wpcode-help-docs").slideToggle()},init_search(){i.$search.on("keyup","input",i.input_search),i.$search.on("click","#wpcode-help-search-clear",i.clear_search)},input_search(){i.$search_results.html("");const e=n(this).val().toLowerCase(),t=n("#wpcode-help-categories .wpcode-help-docs li").filter((function(){return n(this).text().toLowerCase().indexOf(""+e)>-1}));e.length>2&&t.clone().appendTo(i.$search_results),0===t.length?i.$no_result.show():i.$no_result.hide(),i.$search.toggleClass("wpcode-search-empty",!e)},clear_search(){i.$search.find("input").val("").trigger("keyup")}};return i}(document,window,jQuery)).init()},279:function(){const e=window.WPCodeSVG||function(e,t,n){const i={l18n:wpcode,init(){t.WPCodeSVG=i},sanitizeSvg(e,t){const n=(new DOMParser).parseFromString(e,"image/svg+xml");return n.querySelector("parsererror")?(console.error("Error parsing SVG:",n.querySelector("parsererror").textContent),""):(n.querySelectorAll("*").forEach((e=>{const n=e.tagName.toLowerCase();if(t[n])for(let i of[...e.attributes])t[n][i.name.toLowerCase()]||e.removeAttribute(i.name);else e.parentNode.removeChild(e)})),"svg"===n.documentElement.nodeName?n.documentElement.outerHTML:"")},WPCodeIcon(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:20,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";const s=i.wpcodeIcons();if(!s.hasOwnProperty(e))return"";o||(o=`0 0 ${t} ${n}`);const c=`<svg class = "wpcode-icon wpcode-icon-${e} ${a}" width = "${t}" height = "${n}" viewBox = "${o}" fill = "none" xmlns = "http://www.w3.org/2000/svg" id = "${r}" > ${s[e]} </svg> `;return this.sanitizeSvg(c,{svg:{class:!0,"aria-hidden":!0,"aria-labelledby":!0,role:!0,xmlns:!0,width:!0,height:!0,viewbox:!0,id:!0},g:{fill:!0,"clip-path":!0},title:{title:!0},path:{d:!0,fill:!0,"fill-rule":!0,"clip-rule":!0,"data-name":!0},circle:{cx:!0,cy:!0,r:!0,stroke:!0,"stroke-width":!0,fill:!0},rect:{x:!0,y:!0,width:!0,height:!0,fill:!0},polyline:{points:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-miterlimit":!0},clipPath:{id:!0},defs:{}})},wpcodeIcons:()=>({logo:'<path fill-rule="evenodd" clip-rule="evenodd" d="M57.5706 64H6.56732C2.89985 64 0 61.1064 0 57.4468V6.55319C0 2.89362 2.89985 0 6.56732 0H57.5706C61.2381 0 64.1379 2.89362 64.1379 6.55319V57.4468C64.1379 61.1064 61.2381 64 57.5706 64ZM15.863 52.0855C15.5219 52.0855 15.0954 52.0004 14.7543 51.9153C13.2191 51.3196 12.4515 49.6175 13.0485 48.0855L26.439 13.7877C27.036 12.2558 28.7418 11.4898 30.277 12.0855C31.8122 12.6813 32.5798 14.3834 31.9828 15.9153L18.6776 50.2132C18.2512 51.4047 17.0571 52.0855 15.863 52.0855ZM35.0534 47.7445C35.6504 48.3403 36.418 48.5956 37.1856 48.5956C37.9532 48.5956 38.7208 48.3403 39.3179 47.7445L49.8085 37.3616C51.6849 35.4892 51.6849 32.3403 49.8085 30.468L39.3179 19.9999C38.2091 18.8084 36.3327 18.8084 35.1386 19.9999C33.9446 21.1063 33.9446 22.9786 35.1386 24.1701L44.7764 33.8722L35.0534 43.5743C33.8593 44.6807 33.8593 46.5531 35.0534 47.7445Z" fill="white"/>',checkmark:'<circle class="path circle" fill="none" stroke="#73AF55" stroke-width="6" stroke-miterlimit="10" cx="65.1" cy="65.1" r="62.1"/><polyline class="path check" fill="none" stroke="#73AF55" stroke-width="6" stroke-linecap="round" stroke-miterlimit="10" points="100.2,40.2 51.5,88.8 29.8,67.5 "/>',lock:'<path d="M19 9.33333H17.6666V6.66667C17.6666 2.98667 14.68 0 11 0C7.31998 0 4.33331 2.98667 4.33331 6.66667V9.33333H2.99998C1.53331 9.33333 0.333313 10.5333 0.333313 12V25.3333C0.333313 26.8 1.53331 28 2.99998 28H19C20.4666 28 21.6666 26.8 21.6666 25.3333V12C21.6666 10.5333 20.4666 9.33333 19 9.33333ZM6.99998 6.66667C6.99998 4.45333 8.78665 2.66667 11 2.66667C13.2133 2.66667 15 4.45333 15 6.66667V9.33333H6.99998V6.66667ZM19 25.3333H2.99998V12H19V25.3333ZM11 21.3333C12.4666 21.3333 13.6666 20.1333 13.6666 18.6667C13.6666 17.2 12.4666 16 11 16C9.53331 16 8.33331 17.2 8.33331 18.6667C8.33331 20.1333 9.53331 21.3333 11 21.3333Z" fill="#8A8A8A"/>'})};return i}(document,window,jQuery);e.init()},298:function(){(window.WPCodeInputs||function(e,t,n){const i={init(){n(i.ready)},ready(){i.initFileUploads(),i.initCheckboxMultiselectColumns()},initFileUploads(){n(".wpcode-file-upload").each((function(){const e=n(this).find("input[type=file]"),t=n(this).find("label"),i=t.html();e.on("change",(function(e){let n="";this.files&&this.files.length>1?n=(this.getAttribute("data-multiple-caption")||"").replace("{count}",this.files.length):e.target.value&&(n=e.target.value.split("\\").pop()),n?t.find(".wpcode-file-field").html(n):t.html(i)})),e.on("focus",(function(){e.addClass("has-focus")})).on("blur",(function(){e.removeClass("has-focus")}))}))},initCheckboxMultiselectColumns(){n(e).on("change",".wpcode-checkbox-multiselect-columns input",(function(){var e=n(this),t=e.parent(),i=e.closest(".wpcode-checkbox-multiselect-columns"),o=t.text(),r="check-item-"+e.val(),a=i.find("#"+r);e.prop("checked")?(e.parent().addClass("checked"),a.length||i.find(".second-column ul").append('<li id="'+r+'">'+o+"</li>")):(e.parent().removeClass("checked"),i.find("#"+r).remove())})),n(e).on("click",".wpcode-checkbox-multiselect-columns .all",(function(e){e.preventDefault(),n(this).closest(".wpcode-checkbox-multiselect-columns").find("input[type=checkbox]").prop("checked",!0).trigger("change")}))}};return i}(document,window,jQuery)).init()},900:function(){window.WPCodeItemsList||function(e,t,n){const i=function(e){this.container=n(e),this.category="*",this.search_term="",this.categories_list=this.container.find(".wpcode-items-filters"),this.search_input=this.container.find(".wpcode-items-search-input"),this.items=this.container.find(".wpcode-list-item"),this.banner=null,this.init()};i.prototype={init:function(){this.should_init()&&(this.init_category_switch(),this.init_search(),this.show_connect_banner(),this.init_custom_event_handlers())},init_custom_event_handlers(){this.container.on("wpcode_reset_items",(()=>{this.reset_items()})),this.container.on("wpcode_select_item",((e,t)=>{this.set_item(t)}))},set_item(e){this.reset_items();const t=this.items.filter((function(){return n(this).data("id")===e}));this.items.removeClass("wpcode-list-item-selected"),t.addClass("wpcode-list-item-selected");const i=t.data("categories"),o=i.length>0?i[0]:"*";this.switch_to_category(o);const r=this.categories_list.find(`button[data-category="${o}"]`);this.switch_category_button(r);const a=t.find('input[type="radio"]');a.length>0&&a.prop("checked",!0)},reset_items(){this.search_input.val(""),this.search_term="";const e=this.categories_list.find("button").first();this.switch_to_category(e.data("category")),this.switch_category_button(e)},should_init:function(){return this.categories_list.length>0},init_category_switch:function(){const e=this;this.categories_list.on("click","button",(function(){const t=n(this);t.hasClass("wpcode-active")||(e.switch_to_category(t.data("category")),e.switch_category_button(t))}))},switch_category_button:function(e){this.categories_list.find("button").removeClass("wpcode-active"),e.addClass("wpcode-active")},switch_to_category:function(e){this.category=e,this.filter_items()},filter_items:function(){let e;const t=this,i=this.items.filter((function(){return"*"===t.category||n(this).data("categories").indexOf(t.category)>-1}));if(t.search_term.length>2){const i=t.search_term.toLowerCase();e=this.items.filter((function(){return n(this).text().toLowerCase().indexOf(i)>-1}))}else e=i;t.items.hide(),e.show(),this.update_banner_position()},init_search:function(){const e=this;this.search_input.on("keyup change search",(function(){const t=n(this).val();e.search_term=t.length<3?"":t,e.filter_items()}))},show_connect_banner:function(){const e=n("#tmpl-wpcode-library-connect-banner");if(!e.length)return;const t=this.container.find(".wpcode-items-list-category .wpcode-list-item:visible");t.length>5?t.eq(5).after(e.html()):t.last().after(e.html()),this.banner=this.container.find("#wpcode-library-connect-banner")},update_banner_position:function(){const e=this.container.find(".wpcode-items-list-category .wpcode-list-item:visible");this.banner&&this.banner.length>0&&(e.length>5?this.banner.insertAfter(e.eq(5)):this.banner.insertAfter(e.last()))}},n(e).ready((function(){n(".wpcode-items-metabox").each((function(){new i(this)}))}))}(document,window,jQuery)},118:function(){(window.WPCodeLibraryAuth||function(e,t,n){const i={i18n:t.wpcode,init:function(){i.load_elements(),i.add_event_listeners(),t.WPCodeLibraryAuth=i},load_elements(){i.auth_delete_button=n(".wpcode-delete-auth")},add_event_listeners(){n(e).on("click",".wpcode-start-auth",(function(e){e.preventDefault(),i.start_auth(n(this))})),i.auth_delete_button.on("click",(function(e){e.preventDefault(),i.delete_auth()})),t.addEventListener("message",(e=>{e.isTrusted&&i.store_auth(e.data,e.origin)}),!1)},start_auth(e){let o=t.open(i.i18n.connect_url,"_blank","location=no,width=500,height=730,scrollbars=0");null===o?n.confirm({title:"Your browser blocked the authorization window from opening. Please check your popup settings.",type:"blue",theme:"modern no-content",buttons:{ok:{text:"Ok",btnClass:"wpcode-btn-confirm",action:function(){}}}}):o.focus()},delete_auth(){const e=i.show_please_wait();n.post(ajaxurl,{action:"wpcode_library_delete_auth",_ajax_nonce:i.i18n.nonce,multisite:i.i18n.multisite},(function(i){e.close(),i.success?t.location.reload():n.confirm({title:"Error!",content:"There was an issue processing your request.",buttons:{ok:function(){}}})}))},store_auth(e,o){if(void 0===e.key||void 0===e.username)return;const r=void 0!==e.deploy_snippet_id?e.deploy_snippet_id:0,a=i.show_please_wait();n.post(ajaxurl,{action:"wpcode_library_store_auth",key:e.key,username:e.username,webhook_secret:e.webhook_secret,client_id:e.client_id,deploy_snippet_id:r,origin:o,_ajax_nonce:i.i18n.nonce,multisite:i.i18n.multisite},(function(e){if(a.close(),e.success){let i='<div class="lds-dual-ring"></div>';n.confirm({title:e.data.title,content:e.data.text+i,closeIcon:!1,theme:"modern loader-spinner-completed",buttons:!1,boxWidth:"600px",onOpen:function(){const e=this;setTimeout((function(){e.close(),t.location.reload()}),2e3)}})}}))},show_please_wait:()=>n.confirm({title:i.i18n.please_wait,closeIcon:!1,content:'<div class="lds-dual-ring"></div>',boxWidth:"600px",theme:"modern loader-spinner",buttons:{close:{isHidden:!0}},onOpenBefore:function(){this.buttons.close.hide(),this.$content.parent().addClass("jconfirm-loading")},onClose:function(){this.$content.parent().removeClass("jconfirm-loading")}})};return i}(document,window,jQuery)).init()},508:function(){(window.WPCodeLibraryTabs||function(e,t,n){const i={init:function(){i.find_elements(),i.should_init()&&i.add_events()},find_elements:function(){i.tabs=n(".wpcode-library-tab"),i.buttons=n(".wpcode-library-tab-button")},should_init:function(){return i.tabs.length>0},add_events:function(){i.buttons.on("click",(function(e){e.preventDefault(),i.switch_tab(n(this))}))},switch_tab:function(e){const t=e.data("tab");i.buttons.removeClass("wpcode-library-tab-button-active"),e.addClass("wpcode-library-tab-button-active"),i.tabs.removeClass("wpcode-library-tab-active"),i.tabs.filter('[data-tab="'+t+'"]').addClass("wpcode-library-tab-active")}};return i}(document,window,jQuery)).init()},423:function(){const e=window.WPCodeAdminLibrary||function(e,t,n){const i={l10n:wpcode,init:function(){i.should_init()&&(i.find_elements(),i.init_preview(),i.init_ai_button())},should_init:()=>n(".wpcode-library-preview-button").length>0,find_elements(){i.library_list=n(".wpcode-items-list"),i.code_preview_use=n("#wpcode-preview-use-code"),i.code_preview_edit=n("#wpcode-preview-edit-snippet"),i.code_preview_updated=n("#wpcode-preview-updated"),i.code_preview_title=n("#wpcode-preview-title")},init_preview(){i.library_list.on("click",".wpcode-library-preview-button",(function(e){e.preventDefault();const t=n(this).parent().find(".wpcode-item-use-button"),o=n(this).closest(".wpcode-list-item").data("id"),r=n(this).closest(".wpcode-items-list").data("type");i.show_code_preview(o,t.attr("href"),r),i.code_preview_use.text(t.text())})),n(".wpcode-close-modal, .wpcode-modal-overlay").on("click",(function(){n("body").removeClass("wpcode-show-modal")}))},show_code_preview(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"library";const r=("library"===o?i.l10n.library.snippets:i.l10n.library.mysnippets).find((t=>t.library_id===e));WPCodeAdminCodeEditor.switch_code_mode("wpcode-code-preview",r.code_type),WPCodeAdminCodeEditor.set_value("wpcode-code-preview",r.code),i.code_preview_use.attr("href",t),i.code_preview_title.text(r.title),"mylibrary"===o?(n(".wpcode-my-library-buttons").show(),i.code_preview_edit.attr("href",i.l10n.cloud_edit_url+e)):n(".wpcode-my-library-buttons").hide(),i.code_preview_updated&&i.code_preview_updated.text(r.updated_text),n("body").addClass("wpcode-show-modal"),WPCodeAdminCodeEditor.refresh("wpcode-code-preview")},init_ai_button(){n(".wpcode-library-item-ai-not-available").on("click",(function(e){e.preventDefault(),e.stopPropagation(),WPCodeAdminNotices.show_pro_notice(i.l10n.ai_title,i.l10n.ai_text,i.l10n.ai_url,i.l10n.ai_button)}))}};return i}(document,window,jQuery);e.init()},5:function(){const e=window.WPCodeAdminNotices||function(e,t,n){const i={l10n:wpcode,init:function(){t.WPCodeAdminNotices=i,i.notice_holder=n(e.getElementById("wpcode-notice-area")),i.document=n(e)},add_notice(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"updated";const n=i.get_notice(e,t);i.notice_holder.append(n),i.document.trigger("wp-updates-notice-added"),n.find("button").focus()},get_notice(e,t){const i=n("<div />"),o=n("<p />");return o.html(e),i.addClass("fade notice is-dismissible"),i.addClass(t),i.append(o),i},show_pro_notice(e,o,r,a){const s=r.startsWith("wpcode-"),c=WPCodeSVG.WPCodeIcon("lock",22,28,"0 0 22 28","iconId");n.confirm({title:c+e,content:o,boxWidth:"560px",theme:"modern upsell-box",onOpenBefore(){this.$btnc.after('<div class="wpcode_check"></div>'),i.l10n.purchased&&this.$btnc.after('<div class="wpcode-already-purchased"><a href=" '+i.l10n.upgrade_link+' ">'+i.l10n.purchased+"</a></div>"),i.l10n.wpcode_lite_users&&(this.$btnc.after('<div class="wpcode-discount-note"><strong> '+i.l10n.bonus+":</strong> "+i.l10n.wpcode_lite_users+"<span> "+i.l10n.price+" </span> "+i.l10n.regular_price+" </div>"),this.$body.find(".jconfirm-content").addClass("wpcode-lite-upgrade"))},buttons:{confirm:{text:a||i.l10n.upgrade_button,btnClass:"wpcode-btn-orange",action:function(){s?s&&WPCodeAddons&&n.confirm({title:i.l10n.please_wait,content:function(){this.showLoading(),WPCodeAddons.install_addon(n("<button></button>").data("addon",r))}}):t.open(r,"_blank","noopener noreferrer")}}},closeIcon:!0,backgroundDismiss:!0,useBootstrap:!1})}};return i}(document,window,jQuery);e.init()},770:function(){(window.WPCodeAdminNotifications||function(e,t,n){const i={init(){i.should_init()&&(i.find_elements(),i.init_open(),i.init_close(),i.init_dismiss(),i.init_view_switch(),i.update_count(i.active_count))},should_init:()=>(i.$drawer=n("#wpcode-notifications-drawer"),i.$drawer.length>0),find_elements(){i.$open_button=n("#wpcode-notifications-button"),i.$count=i.$drawer.find("#wpcode-notifications-count"),i.$dismissed_count=i.$drawer.find("#wpcode-notifications-dismissed-count"),i.active_count=i.$open_button.data("count")?i.$open_button.data("count"):0,i.dismissed_count=i.$open_button.data("dismissed"),i.$body=n("body"),i.$dismissed_button=n("#wpcode-notifications-show-dismissed"),i.$active_button=n("#wpcode-notifications-show-active"),i.$active_list=n(".wpcode-notifications-list .wpcode-notifications-active"),i.$dismissed_list=n(".wpcode-notifications-list .wpcode-notifications-dismissed"),i.$dismiss_all=n("#wpcode-dismiss-all")},update_count(e){i.$open_button.data("count",e).attr("data-count",e),0===e&&i.$open_button.removeAttr("data-count"),i.$count.text(e),i.dismissed_count+=Math.abs(e-i.active_count),i.active_count=e,i.$dismissed_count.text(i.dismissed_count),0===i.active_count&&i.$dismiss_all.hide()},init_open(){i.$open_button.on("click",(function(e){e.preventDefault(),i.$body.addClass("wpcode-notifications-open")}))},init_close(){i.$body.on("click",".wpcode-notifications-close, .wpcode-notifications-overlay",(function(e){e.preventDefault(),i.$body.removeClass("wpcode-notifications-open")}))},init_dismiss(){i.$drawer.on("click",".wpcode-notification-dismiss",(function(e){e.preventDefault();const t=n(this).data("id");if(i.dismiss_notification(t),"all"===t)return i.move_to_dismissed(i.$active_list.find("li")),void i.update_count(0);i.move_to_dismissed(n(this).closest("li")),i.update_count(i.active_count-1)}))},move_to_dismissed(e){e.slideUp((function(){n(this).prependTo(i.$dismissed_list).show()}))},dismiss_notification:e=>n.post(ajaxurl,{action:"wpcode_notification_dismiss",nonce:wpcode.nonce,id:e}),init_view_switch(){i.$dismissed_button.on("click",(function(e){e.preventDefault(),i.$drawer.addClass("show-dismissed")})),i.$active_button.on("click",(function(e){e.preventDefault(),i.$drawer.removeClass("show-dismissed")}))}};return i}(document,window,jQuery)).init()},52:function(){window.WPCodePlugins=window.WPCodePlugins||function(e,t,n){const i={l18n:t.wpcode,init:function(){i.should_init()&&i.init_install()},should_init:()=>(i.$install_buttons=n(".wpcode-button-install-plugin"),i.$install_buttons.length>0),init_install(){i.$install_buttons.on("click",(function(e){e.preventDefault();const t=n(this);i.install_plugin(t)}))},install_plugin(e){const o=e.data("slug");o&&(i.show_button_spinner(e),n.post(ajaxurl,{action:"wpcode_install_plugin",slug:o,_wpnonce:wpcode.nonce,multisite:i.l18n.multisite},(function(o){if(o.success)t.location.reload();else if(i.hide_button_spinner(e),o.data.message){const e="<div class='excl-mark'>!</div>";n.confirm({title:!1,content:e+o.data.message,type:"blue",buttons:{ok:{text:i.l18n.ok,btnClass:"wpcode-btn-confirm",action:function(){}}}})}})))},show_button_spinner(e){t.WPCodeSpinner.show_button_spinner(e)},hide_button_spinner(e){t.WPCodeSpinner.hide_button_spinner(e)}};return i}(document,window,jQuery),WPCodePlugins.init()},670:function(){(window.WPCodeAdminSettings||function(e,t,n){const i={init:function(){i.should_init()&&(i.init_auto_height_toggle(),i.init_select2())},should_init:()=>n("body").hasClass("wpcode-settings"),init_auto_height_toggle(){const e=n("#editor_height_auto"),t=n("#wpcode-editor-height");e.on("change",(function(){n(this).is(":checked")?t.prop("disabled",!0):t.prop("disabled",!1)}))},init_select2(){n(".wpcode-select2").selectWoo()}};return i}(document,window,jQuery)).init()},928:function(){jQuery((function(e){const t=e(".wpcode-smart-tags");let n;function i(){n.removeClass("wpcode-smart-tags-open"),e(document).off("click.wpcode")}t.on("click",".wpcode-smart-tags-toggle",(function(t){t.preventDefault();const o=e(this).closest(".wpcode-smart-tags");o.toggleClass("wpcode-smart-tags-open"),n=o,e(document).on("click.wpcode",(function(t){e(t.target).closest(".wpcode-smart-tags").length||i()}))})),t.on("wpcode_close_smart_tags_dropdown",i),"undefined"!=typeof WPCodeSnippetManager&&t.on("click",".wpcode-insert-smart-tag",(function(t){const n=e(this).closest(".wpcode-smart-tags-dropdown"),i=n.data("upgrade-title");if(i)return t.preventDefault(),t.stopImmediatePropagation(),WPCodeSnippetManager.show_pro_notice(i,n.data("upgrade-text"),n.data("upgrade-link"),n.data("upgrade-button")),!1}))}))},124:function(){const e=window.WPCodeSpinner||function(e,t,n){const i={init(){t.WPCodeSpinner=i,i.spinner=n("#wpcode-admin-spinner")},show_button_spinner(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right";e.prop("disabled",!0);const o=e.offset(),r=n("#adminmenuwrap").width(),a=n("#wpadminbar").height();let s={};i.spinner.show(),s="right"===t?{left:o.left-r+e.outerWidth(),top:o.top-a+e.outerHeight()/2-i.spinner.height()/2}:{left:o.left-r-i.spinner.outerWidth()-20,top:o.top-a+e.outerHeight()/2-i.spinner.height()/2},i.spinner.css(s)},hide_button_spinner(e){e.prop("disabled",!1),i.spinner.hide()}};return i}(document,window,jQuery);e.init()},978:function(){(window.WPCodeTestingMode||function(e,t,n){const i={l18n:t.wpcode,init:function(){i.should_init()&&i.init_events()},should_init:()=>(i.$toggle=n(".wpcode-lite-version #wpcode-toggle-testing-mode"),i.$toggle.length>0),init_events(){i.$toggle.on("change",i.toggle)},toggle(){const e=WPCodeSVG.WPCodeIcon("lock",22,28,"0 0 22 28","iconId");n.confirm({title:e+i.l18n.testing_mode.title,content:i.l18n.testing_mode.text,closeIcon:!0,boxWidth:"560px",backgroundDismiss:!0,theme:"modern upsell-box-alert width560px",buttons:{confirm:{text:i.l18n.testing_mode.button_text,btnClass:"wpcode-btn-orange wpcode-button-large",action:function(){i.$toggle.prop("checked",!1),t.open(i.l18n.testing_mode.link,"_blank","noopener noreferrer")}}},onContentReady:function(){this.$content.parent().parent().append('<div class="footer-link"><a href="'+i.l18n.testing_mode.learn_more_link+'" target="_blank" rel="noopener noreferrer">'+i.l18n.testing_mode.learn_more_text+"</a></div>")},onClose:function(){i.$toggle.prop("checked",!1)}})}};return i}(document,window,jQuery)).init()},801:function(){(window.WPCodeAdminTools||function(e,t,n){const i={i18n:t.wpcode,init:function(){i.should_init()&&(i.find_elements(),i.init_importer(),i.init_ssl_verify(),i.init_confirm_delete_log())},should_init:()=>n("body").hasClass("wpcode-tools"),find_elements(){i.importer_button=n("#wpcode-importer-snippets-submit"),i.$import_progress=n("#wpcode-importer-process"),i.provider=n("#wpcode-importer-provider").val(),i.status_update=n("#wpcode-importer-status-update").html()},init_importer(){i.importer_button.on("click",(function(e){e.preventDefault();const t=n("#wpcode-importer-snippets input:checked");if(t.length){const e=[];t.each((function(){e.push(n(this).val())})),i.import_snippets(e)}}))},import_snippets(e){i.$import_progress.find(".snippet-total").text(e.length),i.$import_progress.find(".snippet-current").text("1"),n("#wpcode-importer-snippets").hide(),i.$import_progress.show(),i.import_queue=e,i.imported=0,i.import_snippet()},import_snippet(){const e=i.import_queue[0];n.post(ajaxurl,{action:"wpcode_import_snippet_"+i.provider,snippet_id:e,_wpnonce:wpcode.nonce}).done((function(e){if(e.success){i.import_queue.shift(),i.imported++;const t=n(i.status_update);t.find(".name span").text(e.data.name),t.find(".actions a").attr("href",e.data.edit),i.$import_progress.find(".status").prepend(t),i.$import_progress.find(".status").show(),0===i.import_queue.length?(i.$import_progress.find(".process-count").hide(),i.$import_progress.find(".snippets-completed").text(i.imported),i.$import_progress.find(".process-completed").show()):(i.$import_progress.find(".snippet-current").text(i.imported+1),i.import_snippet())}}))},init_ssl_verify(){n(e).on("click","#wpcode-ssl-verify",(function(e){e.preventDefault(),i.verify_ssl()}))},verify_ssl(){const e=n("#wpcode-ssl-verify"),t=e.text(),i=e.outerWidth(),o=e.parent(),r={action:"wpcode_verify_ssl",nonce:wpcode.nonce};e.css("width",i).prop("disabled",!0).text(wpcode.testing),n.post(ajaxurl,r,(function(n){console.log(n),o.find(".wpcode-alert, .wpcode-ssl-error").remove(),n.success&&e.before('<div class="wpcode-alert wpcode-alert-success">'+n.data.msg+"</div>"),!n.success&&n.data.msg&&e.before('<div class="wpcode-alert wpcode-alert-danger">'+n.data.msg+"</div>"),!n.success&&n.data.debug&&e.before('<div class="wpcode-ssl-error pre-error">'+n.data.debug+"</div>"),e.css("width",i).prop("disabled",!1).text(t)}))},init_confirm_delete_log(){n(".wpcode-delete-log").on("click",(function(e){return e.stopPropagation(),t.confirm(i.i18n.confirm_delete_log)}))}};return i}(document,window,jQuery)).init()},868:function(){(window.WPCodeAdminWelcome||function(e,t,n){const i={init:function(){i.add_listener()},add_listener(){n("#wpbody-content").on("click",".wpcode-scroll-to",(function(e){e.preventDefault();const t=n(this).attr("href"),i=n(t);n("html, body").animate({scrollTop:i.offset().top},700)}))}};return i}(document,window,jQuery)).init()},895:function(){"use strict";"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))},o=0,r=t;o<r.length;o++){var a=r[o];i(a)}return e})},357:function(e,t,n){var i,o,r;o=[n(567)],void 0===(r="function"==typeof(i=function(e){var t=window;e.fn.confirm=function(n,i){return void 0===n&&(n={}),"string"==typeof n&&(n={content:n,title:i||!1}),e(this).each((function(){var i=e(this);i.attr("jc-attached")?console.warn("jConfirm has already been attached to this element ",i[0]):(i.on("click",(function(o){o.preventDefault();var r=e.extend({},n);if(i.attr("data-title")&&(r.title=i.attr("data-title")),i.attr("data-content")&&(r.content=i.attr("data-content")),void 0===r.buttons&&(r.buttons={}),r.$target=i,i.attr("href")&&0===Object.keys(r.buttons).length){var a=e.extend(!0,{},t.jconfirm.pluginDefaults.defaultButtons,(t.jconfirm.defaults||{}).defaultButtons||{}),s=Object.keys(a)[0];r.buttons=a,r.buttons[s].action=function(){location.href=i.attr("href")}}r.closeIcon=!1,e.confirm(r)})),i.attr("jc-attached",!0))})),e(this)},e.confirm=function(n,i){void 0===n&&(n={}),"string"==typeof n&&(n={content:n,title:i||!1});var o=!(!1===n.buttons);if("object"!=typeof n.buttons&&(n.buttons={}),0===Object.keys(n.buttons).length&&o){var r=e.extend(!0,{},t.jconfirm.pluginDefaults.defaultButtons,(t.jconfirm.defaults||{}).defaultButtons||{});n.buttons=r}return t.jconfirm(n)},e.alert=function(n,i){void 0===n&&(n={}),"string"==typeof n&&(n={content:n,title:i||!1});var o=!(!1===n.buttons);if("object"!=typeof n.buttons&&(n.buttons={}),0===Object.keys(n.buttons).length&&o){var r=e.extend(!0,{},t.jconfirm.pluginDefaults.defaultButtons,(t.jconfirm.defaults||{}).defaultButtons||{}),a=Object.keys(r)[0];n.buttons[a]=r[a]}return t.jconfirm(n)},e.dialog=function(e,n){return void 0===e&&(e={}),"string"==typeof e&&(e={content:e,title:n||!1,closeIcon:function(){}}),e.buttons={},void 0===e.closeIcon&&(e.closeIcon=function(){}),e.confirmKeys=[13],t.jconfirm(e)},t.jconfirm=function(n){void 0===n&&(n={});var i=e.extend(!0,{},t.jconfirm.pluginDefaults);t.jconfirm.defaults&&(i=e.extend(!0,i,t.jconfirm.defaults)),i=e.extend(!0,{},i,n);var o=new t.Jconfirm(i);return t.jconfirm.instances.push(o),o},t.Jconfirm=function(t){e.extend(this,t),this._init()},t.Jconfirm.prototype={_init:function(){var n=this;t.jconfirm.instances.length||(t.jconfirm.lastFocused=e("body").find(":focus")),this._id=Math.round(99999*Math.random()),this.contentParsed=e(document.createElement("div")),this.lazyOpen||setTimeout((function(){n.open()}),0)},_buildHTML:function(){var t=this;this._parseAnimation(this.animation,"o"),this._parseAnimation(this.closeAnimation,"c"),this._parseBgDismissAnimation(this.backgroundDismissAnimation),this._parseColumnClass(this.columnClass),this._parseTheme(this.theme),this._parseType(this.type);var n=e(this.template);n.find(".jconfirm-box").addClass(this.animationParsed).addClass(this.backgroundDismissAnimationParsed).addClass(this.typeParsed),this.typeAnimated&&n.find(".jconfirm-box").addClass("jconfirm-type-animated"),this.useBootstrap?(n.find(".jc-bs3-row").addClass(this.bootstrapClasses.row),n.find(".jc-bs3-row").addClass("justify-content-md-center justify-content-sm-center justify-content-xs-center justify-content-lg-center"),n.find(".jconfirm-box-container").addClass(this.columnClassParsed),this.containerFluid?n.find(".jc-bs3-container").addClass(this.bootstrapClasses.containerFluid):n.find(".jc-bs3-container").addClass(this.bootstrapClasses.container)):n.find(".jconfirm-box").css("width",this.boxWidth),this.titleClass&&n.find(".jconfirm-title-c").addClass(this.titleClass),n.addClass(this.themeParsed);var i="jconfirm-box"+this._id;n.find(".jconfirm-box").attr("aria-labelledby",i).attr("tabindex",-1),n.find(".jconfirm-content").attr("id",i),null!==this.bgOpacity&&n.find(".jconfirm-bg").css("opacity",this.bgOpacity),this.rtl&&n.addClass("jconfirm-rtl"),this.$el=n.appendTo(this.container),this.$jconfirmBoxContainer=this.$el.find(".jconfirm-box-container"),this.$jconfirmBox=this.$body=this.$el.find(".jconfirm-box"),this.$jconfirmBg=this.$el.find(".jconfirm-bg"),this.$title=this.$el.find(".jconfirm-title"),this.$titleContainer=this.$el.find(".jconfirm-title-c"),this.$content=this.$el.find("div.jconfirm-content"),this.$contentPane=this.$el.find(".jconfirm-content-pane"),this.$icon=this.$el.find(".jconfirm-icon-c"),this.$closeIcon=this.$el.find(".jconfirm-closeIcon"),this.$holder=this.$el.find(".jconfirm-holder"),this.$btnc=this.$el.find(".jconfirm-buttons"),this.$scrollPane=this.$el.find(".jconfirm-scrollpane"),t.setStartingPoint(),this._contentReady=e.Deferred(),this._modalReady=e.Deferred(),this.$holder.css({"padding-top":this.offsetTop,"padding-bottom":this.offsetBottom}),this.setTitle(),this.setIcon(),this._setButtons(),this._parseContent(),this.initDraggable(),this.isAjax&&this.showLoading(!1),e.when(this._contentReady,this._modalReady).then((function(){t.isAjaxLoading?setTimeout((function(){t.isAjaxLoading=!1,t.setContent(),t.setTitle(),t.setIcon(),setTimeout((function(){t.hideLoading(!1),t._updateContentMaxHeight()}),100),"function"==typeof t.onContentReady&&t.onContentReady()}),50):(t._updateContentMaxHeight(),t.setTitle(),t.setIcon(),"function"==typeof t.onContentReady&&t.onContentReady()),t.autoClose&&t._startCountDown()})).then((function(){t._watchContent()})),"none"===this.animation&&(this.animationSpeed=1,this.animationBounce=1),this.$body.css(this._getCSS(this.animationSpeed,this.animationBounce)),this.$contentPane.css(this._getCSS(this.animationSpeed,1)),this.$jconfirmBg.css(this._getCSS(this.animationSpeed,1)),this.$jconfirmBoxContainer.css(this._getCSS(this.animationSpeed,1))},_typePrefix:"jconfirm-type-",typeParsed:"",_parseType:function(e){this.typeParsed=this._typePrefix+e},setType:function(e){var t=this.typeParsed;this._parseType(e),this.$jconfirmBox.removeClass(t).addClass(this.typeParsed)},themeParsed:"",_themePrefix:"jconfirm-",setTheme:function(e){var t=this.theme;this.theme=e||this.theme,this._parseTheme(this.theme),t&&this.$el.removeClass(t),this.$el.addClass(this.themeParsed),this.theme=e},_parseTheme:function(t){var n=this;t=t.split(","),e.each(t,(function(i,o){-1===o.indexOf(n._themePrefix)&&(t[i]=n._themePrefix+e.trim(o))})),this.themeParsed=t.join(" ").toLowerCase()},backgroundDismissAnimationParsed:"",_bgDismissPrefix:"jconfirm-hilight-",_parseBgDismissAnimation:function(t){var n=t.split(","),i=this;e.each(n,(function(t,o){-1===o.indexOf(i._bgDismissPrefix)&&(n[t]=i._bgDismissPrefix+e.trim(o))})),this.backgroundDismissAnimationParsed=n.join(" ").toLowerCase()},animationParsed:"",closeAnimationParsed:"",_animationPrefix:"jconfirm-animation-",setAnimation:function(e){this.animation=e||this.animation,this._parseAnimation(this.animation,"o")},_parseAnimation:function(t,n){n=n||"o";var i=t.split(","),o=this;e.each(i,(function(t,n){-1===n.indexOf(o._animationPrefix)&&(i[t]=o._animationPrefix+e.trim(n))}));var r=i.join(" ").toLowerCase();return"o"===n?this.animationParsed=r:this.closeAnimationParsed=r,r},setCloseAnimation:function(e){this.closeAnimation=e||this.closeAnimation,this._parseAnimation(this.closeAnimation,"c")},setAnimationSpeed:function(e){this.animationSpeed=e||this.animationSpeed},columnClassParsed:"",setColumnClass:function(e){this.useBootstrap?(this.columnClass=e||this.columnClass,this._parseColumnClass(this.columnClass),this.$jconfirmBoxContainer.addClass(this.columnClassParsed)):console.warn("cannot set columnClass, useBootstrap is set to false")},_updateContentMaxHeight:function(){var t=e(window).height()-(this.$jconfirmBox.outerHeight()-this.$contentPane.outerHeight())-(this.offsetTop+this.offsetBottom);this.$contentPane.css({"max-height":t+"px"})},setBoxWidth:function(e){this.useBootstrap?console.warn("cannot set boxWidth, useBootstrap is set to true"):(this.boxWidth=e,this.$jconfirmBox.css("width",e))},_parseColumnClass:function(e){var t;switch(e=e.toLowerCase()){case"xl":case"xlarge":t="col-md-12";break;case"l":case"large":t="col-md-8 col-md-offset-2";break;case"m":case"medium":t="col-md-6 col-md-offset-3";break;case"s":case"small":t="col-md-4 col-md-offset-4";break;case"xs":case"xsmall":t="col-md-2 col-md-offset-5";break;default:t=e}this.columnClassParsed=t},initDraggable:function(){var t=this,n=this.$titleContainer;this.resetDrag(),this.draggable&&(n.on("mousedown",(function(e){n.addClass("jconfirm-hand"),t.mouseX=e.clientX,t.mouseY=e.clientY,t.isDrag=!0})),e(window).on("mousemove."+this._id,(function(e){t.isDrag&&(t.movingX=e.clientX-t.mouseX+t.initialX,t.movingY=e.clientY-t.mouseY+t.initialY,t.setDrag())})),e(window).on("mouseup."+this._id,(function(){n.removeClass("jconfirm-hand"),t.isDrag&&(t.isDrag=!1,t.initialX=t.movingX,t.initialY=t.movingY)})))},resetDrag:function(){this.isDrag=!1,this.initialX=0,this.initialY=0,this.movingX=0,this.movingY=0,this.mouseX=0,this.mouseY=0,this.$jconfirmBoxContainer.css("transform","translate(0px, 0px)")},setDrag:function(){if(this.draggable){this.alignMiddle=!1;var t=this.$jconfirmBox.outerWidth(),n=this.$jconfirmBox.outerHeight(),i=e(window).width(),o=e(window).height(),r=this;if(r.movingX%1==0||r.movingY%1==0){if(r.dragWindowBorder){var a=i/2-t/2,s=o/2-n/2;s-=r.dragWindowGap,(a-=r.dragWindowGap)+r.movingX<0?r.movingX=-a:a-r.movingX<0&&(r.movingX=a),s+r.movingY<0?r.movingY=-s:s-r.movingY<0&&(r.movingY=s)}r.$jconfirmBoxContainer.css("transform","translate("+r.movingX+"px, "+r.movingY+"px)")}}},_scrollTop:function(){if("undefined"!=typeof pageYOffset)return pageYOffset;var e=document.body,t=document.documentElement;return(t=t.clientHeight?t:e).scrollTop},_watchContent:function(){var t=this;this._timer&&clearInterval(this._timer);var n=0;this._timer=setInterval((function(){if(t.smoothContent){var i=t.$content.outerHeight()||0;i!==n&&(n=i);var o=e(window).height();t.offsetTop+t.offsetBottom+t.$jconfirmBox.height()-t.$contentPane.height()+t.$content.height()<o?t.$contentPane.addClass("no-scroll"):t.$contentPane.removeClass("no-scroll")}}),this.watchInterval)},_overflowClass:"jconfirm-overflow",_hilightAnimating:!1,highlight:function(){this.hiLightModal()},hiLightModal:function(){var e=this;if(!this._hilightAnimating){e.$body.addClass("hilight");var t=parseFloat(e.$body.css("animation-duration"))||2;this._hilightAnimating=!0,setTimeout((function(){e._hilightAnimating=!1,e.$body.removeClass("hilight")}),1e3*t)}},_bindEvents:function(){var t=this;this.boxClicked=!1,this.$scrollPane.click((function(e){if(!t.boxClicked){var n,i=!1,o=!1;if("string"==typeof(n="function"==typeof t.backgroundDismiss?t.backgroundDismiss():t.backgroundDismiss)&&void 0!==t.buttons[n]?(i=n,o=!1):o=void 0===n||1==!!n,i){var r=t.buttons[i].action.apply(t);o=void 0===r||!!r}o?t.close():t.hiLightModal()}t.boxClicked=!1})),this.$jconfirmBox.click((function(e){t.boxClicked=!0}));var n=!1;e(window).on("jcKeyDown."+t._id,(function(e){n||(n=!0)})),e(window).on("keyup."+t._id,(function(e){n&&(t.reactOnKey(e),n=!1)})),e(window).on("resize."+this._id,(function(){t._updateContentMaxHeight(),setTimeout((function(){t.resetDrag()}),100)}))},_cubic_bezier:"0.36, 0.55, 0.19",_getCSS:function(e,t){return{"-webkit-transition-duration":e/1e3+"s","transition-duration":e/1e3+"s","-webkit-transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+t+")","transition-timing-function":"cubic-bezier("+this._cubic_bezier+", "+t+")"}},_setButtons:function(){var t=this,n=0;if("object"!=typeof this.buttons&&(this.buttons={}),e.each(this.buttons,(function(i,o){n+=1,"function"==typeof o&&(t.buttons[i]=o={action:o}),t.buttons[i].text=o.text||i,t.buttons[i].btnClass=o.btnClass||"btn-default",t.buttons[i].action=o.action||function(){},t.buttons[i].keys=o.keys||[],t.buttons[i].isHidden=o.isHidden||!1,t.buttons[i].isDisabled=o.isDisabled||!1,e.each(t.buttons[i].keys,(function(e,n){t.buttons[i].keys[e]=n.toLowerCase()}));var r=e('<button type="button" class="btn"></button>').html(t.buttons[i].text).addClass(t.buttons[i].btnClass).prop("disabled",t.buttons[i].isDisabled).css("display",t.buttons[i].isHidden?"none":"").click((function(e){e.preventDefault();var n=t.buttons[i].action.apply(t,[t.buttons[i]]);t.onAction.apply(t,[i,t.buttons[i]]),t._stopCountDown(),(void 0===n||n)&&t.close()}));t.buttons[i].el=r,t.buttons[i].setText=function(e){r.html(e)},t.buttons[i].addClass=function(e){r.addClass(e)},t.buttons[i].removeClass=function(e){r.removeClass(e)},t.buttons[i].disable=function(){t.buttons[i].isDisabled=!0,r.prop("disabled",!0)},t.buttons[i].enable=function(){t.buttons[i].isDisabled=!1,r.prop("disabled",!1)},t.buttons[i].show=function(){t.buttons[i].isHidden=!1,r.css("display","")},t.buttons[i].hide=function(){t.buttons[i].isHidden=!0,r.css("display","none")},t["$_"+i]=t["$$"+i]=r,t.$btnc.append(r)})),0===n&&this.$btnc.hide(),null===this.closeIcon&&0===n&&(this.closeIcon=!0),this.closeIcon){if(this.closeIconClass){var i='<i class="'+this.closeIconClass+'"></i>';this.$closeIcon.html(i)}this.$closeIcon.click((function(e){e.preventDefault();var n,i=!1,o=!1;if("string"==typeof(n="function"==typeof t.closeIcon?t.closeIcon():t.closeIcon)&&void 0!==t.buttons[n]?(i=n,o=!1):o=void 0===n||1==!!n,i){var r=t.buttons[i].action.apply(t);o=void 0===r||!!r}o&&t.close()})),this.$closeIcon.show()}else this.$closeIcon.hide()},setTitle:function(e,t){if(t=t||!1,void 0!==e)if("string"==typeof e)this.title=e;else if("function"==typeof e){"function"==typeof e.promise&&console.error("Promise was returned from title function, this is not supported.");var n=e();this.title="string"==typeof n&&n}else this.title=!1;this.isAjaxLoading&&!t||(this.$title.html(this.title||""),this.updateTitleContainer())},setIcon:function(e,t){if(t=t||!1,void 0!==e)if("string"==typeof e)this.icon=e;else if("function"==typeof e){var n=e();this.icon="string"==typeof n&&n}else this.icon=!1;this.isAjaxLoading&&!t||(this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':""),this.updateTitleContainer())},updateTitleContainer:function(){this.title||this.icon?this.$titleContainer.show():this.$titleContainer.hide()},setContentPrepend:function(e,t){e&&this.contentParsed.prepend(e)},setContentAppend:function(e){e&&this.contentParsed.append(e)},setContent:function(e,t){t=!!t;var n=this;e&&this.contentParsed.html("").append(e),this.isAjaxLoading&&!t||(this.$content.html(""),this.$content.append(this.contentParsed),setTimeout((function(){n.$body.find("input[autofocus]:visible:first").focus()}),100))},loadingSpinner:!1,showLoading:function(e){this.loadingSpinner=!0,this.$jconfirmBox.addClass("loading"),e&&this.$btnc.find("button").prop("disabled",!0)},hideLoading:function(e){this.loadingSpinner=!1,this.$jconfirmBox.removeClass("loading"),e&&this.$btnc.find("button").prop("disabled",!1)},ajaxResponse:!1,contentParsed:"",isAjax:!1,isAjaxLoading:!1,_parseContent:function(){var t=this,n="&nbsp;";if("function"==typeof this.content){var i=this.content.apply(this);"string"==typeof i?this.content=i:"object"==typeof i&&"function"==typeof i.always?(this.isAjax=!0,this.isAjaxLoading=!0,i.always((function(e,n,i){t.ajaxResponse={data:e,status:n,xhr:i},t._contentReady.resolve(e,n,i),"function"==typeof t.contentLoaded&&t.contentLoaded(e,n,i)})),this.content=n):this.content=n}if("string"==typeof this.content&&"url:"===this.content.substr(0,4).toLowerCase()){this.isAjax=!0,this.isAjaxLoading=!0;var o=this.content.substring(4,this.content.length);e.get(o).done((function(e){t.contentParsed.html(e)})).always((function(e,n,i){t.ajaxResponse={data:e,status:n,xhr:i},t._contentReady.resolve(e,n,i),"function"==typeof t.contentLoaded&&t.contentLoaded(e,n,i)}))}this.content||(this.content=n),this.isAjax||(this.contentParsed.html(this.content),this.setContent(),t._contentReady.resolve())},_stopCountDown:function(){clearInterval(this.autoCloseInterval),this.$cd&&this.$cd.remove()},_startCountDown:function(){var t=this,n=this.autoClose.split("|");if(2!==n.length)return console.error("Invalid option for autoClose. example 'close|10000'"),!1;var i=n[0],o=parseInt(n[1]);if(void 0===this.buttons[i])return console.error("Invalid button key '"+i+"' for autoClose"),!1;var r=Math.ceil(o/1e3);this.$cd=e('<span class="countdown"> ('+r+")</span>").appendTo(this["$_"+i]),this.autoCloseInterval=setInterval((function(){t.$cd.html(" ("+(r-=1)+") "),r<=0&&(t["$$"+i].trigger("click"),t._stopCountDown())}),1e3)},_getKey:function(e){switch(e){case 192:return"tilde";case 13:return"enter";case 16:return"shift";case 9:return"tab";case 20:return"capslock";case 17:return"ctrl";case 91:return"win";case 18:return"alt";case 27:return"esc";case 32:return"space"}var t=String.fromCharCode(e);return!!/^[A-z0-9]+$/.test(t)&&t.toLowerCase()},reactOnKey:function(t){var n=this,i=e(".jconfirm");if(i.eq(i.length-1)[0]!==this.$el[0])return!1;var o=t.which;if(this.$content.find(":input").is(":focus")&&/13|32/.test(o))return!1;var r,a=this._getKey(o);"esc"===a&&this.escapeKey&&(!0===this.escapeKey?this.$scrollPane.trigger("click"):"string"!=typeof this.escapeKey&&"function"!=typeof this.escapeKey||(r="function"==typeof this.escapeKey?this.escapeKey():this.escapeKey)&&(void 0===this.buttons[r]?console.warn("Invalid escapeKey, no buttons found with key "+r):this["$_"+r].trigger("click"))),e.each(this.buttons,(function(e,t){-1!==t.keys.indexOf(a)&&n["$_"+e].trigger("click")}))},setDialogCenter:function(){console.info("setDialogCenter is deprecated, dialogs are centered with CSS3 tables")},_unwatchContent:function(){clearInterval(this._timer)},close:function(n){var i=this;return"function"==typeof this.onClose&&this.onClose(n),this._unwatchContent(),e(window).unbind("resize."+this._id),e(window).unbind("keyup."+this._id),e(window).unbind("jcKeyDown."+this._id),this.draggable&&(e(window).unbind("mousemove."+this._id),e(window).unbind("mouseup."+this._id),this.$titleContainer.unbind("mousedown")),i.$el.removeClass(i.loadedClass),e("body").removeClass("jconfirm-no-scroll-"+i._id),i.$jconfirmBoxContainer.removeClass("jconfirm-no-transition"),setTimeout((function(){i.$body.addClass(i.closeAnimationParsed),i.$jconfirmBg.addClass("jconfirm-bg-h");var n="none"===i.closeAnimation?1:i.animationSpeed;setTimeout((function(){i.$el.remove(),t.jconfirm.instances;for(var n=t.jconfirm.instances.length-1;n>=0;n--)t.jconfirm.instances[n]._id===i._id&&t.jconfirm.instances.splice(n,1);if(!t.jconfirm.instances.length&&i.scrollToPreviousElement&&t.jconfirm.lastFocused&&t.jconfirm.lastFocused.length&&e.contains(document,t.jconfirm.lastFocused[0])){var o=t.jconfirm.lastFocused;if(i.scrollToPreviousElementAnimate){var r=e(window).scrollTop(),a=t.jconfirm.lastFocused.offset().top,s=e(window).height();if(a>r&&a<r+s)o.focus();else{var c=a-Math.round(s/3);e("html, body").animate({scrollTop:c},i.animationSpeed,"swing",(function(){o.focus()}))}}else o.focus();t.jconfirm.lastFocused=!1}"function"==typeof i.onDestroy&&i.onDestroy()}),.4*n)}),50),!0},open:function(){return!this.isOpen()&&(this._buildHTML(),this._bindEvents(),this._open(),!0)},setStartingPoint:function(){var n=!1;if(!0!==this.animateFromElement&&this.animateFromElement)n=this.animateFromElement,t.jconfirm.lastClicked=!1;else{if(!t.jconfirm.lastClicked||!0!==this.animateFromElement)return!1;n=t.jconfirm.lastClicked,t.jconfirm.lastClicked=!1}if(!n)return!1;var i=n.offset(),o=n.outerHeight()/2,r=n.outerWidth()/2;o-=this.$jconfirmBox.outerHeight()/2,r-=this.$jconfirmBox.outerWidth()/2;var a=i.top+o;a-=this._scrollTop();var s=i.left+r,c=e(window).height()/2,l=e(window).width()/2;if(a-=c-this.$jconfirmBox.outerHeight()/2,s-=l-this.$jconfirmBox.outerWidth()/2,Math.abs(a)>c||Math.abs(s)>l)return!1;this.$jconfirmBoxContainer.css("transform","translate("+s+"px, "+a+"px)")},_open:function(){var e=this;"function"==typeof e.onOpenBefore&&e.onOpenBefore(),this.$body.removeClass(this.animationParsed),this.$jconfirmBg.removeClass("jconfirm-bg-h"),this.$body.focus(),e.$jconfirmBoxContainer.css("transform","translate(0px, 0px)"),setTimeout((function(){e.$body.css(e._getCSS(e.animationSpeed,1)),e.$body.css({"transition-property":e.$body.css("transition-property")+", margin"}),e.$jconfirmBoxContainer.addClass("jconfirm-no-transition"),e._modalReady.resolve(),"function"==typeof e.onOpen&&e.onOpen(),e.$el.addClass(e.loadedClass)}),this.animationSpeed)},loadedClass:"jconfirm-open",isClosed:function(){return!this.$el||0===this.$el.parent().length},isOpen:function(){return!this.isClosed()},toggle:function(){this.isOpen()?this.close():this.open()}},t.jconfirm.instances=[],t.jconfirm.lastFocused=!1,t.jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg jconfirm-bg-h"></div><div class="jconfirm-scrollpane"><div class="jconfirm-row"><div class="jconfirm-cell"><div class="jconfirm-holder"><div class="jc-bs3-container"><div class="jc-bs3-row"><div class="jconfirm-box-container jconfirm-animated"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="jconfirm-closeIcon">&times;</div><div class="jconfirm-title-c"><span class="jconfirm-icon-c"></span><span class="jconfirm-title"></span></div><div class="jconfirm-content-pane"><div class="jconfirm-content"></div></div><div class="jconfirm-buttons"></div><div class="jconfirm-clear"></div></div></div></div></div></div></div></div></div></div>',title:"Hello",titleClass:"",type:"default",typeAnimated:!0,draggable:!0,dragWindowGap:15,dragWindowBorder:!0,animateFromElement:!0,alignMiddle:!0,smoothContent:!0,content:"Are you sure to continue?",buttons:{},defaultButtons:{ok:{action:function(){}},close:{action:function(){}}},contentLoaded:function(){},icon:"",lazyOpen:!1,bgOpacity:null,theme:"light",animation:"scale",closeAnimation:"scale",animationSpeed:400,animationBounce:1,escapeKey:!0,rtl:!1,container:"body",containerFluid:!1,backgroundDismiss:!1,backgroundDismissAnimation:"shake",autoClose:!1,closeIcon:null,closeIconClass:!1,watchInterval:100,columnClass:"col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1",boxWidth:"50%",scrollToPreviousElement:!0,scrollToPreviousElementAnimate:!0,useBootstrap:!0,offsetTop:40,offsetBottom:40,bootstrapClasses:{container:"container",containerFluid:"container-fluid",row:"row"},onContentReady:function(){},onOpenBefore:function(){},onOpen:function(){},onClose:function(){},onDestroy:function(){},onAction:function(){}};var n=!1;e(window).on("keydown",(function(t){if(!n){var i=!1;e(t.target).closest(".jconfirm-box").length&&(i=!0),i&&e(window).trigger("jcKeyDown"),n=!0}})),e(window).on("keyup",(function(){n=!1})),t.jconfirm.lastClicked=!1,e(document).on("mousedown","button, a, [jc-source]",(function(){t.jconfirm.lastClicked=e(this)}))})?i.apply(t,o):i)||(e.exports=r)},180:function(e,t,n){var i,o;!function(r,a){i=[n(567)],o=function(e){return function(e,t){"use strict";var n=e.document,i=t(e),o=t.Deferred,r=t("html"),a=[],s="aria-hidden",c="lity-aria-hidden",l='a[href],area[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),button:not([disabled]),iframe,object,embed,[contenteditable],[tabindex]:not([tabindex^="-"])',d={esc:!0,handler:null,handlers:{image:C,inline:function(e,n){var i,o,r;try{i=t(e)}catch(e){return!1}return!!i.length&&(o=t('<i style="display:none !important"></i>'),r=i.hasClass("lity-hide"),n.element().one("lity:remove",(function(){o.before(i).remove(),r&&!i.closest(".lity-content").length&&i.addClass("lity-hide")})),i.removeClass("lity-hide").after(o))},youtube:function(e){var n=p.exec(e);return!!n&&x(b(e,y("https://www.youtube"+(n[2]||"")+".com/embed/"+n[4],t.extend({autoplay:1},w(n[5]||"")))))},vimeo:function(e){var n=h.exec(e);return!!n&&x(b(e,y("https://player.vimeo.com/video/"+n[3],t.extend({autoplay:1},w(n[4]||"")))))},googlemaps:function(e){var t=f.exec(e);return!!t&&x(b(e,y("https://www.google."+t[3]+"/maps?"+t[6],{output:t[6].indexOf("layer=c")>0?"svembed":"embed"})))},facebookvideo:function(e){var n=m.exec(e);return!!n&&(0!==e.indexOf("http")&&(e="https:"+e),x(b(e,y("https://www.facebook.com/plugins/video.php?href="+e,t.extend({autoplay:1},w(n[4]||""))))))},iframe:x},template:'<div class="lity" role="dialog" aria-label="Dialog Window (Press escape to close)" tabindex="-1"><div class="lity-wrap" data-lity-close role="document"><div class="lity-loader" aria-hidden="true">Loading...</div><div class="lity-container"><div class="lity-content"></div><button class="lity-close" type="button" aria-label="Close (Press escape to close)" data-lity-close>&times;</button></div></div></div>'},u=/(^data:image\/)|(\.(png|jpe?g|gif|svg|webp|bmp|ico|tiff?)(\?\S*)?$)/i,p=/(youtube(-nocookie)?\.com|youtu\.be)\/(watch\?v=|v\/|u\/|embed\/?)?([\w-]{11})(.*)?/i,h=/(vimeo(pro)?.com)\/(?:[^\d]+)?(\d+)\??(.*)?$/,f=/((maps|www)\.)?google\.([^\/\?]+)\/?((maps\/?)?\?)(.*)/i,m=/(facebook\.com)\/([a-z0-9_-]*)\/videos\/([0-9]*)(.*)?$/i,g=function(){var e=n.createElement("div"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in t)if(void 0!==e.style[i])return t[i];return!1}();function _(e){var t=o();return g&&e.length?(e.one(g,t.resolve),setTimeout(t.resolve,500)):t.resolve(),t.promise()}function v(e,n,i){if(1===arguments.length)return t.extend({},e);if("string"==typeof n){if(void 0===i)return void 0===e[n]?null:e[n];e[n]=i}else t.extend(e,n);return this}function w(e){for(var t,n=decodeURI(e.split("#")[0]).split("&"),i={},o=0,r=n.length;o<r;o++)n[o]&&(i[(t=n[o].split("="))[0]]=t[1]);return i}function y(e,n){return e+(e.indexOf("?")>-1?"&":"?")+t.param(n)}function b(e,t){var n=e.indexOf("#");return-1===n?t:(n>0&&(e=e.substr(n)),t+e)}function C(e,n){var i=n.opener()&&n.opener().data("lity-desc")||"Image with no description",r=t('<img src="'+e+'" alt="'+i+'"/>'),a=o(),s=function(){var e;a.reject((e="Failed loading image",t('<span class="lity-error"></span>').append(e)))};return r.on("load",(function(){if(0===this.naturalWidth)return s();a.resolve(r)})).on("error",s),a.promise()}function x(e){return'<div class="lity-iframe-container"><iframe frameborder="0" allowfullscreen allow="autoplay; fullscreen" src="'+e+'"/></div>'}function D(){return n.documentElement.clientHeight?n.documentElement.clientHeight:Math.round(i.height())}function k(e){var t=A();t&&(27===e.keyCode&&t.options("esc")&&t.close(),9===e.keyCode&&function(e,t){var i=t.element().find(l),o=i.index(n.activeElement);e.shiftKey&&o<=0?(i.get(i.length-1).focus(),e.preventDefault()):e.shiftKey||o!==i.length-1||(i.get(0).focus(),e.preventDefault())}(e,t))}function $(){t.each(a,(function(e,t){t.resize()}))}function A(){return 0===a.length?null:a[0]}function j(e,l,u,p){var h,f,m,g,w=this,y=!1,b=!1;l=t.extend({},d,l),f=t(l.template),w.element=function(){return f},w.opener=function(){return u},w.options=t.proxy(v,w,l),w.handlers=t.proxy(v,w,l.handlers),w.resize=function(){y&&!b&&m.css("max-height",D()+"px").trigger("lity:resize",[w])},w.close=function(){if(y&&!b){b=!0,(l=w).element().attr(s,"true"),1===a.length&&(r.removeClass("lity-active"),i.off({resize:$,keydown:k})),((a=t.grep(a,(function(e){return l!==e}))).length?a[0].element():t(".lity-hidden")).removeClass("lity-hidden").each((function(){var e=t(this),n=e.data(c);n?e.attr(s,n):e.removeAttr(s),e.removeData(c)}));var e=o();if(p&&(n.activeElement===f[0]||t.contains(f[0],n.activeElement)))try{p.focus()}catch(e){}return m.trigger("lity:close",[w]),f.removeClass("lity-opened").addClass("lity-closed"),_(m.add(f)).always((function(){m.trigger("lity:remove",[w]),f.remove(),f=void 0,e.resolve()})),e.promise()}var l},h=function(e,n,i,o){var r,a="inline",s=t.extend({},i);return o&&s[o]?(r=s[o](e,n),a=o):(t.each(["inline","iframe"],(function(e,t){delete s[t],s[t]=i[t]})),t.each(s,(function(t,i){return!i||!(!i.test||i.test(e,n))||(!1!==(r=i(e,n))?(a=t,!1):void 0)}))),{handler:a,content:r||""}}(e,w,l.handlers,l.handler),f.attr(s,"false").addClass("lity-loading lity-opened lity-"+h.handler).appendTo("body").focus().on("click","[data-lity-close]",(function(e){t(e.target).is("[data-lity-close]")&&w.close()})).trigger("lity:open",[w]),g=w,1===a.unshift(g)&&(r.addClass("lity-active"),i.on({resize:$,keydown:k})),t("body > *").not(g.element()).addClass("lity-hidden").each((function(){var e=t(this);void 0===e.data(c)&&e.data(c,e.attr(s)||null)})).attr(s,"true"),t.when(h.content).always((function(e){m=t(e).css("max-height",D()+"px"),f.find(".lity-loader").each((function(){var e=t(this);_(e).always((function(){e.remove()}))})),f.removeClass("lity-loading").find(".lity-content").empty().append(m),y=!0,m.trigger("lity:ready",[w])}))}function M(e,i,o){e.preventDefault?(e.preventDefault(),e=(o=t(this)).data("lity-target")||o.attr("href")||o.attr("src")):o=t(o);var r=new j(e,t.extend({},o.data("lity-options")||o.data("lity"),i),o,n.activeElement);if(!e.preventDefault)return r}return C.test=function(e){return u.test(e)},M.version="2.4.1",M.options=t.proxy(v,M,d),M.handlers=t.proxy(v,M,d.handlers),M.current=A,t(n).on("click.lity","[data-lity]",M),M}(r,e)}.apply(t,i),void 0===o||(e.exports=o)}("undefined"!=typeof window?window:this)},207:function(e,t,n){var i,o,r;o=[n(567)],i=function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,o;return t&&t.requirejs||(t?i=t:t={},function(e){var t,r,a,s,c={},l={},d={},u={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function m(e,t){return p.call(e,t)}function g(e,t){var n,i,o,r,a,s,c,l,u,p,h,m=t&&t.split("/"),g=d.map,_=g&&g["*"]||{};if(e){for(a=(e=e.split("/")).length-1,d.nodeIdCompat&&f.test(e[a])&&(e[a]=e[a].replace(f,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),u=0;u<e.length;u++)if("."===(h=e[u]))e.splice(u,1),u-=1;else if(".."===h){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((m||_)&&g){for(u=(n=e.split("/")).length;u>0;u-=1){if(i=n.slice(0,u).join("/"),m)for(p=m.length;p>0;p-=1)if((o=g[m.slice(0,p).join("/")])&&(o=o[i])){r=o,s=u;break}if(r)break;!c&&_&&_[i]&&(c=_[i],l=u)}!r&&c&&(r=c,s=l),r&&(n.splice(0,s,r),e=n.join("/"))}return e}function _(t,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),r.apply(e,i.concat([t,n]))}}function v(e){return function(t){c[e]=t}}function w(n){if(m(l,n)){var i=l[n];delete l[n],u[n]=!0,t.apply(e,i)}if(!m(c,n)&&!m(u,n))throw new Error("No "+n);return c[n]}function y(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function b(e){return e?y(e):[]}function C(e){return function(){return d&&d.config&&d.config[e]||{}}}a=function(e,t){var n,i,o=y(e),r=o[0],a=t[1];return e=o[1],r&&(n=w(r=g(r,a))),r?e=n&&n.normalize?n.normalize(e,(i=a,function(e){return g(e,i)})):g(e,a):(r=(o=y(e=g(e,a)))[0],e=o[1],r&&(n=w(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},s={require:function(e){return _(e)},exports:function(e){var t=c[e];return void 0!==t?t:c[e]={}},module:function(e){return{id:e,uri:"",exports:c[e],config:C(e)}}},t=function(t,n,i,o){var r,d,p,h,f,g,y,C=[],x=typeof i;if(g=b(o=o||t),"undefined"===x||"function"===x){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(d=(h=a(n[f],g)).f))C[f]=s.require(t);else if("exports"===d)C[f]=s.exports(t),y=!0;else if("module"===d)r=C[f]=s.module(t);else if(m(c,d)||m(l,d)||m(u,d))C[f]=w(d);else{if(!h.p)throw new Error(t+" missing "+d);h.p.load(h.n,_(o,!0),v(d),{}),C[f]=c[d]}p=i?i.apply(c[t],C):void 0,t&&(r&&r.exports!==e&&r.exports!==c[t]?c[t]=r.exports:p===e&&y||(c[t]=p))}else t&&(c[t]=i)},n=i=r=function(n,i,o,c,l){if("string"==typeof n)return s[n]?s[n](i):w(a(n,b(i)).f);if(!n.splice){if((d=n).deps&&r(d.deps,d.callback),!i)return;i.splice?(n=i,i=o,o=null):n=e}return i=i||function(){},"function"==typeof o&&(o=c,c=l),c?t(e,n,i,o):setTimeout((function(){t(e,n,i,o)}),4),r},r.config=function(e){return r(e)},n._defined=c,(o=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(c,e)||m(l,e)||(l[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=o),t.define("almond",(function(){})),t.define("jquery",[],(function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t})),t.define("select2/utils",["jquery"],(function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t)"function"==typeof t[i]&&"constructor"!==i&&n.push(i);return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var o in t)n.call(t,o)&&(e[o]=t[o]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),o=n(e);function r(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,o=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),o=t.prototype.constructor),o.apply(this,arguments)}t.displayName=e.displayName,r.prototype=new function(){this.constructor=r};for(var a=0;a<o.length;a++){var s=o[a];r.prototype[s]=e.prototype[s]}for(var c=function(e){var n=function(){};e in r.prototype&&(n=r.prototype[e]);var i=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),i.apply(this,arguments)}},l=0;l<i.length;l++){var d=i[l];r.prototype[d]=c(d)}return r};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},t.Observable=i,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];(r=r.substring(0,1).toLowerCase()+r.substring(1))in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},t.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth)},t.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,(function(e){i=i.add(e)})),n=i}t.append(n)},t.isTouchscreen=function(){return void 0===t._isTouchscreenCache&&(t._isTouchscreenCache="ontouchstart"in document.documentElement),t._isTouchscreenCache},t})),t.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox" tabindex="-1"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[data-selected]"),t=e.filter("[data-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current((function(n){var i=e.map(n,(function(e){return e.id.toString()}));t.$results.find(".select2-results__option[data-selected]").each((function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("data-selected","true"):t.attr("data-selected","false")}))}))},n.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"option","data-selected":"false",tabindex:-1};for(var o in t.disabled&&(delete i["data-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["data-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i["aria-label"]=t.text,delete i["data-selected"]),i){var r=i[o];n.setAttribute(o,r)}if(t.children){var a=e(n),s=document.createElement("strong");s.className="select2-results__group";var c=e(s);this.template(t,s),c.attr("role","presentation");for(var l=[],d=0;d<t.children.length;d++){var u=t.children[d],p=this.option(u);l.push(p)}var h=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"listbox"});h.append(l),a.attr("role","list"),a.append(s),a.append(h)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",(function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("results:append",(function(e){i.append(e.data),t.isOpen()&&i.setClasses()})),t.on("query",(function(e){i.hideMessages(),i.showLoading(e)})),t.on("select",(function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("unselect",(function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),t.on("open",(function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()})),t.on("close",(function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")})),t.on("results:toggle",(function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),t.on("results:select",(function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("data-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}})),t.on("results:previous",(function(){var e=i.getHighlightedResults(),t=i.$results.find("[data-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var a=i.$results.offset().top,s=r.offset().top,c=i.$results.scrollTop()+(s-a);0===o?i.$results.scrollTop(0):s-a<0&&i.$results.scrollTop(c)}})),t.on("results:next",(function(){var e=i.getHighlightedResults(),t=i.$results.find("[data-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var o=t.eq(n);o.trigger("mouseenter");var r=i.$results.offset().top+i.$results.outerHeight(!1),a=o.offset().top+o.outerHeight(!1),s=i.$results.scrollTop()+a-r;0===n?i.$results.scrollTop(0):a>r&&i.$results.scrollTop(s)}})),t.on("results:focus",(function(e){e.element.addClass("select2-results__option--highlighted").attr("aria-selected","true"),i.$results.attr("aria-activedescendant",e.element.attr("id"))})),t.on("results:message",(function(e){i.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[data-selected]",(function(t){var n=e(this),o=n.data("data");"true"!==n.attr("data-selected")?i.trigger("select",{originalEvent:t,data:o}):i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[data-selected]",(function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:n,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[data-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,o=this.$results.scrollTop()+(i-n),r=i-n;o-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(r>this.$results.outerHeight()||r<0)&&this.$results.scrollTop(o)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n})),t.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),t.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id,e.id+"-results");this.options.get("minimumResultsForSearch"),this.container=e,this.$selection.on("focus",(function(e){i.trigger("focus",e)})),this.$selection.on("blur",(function(e){i._handleBlur(e)})),this.$selection.on("keydown",(function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){i.update(e.data)})),e.on("open",(function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)})),e.on("close",(function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),window.setTimeout((function(){i.$selection.focus()}),1),i._detachCloseHandler(e)})),e.on("enable",(function(){i.$selection.attr("tabindex",i._tabindex)})),e.on("disable",(function(){i.$selection.attr("tabindex","-1")}))},i.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,(function(t){var n=e(t.target),i=n.closest(".select2");e(".select2.select2-container--open").each((function(){var t=e(this);this!=i[0]&&(t.data("element").select2("close"),setTimeout((function(){t.find("*:focus").blur(),n.focus()}),1))}))}))},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i})),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",i),this.$selection.attr("role","combobox"),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("keydown",(function(t){!e.isOpen()&&t.which>=48&&t.which<=90&&e.open()})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.focus()})),e.on("selection:update",(function(e){n.update(e.data)}))},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},o})),t.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered" aria-live="polite" aria-relevant="additions removals" aria-atomic="true"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){if(!o.options.get("disabled")){var n=e(this).parent().data("data");o.trigger("unselect",{originalEvent:t,data:n})}})),this.$selection.on("keydown",(function(e){!t.isOpen()&&e.which>=48&&e.which<=90&&t.open()})),t.on("focus",(function(){o.focusOnSearch()}))},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation" aria-hidden="true">&times;</span></li>')},i.prototype.focusOnSearch=function(){var e=this;void 0!==e.$search&&setTimeout((function(){e._keyUpPrevented=!0,e.$search.focus()}),1)},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),a=this.display(o,r);"string"==typeof a&&(a=a.trim()),r.append(a),r.prop("title",o.title||o.text),r.data("data",o),t.push(r)}var s=this.$selection.find(".select2-selection__rendered");n.appendMany(s,t)}},i})),t.define("select2/selection/placeholder",["../utils"],(function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t})),t.define("select2/selection/allowClear",["jquery","../keys"],(function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){i._handleClear(e)})),t.on("keypress",(function(e){i._handleKeyboardClear(e,t)}))},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n})),t.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="text" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this,r=t.id+"-results";e.call(this,t,i),t.on("open",(function(){o.$search.attr("aria-owns",r),o.$search.trigger("focus")})),t.on("close",(function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.removeAttr("aria-owns"),o.$search.trigger("focus")})),t.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),t.on("disable",(function(){o.$search.prop("disabled",!0)})),t.on("focus",(function(e){o.$search.trigger("focus")})),t.on("results:focus",(function(e){o.$search.attr("aria-activedescendant",e.data._resultId)})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".select2-selection__choice");if(i.length>0){var r=i.data("data");o.searchRemoveChoice(r),e.preventDefault()}}else e.which===n.ENTER&&(t.open(),e.preventDefault())}));var a=document.documentMode,s=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){s?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){if(s&&"input"===e.type)o.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}}))},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e;e=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},i})),t.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",(function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,a)&&(n.prevented=i.isDefaultPrevented())}}))},t})),t.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n})),t.define("select2/diacritics",[],(function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}})),t.define("select2/data/base",["../utils"],(function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i="";return i+=null!=t?t.id:e.generateChars(4),i+="-result-",i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t})),t.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each((function(){var e=n(this),o=i.item(e);t.push(o)})),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current((function(i){var o=[];(e=[e]).push.apply(e,i);for(var r=0;r<e.length;r++){var a=e[r].id;-1===n.inArray(a,o)&&o.push(a)}t.$element.val(o),t.$element.trigger("change")}));else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current((function(i){for(var o=[],r=0;r<i.length;r++){var a=i[r].id;a!==e.id&&-1===n.inArray(a,o)&&o.push(a)}t.$element.val(o),t.$element.trigger("change")}))}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",(function(e){n.select(e.data)})),e.on("unselect",(function(e){n.unselect(e.data)}))},i.prototype.destroy=function(){this.$element.find("*").each((function(){n.removeData(this,"data")}))},i.prototype.query=function(e,t){var i=[],o=this;this.$element.children().each((function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=o.item(t),a=o.matches(e,r);null!==a&&i.push(a)}})),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),o=[],r=0;r<i.length;r++){var a=n(i[r]),s=this.item(a);o.push(s)}t.children=o}return(t=this._normalizeItem(t)).element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e});return null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i})),t.define("select2/data/array",["./select","../utils","jquery"],(function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter((function(t,n){return n.value==e.id.toString()}));0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){var i=this,o=this.$element.find("option"),r=o.map((function(){return i.item(n(this)).id})).get(),a=[];function s(e){return function(){return n(this).val()==e.id}}for(var c=0;c<e.length;c++){var l=this._normalizeItem(e[c]);if(n.inArray(l.id,r)>=0){var d=o.filter(s(l)),u=this.item(d),p=n.extend(!0,{},l,u),h=this.option(p);d.replaceWith(h)}else{var f=this.option(l);if(l.children){var m=this.convertToOptions(l.children);t.appendMany(f,m)}a.push(f)}}return a},i})),t.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);function r(){var r=o.transport(o,(function(o){var r=i.processResults(o,e);i.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r),i.container.focusOnActiveElement()}),(function(){r.status&&"0"===r.status||i.trigger("results:message",{message:"errorLoading"})}));i._request=r}"function"==typeof o.url&&(o.url=o.url.call(this.$element,e)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},i})),t.define("select2/data/tags",["jquery"],(function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var a=i.get("insertTag");if(void 0!==a&&(this.insertTag=a),t.call(this,n,i),e.isArray(o))for(var s=0;s<o.length;s++){var c=o[s],l=this._normalizeItem(c),d=this.option(l);this.$element.append(d)}}return t.prototype.query=function(e,t,n){var i=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,(function e(o,r){for(var a=o.results,s=0;s<a.length;s++){var c=a[s],l=null!=c.children&&!e({results:c.children},!0);if((c.text||"").toUpperCase()===(t.term||"").toUpperCase()||l)return!r&&(o.data=a,void n(o))}if(r)return!0;var d=i.createTag(t);if(null!=d){var u=i.option(d);u.attr("data-select2-tag",!0),i.addOptions([u]),i.insertTag(a,d)}o.results=a,n(o)})):e.call(this,t,n)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag,this.$element.find("option[data-select2-tag]").each((function(){this.selected||e(this).remove()}))},t})),t.define("select2/data/tokenizer",["jquery"],(function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){var o=this;n.term=n.term||"";var r=this.tokenizer(n,this.options,(function(t){var n=o._normalizeItem(t);if(!o.$element.find("option").filter((function(){return e(this).val()===n.id})).length){var i=o.option(n);i.attr("data-select2-tag",!0),o._removeOldTags(),o.addOptions([i])}!function(e){o.trigger("select",{data:e})}(n)}));r.term!==n.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),n.term=r.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,o){for(var r=i.get("tokenSeparators")||[],a=n.term,s=0,c=this.createTag||function(e){return{id:e.term,text:e.term}};s<a.length;){var l=a[s];if(-1!==e.inArray(l,r)){var d=a.substr(0,s),u=c(e.extend({},n,{term:d}));null!=u?(o(u),a=a.substr(s+1)||"",s=0):s++}else s++}return{term:a}},t})),t.define("select2/data/minimumInputLength",[],(function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumInputLength",[],(function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),t.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current((function(o){var r=null!=o?o.length:0;i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):e.call(i,t,n)}))},e})),t.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),t.define("select2/dropdown/search",["jquery","../utils"],(function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="text" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="combobox" aria-autocomplete="list" aria-expanded="true" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this,r=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",(function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){o.handleSearch(e)})),n.on("open",(function(){o.$search.attr("tabindex",0),o.$search.attr("aria-owns",r),o.$search.focus(),window.setTimeout((function(){o.$search.focus()}),0)})),n.on("close",(function(){o.$search.attr("tabindex",-1),o.$search.removeAttr("aria-activedescendant"),o.$search.removeAttr("aria-owns"),o.$search.val("")})),n.on("focus",(function(){n.isOpen()||o.$search.focus()})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide"))})),n.on("results:focus",(function(e){o.$search.attr("aria-activedescendant",e.data._resultId)}))},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n})),t.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e})),t.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",(function(e){o.lastParams=e,o.loading=!0})),n.on("query:append",(function(e){o.lastParams=e,o.loading=!0})),this.$results.on("scroll",(function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);!o.loading&&t&&o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore()}))},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),t.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",(function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",(function(){i._positionDropdown(),i._resizeDropdown()})),t.on("results:append",(function(){i._positionDropdown(),i._resizeDropdown()})))})),t.on("close",(function(){i._hideDropdown(),i._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2."+i.id,a="resize.select2."+i.id,s="orientationchange.select2."+i.id,c=this.$container.parents().filter(t.hasScroll);c.each((function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),c.on(r,(function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)})),e(window).on(r+" "+a+" "+s,(function(e){o._positionDropdown(),o._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,r="resize.select2."+i.id,a="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+r+" "+a)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=r.top,a.bottom=r.top+a.height;var s=this.$dropdown.outerHeight(!1),c=t.scrollTop(),l=t.scrollTop()+t.height(),d=c<r.top-s,u=l>r.bottom+s,p={left:r.left,top:a.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();p.top-=f.top,p.left-=f.left,n||i||(o="below"),u||!d||n?!d&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(p.top=a.top-f.top-s),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(p)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),t.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t})),t.define("select2/dropdown/selectOnClose",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",(function(e){i._handleSelectOnClose(e)}))},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e})),t.define("select2/dropdown/closeOnSelect",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",(function(e){i._selectTriggered(e)})),t.on("unselect",(function(e){i._selectTriggered(e)}))},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e})),t.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}})),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],(function(e,t,n,i,o,r,a,s,c,l,d,u,p,h,f,m,g,_,v,w,y,b,C,x,D,k,$,A,j){function M(){this.reset()}return M.prototype.apply=function(u){if(null==(u=e.extend(!0,{},this.defaults,u)).dataAdapter){if(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=p,u.minimumInputLength>0&&(u.dataAdapter=l.Decorate(u.dataAdapter,_)),u.maximumInputLength>0&&(u.dataAdapter=l.Decorate(u.dataAdapter,v)),u.maximumSelectionLength>0&&(u.dataAdapter=l.Decorate(u.dataAdapter,w)),u.tags&&(u.dataAdapter=l.Decorate(u.dataAdapter,m)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=l.Decorate(u.dataAdapter,g)),null!=u.query){var j=t(u.amdBase+"compat/query");u.dataAdapter=l.Decorate(u.dataAdapter,j)}if(null!=u.initSelection){var M=t(u.amdBase+"compat/initSelection");u.dataAdapter=l.Decorate(u.dataAdapter,M)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n,null!=u.ajax&&(u.resultsAdapter=l.Decorate(u.resultsAdapter,x)),null!=u.placeholder&&(u.resultsAdapter=l.Decorate(u.resultsAdapter,C)),u.selectOnClose&&(u.resultsAdapter=l.Decorate(u.resultsAdapter,$))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=y;else{var E=l.Decorate(y,b);u.dropdownAdapter=E}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=l.Decorate(u.dropdownAdapter,k)),u.closeOnSelect&&(u.dropdownAdapter=l.Decorate(u.dropdownAdapter,A)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var T=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=l.Decorate(u.dropdownAdapter,T)}u.dropdownAdapter=l.Decorate(u.dropdownAdapter,D)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=o:u.selectionAdapter=i,null!=u.placeholder&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,r)),u.allowClear&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,a)),u.multiple&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,s)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var P=t(u.amdBase+"compat/containerCss");u.selectionAdapter=l.Decorate(u.selectionAdapter,P)}u.selectionAdapter=l.Decorate(u.selectionAdapter,c)}if("string"==typeof u.language)if(u.language.indexOf("-")>0){var S=u.language.split("-")[0];u.language=[u.language,S]}else u.language=[u.language];if(e.isArray(u.language)){var O=new d;u.language.push("en");for(var I=u.language,L=0;L<I.length;L++){var H=I[L],W={};try{W=d.loadPath(H)}catch(e){try{H=this.defaults.amdLanguageBase+H,W=d.loadPath(H)}catch(e){u.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+H+'" could not be automatically loaded. A fallback will be used instead.');continue}}O.extend(W)}u.translations=O}else{var N=d.loadPath(this.defaults.amdLanguageBase+"en"),F=new d(u.language);F.extend(N),u.translations=F}return u},M.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,(function(e){return u[e]||e}))}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:l.escapeMarkup,language:j,matcher:function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=e.extend(!0,{},o),a=o.children.length-1;a>=0;a--)null==n(i,o.children[a])&&r.children.splice(a,1);return r.children.length>0?r:n(i,r)}var s=t(o.text).toUpperCase(),c=t(i.term).toUpperCase();return s.indexOf(c)>-1?o:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},M.prototype.set=function(t,n){var i={};i[e.camelCase(t)]=n;var o=l._convertData(i);e.extend(this.defaults,o)},new M})),t.define("select2/options",["require","jquery","./defaults","./utils"],(function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o;o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},o);for(var a in r=i._convertData(r))t.inArray(a,n)>-1||(t.isPlainObject(this.options[a])?t.extend(this.options[a],r[a]):this.options[a]=r[a]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o})),t.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,i){var o=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var l=this.options.get("resultsAdapter");this.results=new l(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){d.trigger("selection:update",{data:e})})),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var a=r.split(";"),s=0,c=a.length;s<c;s+=1){var l=a[s].replace(/\s/g,"").match(n);if(null!==l&&l.length>=1)return l[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",(function(){t.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})}))})),this.$element.on("focus.select2",(function(e){t.trigger("focus",e)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i((function(n){e.each(n,t._syncA),e.each(n,t._syncS)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",(function(){t.toggleDropdown()})),this.selection.on("focus",(function(e){t.focus(e)})),this.selection.on("*",(function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)}))},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},o.prototype._registerEvents=function(){var t=this;this.on("open",(function(){t.$container.addClass("select2-container--open")})),this.on("close",(function(){t.$container.removeClass("select2-container--open")})),this.on("enable",(function(){t.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){t.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){t.$container.removeClass("select2-container--focus")})),this.on("query",(function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,(function(n){t.trigger("results:all",{data:n,query:e})}))})),this.on("query:append",(function(e){this.dataAdapter.query(e,(function(n){t.trigger("results:append",{data:n,query:e})}))})),this.on("open",(function(){setTimeout((function(){t.focusOnActiveElement()}),1)})),e(document).on("keydown",(function(e){var n=e.which;if(t.isOpen()){n===i.ESC||n===i.TAB||n===i.UP&&e.altKey?(t.close(),e.preventDefault()):n===i.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===i.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===i.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===i.DOWN&&(t.trigger("results:next",{}),e.preventDefault());var o=t.$dropdown.find(".select2-search__field");o.length||(o=t.$container.find(".select2-search__field")),n===i.DOWN||n===i.UP?t.focusOnActiveElement():(o.focus(),setTimeout((function(){t.focusOnActiveElement()}),1e3))}else t.hasFocus()&&(n!==i.ENTER&&n!==i.SPACE&&n!==i.DOWN||(t.open(),e.preventDefault()))}))},o.prototype.focusOnActiveElement=function(){this.isOpen()&&!n.isTouchscreen()&&this.$results.find("li.select2-results__option--highlighted").focus()},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++)t.addedNodes[o].selected&&(n=!0);else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current((function(e){i.trigger("selection:update",{data:e})}))}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],a={prevented:!1,name:e,args:t};if(n.call(this,r,a),a.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,(function(e){return e.toString()}))),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o})),t.define("jquery-mousewheel",["jquery"],(function(e){return e})),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],(function(e,t,n,i){if(null==e.fn.selectWoo){var o=["open","close","destroy"];e.fn.selectWoo=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var i=e.extend(!0,{},t);new n(e(this),i)})),this;if("string"==typeof t){var i,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,r)})),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null!=e.fn.select2&&null!=e.fn.select2.defaults&&(e.fn.selectWoo.defaults=e.fn.select2.defaults),null==e.fn.selectWoo.defaults&&(e.fn.selectWoo.defaults=i),e.fn.select2=e.fn.select2||e.fn.selectWoo,n})),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,e.fn.selectWoo.amd=t,n},void 0===(r=i.apply(t,o))||(e.exports=r)},567:function(e){"use strict";e.exports=window.jQuery}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}!function(){"use strict";n(357),n(707),n(279),n(233),n(207);const e=window.WPCodeSnippetManager||function(e,t,n){const i={editor_id:"wpcode_snippet_code",unload_set:!1,icon_lock:'<svg width="22" height="28" viewBox="0 0 22 28" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M19 9.33333H17.6666V6.66667C17.6666 2.98667 14.68 0 11 0C7.31998 0 4.33331 2.98667 4.33331 6.66667V9.33333H2.99998C1.53331 9.33333 0.333313 10.5333 0.333313 12V25.3333C0.333313 26.8 1.53331 28 2.99998 28H19C20.4666 28 21.6666 26.8 21.6666 25.3333V12C21.6666 10.5333 20.4666 9.33333 19 9.33333ZM6.99998 6.66667C6.99998 4.45333 8.78665 2.66667 11 2.66667C13.2133 2.66667 15 4.45333 15 6.66667V9.33333H6.99998V6.66667ZM19 25.3333H2.99998V12H19V25.3333ZM11 21.3333C12.4666 21.3333 13.6666 20.1333 13.6666 18.6667C13.6666 17.2 12.4666 16 11 16C9.53331 16 8.33331 17.2 8.33331 18.6667C8.33331 20.1333 9.53331 21.3333 11 21.3333Z" fill="#8A8A8A"/></svg>',l10n:wpcode,saving_height:!1,init:function(){i.should_init()&&(t.WPCodeSnippetManager=i,i.find_elements(),i.init_location_picker(),i.init_location_click(),i.prevent_multi_button_click(),i.init_snippet_type_switcher(),i.init_auto_insert_toggle(),i.init_dynamic_hide(),i.init_copy_target(),i.init_tags_picker(),i.init_metabox_toggler(),i.init_select2(),i.init_tinymce_listener(),i.unload_change_listener(),i.init_save_to_library(),i.init_custom_shortcode(),i.init_conditional_logic_notice(),i.init_device_type(),i.init_datetime_lite(),i.init_shortcode_attributes(),i.update_smart_tags_attributes(),i.restore_cursor_position(),i.maybe_highlight_error_line(),i.init_load_as_file(),i.init_edit_lock(),i.editor_resizer(),i.init_ai_button(),i.keyboard_shortcuts(),i.update_available_locations(i.switcher.val(),!1))},should_init:function(){return null!==e.getElementById(i.editor_id)},find_elements(){i.location_dropdown=n("#wpcode_auto_insert_location"),i.switcher=n(e.getElementById("wpcode_snippet_type")),i.$body=n("body"),i.$text_editor="undefined"!=typeof tinymce&&tinymce.get("wpcode_snippet_text"),i.$selected_location_display=n("#wpcode-selected-location-display"),i.code_type=i.switcher.val()},init_snippet_type_switcher:function(){i.switcher.on("change",(function(){let e=i.switcher.val();if(n(this).find(":selected").hasClass("wpcode-pro"))return i.switcher.val(i.code_type),void("scss"===e?i.show_pro_notice(i.l10n.scss_title,i.l10n.scss_text,i.l10n.scss_url,i.l10n.scss_button).then((function(){WPCodeCodeTypePicker.showPicker()})):"blocks"===e&&i.show_pro_notice(i.l10n.blocks_title,i.l10n.blocks_text,i.l10n.blocks_url,i.l10n.blocks_button).then((function(){WPCodeCodeTypePicker.showPicker()})));if(i.set_before_unload(),t.WPCodeAdminCodeEditor.switch_code_mode(i.editor_id,n(this).val(),n(this).find(":selected").data("mode"),n(this).find(":selected").data("lint")),i.$body.removeClass("wpcode-code-type-"+i.code_type),i.$body.addClass("wpcode-code-type-"+n(this).val()),"text"===i.switcher.val()){const e=t.WPCodeAdminCodeEditor.get_value(i.editor_id);i.$text_editor?i.$text_editor.setContent(e):n("#wpcode_snippet_text").val(e)}else t.WPCodeAdminCodeEditor.refresh(i.editor_id);const o=i.switcher.val();"php"!==i.code_type&&"php"!==o||i.update_available_locations(o),i.switcher.data("previous-type",i.code_type),i.code_type=o}))},update_available_locations(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=i.location_dropdown.find(".wpcode-list-item");o.removeClass("wpcode-list-item-disabled"),o.find('input[type="radio"]').prop("disabled",!1);const r=o.filter((function(){const t=n(this).data("code-type");return"all"!==t&&e!==t}));if(r.length>0&&(r.addClass("wpcode-list-item-disabled"),r.find('input[type="radio"]').prop("disabled",!0)),i.location_dropdown.find(".wpcode-items-list-category").each((function(){const e=n(this).find(".wpcode-list-item");e.sort((function(e,t){return n(e).data("index")-n(t).data("index")})),n(this).html(e)})),r.detach().appendTo(i.location_dropdown.find(".wpcode-items-list-category")),t){const e=i.location_dropdown.find(".wpcode-list-item:not(.wpcode-list-item-disabled):not(.wpcode-list-item-separator)").first();e.length>0&&e.find('input[type="radio"]').prop("checked",!0).trigger("change")}},init_location_picker:function(){i.location_dropdown.on("keydown",".wpcode-list-item-location",(function(e){if("Enter"===e.key||" "===e.key){const e=n(this).find('input[type="radio"]');e.prop("disabled")||(e.prop("checked",!0).trigger("change"),i.$selected_location_display.focus())}})),i.location_dropdown.on("change",'input[type="radio"]',(function(e){i.location_dropdown.find(".wpcode-list-item").removeClass("wpcode-list-item-selected");const t=n(this).closest(".wpcode-list-item");t.addClass("wpcode-list-item-selected"),i.$selected_location_display.text(t.find(".wpcode-list-item-title").attr("title")),i.location_dropdown.is(":visible")&&i.close_location_dropdown()}))},prevent_multi_button_click:function(){n('#wpcode-snippet-manager-form .wpcode-button[type="submit"]').click((function(e){return!e.detail||1==e.detail}))},init_location_click:function(){i.location_dropdown.hide(),n("body").on("click",".wpcode-list-item",(function(e){const t=n(this).find("label").first();t.data("upgrade-title")&&i.show_pro_notice(t.data("upgrade-title"),t.data("upgrade-text"),t.data("upgrade-link"),t.data("upgrade-button"))})),i.$selected_location_display.on("click, focus",(function(){i.location_dropdown.slideDown(200,(function(){i.init_dropdown_close()})),i.scroll_to_location_dropdown()}))},init_dropdown_close:function(){n(e).on("click.wpcodelocation",(function(e){n(e.target).closest("#wpcode_auto_insert_location").length||n(e.target).closest(".jconfirm-box").length||i.close_location_dropdown()}))},close_location_dropdown:function(){i.location_dropdown.hide(),n(e).off("click.wpcodelocation"),i.scroll_to_location_dropdown(300),i.$selected_location_display.blur()},scroll_to_location_dropdown:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;const t=i.$selected_location_display.offset();t&&n("html, body").animate({scrollTop:t.top-e},200)},init_auto_insert_toggle:function(){const t={toggles:"",init:function(){t.toggles=n(e.querySelectorAll(".wpcode-button-toggle")),t.listen_to_switch()},listen_to_switch:function(){t.toggles.each((function(){const e=n(this).find(".wpcode-button-toggle-input");n(this).on("click",".wpcode-button",(function(o){o.preventDefault(),i.set_before_unload(),e.val(n(this).val()).change(),t.make_button_active(n(this))}))}))},make_button_active:function(e){e.closest(".wpcode-button-toggle").find(".wpcode-button").each((function(){e.is(n(this))?n(this).removeClass("wpcode-button-secondary-inactive"):n(this).addClass("wpcode-button-secondary-inactive")}))}};t.init()},init_dynamic_hide:function(){const e={init:function(){e.elements=n("[data-show-if-id]"),e.add_listeners()},add_listeners:function(){e.elements.each((function(){const t=n(this),i=t.data("show-if-id");if(""===i)return;let o=!1,r=String(t.data("show-if-value")).split(",");t.data("hide-if-value")&&(r=String(t.data("hide-if-value")).split(","),o=!0);const a=n(i);n(".wpcode-admin-page #wpbody-content").on("change",i,(function(){e.maybe_hide(n(this),t,r,o)})),e.maybe_hide(a,t,r,o)}))},maybe_hide:function(e,t,n,o){let r=String(e.val());if("checkbox"===e.attr("type")&&(r=e.prop("checked")?"1":"0"),"radio"===e.attr("type")&&(r=e.closest("form").find('input[name="'+e.attr("name")+'"]:checked').val()),o){if(n.indexOf(r)>=0)return void t.hide();t.show(),t.find(".wpcode-select2").length>0&&i.init_select2()}else n.indexOf(r)<0?t.hide():(t.show(),t.find(".wpcode-select2").length>0&&i.init_select2())}};e.init()},init_copy_target:function(){n(".wpcode-copy-target").on("click",(function(e){e.preventDefault();const t=n(this),i=t.data("target"),o=t.data("prefix"),r=t.data("suffix"),a=n(i).val();a&&(navigator.clipboard.writeText(o+a+r),t.addClass("wpcode-show-success-icon"),setTimeout((function(){t.removeClass("wpcode-show-success-icon")}),500))}))},init_select2:function(){n(".wpcode-select2").selectWoo({templateResult:function(e){const t=n(e.element),i=t.data("label-pill"),o=t.data("upgrade-title"),r=t.data("upgrade-text"),a=t.data("upgrade-link"),s=t.data("upgrade-button"),c=n('<span class="wpcode-pro-pill">'+i+"</span>");return""!==o&&c.attr("data-upgrade-title",o),""!==r&&c.attr("data-upgrade-text",r),""!==a&&c.attr("data-upgrade-link",a),""!==s&&c.attr("data-upgrade-button",s),void 0!==i&&""!==i?((e=n("<span>"+e.text+"</span>")).append(c),e):e.text}}),n("body").on("click",".select2-results__options",(function(e){const t=n(this).closest(".select2-results__option").find(".wpcode-pro-pill");t.length>0&&i.show_pro_notice(t.data("upgrade-title"),t.data("upgrade-text"),t.data("upgrade-link"),t.data("upgrade-button"))}))},init_tags_picker:function(){const e=n(".wpcode-tags-picker");e.selectWoo({tags:!0,ajax:{url:ajaxurl,data:function(e){return{action:"ajax-tag-search",tax:"wpcode_tags",q:e.term?e.term:""}},processResults:function(e){const t=e.split(","),n=[];return t.forEach((function(e){""!==e&&n.push({id:e,text:e})})),{results:n}}}}),e.on("change",(function(){i.set_before_unload();const e=n(this).data("target");n(e).val(n(this).val().join(","))}))},init_metabox_toggler:function(){n(".wpcode-metabox-title").on("click",(function(){n(this).parent().toggleClass("wpcode-metabox-collapsed")}))},init_tinymce_listener(){if(null===i.$text_editor)return i.$text_editor=tinymce.get("wpcode_snippet_text"),void setTimeout(i.init_tinymce_listener,100);!1!==i.$text_editor?i.$text_editor.on("Paste Change input Undo Redo",(function(){i.set_before_unload(),clearTimeout(i.editor_change_handler),i.editor_change_handler=setTimeout((function(){t.WPCodeAdminCodeEditor.set_value(i.editor_id,i.$text_editor.getContent())}),100)})):n("#wpcode_snippet_text").on("paste change input",(function(){i.set_before_unload(),clearTimeout(i.editor_change_handler),i.editor_change_handler=setTimeout((function(){t.WPCodeAdminCodeEditor.set_value(i.editor_id,n("#wpcode_snippet_text").val())}),100)}))},set_before_unload(){i.unload_set||(i.unload_set=!0,i.catch_unsaved_button=!0,n(t).on("beforeunload",(function(){return"Are you sure?"})))},unload_change_listener(){const e=t.WPCodeAdminCodeEditor.get_editor(i.editor_id);e&&e.on("change",(function(){i.set_before_unload()}));const o=n("#wpcode-snippet-manager-form");o.on("change","input, select",(function(){i.set_before_unload()})),o.on("submit",(function(){n(t).off("beforeunload"),i.save_cursor_position()}))},save_cursor_position(){const e=t.WPCodeAdminCodeEditor.get_editor(i.editor_id);e&&(i.cursor_position=e.getCursor(),localStorage.setItem("wpcode_cursor_position",JSON.stringify(i.cursor_position)),localStorage.setItem("wpcode_scroll_position",JSON.stringify(e.getScrollInfo())))},restore_cursor_position(){const e=localStorage.getItem("wpcode_cursor_position");if(e){const n=JSON.parse(e),o=localStorage.getItem("wpcode_scroll_position");localStorage.removeItem("wpcode_cursor_position");const r=t.WPCodeAdminCodeEditor.get_editor(i.editor_id);if(r&&(r.focus(),r.setCursor(n),o)){const e=JSON.parse(o);r.scrollTo(e.left,e.top)}}},init_save_to_library(){n("#wpcode_save_to_library").click((function(e){e.preventDefault(),i.show_pro_notice(i.l10n.save_to_library_title,i.l10n.save_to_library_text,i.l10n.save_to_library_url)}))},init_custom_shortcode(){n("#wpcode-custom-shortcode-lite").click((function(e){e.preventDefault(),i.show_pro_notice(i.l10n.shortcode_title,i.l10n.shortcode_text,i.l10n.shortcode_url)}))},init_datetime_lite(){n(".wpcode-input-datetime[readonly]").click((function(e){e.preventDefault(),i.show_pro_notice(i.l10n.datetime_title,i.l10n.datetime_text,i.l10n.datetime_url)}))},init_device_type(){n(".wpcode-device-type-picker-lite label").click((function(e){e.preventDefault(),i.show_pro_notice(i.l10n.device_title,i.l10n.device_text,i.l10n.device_url)}))},init_load_as_file(){n("#wpcode_snippet_as_file_option #wpcode_snippet_as_file").on("change",(function(e){e.preventDefault(),n(this).prop("checked",!1),i.show_pro_notice(i.l10n.laf_title,i.l10n.laf_text,i.l10n.laf_url)}))},show_pro_notice:(e,t,n,i)=>WPCodeAdminNotices.show_pro_notice(e,t,n,i),init_conditional_logic_notice(){n("#wpcode-conditions-holder").on("change",".wpcode-cl-rule-type",(function(e){const t=n(this).find(":selected");if(t.data("upgrade-title")){e.stopPropagation(),i.show_pro_notice(t.data("upgrade-title"),t.data("upgrade-text"),t.data("upgrade-link"),t.data("upgrade-button"));const o=n(this).find("option").first();n(this).val(o.attr("value")).trigger("change")}}))},init_shortcode_attributes(){const e=n("#wpcode-shortcode-attributes-list ul"),t=n("#wpcode-shortcode-attribute-name"),o=n("#wpcode_shortcode_attribute_list_item_template").html();n("#wpcode_add_attribute").on("click",(function(r){r.preventDefault();const a=i.sanitize_key(t.val());if(""===a)return;const s=n(o);s.find(".wpcode-shortcode-attribute-name").text(a),s.find(".wpcode-shortcode-attribute-item-input").val(a),e.append(s),t.val(""),i.update_smart_tags_attributes()})),e.on("click",".wpcode-shortcode-attribute-remove",(function(e){e.preventDefault(),n(this).closest("li").remove(),i.update_smart_tags_attributes()}))},sanitize_key:e=>e.replace(/[^a-z0-9_]/gi,"").toLowerCase(),update_smart_tags_attributes(){const e=n(".wpcode-shortcode-attribute-item-input"),t=n(".wpcode-smart-tags-dropdown ul");t.find(".wpcode-attribute-smart-tag").remove(),e.length>0&&t.append('<li class="wpcode-attribute-smart-tag wpcode-smart-tag-category-label">'+i.l10n.shortcode_attributes+"</li>"),e.each((function(){const e=n(this).val();t.append('<li class="wpcode-attribute-smart-tag" ><buton class="wpcode-insert-smart-tag" data-tag="{attr_'+e+'}"><code>{attr_'+e+"}</code> - "+e+"</buton></li>")}))},maybe_highlight_error_line(){if(i.l10n.error_line<=0)return;const t=wpcode_editor[i.editor_id].codemirror;var n;t.doc.setGutterMarker(i.l10n.error_line-1,"CodeMirror-lint-markers",((n=e.createElement("div")).innerHTML='<div class="wpcode-line-error-icon"></div>',n.setAttribute("title",i.l10n.error_line_message),n)),t.doc.addLineClass(i.l10n.error_line-1,"background","wpcode-line-error-code")},init_edit_lock(){n(e).on("heartbeat-send.refresh-lock",(function(e,t){t.wpcode_lock=i.l10n.snippet_id})),i.l10n.is_locked&&i.show_locked_message(i.l10n.locked_by)},show_locked_message(e){const t=WPCodeSVG.WPCodeIcon("lock",22,28,"0 0 22 28","iconId");n.confirm({title:t+i.l10n.edited+e,boxWidth:"560px",theme:"modern no-content",type:"blue",buttons:{ok:{text:i.l10n.ok,btnClass:"wpcode-btn-confirm",action:function(){}}}})},editor_resizer(){let n=e.querySelector(".wpcode-resize-handle"),o=e.querySelector(".wpcode-code-textarea"),r=0;const a=t.WPCodeAdminCodeEditor.get_editor(i.editor_id);var s,c;function l(e){r=Math.max(200,c+e.y-s)+"px",a.setSize(null,r)}function d(n){e.body.removeEventListener("mousemove",l),t.removeEventListener("mouseup",d),o.classList.remove("wpcode-resizing"),i.save_editor_height(r)}n.addEventListener("mousedown",(function(n){var i;n.x,s=n.y,i=o,c=parseInt(t.getComputedStyle(i).height.replace(/px$/,"")),o.classList.add("wpcode-resizing"),e.body.addEventListener("mousemove",l),t.addEventListener("mouseup",d)}))},save_editor_height(e){i.saving_height&&i.saving_height.abort(),i.saving_height=n.post(ajaxurl,{action:"wpcode_save_editor_height",height:e,_wpnonce:i.l10n.nonce})},init_ai_button(){n(".wpcode-button-ai-not-available").on("click",(function(e){e.preventDefault(),e.stopPropagation(),WPCodeAdminNotices.show_pro_notice(i.l10n.ai_improve_title,i.l10n.ai_text,i.l10n.ai_improve_url,i.l10n.ai_button)}))},keyboard_shortcuts(){var o={};n(e).on("keydown",(function(e){var t=/Mac/.test(navigator.userAgent),n=!t&&e.ctrlKey,i=t&&e.metaKey;if(n||i){var r=String.fromCharCode(e.which).toUpperCase();o.hasOwnProperty(r)&&(e.preventDefault(),o[r](e))}}));const r=t.WPCodeAdminCodeEditor.get_editor(i.editor_id);var a;a=function(e){r.hasFocus()&&n("#wpcode-snippet-manager-form").submit()},o["S".toUpperCase()]=a}};return i}(document,window,jQuery);jQuery((function(){e.init()})),n(560);var t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],i={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},r=o,a=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},s=function(e){return!0===e?1:0};function c(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(i,o)}),t)}}var l=function(e){return e instanceof Array?e:[e]};function d(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function u(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function p(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function h(e,t){return t(e)?e:e.parentNode?h(e.parentNode,t):void 0}function f(e,t){var n=u("div","numInputWrapper"),i=u("input","numInput "+e),o=u("span","arrowUp"),r=u("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var a in t)i.setAttribute(a,t[a]);return n.appendChild(i),n.appendChild(o),n.appendChild(r),n}function m(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var g=function(){},_=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},v={D:g,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*s(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:g,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:g,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},w={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},y={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[y.w(e,t,n)]},F:function(e,t,n){return _(y.n(e,t,n)-1,!1,t)},G:function(e,t,n){return a(y.h(e,t,n))},H:function(e){return a(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[s(e.getHours()>11)]},M:function(e,t){return _(e.getMonth(),!0,t)},S:function(e){return a(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return a(e.getFullYear(),4)},d:function(e){return a(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return a(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return a(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},b=function(e){var t=e.config,n=void 0===t?i:t,r=e.l10n,a=void 0===r?o:r,s=e.isMobile,c=void 0!==s&&s;return function(e,t,i){var o=i||a;return void 0===n.formatDate||c?t.split("").map((function(t,i,r){return y[t]&&"\\"!==r[i-1]?y[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}},C=function(e){var t=e.config,n=void 0===t?i:t,r=e.l10n,a=void 0===r?o:r;return function(e,t,o,r){if(0===e||e){var s,c=r||a,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var d=t||(n||i).dateFormat,u=String(e).trim();if("today"===u)s=new Date,o=!0;else if(n&&n.parseDate)s=n.parseDate(e,d);else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else{for(var p=void 0,h=[],f=0,m=0,g="";f<d.length;f++){var _=d[f],y="\\"===_,b="\\"===d[f-1]||y;if(w[_]&&!b){g+=w[_];var C=new RegExp(g).exec(e);C&&(p=!0)&&h["Y"!==_?"push":"unshift"]({fn:v[_],val:C[++m]})}else y||(g+=".")}s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),h.forEach((function(e){var t=e.fn,n=e.val;return s=t(s,n,c)||s})),s=p?s:void 0}}if(s instanceof Date&&!isNaN(s.getTime()))return!0===o&&s.setHours(0,0,0,0),s;n.errorHandler(new Error("Invalid date provided: "+l))}}};function x(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var D=function(e,t,n){return 3600*e+60*t+n};function k(e){var t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),r=e.minDate.getMinutes(),a=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<r&&(n=r),t===o&&n===r&&i<a&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){var s=e.maxDate.getHours(),c=e.maxDate.getMinutes();(t=Math.min(t,s))===s&&(n=Math.min(c,n)),t===s&&n===c&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}n(895);var $=function(){return $=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},$.apply(this,arguments)},A=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};function j(e,n){var o={config:$($({},i),E.defaultConfig),l10n:r};function g(){var e;return(null===(e=o.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function v(e){return e.bind(o)}function y(){var e=o.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==o.calendarContainer&&(o.calendarContainer.style.visibility="hidden",o.calendarContainer.style.display="block"),void 0!==o.daysContainer){var t=(o.days.offsetWidth+1)*e.showMonths;o.daysContainer.style.width=t+"px",o.calendarContainer.style.width=t+(void 0!==o.weekWrapper?o.weekWrapper.offsetWidth:0)+"px",o.calendarContainer.style.removeProperty("visibility"),o.calendarContainer.style.removeProperty("display")}}))}function j(e){if(0===o.selectedDates.length){var t=void 0===o.config.minDate||x(new Date,o.config.minDate)>=0?new Date:new Date(o.config.minDate.getTime()),n=k(o.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),o.selectedDates=[t],o.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=m(e),i=n;void 0!==o.amPM&&n===o.amPM&&(o.amPM.textContent=o.l10n.amPM[s(o.amPM.textContent===o.l10n.amPM[0])]);var r=parseFloat(i.getAttribute("min")),c=parseFloat(i.getAttribute("max")),l=parseFloat(i.getAttribute("step")),d=parseInt(i.value,10),u=d+l*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==i.value&&2===i.value.length){var p=i===o.hourElement,h=i===o.minuteElement;u<r?(u=c+u+s(!p)+(s(p)&&s(!o.amPM)),h&&W(void 0,-1,o.hourElement)):u>c&&(u=i===o.hourElement?u-c-s(!o.amPM):r,h&&W(void 0,1,o.hourElement)),o.amPM&&p&&(1===l?u+d===23:Math.abs(u-d)>l)&&(o.amPM.textContent=o.l10n.amPM[s(o.amPM.textContent===o.l10n.amPM[0])]),i.value=a(u)}}(e);var i=o._input.value;M(),Ce(),o._input.value!==i&&o._debouncedChange()}function M(){if(void 0!==o.hourElement&&void 0!==o.minuteElement){var e,t,n=(parseInt(o.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(o.minuteElement.value,10)||0)%60,r=void 0!==o.secondElement?(parseInt(o.secondElement.value,10)||0)%60:0;void 0!==o.amPM&&(e=n,t=o.amPM.textContent,n=e%12+12*s(t===o.l10n.amPM[1]));var a=void 0!==o.config.minTime||o.config.minDate&&o.minDateHasTime&&o.latestSelectedDateObj&&0===x(o.latestSelectedDateObj,o.config.minDate,!0),c=void 0!==o.config.maxTime||o.config.maxDate&&o.maxDateHasTime&&o.latestSelectedDateObj&&0===x(o.latestSelectedDateObj,o.config.maxDate,!0);if(void 0!==o.config.maxTime&&void 0!==o.config.minTime&&o.config.minTime>o.config.maxTime){var l=D(o.config.minTime.getHours(),o.config.minTime.getMinutes(),o.config.minTime.getSeconds()),d=D(o.config.maxTime.getHours(),o.config.maxTime.getMinutes(),o.config.maxTime.getSeconds()),u=D(n,i,r);if(u>d&&u<l){var p=function(e){var t=Math.floor(e/3600),n=(e-3600*t)/60;return[t,n,e-3600*t-60*n]}(l);n=p[0],i=p[1],r=p[2]}}else{if(c){var h=void 0!==o.config.maxTime?o.config.maxTime:o.config.maxDate;(n=Math.min(n,h.getHours()))===h.getHours()&&(i=Math.min(i,h.getMinutes())),i===h.getMinutes()&&(r=Math.min(r,h.getSeconds()))}if(a){var f=void 0!==o.config.minTime?o.config.minTime:o.config.minDate;(n=Math.max(n,f.getHours()))===f.getHours()&&i<f.getMinutes()&&(i=f.getMinutes()),i===f.getMinutes()&&(r=Math.max(r,f.getSeconds()))}}P(n,i,r)}}function T(e){var t=e||o.latestSelectedDateObj;t&&t instanceof Date&&P(t.getHours(),t.getMinutes(),t.getSeconds())}function P(e,t,n){void 0!==o.latestSelectedDateObj&&o.latestSelectedDateObj.setHours(e%24,t,n||0,0),o.hourElement&&o.minuteElement&&!o.isMobile&&(o.hourElement.value=a(o.config.time_24hr?e:(12+e)%12+12*s(e%12==0)),o.minuteElement.value=a(t),void 0!==o.amPM&&(o.amPM.textContent=o.l10n.amPM[s(e>=12)]),void 0!==o.secondElement&&(o.secondElement.value=a(n)))}function S(e){var t=m(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&X(n)}function O(e,t,n,i){return t instanceof Array?t.forEach((function(t){return O(e,t,n,i)})):e instanceof Array?e.forEach((function(e){return O(e,t,n,i)})):(e.addEventListener(t,n,i),void o._handlers.push({remove:function(){return e.removeEventListener(t,n,i)}}))}function I(){_e("onChange")}function L(e,t){var n=void 0!==e?o.parseDate(e):o.latestSelectedDateObj||(o.config.minDate&&o.config.minDate>o.now?o.config.minDate:o.config.maxDate&&o.config.maxDate<o.now?o.config.maxDate:o.now),i=o.currentYear,r=o.currentMonth;try{void 0!==n&&(o.currentYear=n.getFullYear(),o.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,o.config.errorHandler(e)}t&&o.currentYear!==i&&(_e("onYearChange"),z()),!t||o.currentYear===i&&o.currentMonth===r||_e("onMonthChange"),o.redraw()}function H(e){var t=m(e);~t.className.indexOf("arrow")&&W(e,t.classList.contains("arrowUp")?1:-1)}function W(e,t,n){var i=e&&m(e),o=n||i&&i.parentNode&&i.parentNode.firstChild,r=ve("increment");r.delta=t,o&&o.dispatchEvent(r)}function N(e,t,n,i){var r=ee(t,!0),a=u("span",e,t.getDate().toString());return a.dateObj=t,a.$i=i,a.setAttribute("aria-label",o.formatDate(t,o.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===x(t,o.now)&&(o.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),r?(a.tabIndex=-1,we(t)&&(a.classList.add("selected"),o.selectedDateElem=a,"range"===o.config.mode&&(d(a,"startRange",o.selectedDates[0]&&0===x(t,o.selectedDates[0],!0)),d(a,"endRange",o.selectedDates[1]&&0===x(t,o.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("flatpickr-disabled"),"range"===o.config.mode&&function(e){return!("range"!==o.config.mode||o.selectedDates.length<2)&&x(e,o.selectedDates[0])>=0&&x(e,o.selectedDates[1])<=0}(t)&&!we(t)&&a.classList.add("inRange"),o.weekNumbers&&1===o.config.showMonths&&"prevMonthDay"!==e&&i%7==6&&o.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+o.config.getWeek(t)+"</span>"),_e("onDayCreate",a),a}function F(e){e.focus(),"range"===o.config.mode&&oe(e)}function Y(e){for(var t=e>0?0:o.config.showMonths-1,n=e>0?o.config.showMonths:-1,i=t;i!=n;i+=e)for(var r=o.daysContainer.children[i],a=e>0?0:r.children.length-1,s=e>0?r.children.length:-1,c=a;c!=s;c+=e){var l=r.children[c];if(-1===l.className.indexOf("hidden")&&ee(l.dateObj))return l}}function B(e,t){var n=g(),i=te(n||document.body),r=void 0!==e?e:i?n:void 0!==o.selectedDateElem&&te(o.selectedDateElem)?o.selectedDateElem:void 0!==o.todayDateElem&&te(o.todayDateElem)?o.todayDateElem:Y(t>0?1:-1);void 0===r?o._input.focus():i?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():o.currentMonth,i=t>0?o.config.showMonths:-1,r=t>0?1:-1,a=n-o.currentMonth;a!=i;a+=r)for(var s=o.daysContainer.children[a],c=n-o.currentMonth===a?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,d=c;d>=0&&d<l&&d!=(t>0?l:-1);d+=r){var u=s.children[d];if(-1===u.className.indexOf("hidden")&&ee(u.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return F(u)}o.changeMonth(r),B(Y(r),0)}(r,t):F(r)}function R(e,t){for(var n=(new Date(e,t,1).getDay()-o.l10n.firstDayOfWeek+7)%7,i=o.utils.getDaysInMonth((t-1+12)%12,e),r=o.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),s=o.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",d=i+1-n,p=0;d<=i;d++,p++)a.appendChild(N("flatpickr-day "+c,new Date(e,t-1,d),0,p));for(d=1;d<=r;d++,p++)a.appendChild(N("flatpickr-day",new Date(e,t,d),0,p));for(var h=r+1;h<=42-n&&(1===o.config.showMonths||p%7!=0);h++,p++)a.appendChild(N("flatpickr-day "+l,new Date(e,t+1,h%r),0,p));var f=u("div","dayContainer");return f.appendChild(a),f}function q(){if(void 0!==o.daysContainer){p(o.daysContainer),o.weekNumbers&&p(o.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<o.config.showMonths;t++){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),e.appendChild(R(n.getFullYear(),n.getMonth()))}o.daysContainer.appendChild(e),o.days=o.daysContainer.firstChild,"range"===o.config.mode&&1===o.selectedDates.length&&oe()}}function z(){if(!(o.config.showMonths>1||"dropdown"!==o.config.monthSelectorType)){var e=function(e){return!(void 0!==o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&e<o.config.minDate.getMonth()||void 0!==o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()&&e>o.config.maxDate.getMonth())};o.monthsDropdownContainer.tabIndex=-1,o.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=u("option","flatpickr-monthDropdown-month");n.value=new Date(o.currentYear,t).getMonth().toString(),n.textContent=_(t,o.config.shorthandCurrentMonth,o.l10n),n.tabIndex=-1,o.currentMonth===t&&(n.selected=!0),o.monthsDropdownContainer.appendChild(n)}}}function U(){var e,t=u("div","flatpickr-month"),n=window.document.createDocumentFragment();o.config.showMonths>1||"static"===o.config.monthSelectorType?e=u("span","cur-month"):(o.monthsDropdownContainer=u("select","flatpickr-monthDropdown-months"),o.monthsDropdownContainer.setAttribute("aria-label",o.l10n.monthAriaLabel),O(o.monthsDropdownContainer,"change",(function(e){var t=m(e),n=parseInt(t.value,10);o.changeMonth(n-o.currentMonth),_e("onMonthChange")})),z(),e=o.monthsDropdownContainer);var i=f("cur-year",{tabindex:"-1"}),r=i.getElementsByTagName("input")[0];r.setAttribute("aria-label",o.l10n.yearAriaLabel),o.config.minDate&&r.setAttribute("min",o.config.minDate.getFullYear().toString()),o.config.maxDate&&(r.setAttribute("max",o.config.maxDate.getFullYear().toString()),r.disabled=!!o.config.minDate&&o.config.minDate.getFullYear()===o.config.maxDate.getFullYear());var a=u("div","flatpickr-current-month");return a.appendChild(e),a.appendChild(i),n.appendChild(a),t.appendChild(n),{container:t,yearElement:r,monthElement:e}}function K(){p(o.monthNav),o.monthNav.appendChild(o.prevMonthNav),o.config.showMonths&&(o.yearElements=[],o.monthElements=[]);for(var e=o.config.showMonths;e--;){var t=U();o.yearElements.push(t.yearElement),o.monthElements.push(t.monthElement),o.monthNav.appendChild(t.container)}o.monthNav.appendChild(o.nextMonthNav)}function V(){o.weekdayContainer?p(o.weekdayContainer):o.weekdayContainer=u("div","flatpickr-weekdays");for(var e=o.config.showMonths;e--;){var t=u("div","flatpickr-weekdaycontainer");o.weekdayContainer.appendChild(t)}return Q(),o.weekdayContainer}function Q(){if(o.weekdayContainer){var e=o.l10n.firstDayOfWeek,t=A(o.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=A(t.splice(e,t.length),t.splice(0,e)));for(var n=o.config.showMonths;n--;)o.weekdayContainer.children[n].innerHTML="\n      <span class='flatpickr-weekday'>\n        "+t.join("</span><span class='flatpickr-weekday'>")+"\n      </span>\n      "}}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-o.currentMonth;n<0&&!0===o._hidePrevMonthArrow||n>0&&!0===o._hideNextMonthArrow||(o.currentMonth+=n,(o.currentMonth<0||o.currentMonth>11)&&(o.currentYear+=o.currentMonth>11?1:-1,o.currentMonth=(o.currentMonth+12)%12,_e("onYearChange"),z()),q(),_e("onMonthChange"),ye())}function Z(e){return o.calendarContainer.contains(e)}function J(e){if(o.isOpen&&!o.config.inline){var t=m(e),n=Z(t),i=!(t===o.input||t===o.altInput||o.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(o.input)||~e.path.indexOf(o.altInput))||n||Z(e.relatedTarget)),r=!o.config.ignoredFocusElements.some((function(e){return e.contains(t)}));i&&r&&(o.config.allowInput&&o.setDate(o._input.value,!1,o.config.altInput?o.config.altFormat:o.config.dateFormat),void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement&&""!==o.input.value&&void 0!==o.input.value&&j(),o.close(),o.config&&"range"===o.config.mode&&1===o.selectedDates.length&&o.clear(!1))}}function X(e){if(!(!e||o.config.minDate&&e<o.config.minDate.getFullYear()||o.config.maxDate&&e>o.config.maxDate.getFullYear())){var t=e,n=o.currentYear!==t;o.currentYear=t||o.currentYear,o.config.maxDate&&o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth=Math.min(o.config.maxDate.getMonth(),o.currentMonth):o.config.minDate&&o.currentYear===o.config.minDate.getFullYear()&&(o.currentMonth=Math.max(o.config.minDate.getMonth(),o.currentMonth)),n&&(o.redraw(),_e("onYearChange"),z())}}function ee(e,t){var n;void 0===t&&(t=!0);var i=o.parseDate(e,void 0,t);if(o.config.minDate&&i&&x(i,o.config.minDate,void 0!==t?t:!o.minDateHasTime)<0||o.config.maxDate&&i&&x(i,o.config.maxDate,void 0!==t?t:!o.maxDateHasTime)>0)return!1;if(!o.config.enable&&0===o.config.disable.length)return!0;if(void 0===i)return!1;for(var r=!!o.config.enable,a=null!==(n=o.config.enable)&&void 0!==n?n:o.config.disable,s=0,c=void 0;s<a.length;s++){if("function"==typeof(c=a[s])&&c(i))return r;if(c instanceof Date&&void 0!==i&&c.getTime()===i.getTime())return r;if("string"==typeof c){var l=o.parseDate(c,void 0,!0);return l&&l.getTime()===i.getTime()?r:!r}if("object"==typeof c&&void 0!==i&&c.from&&c.to&&i.getTime()>=c.from.getTime()&&i.getTime()<=c.to.getTime())return r}return!r}function te(e){return void 0!==o.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&o.daysContainer.contains(e)}function ne(e){var t=e.target===o._input,n=o._input.value.trimEnd()!==be();!t||!n||e.relatedTarget&&Z(e.relatedTarget)||o.setDate(o._input.value,!0,e.target===o.altInput?o.config.altFormat:o.config.dateFormat)}function ie(t){var n=m(t),i=o.config.wrap?e.contains(n):n===o._input,r=o.config.allowInput,a=o.isOpen&&(!r||!i),s=o.config.inline&&i&&!r;if(13===t.keyCode&&i){if(r)return o.setDate(o._input.value,!0,n===o.altInput?o.config.altFormat:o.config.dateFormat),o.close(),n.blur();o.open()}else if(Z(n)||a||s){var c=!!o.timeContainer&&o.timeContainer.contains(n);switch(t.keyCode){case 13:c?(t.preventDefault(),j(),ue()):pe(t);break;case 27:t.preventDefault(),ue();break;case 8:case 46:i&&!o.config.allowInput&&(t.preventDefault(),o.clear());break;case 37:case 39:if(c||i)o.hourElement&&o.hourElement.focus();else{t.preventDefault();var l=g();if(void 0!==o.daysContainer&&(!1===r||l&&te(l))){var d=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),G(d),B(Y(1),0)):B(void 0,d)}}break;case 38:case 40:t.preventDefault();var u=40===t.keyCode?1:-1;o.daysContainer&&void 0!==n.$i||n===o.input||n===o.altInput?t.ctrlKey?(t.stopPropagation(),X(o.currentYear-u),B(Y(1),0)):c||B(void 0,7*u):n===o.currentYearElement?X(o.currentYear-u):o.config.enableTime&&(!c&&o.hourElement&&o.hourElement.focus(),j(t),o._debouncedChange());break;case 9:if(c){var p=[o.hourElement,o.minuteElement,o.secondElement,o.amPM].concat(o.pluginElements).filter((function(e){return e})),h=p.indexOf(n);if(-1!==h){var f=p[h+(t.shiftKey?-1:1)];t.preventDefault(),(f||o._input).focus()}}else!o.config.noCalendar&&o.daysContainer&&o.daysContainer.contains(n)&&t.shiftKey&&(t.preventDefault(),o._input.focus())}}if(void 0!==o.amPM&&n===o.amPM)switch(t.key){case o.l10n.amPM[0].charAt(0):case o.l10n.amPM[0].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[0],M(),Ce();break;case o.l10n.amPM[1].charAt(0):case o.l10n.amPM[1].charAt(0).toLowerCase():o.amPM.textContent=o.l10n.amPM[1],M(),Ce()}(i||Z(n))&&_e("onKeyDown",t)}function oe(e,t){if(void 0===t&&(t="flatpickr-day"),1===o.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var n=e?e.dateObj.getTime():o.days.firstElementChild.dateObj.getTime(),i=o.parseDate(o.selectedDates[0],void 0,!0).getTime(),r=Math.min(n,o.selectedDates[0].getTime()),a=Math.max(n,o.selectedDates[0].getTime()),s=!1,c=0,l=0,d=r;d<a;d+=864e5)ee(new Date(d),!0)||(s=s||d>r&&d<a,d<i&&(!c||d>c)?c=d:d>i&&(!l||d<l)&&(l=d));Array.from(o.rContainer.querySelectorAll("*:nth-child(-n+"+o.config.showMonths+") > ."+t)).forEach((function(t){var r,a,d,u=t.dateObj.getTime(),p=c>0&&u<c||l>0&&u>l;if(p)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));s&&!p||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(n<=o.selectedDates[0].getTime()?"startRange":"endRange"),i<n&&u===i?t.classList.add("startRange"):i>n&&u===i&&t.classList.add("endRange"),u>=c&&(0===l||u<=l)&&(a=i,d=n,(r=u)>Math.min(a,d)&&r<Math.max(a,d))&&t.classList.add("inRange")))}))}}function re(){!o.isOpen||o.config.static||o.config.inline||le()}function ae(e){return function(t){var n=o.config["_"+e+"Date"]=o.parseDate(t,o.config.dateFormat),i=o.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(o["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),o.selectedDates&&(o.selectedDates=o.selectedDates.filter((function(e){return ee(e)})),o.selectedDates.length||"min"!==e||T(n),Ce()),o.daysContainer&&(de(),void 0!==n?o.currentYearElement[e]=n.getFullYear().toString():o.currentYearElement.removeAttribute(e),o.currentYearElement.disabled=!!i&&void 0!==n&&i.getFullYear()===n.getFullYear())}}function se(){return o.config.wrap?e.querySelector("[data-input]"):e}function ce(){"object"!=typeof o.config.locale&&void 0===E.l10ns[o.config.locale]&&o.config.errorHandler(new Error("flatpickr: invalid locale "+o.config.locale)),o.l10n=$($({},E.l10ns.default),"object"==typeof o.config.locale?o.config.locale:"default"!==o.config.locale?E.l10ns[o.config.locale]:void 0),w.D="("+o.l10n.weekdays.shorthand.join("|")+")",w.l="("+o.l10n.weekdays.longhand.join("|")+")",w.M="("+o.l10n.months.shorthand.join("|")+")",w.F="("+o.l10n.months.longhand.join("|")+")",w.K="("+o.l10n.amPM[0]+"|"+o.l10n.amPM[1]+"|"+o.l10n.amPM[0].toLowerCase()+"|"+o.l10n.amPM[1].toLowerCase()+")",void 0===$($({},n),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(o.config.time_24hr=o.l10n.time_24hr),o.formatDate=b(o),o.parseDate=C({config:o.config,l10n:o.l10n})}function le(e){if("function"!=typeof o.config.position){if(void 0!==o.calendarContainer){_e("onPreCalendarPosition");var t=e||o._positionElement,n=Array.prototype.reduce.call(o.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),i=o.calendarContainer.offsetWidth,r=o.config.position.split(" "),a=r[0],s=r.length>1?r[1]:null,c=t.getBoundingClientRect(),l=window.innerHeight-c.bottom,u="above"===a||"below"!==a&&l<n&&c.top>n,p=window.pageYOffset+c.top+(u?-n-2:t.offsetHeight+2);if(d(o.calendarContainer,"arrowTop",!u),d(o.calendarContainer,"arrowBottom",u),!o.config.inline){var h=window.pageXOffset+c.left,f=!1,m=!1;"center"===s?(h-=(i-c.width)/2,f=!0):"right"===s&&(h-=i-c.width,m=!0),d(o.calendarContainer,"arrowLeft",!f&&!m),d(o.calendarContainer,"arrowCenter",f),d(o.calendarContainer,"arrowRight",m);var g=window.document.body.offsetWidth-(window.pageXOffset+c.right),_=h+i>window.document.body.offsetWidth,v=g+i>window.document.body.offsetWidth;if(d(o.calendarContainer,"rightMost",_),!o.config.static)if(o.calendarContainer.style.top=p+"px",_)if(v){var w=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];if(n.cssRules){try{n.cssRules}catch(e){continue}e=n;break}}return null!=e?e:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===w)return;var y=window.document.body.offsetWidth,b=Math.max(0,y/2-i/2),C=w.cssRules.length,x="{left:"+c.left+"px;right:auto;}";d(o.calendarContainer,"rightMost",!1),d(o.calendarContainer,"centerMost",!0),w.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+x,C),o.calendarContainer.style.left=b+"px",o.calendarContainer.style.right="auto"}else o.calendarContainer.style.left="auto",o.calendarContainer.style.right=g+"px";else o.calendarContainer.style.left=h+"px",o.calendarContainer.style.right="auto"}}}else o.config.position(o,e)}function de(){o.config.noCalendar||o.isMobile||(z(),ye(),q())}function ue(){o._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(o.close,0):o.close()}function pe(e){e.preventDefault(),e.stopPropagation();var t=h(m(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var n=t,i=o.latestSelectedDateObj=new Date(n.dateObj.getTime()),r=(i.getMonth()<o.currentMonth||i.getMonth()>o.currentMonth+o.config.showMonths-1)&&"range"!==o.config.mode;if(o.selectedDateElem=n,"single"===o.config.mode)o.selectedDates=[i];else if("multiple"===o.config.mode){var a=we(i);a?o.selectedDates.splice(parseInt(a),1):o.selectedDates.push(i)}else"range"===o.config.mode&&(2===o.selectedDates.length&&o.clear(!1,!1),o.latestSelectedDateObj=i,o.selectedDates.push(i),0!==x(i,o.selectedDates[0],!0)&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(M(),r){var s=o.currentYear!==i.getFullYear();o.currentYear=i.getFullYear(),o.currentMonth=i.getMonth(),s&&(_e("onYearChange"),z()),_e("onMonthChange")}if(ye(),q(),Ce(),r||"range"===o.config.mode||1!==o.config.showMonths?void 0!==o.selectedDateElem&&void 0===o.hourElement&&o.selectedDateElem&&o.selectedDateElem.focus():F(n),void 0!==o.hourElement&&void 0!==o.hourElement&&o.hourElement.focus(),o.config.closeOnSelect){var c="single"===o.config.mode&&!o.config.enableTime,l="range"===o.config.mode&&2===o.selectedDates.length&&!o.config.enableTime;(c||l)&&ue()}I()}}o.parseDate=C({config:o.config,l10n:o.l10n}),o._handlers=[],o.pluginElements=[],o.loadedPlugins=[],o._bind=O,o._setHoursFromDate=T,o._positionCalendar=le,o.changeMonth=G,o.changeYear=X,o.clear=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!0),o.input.value="",void 0!==o.altInput&&(o.altInput.value=""),void 0!==o.mobileInput&&(o.mobileInput.value=""),o.selectedDates=[],o.latestSelectedDateObj=void 0,!0===t&&(o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth()),!0===o.config.enableTime){var n=k(o.config);P(n.hours,n.minutes,n.seconds)}o.redraw(),e&&_e("onChange")},o.close=function(){o.isOpen=!1,o.isMobile||(void 0!==o.calendarContainer&&o.calendarContainer.classList.remove("open"),void 0!==o._input&&o._input.classList.remove("active")),_e("onClose")},o.onMouseOver=oe,o._createElement=u,o.createDay=N,o.destroy=function(){void 0!==o.config&&_e("onDestroy");for(var e=o._handlers.length;e--;)o._handlers[e].remove();if(o._handlers=[],o.mobileInput)o.mobileInput.parentNode&&o.mobileInput.parentNode.removeChild(o.mobileInput),o.mobileInput=void 0;else if(o.calendarContainer&&o.calendarContainer.parentNode)if(o.config.static&&o.calendarContainer.parentNode){var t=o.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else o.calendarContainer.parentNode.removeChild(o.calendarContainer);o.altInput&&(o.input.type="text",o.altInput.parentNode&&o.altInput.parentNode.removeChild(o.altInput),delete o.altInput),o.input&&(o.input.type=o.input._type,o.input.classList.remove("flatpickr-input"),o.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete o[e]}catch(e){}}))},o.isEnabled=ee,o.jumpToDate=L,o.updateValue=Ce,o.open=function(e,t){if(void 0===t&&(t=o._positionElement),!0===o.isMobile){if(e){e.preventDefault();var n=m(e);n&&n.blur()}return void 0!==o.mobileInput&&(o.mobileInput.focus(),o.mobileInput.click()),void _e("onOpen")}if(!o._input.disabled&&!o.config.inline){var i=o.isOpen;o.isOpen=!0,i||(o.calendarContainer.classList.add("open"),o._input.classList.add("active"),_e("onOpen"),le(t)),!0===o.config.enableTime&&!0===o.config.noCalendar&&(!1!==o.config.allowInput||void 0!==e&&o.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return o.hourElement.select()}),50))}},o.redraw=de,o.set=function(e,n){if(null!==e&&"object"==typeof e)for(var i in Object.assign(o.config,e),e)void 0!==he[i]&&he[i].forEach((function(e){return e()}));else o.config[e]=n,void 0!==he[e]?he[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(o.config[e]=l(n));o.redraw(),Ce(!0)},o.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=o.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return o.clear(t);fe(e,n),o.latestSelectedDateObj=o.selectedDates[o.selectedDates.length-1],o.redraw(),L(void 0,t),T(),0===o.selectedDates.length&&o.clear(!1),Ce(t),t&&_e("onChange")},o.toggle=function(e){if(!0===o.isOpen)return o.close();o.open(e)};var he={locale:[ce,Q],showMonths:[K,y,V],minDate:[L],maxDate:[L],positionElement:[ge],clickOpens:[function(){!0===o.config.clickOpens?(O(o._input,"focus",o.open),O(o._input,"click",o.open)):(o._input.removeEventListener("focus",o.open),o._input.removeEventListener("click",o.open))}]};function fe(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return o.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[o.parseDate(e,t)];else if("string"==typeof e)switch(o.config.mode){case"single":case"time":n=[o.parseDate(e,t)];break;case"multiple":n=e.split(o.config.conjunction).map((function(e){return o.parseDate(e,t)}));break;case"range":n=e.split(o.l10n.rangeSeparator).map((function(e){return o.parseDate(e,t)}))}else o.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));o.selectedDates=o.config.allowInvalidPreload?n:n.filter((function(e){return e instanceof Date&&ee(e,!1)})),"range"===o.config.mode&&o.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function me(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?o.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:o.parseDate(e.from,void 0),to:o.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function ge(){o._positionElement=o.config.positionElement||o._input}function _e(e,t){if(void 0!==o.config){var n=o.config[e];if(void 0!==n&&n.length>0)for(var i=0;n[i]&&i<n.length;i++)n[i](o.selectedDates,o.input.value,o,t);"onChange"===e&&(o.input.dispatchEvent(ve("change")),o.input.dispatchEvent(ve("input")))}}function ve(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function we(e){for(var t=0;t<o.selectedDates.length;t++){var n=o.selectedDates[t];if(n instanceof Date&&0===x(n,e))return""+t}return!1}function ye(){o.config.noCalendar||o.isMobile||!o.monthNav||(o.yearElements.forEach((function(e,t){var n=new Date(o.currentYear,o.currentMonth,1);n.setMonth(o.currentMonth+t),o.config.showMonths>1||"static"===o.config.monthSelectorType?o.monthElements[t].textContent=_(n.getMonth(),o.config.shorthandCurrentMonth,o.l10n)+" ":o.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),o._hidePrevMonthArrow=void 0!==o.config.minDate&&(o.currentYear===o.config.minDate.getFullYear()?o.currentMonth<=o.config.minDate.getMonth():o.currentYear<o.config.minDate.getFullYear()),o._hideNextMonthArrow=void 0!==o.config.maxDate&&(o.currentYear===o.config.maxDate.getFullYear()?o.currentMonth+1>o.config.maxDate.getMonth():o.currentYear>o.config.maxDate.getFullYear()))}function be(e){var t=e||(o.config.altInput?o.config.altFormat:o.config.dateFormat);return o.selectedDates.map((function(e){return o.formatDate(e,t)})).filter((function(e,t,n){return"range"!==o.config.mode||o.config.enableTime||n.indexOf(e)===t})).join("range"!==o.config.mode?o.config.conjunction:o.l10n.rangeSeparator)}function Ce(e){void 0===e&&(e=!0),void 0!==o.mobileInput&&o.mobileFormatStr&&(o.mobileInput.value=void 0!==o.latestSelectedDateObj?o.formatDate(o.latestSelectedDateObj,o.mobileFormatStr):""),o.input.value=be(o.config.dateFormat),void 0!==o.altInput&&(o.altInput.value=be(o.config.altFormat)),!1!==e&&_e("onValueUpdate")}function xe(e){var t=m(e),n=o.prevMonthNav.contains(t),i=o.nextMonthNav.contains(t);n||i?G(n?-1:1):o.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?o.changeYear(o.currentYear+1):t.classList.contains("arrowDown")&&o.changeYear(o.currentYear-1)}return function(){o.element=o.input=e,o.isOpen=!1,function(){var r=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=$($({},JSON.parse(JSON.stringify(e.dataset||{}))),n),s={};o.config.parseDate=a.parseDate,o.config.formatDate=a.formatDate,Object.defineProperty(o.config,"enable",{get:function(){return o.config._enable},set:function(e){o.config._enable=me(e)}}),Object.defineProperty(o.config,"disable",{get:function(){return o.config._disable},set:function(e){o.config._disable=me(e)}});var c="time"===a.mode;if(!a.dateFormat&&(a.enableTime||c)){var d=E.defaultConfig.dateFormat||i.dateFormat;s.dateFormat=a.noCalendar||c?"H:i"+(a.enableSeconds?":S":""):d+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||c)&&!a.altFormat){var u=E.defaultConfig.altFormat||i.altFormat;s.altFormat=a.noCalendar||c?"h:i"+(a.enableSeconds?":S K":" K"):u+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(o.config,"minDate",{get:function(){return o.config._minDate},set:ae("min")}),Object.defineProperty(o.config,"maxDate",{get:function(){return o.config._maxDate},set:ae("max")});var p=function(e){return function(t){o.config["min"===e?"_minTime":"_maxTime"]=o.parseDate(t,"H:i:S")}};Object.defineProperty(o.config,"minTime",{get:function(){return o.config._minTime},set:p("min")}),Object.defineProperty(o.config,"maxTime",{get:function(){return o.config._maxTime},set:p("max")}),"time"===a.mode&&(o.config.noCalendar=!0,o.config.enableTime=!0),Object.assign(o.config,s,a);for(var h=0;h<r.length;h++)o.config[r[h]]=!0===o.config[r[h]]||"true"===o.config[r[h]];for(t.filter((function(e){return void 0!==o.config[e]})).forEach((function(e){o.config[e]=l(o.config[e]||[]).map(v)})),o.isMobile=!o.config.disableMobile&&!o.config.inline&&"single"===o.config.mode&&!o.config.disable.length&&!o.config.enable&&!o.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),h=0;h<o.config.plugins.length;h++){var f=o.config.plugins[h](o)||{};for(var m in f)t.indexOf(m)>-1?o.config[m]=l(f[m]).map(v).concat(o.config[m]):void 0===a[m]&&(o.config[m]=f[m])}a.altInputClass||(o.config.altInputClass=se().className+" "+o.config.altInputClass),_e("onParseConfig")}(),ce(),o.input=se(),o.input?(o.input._type=o.input.type,o.input.type="text",o.input.classList.add("flatpickr-input"),o._input=o.input,o.config.altInput&&(o.altInput=u(o.input.nodeName,o.config.altInputClass),o._input=o.altInput,o.altInput.placeholder=o.input.placeholder,o.altInput.disabled=o.input.disabled,o.altInput.required=o.input.required,o.altInput.tabIndex=o.input.tabIndex,o.altInput.type="text",o.input.setAttribute("type","hidden"),!o.config.static&&o.input.parentNode&&o.input.parentNode.insertBefore(o.altInput,o.input.nextSibling)),o.config.allowInput||o._input.setAttribute("readonly","readonly"),ge()):o.config.errorHandler(new Error("Invalid input element specified")),function(){o.selectedDates=[],o.now=o.parseDate(o.config.now)||new Date;var e=o.config.defaultDate||("INPUT"!==o.input.nodeName&&"TEXTAREA"!==o.input.nodeName||!o.input.placeholder||o.input.value!==o.input.placeholder?o.input.value:null);e&&fe(e,o.config.dateFormat),o._initialDate=o.selectedDates.length>0?o.selectedDates[0]:o.config.minDate&&o.config.minDate.getTime()>o.now.getTime()?o.config.minDate:o.config.maxDate&&o.config.maxDate.getTime()<o.now.getTime()?o.config.maxDate:o.now,o.currentYear=o._initialDate.getFullYear(),o.currentMonth=o._initialDate.getMonth(),o.selectedDates.length>0&&(o.latestSelectedDateObj=o.selectedDates[0]),void 0!==o.config.minTime&&(o.config.minTime=o.parseDate(o.config.minTime,"H:i")),void 0!==o.config.maxTime&&(o.config.maxTime=o.parseDate(o.config.maxTime,"H:i")),o.minDateHasTime=!!o.config.minDate&&(o.config.minDate.getHours()>0||o.config.minDate.getMinutes()>0||o.config.minDate.getSeconds()>0),o.maxDateHasTime=!!o.config.maxDate&&(o.config.maxDate.getHours()>0||o.config.maxDate.getMinutes()>0||o.config.maxDate.getSeconds()>0)}(),o.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=o.currentMonth),void 0===t&&(t=o.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:o.l10n.daysInMonth[e]}},o.isMobile||function(){var e=window.document.createDocumentFragment();if(o.calendarContainer=u("div","flatpickr-calendar"),o.calendarContainer.tabIndex=-1,!o.config.noCalendar){if(e.appendChild((o.monthNav=u("div","flatpickr-months"),o.yearElements=[],o.monthElements=[],o.prevMonthNav=u("span","flatpickr-prev-month"),o.prevMonthNav.innerHTML=o.config.prevArrow,o.nextMonthNav=u("span","flatpickr-next-month"),o.nextMonthNav.innerHTML=o.config.nextArrow,K(),Object.defineProperty(o,"_hidePrevMonthArrow",{get:function(){return o.__hidePrevMonthArrow},set:function(e){o.__hidePrevMonthArrow!==e&&(d(o.prevMonthNav,"flatpickr-disabled",e),o.__hidePrevMonthArrow=e)}}),Object.defineProperty(o,"_hideNextMonthArrow",{get:function(){return o.__hideNextMonthArrow},set:function(e){o.__hideNextMonthArrow!==e&&(d(o.nextMonthNav,"flatpickr-disabled",e),o.__hideNextMonthArrow=e)}}),o.currentYearElement=o.yearElements[0],ye(),o.monthNav)),o.innerContainer=u("div","flatpickr-innerContainer"),o.config.weekNumbers){var t=function(){o.calendarContainer.classList.add("hasWeeks");var e=u("div","flatpickr-weekwrapper");e.appendChild(u("span","flatpickr-weekday",o.l10n.weekAbbreviation));var t=u("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,i=t.weekNumbers;o.innerContainer.appendChild(n),o.weekNumbers=i,o.weekWrapper=n}o.rContainer=u("div","flatpickr-rContainer"),o.rContainer.appendChild(V()),o.daysContainer||(o.daysContainer=u("div","flatpickr-days"),o.daysContainer.tabIndex=-1),q(),o.rContainer.appendChild(o.daysContainer),o.innerContainer.appendChild(o.rContainer),e.appendChild(o.innerContainer)}o.config.enableTime&&e.appendChild(function(){o.calendarContainer.classList.add("hasTime"),o.config.noCalendar&&o.calendarContainer.classList.add("noCalendar");var e=k(o.config);o.timeContainer=u("div","flatpickr-time"),o.timeContainer.tabIndex=-1;var t=u("span","flatpickr-time-separator",":"),n=f("flatpickr-hour",{"aria-label":o.l10n.hourAriaLabel});o.hourElement=n.getElementsByTagName("input")[0];var i=f("flatpickr-minute",{"aria-label":o.l10n.minuteAriaLabel});if(o.minuteElement=i.getElementsByTagName("input")[0],o.hourElement.tabIndex=o.minuteElement.tabIndex=-1,o.hourElement.value=a(o.latestSelectedDateObj?o.latestSelectedDateObj.getHours():o.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),o.minuteElement.value=a(o.latestSelectedDateObj?o.latestSelectedDateObj.getMinutes():e.minutes),o.hourElement.setAttribute("step",o.config.hourIncrement.toString()),o.minuteElement.setAttribute("step",o.config.minuteIncrement.toString()),o.hourElement.setAttribute("min",o.config.time_24hr?"0":"1"),o.hourElement.setAttribute("max",o.config.time_24hr?"23":"12"),o.hourElement.setAttribute("maxlength","2"),o.minuteElement.setAttribute("min","0"),o.minuteElement.setAttribute("max","59"),o.minuteElement.setAttribute("maxlength","2"),o.timeContainer.appendChild(n),o.timeContainer.appendChild(t),o.timeContainer.appendChild(i),o.config.time_24hr&&o.timeContainer.classList.add("time24hr"),o.config.enableSeconds){o.timeContainer.classList.add("hasSeconds");var r=f("flatpickr-second");o.secondElement=r.getElementsByTagName("input")[0],o.secondElement.value=a(o.latestSelectedDateObj?o.latestSelectedDateObj.getSeconds():e.seconds),o.secondElement.setAttribute("step",o.minuteElement.getAttribute("step")),o.secondElement.setAttribute("min","0"),o.secondElement.setAttribute("max","59"),o.secondElement.setAttribute("maxlength","2"),o.timeContainer.appendChild(u("span","flatpickr-time-separator",":")),o.timeContainer.appendChild(r)}return o.config.time_24hr||(o.amPM=u("span","flatpickr-am-pm",o.l10n.amPM[s((o.latestSelectedDateObj?o.hourElement.value:o.config.defaultHour)>11)]),o.amPM.title=o.l10n.toggleTitle,o.amPM.tabIndex=-1,o.timeContainer.appendChild(o.amPM)),o.timeContainer}()),d(o.calendarContainer,"rangeMode","range"===o.config.mode),d(o.calendarContainer,"animate",!0===o.config.animate),d(o.calendarContainer,"multiMonth",o.config.showMonths>1),o.calendarContainer.appendChild(e);var r=void 0!==o.config.appendTo&&void 0!==o.config.appendTo.nodeType;if((o.config.inline||o.config.static)&&(o.calendarContainer.classList.add(o.config.inline?"inline":"static"),o.config.inline&&(!r&&o.element.parentNode?o.element.parentNode.insertBefore(o.calendarContainer,o._input.nextSibling):void 0!==o.config.appendTo&&o.config.appendTo.appendChild(o.calendarContainer)),o.config.static)){var c=u("div","flatpickr-wrapper");o.element.parentNode&&o.element.parentNode.insertBefore(c,o.element),c.appendChild(o.element),o.altInput&&c.appendChild(o.altInput),c.appendChild(o.calendarContainer)}o.config.static||o.config.inline||(void 0!==o.config.appendTo?o.config.appendTo:window.document.body).appendChild(o.calendarContainer)}(),function(){if(o.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(o.element.querySelectorAll("[data-"+e+"]"),(function(t){return O(t,"click",o[e])}))})),o.isMobile)!function(){var e=o.config.enableTime?o.config.noCalendar?"time":"datetime-local":"date";o.mobileInput=u("input",o.input.className+" flatpickr-mobile"),o.mobileInput.tabIndex=1,o.mobileInput.type=e,o.mobileInput.disabled=o.input.disabled,o.mobileInput.required=o.input.required,o.mobileInput.placeholder=o.input.placeholder,o.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",o.selectedDates.length>0&&(o.mobileInput.defaultValue=o.mobileInput.value=o.formatDate(o.selectedDates[0],o.mobileFormatStr)),o.config.minDate&&(o.mobileInput.min=o.formatDate(o.config.minDate,"Y-m-d")),o.config.maxDate&&(o.mobileInput.max=o.formatDate(o.config.maxDate,"Y-m-d")),o.input.getAttribute("step")&&(o.mobileInput.step=String(o.input.getAttribute("step"))),o.input.type="hidden",void 0!==o.altInput&&(o.altInput.type="hidden");try{o.input.parentNode&&o.input.parentNode.insertBefore(o.mobileInput,o.input.nextSibling)}catch(e){}O(o.mobileInput,"change",(function(e){o.setDate(m(e).value,!1,o.mobileFormatStr),_e("onChange"),_e("onClose")}))}();else{var e=c(re,50);if(o._debouncedChange=c(I,300),o.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&O(o.daysContainer,"mouseover",(function(e){"range"===o.config.mode&&oe(m(e))})),O(o._input,"keydown",ie),void 0!==o.calendarContainer&&O(o.calendarContainer,"keydown",ie),o.config.inline||o.config.static||O(window,"resize",e),void 0!==window.ontouchstart?O(window.document,"touchstart",J):O(window.document,"mousedown",J),O(window.document,"focus",J,{capture:!0}),!0===o.config.clickOpens&&(O(o._input,"focus",o.open),O(o._input,"click",o.open)),void 0!==o.daysContainer&&(O(o.monthNav,"click",xe),O(o.monthNav,["keyup","increment"],S),O(o.daysContainer,"click",pe)),void 0!==o.timeContainer&&void 0!==o.minuteElement&&void 0!==o.hourElement){O(o.timeContainer,["increment"],j),O(o.timeContainer,"blur",j,{capture:!0}),O(o.timeContainer,"click",H),O([o.hourElement,o.minuteElement],["focus","click"],(function(e){return m(e).select()})),void 0!==o.secondElement&&O(o.secondElement,"focus",(function(){return o.secondElement&&o.secondElement.select()})),void 0!==o.amPM&&O(o.amPM,"click",(function(e){j(e)}))}o.config.allowInput&&O(o._input,"blur",ne)}}(),(o.selectedDates.length||o.config.noCalendar)&&(o.config.enableTime&&T(o.config.noCalendar?o.latestSelectedDateObj:void 0),Ce(!1)),y();var r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!o.isMobile&&r&&le(),_e("onReady")}(),o}function M(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=j(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return M(this,e)},HTMLElement.prototype.flatpickr=function(e){return M([this],e)});var E=function(e,t){return"string"==typeof e?M(window.document.querySelectorAll(e),t):e instanceof Node?M([e],t):M(e,t)};E.defaultConfig={},E.l10ns={en:$({},r),default:$({},r)},E.localize=function(e){E.l10ns.default=$($({},E.l10ns.default),e)},E.setDefaults=function(e){E.defaultConfig=$($({},E.defaultConfig),e)},E.parseDate=C({}),E.formatDate=b({}),E.compareDates=x,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return M(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=E);const T=window.WPCodeConditionalLogic||function(e,t,n){const i={l10n:wpcode,current_select:null,init:function(){i.should_init()&&(i.find_elements(),i.add_events(),i.show_relations_for_all_rows(),i.maybe_switch_location())},should_init:function(){return void 0!==wpcode.conditions},find_elements:function(){i.conditions=wpcode.conditions,i.conditions_holder=n(e.getElementById("wpcode-conditions-holder")),i.conditions_input=n(e.getElementById("wpcode-cl-rules")),i.add_group_button=n(e.getElementById("wpcode-cl-add-group")),i.group_template=n(e.getElementById("wpcode-conditions-group-markup")).html(),i.row_template=n(e.getElementById("wpcode-conditions-group-row-markup")).html(),i.show_hide_input=n(e.getElementById("wpcode-cl-show-hide")),i.document=n(e),i.options_dropdown=n(e.getElementById("wpcode_cl_picker"))},add_events:function(){i.init_add_group(),i.init_add_row(),i.init_remove_row(),i.init_change_type(),i.init_capture_rules(),i.init_change_show_hide(),i.init_select2(),jQuery((function(){i.trigger_row_loaded()}))},show_relations_for_all_rows(){i.conditions_holder.find(".wpcode-cl-rules-row").each((function(){i.show_hide_relation_options(n(this))}))},init_add_group:function(){i.add_group_button.on("click",(function(){i.add_group()}))},add_group(){const e=i.get_new_group();i.conditions_holder.append(e),i.add_new_row(e.find(".wpcode-cl-group-rules")),i.build_rules_from_inputs()},get_new_group:()=>n(i.group_template),get_new_row:()=>n(i.row_template),init_add_row(){i.conditions_holder.on("click",".wpcode-cl-add-row",(function(){i.add_new_row(n(this).closest(".wpcode-cl-group").find(".wpcode-cl-group-rules"))}))},init_remove_row(){i.conditions_holder.on("click",".wpcode-cl-remove-row",(function(){const e=n(this).closest(".wpcode-cl-group");n(this).closest(".wpcode-cl-rules-row").remove(),i.maybe_remove_group(e),i.build_rules_from_inputs(),i.options_dropdown.addClass("wpcode-hidden"),i.current_select=null}))},maybe_remove_group(e){0===e.find(".wpcode-cl-group-rules .wpcode-cl-rules-row").length&&i.remove_group(e)},remove_group(e){e.remove(),i.build_rules_from_inputs()},add_new_row(e){const t=i.get_new_row();t.appendTo(e);const n=t.find(".wpcode-cl-rule-type");i.handle_type_change(n),i.build_rules_from_inputs(),n.focus()},init_change_type(){i.conditions_holder.on("click",".wpcode-cl-rule-type-container",(function(e){e.preventDefault(),e.stopPropagation();const t=n(this).find(".wpcode-cl-rule-type");i.options_dropdown.hasClass("wpcode-hidden")||!t.is(i.current_select)?(i.options_dropdown.trigger("wpcode_select_item",t.val()),i.current_select=t,i.options_dropdown.insertAfter(t.closest(".wpcode-cl-rules-row")),i.options_dropdown.removeClass("wpcode-hidden"),i.options_dropdown.find(".wpcode-items-search-input").focus()):i.options_dropdown.addClass("wpcode-hidden")})),i.conditions_holder.on("change",".wpcode-cl-rule-type",(function(){i.handle_type_change(n(this))})),i.options_dropdown.on("change",".wpcode-radio-cl-option",(function(){const e=n(this).val();i.current_select.val(e).trigger("change"),i.options_dropdown.trigger("wpcode_select_item",e),i.options_dropdown.addClass("wpcode-hidden")}))},init_change_show_hide(){i.show_hide_input.on("change",(function(){i.build_rules_from_inputs()}))},handle_type_change(e){const t=e.find("option:selected"),n=e.val(),o=t.closest("optgroup").data("type"),r=i.conditions[o].options[n],a=e.closest(".wpcode-cl-rules-row");a.find(".wpcode-cl-rule-value").html(i.get_input_markup(r)),a.find(".wpcode-cl-rule-relation option").prop("selected",!1),i.show_hide_relation_options(a,!0),i.init_select2(),i.trigger_row_loaded()},get_input_markup(e){let t="";switch(e.type){case"select":t=i.get_input_select(e.options,e.multiple);break;case"text":t=i.get_input_text();break;case"ajax":t=i.get_input_ajax(e.options,e.multiple);break;case"time":t=i.get_input_time();break;case"date":t=i.get_input_date();break;case"datetime":t=i.get_input_datetime()}return t},get_input_select(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=n("<select/>");return t&&(i.attr("multiple","multiple"),i.addClass("wpcode-select2")),n.each(e,(function(e,t){i.append(n("<option />",{value:t.value,disabled:!0===t.disabled}).text(t.label))})),i},get_input_text:()=>n('<input type="text" class="wpcode-input-text" />'),get_input_ajax(e,t){const i=n('<select data-action="'+e+'" class="wpcode-select2-ajax" />');return t&&i.attr("multiple","multiple"),i},get_input_time:()=>n('<input type="text" class="wpcode-input-text wpcode-input-time" />'),get_input_date:()=>n('<input type="text" class="wpcode-input-text wpcode-input-date" />'),get_input_datetime:()=>n('<input type="text" class="wpcode-input-text wpcode-input-datetime" />'),init_capture_rules(){i.conditions_holder.on("change","input,select",(function(){i.build_rules_from_inputs()}))},build_rules_from_inputs(){const e=i.conditions_holder.find(".wpcode-cl-group"),t=[];e.each((function(e){const o=n(this).find(".wpcode-cl-rules-row");t[e]=[],o.each((function(){const o=n(this),r=o.find(".wpcode-cl-rule-type"),a=r.find("option:selected").closest("optgroup").data("type"),s=r.val(),c={},l=i.conditions[a].options[s];c.type=a,c.option=s,c.relation=o.find(".wpcode-cl-rule-relation").val(),c.value=i.get_input_value(l,o),null!==c.value&&t[e].push(c)}))}));const o={show:i.show_hide_input.val(),groups:t};i.conditions_input.val(JSON.stringify(o))},get_input_value(e,t){let n="";switch(e.type){case"select":case"ajax":n=t.find(".wpcode-cl-rule-value select").val();break;case"text":case"time":case"date":case"datetime":n=t.find(".wpcode-cl-rule-value input").val()}return n},show_hide_relation_options(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=e.find(".wpcode-cl-rule-type"),r=o.val(),a=o.find("option:selected").closest("optgroup").data("type"),s=e.find(".wpcode-cl-rule-relation"),c=s.find("option"),l={select:["=","!="],ajax:["=","!="],text:["contains","notcontains","=","!="],date:["=","!=","before","after","before-or","after-or"],datetime:["=","!=","before","after","before-or","after-or"],time:["=","before","after","before-or","after-or"]}[i.conditions[a].options[r].type],d=i.l10n.cl_labels_custom[r];let u=null;if(c.each((function(){const e=n(this).attr("value");l.indexOf(e)>-1?(null===u&&(u=e),n(this).show(),d&&d[e]?n(this).text(d[e]):n(this).text(i.l10n.cl_labels[e])):n(this).hide()})),u&&t&&s.val(u),d&&d.placeholder){const t=e.find(".wpcode-select2-ajax"),n=e.find(".wpcode-input-text");t.length>0&&t.data("placeholder",d.placeholder),n.length>0&&n.attr("placeholder",d.placeholder)}},init_select2(){i.conditions_holder.find(".wpcode-select2").selectWoo(),i.conditions_holder.find(".wpcode-select2-ajax").selectWoo({ajax:{url:ajaxurl,data:function(e){return{action:n(this).data("action"),term:e.term,_wpnonce:i.l10n.nonce}}}})},trigger_row_loaded(){n(e.body).trigger("wpcode_cl_type_loaded",{conditions_holder:i.conditions_holder})},maybe_switch_location(){const e=n('input[name="wpcode_auto_insert_location"]:checked'),t=n("#wpcode_snippet_type");n("#wpcode_conditional_logic_enable").on("change",(function(){if("php"!==t.val()||"everywhere"!==e.val()||!n(this).is(":checked"))return;const o=n(this).closest(".wpcode-metabox-form-row");n('input[name="wpcode_auto_insert_location"][value="frontend_cl"]').prop("checked",!0).trigger("change"),WPCodeAdminNotices.get_notice(i.l10n.php_cl_location_notice,"notice-warning notice-alt").insertBefore(o),i.document.trigger("wp-updates-notice-added")}))}};return i}(document,window,jQuery);T.init(),n(5),n(900),n(423),n(508),n(124),n(786),n(298),n(801),n(847),n(770),n(868),n(448),n(118),n(670),n(928),n(978),n(180),n(52),n(691)}()}();

Zerion Mini Shell 1.0