')},o.prototype.focusOnSearch=function(){var e=this;void 0!==e.$search&&setTimeout(function(){e._keyUpPrevented=!0,e.$search.focus()},1)},o.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],o=0;o1||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(o)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var o=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){o._handleClear(e)}),t.on("keypress",function(e){o._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 o=n.data("data"),i=0;i0||0===n.length)){var o=e('×');o.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(o)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function o(e,t,n){e.call(this,t,n)}return o.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var o=t.call(this);return this._transferTabIndex(),o},o.prototype.bind=function(e,t,o){var i=this,s=t.id+"-results";e.call(this,t,o),t.on("open",function(){i.$search.attr("aria-owns",s),i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.removeAttr("aria-owns"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.data._resultId)}),this.$selection.on("focusin",".select2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===i.$search.val()){var o=i.$searchContainer.prev(".select2-selection__choice");if(o.length>0){var s=o.data("data");i.searchRemoveChoice(s),e.preventDefault()}}else e.which===n.ENTER&&(t.open(),e.preventDefault())});var r=document.documentMode,a=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){a?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(a&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&i.handleSearch(e)}})},o.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},o.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},o.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()},o.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},o.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},o.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)},o}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,o){var i=this,s=["open","opening","close","closing","select","selecting","unselect","unselecting"],r=["opening","closing","selecting","unselecting"];t.call(this,n,o),n.on("*",function(t,n){if(-1!==e.inArray(t,s)){n=n||{};var o=e.Event("select2:"+t,{params:n});i.$element.trigger(o),-1!==e.inArray(t,r)&&(n.prevented=o.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 o=t(e);n._cache[e]=o}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",Ȇ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ƭ:"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 o="";return o+=null!=t?t.id:e.generateChars(4),o+="-result-",o+=e.generateChars(4),null!=n.id?o+="-"+n.id.toString():o+="-"+e.generateChars(4),o},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return t.Extend(o,e),o.prototype.current=function(e){var t=[],o=this;this.$element.find(":selected").each(function(){var e=n(this),i=o.item(e);t.push(i)}),e(t)},o.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(o){var i=[];(e=[e]).push.apply(e,o);for(var s=0;s=0){var d=i.filter(a(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)}r.push(f)}}return r},o}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function o(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),o.__super__.constructor.call(this,e,t)}return t.Extend(o,e),o.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,o){var i=n.ajax(e);return i.then(t),i.fail(o),i}};return n.extend({},t,e,!0)},o.prototype.processResults=function(e){return e},o.prototype.query=function(e,t){var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);function s(){var s=i.transport(i,function(i){var s=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(s&&s.results&&n.isArray(s.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(s),o.container.focusOnActiveElement()},function(){s.status&&"0"===s.status||o.trigger("results:message",{message:"errorLoading"})});o._request=s}"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(s,this.ajaxOptions.delay)):s()},o}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,o){var i=o.get("tags"),s=o.get("createTag");void 0!==s&&(this.createTag=s);var r=o.get("insertTag");if(void 0!==r&&(this.insertTag=r),t.call(this,n,o),e.isArray(i))for(var a=0;a0&&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 o=this;this.current(function(i){var s=null!=i?i.length:0;o.maximumSelectionLength>0&&s>=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):e.call(o,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('');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),o=e('');return this.$searchContainer=o,this.$search=o.find("input"),n.prepend(o),n},n.prototype.bind=function(t,n,o){var i=this,s=n.id+"-results";t.call(this,n,o),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),n.on("open",function(){i.$search.attr("tabindex",0),i.$search.attr("aria-owns",s),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),n.on("close",function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-activedescendant"),i.$search.removeAttr("aria-owns"),i.$search.val("")}),n.on("focus",function(){n.isOpen()||i.$search.focus()}),n.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide"))}),n.on("results:focus",function(e){i.$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,o){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,o)}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),o=t.length-1;o>=0;o--){var i=t[o];this.placeholder.id===i.id&&n.splice(o,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,o){this.lastParams={},e.call(this,t,n,o),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,o){var i=this;t.call(this,n,o),n.on("query",function(e){i.lastParams=e,i.loading=!0}),n.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,i.$loadingMore[0]);!i.loading&&t&&i.$results.offset().top+i.$results.outerHeight(!1)+50>=i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)&&i.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(''),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,o){this.$dropdownParent=o.get("dropdownParent")||e(document.body),t.call(this,n,o)}return n.prototype.bind=function(e,t,n){var o=this,i=!1;e.call(this,t,n),t.on("open",function(){o._showDropdown(),o._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){o._positionDropdown(),o._resizeDropdown()}),t.on("results:append",function(){o._positionDropdown(),o._resizeDropdown()}))}),t.on("close",function(){o._hideDropdown(),o._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(""),o=t.call(this);return n.append(o),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,o){var i=this,s="scroll.select2."+o.id,r="resize.select2."+o.id,a="orientationchange.select2."+o.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(s,function(t){var n=e(this).data("select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(s+" "+r+" "+a,function(e){i._positionDropdown(),i._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,o){var i="scroll.select2."+o.id,s="resize.select2."+o.id,r="orientationchange.select2."+o.id;this.$container.parents().filter(t.hasScroll).off(i),e(window).off(i+" "+s+" "+r)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),o=this.$dropdown.hasClass("select2-dropdown--below"),i=null,s=this.$container.offset();s.bottom=s.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=s.top,r.bottom=s.top+r.height;var a=this.$dropdown.outerHeight(!1),c=t.scrollTop(),l=t.scrollTop()+t.height(),d=cs.bottom+a,p={left:s.left,top:r.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f=h.offset();p.top-=f.top,p.left-=f.left,n||o||(i="below"),u||!d||n?!d&&u&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(p.top=r.top-f.top-a),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),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,o=0;o0&&(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 A=t(u.amdBase+"compat/initSelection");u.dataAdapter=l.Decorate(u.dataAdapter,A)}}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 P=l.Decorate(y,b);u.dropdownAdapter=P}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=l.Decorate(u.dropdownAdapter,k)),u.closeOnSelect&&(u.dropdownAdapter=l.Decorate(u.dropdownAdapter,E)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var M=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=l.Decorate(u.dropdownAdapter,M)}u.dropdownAdapter=l.Decorate(u.dropdownAdapter,D)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=i:u.selectionAdapter=o,null!=u.placeholder&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,s)),u.allowClear&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,r)),u.multiple&&(u.selectionAdapter=l.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var T=t(u.amdBase+"compat/containerCss");u.selectionAdapter=l.Decorate(u.selectionAdapter,T)}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 I=new d;u.language.push("en");for(var O=u.language,L=0;L0){for(var s=e.extend(!0,{},i),r=i.children.length-1;r>=0;r--)null==n(o,i.children[r])&&s.children.splice(r,1);return s.children.length>0?s:n(o,s)}var a=t(i.text).toUpperCase(),c=t(o.term).toUpperCase();return a.indexOf(c)>-1?i: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"}},A.prototype.set=function(t,n){var o={};o[e.camelCase(t)]=n;var i=l._convertData(o);e.extend(this.defaults,i)},new A}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,o){function i(t,i){if(this.options=t,null!=i&&this.fromElement(i),this.options=n.apply(this.options),i&&i.is("input")){var s=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=o.Decorate(this.options.dataAdapter,s)}}return i.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 i;i=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var s=t.extend(!0,{},i);for(var r in s=o._convertData(s))t.inArray(r,n)>-1||(t.isPlainObject(this.options[r])?t.extend(this.options[r],s[r]):this.options[r]=s[r]);return this},i.prototype.get=function(e){return this.options[e]},i.prototype.set=function(e,t){this.options[e]=t},i}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,o){var i=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),i.__super__.constructor.call(this);var o=e.attr("tabindex")||0;e.data("old-tabindex",o),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var r=this.render();this._placeContainer(r);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);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(i,n.Observable),i.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,"")},i.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},i.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 o=this._resolveWidth(e,"style");return null!=o?o:this._resolveWidth(e,"element")}if("element"==t){var i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"==t){var s=e.attr("style");if("string"!=typeof s)return null;for(var r=s.split(";"),a=0,c=r.length;a=1)return l[1]}return null}return t},i.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)},i.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 o=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=o?(this._observer=new o(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))},i.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},i.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(o,i){-1===e.inArray(o,n)&&t.trigger(o,i)})},i.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},i.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},i.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===o.ESC||n===o.TAB||n===o.UP&&e.altKey?(t.close(),e.preventDefault()):n===o.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===o.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===o.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===o.DOWN&&(t.trigger("results:next",{}),e.preventDefault());var i=t.$dropdown.find(".select2-search__field");i.length||(i=t.$container.find(".select2-search__field")),n===o.DOWN||n===o.UP?t.focusOnActiveElement():(i.focus(),setTimeout(function(){t.focusOnActiveElement()},1e3))}else t.hasFocus()&&(n!==o.ENTER&&n!==o.SPACE&&n!==o.DOWN||(t.open(),e.preventDefault()))})},i.prototype.focusOnActiveElement=function(){this.isOpen()&&!n.isTouchscreen()&&this.$results.find("li.select2-results__option--highlighted").focus()},i.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",{})},i.prototype._syncSubtree=function(e,t){var n=!1,o=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var i=0;i0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){o.trigger("selection:update",{data:e})})}},i.prototype.trigger=function(e,t){var n=i.__super__.trigger,o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in o){var s=o[e],r={prevented:!1,name:e,args:t};if(n.call(this,s,r),r.prevented)return void(t.prevented=!0)}n.call(this,e,t)},i.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.trigger("query",{})},i.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},i.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},i.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},i.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},i.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)},i.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},i.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")},i.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},i.prototype.render=function(){var t=e('');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},i}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,o){if(null==e.fn.selectWoo){var i=["open","close","destroy"];e.fn.selectWoo=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var o=e.extend(!0,{},t);new n(e(this),o)}),this;if("string"==typeof t){var o,s=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."),o=n[t].apply(n,s)}),e.inArray(t,i)>-1?this:o}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=o),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===(s=o.apply(t,i))||(e.exports=s)},634(){(window.WPCodeTestingMode||function(e,t,n){const o={l18n:t.wpcode,init:function(){o.should_init()&&o.init_events()},should_init:()=>(o.$toggle=n(".wpcode-lite-version #wpcode-toggle-testing-mode"),o.$toggle.length>0),init_events(){o.$toggle.on("change",o.toggle)},toggle(){const e=WPCodeSVG.WPCodeIcon("lock",22,28,"0 0 22 28","iconId");n.confirm({title:e+o.l18n.testing_mode.title,content:o.l18n.testing_mode.text,closeIcon:!0,boxWidth:"560px",backgroundDismiss:!0,theme:"modern upsell-box-alert width560px",buttons:{confirm:{text:o.l18n.testing_mode.button_text,btnClass:"wpcode-btn-orange wpcode-button-large",action:function(){o.$toggle.prop("checked",!1),t.open(o.l18n.testing_mode.link,"_blank","noopener noreferrer")}}},onContentReady:function(){this.$content.parent().parent().append('")},onClose:function(){o.$toggle.prop("checked",!1)}})}};return o}(document,window,jQuery)).init()},695(){jQuery(function(e){WPCodeCodeTypePicker.init()}),window.WPCodeCodeTypePicker=function(e,t,n){const o={hidePicker:function(){o.body.removeClass("wpcode-code-type-picker-visible")},findElements:function(){o.snippet_type_dropdown=n("#wpcode_snippet_type"),o.snippet_type_holder=n("#wpcode_snippet_type-holder"),o.backdrop=n("#wpcode-code-type-picker-backdrop"),o.close=n("#wpcode-close-code-type-picker"),o.body=n("body"),o.code_type_list=n("#wpcode-code-type-list")},init:function(){o.findElements();const e=new URLSearchParams(t.location.search);o.body.hasClass("wpcode-new-snippet")&&!e.has("ai_generate")&&o.showPicker(),o.snippet_type_holder.click(function(e){e.preventDefault(),e.stopPropagation(),o.showPicker()}),o.backdrop.click(function(){o.hidePicker()}),o.close.click(function(){o.hidePicker()}),o.code_type_list.on("click",".wpcode-code-type",function(e){e.preventDefault();const t=n(this).data("code-type");o.snippet_type_dropdown.val(t).trigger("change"),n(".wpcode-code-type").removeClass("wpcode-code-type-selected"),n(this).addClass("wpcode-code-type-selected"),o.hidePicker()})},showPicker:function(){o.code_type_list.find(".wpcode-code-type").each(function(){n(this).data("code-type")===o.snippet_type_dropdown.val()?n(this).addClass("wpcode-code-type-selected"):n(this).removeClass("wpcode-code-type-selected")}),o.body.addClass("wpcode-code-type-picker-visible")}};return o}(document,window,jQuery)},719(){(window.WPCodeAdminLibrary||function(e,t,n){const o={l10n:wpcode,init:function(){o.should_init()&&(o.find_elements(),o.init_preview(),o.init_ai_button())},should_init:()=>n(".wpcode-library-preview-button").length>0,find_elements(){o.library_list=n(".wpcode-items-list"),o.code_preview_use=n("#wpcode-preview-use-code"),o.code_preview_edit=n("#wpcode-preview-edit-snippet"),o.code_preview_updated=n("#wpcode-preview-updated"),o.code_preview_title=n("#wpcode-preview-title")},init_preview(){o.library_list.on("click",".wpcode-library-preview-button",function(e){e.preventDefault();const t=n(this).parent().find(".wpcode-item-use-button"),i=n(this).closest(".wpcode-list-item").data("id"),s=n(this).closest(".wpcode-items-list").data("type");o.show_code_preview(i,t.attr("href"),s),o.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,i="library"){const s=("library"===i?o.l10n.library.snippets:o.l10n.library.mysnippets).find(t=>t.library_id===e);WPCodeAdminCodeEditor.switch_code_mode("wpcode-code-preview",s.code_type),WPCodeAdminCodeEditor.set_value("wpcode-code-preview",s.code),o.code_preview_use.attr("href",t),o.code_preview_title.text(s.title),"mylibrary"===i?(n(".wpcode-my-library-buttons").show(),o.code_preview_edit.attr("href",o.l10n.cloud_edit_url+e)):n(".wpcode-my-library-buttons").hide(),o.code_preview_updated&&o.code_preview_updated.text(s.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(o.l10n.ai_title,o.l10n.ai_text,o.l10n.ai_url,o.l10n.ai_button)})}};return o}(document,window,jQuery)).init()},790(){const e=window.WPCodeShortcodeLocations||function(e,t,n){const o={init:function(){if(!wpcode||!wpcode.nonce)return;const t=e.getElementById("wpcode-find-locations");t&&o.bindEvents(t)},bindEvents(e){e.addEventListener("click",o.handleButtonClick)},handleButtonClick(){const t=e.getElementById("wpcode-locations-list");t.innerHTML="";let o=1,i=!0;const s=()=>{i&&n.ajax({url:ajaxurl,type:"POST",data:{action:"wpcode_get_shortcode_locations",_wpnonce:wpcode.nonce,snippet_id:wpcode.snippet_id,page:o},success:function(e){e.success&&e.data?(t.innerHTML+=e.data.html,i=e.data.has_more,o++,i&&s()):(t.innerHTML='
'+(e.data?.message||wpcode.text.error)+"
",i=!1)},error:function(){t.innerHTML='
'+wpcode.text.error+"
",i=!1}})};s()}};return o}(document,window,jQuery);document.addEventListener("DOMContentLoaded",e.init)},799(){jQuery(function(e){const t=e(".wpcode-smart-tags");let n;function o(){n.removeClass("wpcode-smart-tags-open"),e(document).off("click.wpcode")}t.on("click",".wpcode-smart-tags-toggle",function(t){t.preventDefault();const i=e(this).closest(".wpcode-smart-tags");i.toggleClass("wpcode-smart-tags-open"),n=i,e(document).on("click.wpcode",function(t){e(t.target).closest(".wpcode-smart-tags").length||o()}),i.hasClass("wpcode-smart-tags-open")&&i.find(".wpcode-smart-tags-search-input").focus()}),t.on("wpcode_close_smart_tags_dropdown",o),t.on("input",".wpcode-smart-tags-search-input",function(){const t=e(this).val().toLowerCase(),n=e(this).closest(".wpcode-smart-tags-dropdown"),o=n.find(".wpcode-smart-tags-category"),i=n.find(".wpcode-smart-tags-no-results");let s=0;o.each(function(){const n=e(this),o=n.find(".wpcode-smart-tag-category-label"),i=n.find("li:not(.wpcode-smart-tag-category-label)");let r=!1;i.each(function(){const n=e(this);-1!==n.text().toLowerCase().indexOf(t)?(n.show(),r=!0,s++):n.hide()}),r?(n.show(),o.show()):n.hide()}),0===s&&""!==t?i.show():i.hide()}),t.on("wpcode_close_smart_tags_dropdown",function(){const e=n.find(".wpcode-smart-tags-search-input");e.length&&(e.val(""),e.trigger("input"))}),"undefined"!=typeof WPCodeSnippetManager&&t.on("click",".wpcode-insert-smart-tag",function(t){const n=e(this).closest(".wpcode-smart-tags-dropdown"),o=n.data("upgrade-title");if(o)return t.preventDefault(),t.stopImmediatePropagation(),WPCodeSnippetManager.show_pro_notice(o,n.data("upgrade-text"),n.data("upgrade-link"),n.data("upgrade-button")),!1})})},866(){(window.WPCodeLibraryAuth||function(e,t,n){const o={i18n:t.wpcode,init:function(){o.load_elements(),o.add_event_listeners(),t.WPCodeLibraryAuth=o},load_elements(){o.auth_delete_button=n(".wpcode-delete-auth")},add_event_listeners(){n(e).on("click",".wpcode-start-auth",function(e){e.preventDefault(),o.start_auth(n(this))}),o.auth_delete_button.on("click",function(e){e.preventDefault(),o.delete_auth()}),t.addEventListener("message",e=>{e.isTrusted&&o.store_auth(e.data,e.origin)},!1)},start_auth(e){let i=t.open(o.i18n.connect_url,"_blank","location=no,width=500,height=730,scrollbars=0");null===i?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(){}}}}):i.focus()},delete_auth(){const e=o.show_please_wait();n.post(ajaxurl,{action:"wpcode_library_delete_auth",_ajax_nonce:o.i18n.nonce,multisite:o.i18n.multisite},function(o){e.close(),o.success?t.location.reload():n.confirm({title:"Error!",content:"There was an issue processing your request.",buttons:{ok:function(){}}})})},store_auth(e,i){if(void 0===e.key||void 0===e.username)return;const s=void 0!==e.deploy_snippet_id?e.deploy_snippet_id:0,r=o.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:s,origin:i,_ajax_nonce:o.i18n.nonce,multisite:o.i18n.multisite},function(e){if(r.close(),e.success){let o='';n.confirm({title:e.data.title,content:e.data.text+o,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:o.i18n.please_wait,closeIcon:!1,content:'',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 o}(document,window,jQuery)).init()},875(){(window.WPCodeAdminTools||function(e,t,n){const o={i18n:t.wpcode,init:function(){o.should_init()&&(o.find_elements(),o.init_importer(),o.init_ssl_verify(),o.init_confirm_delete_log())},should_init:()=>n("body").hasClass("wpcode-tools"),find_elements(){o.importer_button=n("#wpcode-importer-snippets-submit"),o.$import_progress=n("#wpcode-importer-process"),o.provider=n("#wpcode-importer-provider").val(),o.status_update=n("#wpcode-importer-status-update").html()},init_importer(){o.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())}),o.import_snippets(e)}})},import_snippets(e){o.$import_progress.find(".snippet-total").text(e.length),o.$import_progress.find(".snippet-current").text("1"),n("#wpcode-importer-snippets").hide(),o.$import_progress.show(),o.import_queue=e,o.imported=0,o.import_snippet()},import_snippet(){const e=o.import_queue[0];n.post(ajaxurl,{action:"wpcode_import_snippet_"+o.provider,snippet_id:e,_wpnonce:wpcode.nonce}).done(function(e){if(e.success){o.import_queue.shift(),o.imported++;const t=n(o.status_update);t.find(".name span").text(e.data.name),t.find(".actions a").attr("href",e.data.edit),o.$import_progress.find(".status").prepend(t),o.$import_progress.find(".status").show(),0===o.import_queue.length?(o.$import_progress.find(".process-count").hide(),o.$import_progress.find(".snippets-completed").text(o.imported),o.$import_progress.find(".process-completed").show()):(o.$import_progress.find(".snippet-current").text(o.imported+1),o.import_snippet())}})},init_ssl_verify(){n(e).on("click","#wpcode-ssl-verify",function(e){e.preventDefault(),o.verify_ssl()})},verify_ssl(){const e=n("#wpcode-ssl-verify"),t=e.text(),o=e.outerWidth(),i=e.parent(),s={action:"wpcode_verify_ssl",nonce:wpcode.nonce};e.css("width",o).prop("disabled",!0).text(wpcode.testing),n.post(ajaxurl,s,function(n){console.log(n),i.find(".wpcode-alert, .wpcode-ssl-error").remove(),n.success&&e.before('