CVE-2019-17496: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79)
value: Craft CMS before 3.3.8 has stored XSS via a name field. This field is mishandled during site deletion.
CWE description: The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVSS v3 base score: 6.1
Published: 2019-10-11T00:15Z
Repository: https://github.com/craftcms/cms
Language: JavaScript
Files changed: CHANGELOG-v3.md, src/web/assets/cp/dist/js/Craft.js, src/web/assets/cp/dist/js/Craft.min.js, src/web/assets/cp/dist/js/Craft.min.js.map, src/web/assets/cp/src/js/AdminTable.js
Commit date: 2019-10-08 12:13:59 -0700
Commit message: Fixed an XSS vulnerability

Diff: diff --git a/CHANGELOG-v3.md b/CHANGELOG-v3.md
index 957f366f6b..c452914a1b 100644
--- a/CHANGELOG-v3.md
+++ b/CHANGELOG-v3.md
@@ -14,10 +14,13 @@
 - Fixed a SQL error that could occur when deleting an entry or category with three or more nested levels of elements. ([#3456](https://github.com/craftcms/cms/issues/3456))
 - Fixed a bug where deleting an entry or category with nested elements could leave the structure in a jumbled state.
 - Fixed a PHP error occurred when viewing the PHP Info utility if `register_argc_argv` was set to `On` in `php.ini`. ([#4878](https://github.com/craftcms/cms/issues/4878))
 - Fixed a bug where the `resave/matrix-blocks` command would wittingly resave Matrix blocks even if they hadn’t been loaded with their content, resulting in lost content. ([#5030](https://github.com/craftcms/cms/issues/5030))
 
+### Security
+- Fixed an XSS vulnerability.
+
 ## 3.3.7 - 2019-10-03
 
 ### Changed
 - When saving a user, email validation errors are now copied over to the `email` attribute from the `unverifiedEmail` attribute. ([#5019](https://github.com/craftcms/cms/issues/5019))
 - `craft\web\View::renderString()` and `renderObjectTemplate()` now have `$templateMode` arguments. ([#5020](https://github.com/craftcms/cms/issues/5020))
diff --git a/src/web/assets/cp/dist/js/Craft.js b/src/web/assets/cp/dist/js/Craft.js
index e69b9f9176..d4a9989681 100644
--- a/src/web/assets/cp/dist/js/Craft.js
+++ b/src/web/assets/cp/dist/js/Craft.js
@@ -1,6 +1,6 @@
-/*!   - 2019-09-25 */
+/*!   - 2019-10-08 */
 (function($){
 
 /** global: Craft */
 /** global: Garnish */
 // Set all the standard Craft.* stuff
@@ -4950,14 +4950,14 @@ Craft.AdminTable = Garnish.Base.extend(
                 $row.remove();
                 this.totalItems--;
                 this.updateUI();
                 this.onDeleteItem(id);
 
-                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: Craft.escapeHtml(name)}));
+                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: name}));
             }
             else {
-                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: Craft.escapeHtml(name)}));
+                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: name}));
             }
         },
 
         onReorderItems: function(ids) {
             this.settings.onReorderItems(ids);
@@ -4970,11 +4970,11 @@ Craft.AdminTable = Garnish.Base.extend(
         getItemId: function($row) {
             return $row.attr(this.settings.idAttribute);
         },
 
         getItemName: function($row) {
-            return $row.attr(this.settings.nameAttribute);
+            return Craft.escapeHtml($row.attr(this.settings.nameAttribute));
         },
 
         updateUI: function() {
             // Show the "No Whatever Exists" message if there aren't any
             if (this.totalItems === 0) {
diff --git a/src/web/assets/cp/dist/js/Craft.min.js b/src/web/assets/cp/dist/js/Craft.min.js
index a0e960dde8..cbb157cd80 100644
--- a/src/web/assets/cp/dist/js/Craft.min.js
+++ b/src/web/assets/cp/dist/js/Craft.min.js
@@ -1,2 +1,2 @@
-!function($){$.extend(Craft,{navHeight:48,t:function(t,e,i){if(void 0!==Craft.translations[t]&&void 0!==Craft.translations[t][e]&&(e=Craft.translations[t][e]),i)for(var s in i)i.hasOwnProperty(s)&&(e=e.replace("{"+s+"}",i[s]));return e},formatDate:function(t){return"object"!=typeof t&&(t=new Date(t)),$.datepicker.formatDate(Craft.datepickerOptions.dateFormat,t)},formatNumber:function(t,e){return void 0===e&&(e=",.0f"),d3.formatLocale(d3FormatLocaleDefinition).format(e)(t)},escapeHtml:function(t){return $("<div/>").text(t).html()},escapeRegex:function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getText:function(t){return $("<div/>").html(t).text()},encodeUriComponent:function(t){t=encodeURIComponent(t);var e={"!":"%21","*":"%2A","'":"%27","(":"%28",")":"%29"};for(var i in e){var s=new RegExp("\\"+i,"g");t=t.replace(s,e[i])}return t},selectFullValue:function(t){var e=$(t),i=e.val();if(void 0!==e[0].setSelectionRange){var s=2*i.length;e[0].setSelectionRange(0,s)}else e.val(i)},formatInputId:function(t){return this.rtrim(t.replace(/[\[\]\\]+/g,"-"),"-")},getUrl:function(t,e,i){"string"!=typeof t&&(t="");var s="";if($.isPlainObject(e)){var n=[];for(var a in e)if(e.hasOwnProperty(a)){var r=e[a];"#"===a?s=r:null!==r&&""!==r&&n.push(a+"="+r)}e=n}e=Garnish.isArray(e)?e.join("&"):Craft.trim(e,"&?");var o,l=t.indexOf("?");if(-1!==l&&(e=t.substr(l+1)+(e?"&"+e:""),t=t.substr(0,l)),-1!==t.search("://")||"/"===t[0])return t+(e?"?"+e:"");if(t=Craft.trim(t,"/"),i){if(o=i,t){var h=o.match(new RegExp("[&?]"+Craft.escapeRegex(Craft.pathParam)+"=[^&]+"));h&&(o=o.replace(h[0],Craft.rtrim(h[0],"/")+"/"+t),t="")}}else o=Craft.baseUrl;if(-1!==(l=o.indexOf("?"))&&(e=o.substr(l+1)+(e?"&"+e:""),o=o.substr(0,l)),!Craft.omitScriptNameInUrls&&t)if(Craft.usePathInfo)-1===o.search(Craft.scriptName)&&(o=Craft.rtrim(o,"/")+"/"+Craft.scriptName);else{if(e&&e.substr(0,Craft.pathParam.length+1)===Craft.pathParam+"="){var d,c=e.indexOf("&");e=-1!==c?(d=e.substring(2,c),e.substr(c+1)):(d=e.substr(2),null),t=(d=Craft.rtrim(d))+(t?"/"+t:"")}e=Craft.pathParam+"="+t+(e?"&"+e:""),t=null}return t&&(o=Craft.rtrim(o,"/")+"/"+t),e&&(o+="?"+e),s&&(o+="#"+s),o},getCpUrl:function(t,e){return this.getUrl(t,e,Craft.baseCpUrl)},getSiteUrl:function(t,e){return this.getUrl(t,e,Craft.baseSiteUrl)},getActionUrl:function(t,e){return Craft.getUrl(t,e,Craft.actionUrl)},redirectTo:function(t){document.location.href=this.getUrl(t)},getCsrfInput:function(){return Craft.csrfTokenName?'<input type="hidden" name="'+Craft.csrfTokenName+'" value="'+Craft.csrfTokenValue+'"/>':""},postActionRequest:function(t,e,s,i){"function"==typeof e&&(i=s,s=e,e={});var n={"X-Registered-Asset-Bundles":Object.keys(Craft.registeredAssetBundles).join(","),"X-Registered-Js-Files":Object.keys(Craft.registeredJsFiles).join(",")};Craft.csrfTokenValue&&Craft.csrfTokenName&&(n["X-CSRF-Token"]=Craft.csrfTokenValue);var a=$.ajax($.extend({url:Craft.getActionUrl(t),type:"POST",dataType:"json",headers:n,data:e,success:s,error:function(t,e,i){4===t.readyState&&(void 0!==Craft.cp?Craft.cp.displayError():alert(Craft.t("app","An unknown error occurred.")),s&&s(null,e,t))}},i));return i&&"function"==typeof i.send&&i.send(a),a},_waitingOnAjax:!1,_ajaxQueue:[],queueActionRequest:function(t,e,i,s){"function"==typeof e&&(s=i,i=e,e=void 0),Craft._ajaxQueue.push([t,e,i,s]),Craft._waitingOnAjax||Craft._postNextActionRequestInQueue()},_postNextActionRequestInQueue:function(){Craft._waitingOnAjax=!0;var s=Craft._ajaxQueue.shift();Craft.postActionRequest(s[0],s[1],function(t,e,i){s[2]&&"function"==typeof s[2]&&s[2](t,e,i),Craft._ajaxQueue.length?Craft._postNextActionRequestInQueue():Craft._waitingOnAjax=!1},s[3])},stringToArray:function(t){if("string"!=typeof t)return t;for(var e=t.split(","),i=0;i<e.length;i++)e[i]=$.trim(e[i]);return e},expandPostArray:function(t){var e,i={};for(var s in t)if(t.hasOwnProperty(s)){var n,a=t[s],r=s.match(/^(\w+)(\[.*)?/);if(r[2])for(n=r[2].match(/\[[^\[\]]*\]/g),e=0;e<n.length;e++)n[e]=n[e].substring(1,n[e].length-1);else n=[];n.unshift(r[1]);var o=i;for(e=0;e<n.length;e++)e<n.length-1?("object"!=typeof o[n[e]]&&(n[e+1]&&parseInt(n[e+1])!=n[e+1]?o[n[e]]={}:o[n[e]]=[]),o=o[n[e]]):(n[e]||(n[e]=o.length),o[n[e]]=a)}return i},compare:function(t,e,i){if(typeof t!=typeof e)return!1;if("object"!=typeof t)return t===e;if(t.length!==e.length)return!1;if(t instanceof Array!=e instanceof Array)return!1;if(!(t instanceof Array))if(void 0===i||!0===i){if(!Craft.compare(Craft.getObjectKeys(t).sort(),Craft.getObjectKeys(e).sort()))return!1}else if(!Craft.compare(Craft.getObjectKeys(t),Craft.getObjectKeys(e)))return!1;for(var s in t)if(t.hasOwnProperty(s)&&!Craft.compare(t[s],e[s]))return!1;return!0},getObjectKeys:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e},escapeChars:function(t){Garnish.isArray(t)||(t=t.split());for(var e="",i=0;i<t.length;i++)e+="\\"+t[i];return e},ltrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("^["+Craft.escapeChars(e)+"]+");return t.replace(i,"")},rtrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("["+Craft.escapeChars(e)+"]+$");return t.replace(i,"")},trim:function(t,e){return t=Craft.ltrim(t,e),t=Craft.rtrim(t,e)},startsWith:function(t,e){return t.substr(0,e.length)===e},filterArray:function(t,e){for(var i=[],s=0;s<t.length;s++){("function"==typeof e?e(t[s],s):t[s])&&i.push(t[s])}return i},inArray:function(t,e){return-1!==$.inArray(t,e)},removeFromArray:function(t,e){var i=$.inArray(t,e);return-1!==i&&(e.splice(i,1),!0)},getLast:function(t){return t.length?t[t.length-1]:null},uppercaseFirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},lowercaseFirst:function(t){return t.charAt(0).toLowerCase()+t.slice(1)},parseUrl:function(t){var e=t.match(/^(?:(https?):\/\/|\/\/)([^\/\:]*)(?:\:(\d+))?(\/[^\?]*)?(?:\?([^#]*))?(#.*)?/);return e?{scheme:e[1],host:e[2]+(e[3]?":"+e[3]:""),hostname:e[2],port:e[3]||null,path:e[4]||"/",query:e[5]||null,hash:e[6]||null}:{}},isSameHost:function(t){var e=this.parseUrl(document.location.href);if(!e)return!1;var i=this.parseUrl(t);return!!i&&e.host===i.host},secondsToHumanTimeDuration:function(t,e){void 0===e&&(e=!0);var i=Math.floor(t/604800);t%=604800;var s=Math.floor(t/86400);t%=86400;var n,a=Math.floor(t/3600);t%=3600,e?(n=Math.floor(t/60),t%=60):(n=Math.round(t/60),t=0);var r=[];return i&&r.push(i+" "+(1===i?Craft.t("app","week"):Craft.t("app","weeks"))),s&&r.push(s+" "+(1===s?Craft.t("app","day"):Craft.t("app","days"))),a&&r.push(a+" "+(1===a?Craft.t("app","hour"):Craft.t("app","hours"))),!n&&(e||i||s||a)||r.push(n+" "+(1===n?Craft.t("app","minute"):Craft.t("app","minutes"))),!t&&(!e||i||s||a||n)||r.push(t+" "+(1===t?Craft.t("app","second"):Craft.t("app","seconds"))),r.join(", ")},asciiString:function(t,e){for(var i,s="",n=0;n<t.length;n++)i=t.charAt(n),s+=(e||Craft.asciiCharMap)[i]||i;return s},randomString:function(t){for(var e="",i=0;i<t;i++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e},preventOutlineOnMouseFocus:function(t){var e=$(t),i=".preventOutlineOnMouseFocus";e.on("mousedown"+i,function(){e.addClass("no-outline"),e.trigger("focus")}).on("keydown"+i+" blur"+i,function(t){t.keyCode!==Garnish.SHIFT_KEY&&t.keyCode!==Garnish.CTRL_KEY&&t.keyCode!==Garnish.CMD_KEY&&e.removeClass("no-outline")})},createErrorList:function(t){for(var e=$(document.createElement("ul")).addClass("errors"),i=0;i<t.length;i++){var s=$(document.createElement("li"));s.appendTo(e),s.html(t[i])}return e},appendHeadHtml:function(t){if(t){var e=$("link[href]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("href").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<link\\s[^>]*href="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}$("head").append(t)}},appendFootHtml:function(t){if(t){var e=$("script[src]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("src").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<script\\s[^>]*src="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}Garnish.$bod.append(t)}},initUiElements:function(t){$(".grid",t).grid(),$(".info",t).infoicon(),$(".checkbox-select",t).checkboxselect(),$(".fieldtoggle",t).fieldtoggle(),$(".lightswitch",t).lightswitch(),$(".nicetext",t).nicetext(),$(".pill",t).pill(),$(".formsubmit",t).formsubmit(),$(".menubtn",t).menubtn()},_elementIndexClasses:{},_elementSelectorModalClasses:{},_elementEditorClasses:{},registerElementIndexClass:function(t,e){if(void 0!==this._elementIndexClasses[t])throw"An element index class has already been registered for the element type “"+t+"”.";this._elementIndexClasses[t]=e},registerElementSelectorModalClass:function(t,e){if(void 0!==this._elementSelectorModalClasses[t])throw"An element selector modal class has already been registered for the element type “"+t+"”.";this._elementSelectorModalClasses[t]=e},registerElementEditorClass:function(t,e){if(void 0!==this._elementEditorClasses[t])throw"An element editor class has already been registered for the element type “"+t+"”.";this._elementEditorClasses[t]=e},createElementIndex:function(t,e,i){return new(void 0!==this._elementIndexClasses[t]?this._elementIndexClasses[t]:Craft.BaseElementIndex)(t,e,i)},createElementSelectorModal:function(t,e){return new(void 0!==this._elementSelectorModalClasses[t]?this._elementSelectorModalClasses[t]:Craft.BaseElementSelectorModal)(t,e)},createElementEditor:function(t,e,i){return new(void 0!==this._elementEditorClasses[t]?this._elementEditorClasses[t]:Craft.BaseElementEditor)(e,i)},getLocalStorage:function(t,e){return t="Craft-"+Craft.systemUid+"."+t,"undefined"!=typeof localStorage&&void 0!==localStorage[t]?JSON.parse(localStorage[t]):e},setLocalStorage:function(t,e){if("undefined"!=typeof localStorage){t="Craft-"+Craft.systemUid+"."+t;try{localStorage[t]=JSON.stringify(e)}catch(t){}}},getElementInfo:function(t){var e=$(t);return e.hasClass("element")||(e=e.find(".element:first")),{id:e.data("id"),siteId:e.data("site-id"),label:e.data("label"),status:e.data("status"),url:e.data("url"),hasThumb:e.hasClass("hasthumb"),$element:e}},setElementSize:function(t,e){var i=$(t);if("small"!==e&&"large"!==e&&(e="small"),!i.hasClass(e)){var s="small"===e?"large":"small";if(i.addClass(e).removeClass(s),i.hasClass("hasthumb")){var n=i.find("> .elementthumb > img"),a=$("<img/>",{sizes:("small"===e?"30":"100")+"px",srcset:n.attr("srcset")||n.attr("data-pfsrcset")});n.replaceWith(a),picturefill({elements:[a[0]]})}}}}),$.extend($.fn,{animateLeft:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({left:t},e,i,s):this.velocity({right:t},e,i,s)},animateRight:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({right:t},e,i,s):this.velocity({left:t},e,i,s)},disable:function(){return this.each(function(){var t=$(this);t.addClass("disabled"),t.data("activatable")&&t.removeAttr("tabindex")})},enable:function(){return this.each(function(){var t=$(this);t.removeClass("disabled"),t.data("activatable")&&t.attr("tabindex","0")})},grid:function(){return this.each(function(){var t=$(this),e={};t.data("item-selector")&&(e.itemSelector=t.data("item-selector")),t.data("cols")&&(e.cols=parseInt(t.data("cols"))),t.data("max-cols")&&(e.maxCols=parseInt(t.data("max-cols"))),t.data("min-col-width")&&(e.minColWidth=parseInt(t.data("min-col-width"))),t.data("mode")&&(e.mode=t.data("mode")),t.data("fill-mode")&&(e.fillMode=t.data("fill-mode")),t.data("col-class")&&(e.colClass=t.data("col-class")),t.data("snap-to-grid")&&(e.snapToGrid=!!t.data("snap-to-grid")),new Craft.Grid(this,e)})},infoicon:function(){return this.each(function(){new Craft.InfoIcon(this)})},checkboxselect:function(){return this.each(function(){$.data(this,"checkboxselect")||new Garnish.CheckboxSelect(this)})},fieldtoggle:function(){return this.each(function(){$.data(this,"fieldtoggle")||new Craft.FieldToggle(this)})},lightswitch:function(e,t,i){return"settings"===e?("string"==typeof t?(e={})[t]=i:e=t,this.each(function(){var t=$.data(this,"lightswitch");t&&t.setSettings(e)})):($.isPlainObject(e)||(e={}),this.each(function(){var t=$.extend({},e);Garnish.hasAttr(this,"data-value")&&(t.value=$(this).attr("data-value")),$.data(this,"lightswitch")||new Craft.LightSwitch(this,t)}))},nicetext:function(){return this.each(function(){$.data(this,"nicetext")||new Garnish.NiceText(this)})},pill:function(){return this.each(function(){$.data(this,"pill")||new Garnish.Pill(this)})},formsubmit:function(){this.on("click",function(t){var e=$(t.currentTarget);if(!e.attr("data-confirm")||confirm(e.attr("data-confirm"))){var i=e.data("menu")?e.data("menu").$anchor:e,s=i.attr("data-form")?$("#"+i.attr("data-form")):i.closest("form");e.data("action")&&$('<input type="hidden" name="action"/>').val(e.data("action")).appendTo(s),e.data("redirect")&&$('<input type="hidden" name="redirect"/>').val(e.data("redirect")).appendTo(s),e.data("param")&&$('<input type="hidden"/>').attr({name:e.data("param"),value:e.data("value")}).appendTo(s),s.trigger({type:"submit",customTrigger:e})}})},menubtn:function(){return this.each(function(){var t=$(this);if(!t.data("menubtn")&&t.next().hasClass("menu")){var e={};t.data("menu-anchor")&&(e.menuAnchor=t.data("menu-anchor")),new Garnish.MenuBtn(t,e)}})}}),Garnish.$doc.ready(function(){Craft.initUiElements()}),Craft.BaseElementEditor=Garnish.Base.extend({$element:null,elementId:null,siteId:null,$form:null,$fieldsContainer:null,$cancelBtn:null,$saveBtn:null,$spinner:null,$siteSelect:null,$siteSpinner:null,hud:null,init:function(t,e){void 0===e&&$.isPlainObject(t)&&(e=t,t=null),this.$element=$(t),this.setSettings(e,Craft.BaseElementEditor.defaults),this.loadHud()},setElementAttribute:function(t,e){this.settings.attributes||(this.settings.attributes={}),null===e?delete this.settings.attributes[t]:this.settings.attributes[t]=e},getBaseData:function(){var t=$.extend({},this.settings.params);return this.settings.siteId?t.siteId=this.settings.siteId:this.$element&&this.$element.data("site-id")&&(t.siteId=this.$element.data("site-id")),this.settings.elementId?t.elementId=this.settings.elementId:this.$element&&this.$element.data("id")&&(t.elementId=this.$element.data("id")),this.settings.elementType&&(t.elementType=this.settings.elementType),this.settings.attributes&&(t.attributes=this.settings.attributes),this.settings.prevalidate&&(t.prevalidate=1),t},loadHud:function(){this.onBeginLoading();var t=this.getBaseData();t.includeSites=Craft.isMultiSite&&this.settings.showSiteSwitcher,Craft.postActionRequest("elements/get-editor-html",t,$.proxy(this,"showHud"))},showHud:function(t,e){if(this.onEndLoading(),"success"===e){var i=$();if(t.sites){var s=$('<div class="hud-header"/>');if(1===t.sites.length)$("<h5/>",{text:t.sites[0].name}).appendTo(s);else{var n=$('<div class="select"/>').appendTo(s);this.$siteSelect=$("<select/>").appendTo(n),this.$siteSpinner=$('<div class="spinner hidden"/>').appendTo(s);for(var a=0;a<t.sites.length;a++){var r=t.sites[a];$('<option value="'+r.id+'"'+(r.id==t.siteId?' selected="selected"':"")+">"+r.name+"</option>").appendTo(this.$siteSelect)}this.addListener(this.$siteSelect,"change","switchSite")}i=i.add(s)}this.$form=$("<div/>"),this.$fieldsContainer=$('<div class="fields"/>').appendTo(this.$form),this.updateForm(t),this.onCreateForm(this.$form);var o=$('<div class="hud-footer"/>').appendTo(this.$form),l=$('<div class="buttons right"/>').appendTo(o);if(this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(l),this.$saveBtn=$('<input class="btn submit" type="submit" value="'+Craft.t("app","Save")+'"/>').appendTo(l),this.$spinner=$('<div class="spinner hidden"/>').appendTo(l),i=i.add(this.$form),this.hud)this.hud.updateBody(i),this.hud.updateSizeAndPosition();else{var h=this.settings.hudTrigger||this.$element;this.hud=new Garnish.HUD(h,i,{bodyClass:"body elementeditor",closeOtherHUDs:!1,onShow:$.proxy(this,"onShowHud"),onHide:$.proxy(this,"onHideHud"),onSubmit:$.proxy(this,"saveElement")}),this.hud.$hud.data("elementEditor",this),this.hud.on("hide",$.proxy(function(){delete this.hud},this))}i.find(".text:first").trigger("focus"),this.addListener(this.$cancelBtn,"click",function(){this.hud.hide()})}},switchSite:function(){var t=this.$siteSelect.val();t!=this.siteId&&(this.$siteSpinner.removeClass("hidden"),this.reloadForm({siteId:t},$.proxy(function(t){this.$siteSpinner.addClass("hidden"),"success"!==t&&this.$siteSelect.val(this.siteId)},this)))},reloadForm:function(t,i){t=$.extend(this.getBaseData(),t),Craft.postActionRequest("elements/get-editor-html",t,$.proxy(function(t,e){"success"===e&&this.updateForm(t),i&&i(e)},this))},updateForm:function(t){this.siteId=t.siteId,this.$fieldsContainer.html(t.html);for(var e=this.$fieldsContainer.find("> .meta > .field > .heading > .instructions"),i=0;i<e.length;i++)e.eq(i).replaceWith($("<span/>",{class:"info",html:e.eq(i).children().html()})).infoicon();Garnish.requestAnimationFrame($.proxy(function(){Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.initUiElements(this.$fieldsContainer)},this))},saveElement:function(){var t=this.settings.validators;if($.isArray(t))for(var e=0;e<t.length;e++)if($.isFunction(t[e])&&!t[e].call())return!1;this.$spinner.removeClass("hidden");var i=$.param(this.getBaseData())+"&"+this.hud.$body.serialize();Craft.postActionRequest("elements/save-element",i,$.proxy(function(t,e){if(this.$spinner.addClass("hidden"),"success"===e)if(t.success){if(this.$element&&this.siteId==this.$element.data("site-id")){var i=this.$element.find(".title"),s=i.find("a");s.length&&t.cpEditUrl?(s.attr("href",t.cpEditUrl),s.text(t.newTitle)):i.text(t.newTitle)}this.closeHud(),this.onSaveElement(t)}else this.updateForm(t),Garnish.shake(this.hud.$hud)},this))},closeHud:function(){this.hud.hide(),delete this.hud},onShowHud:function(){this.settings.onShowHud(),this.trigger("showHud")},onHideHud:function(){this.settings.onHideHud(),this.trigger("hideHud")},onBeginLoading:function(){this.$element&&this.$element.addClass("loading"),this.settings.onBeginLoading(),this.trigger("beginLoading")},onEndLoading:function(){this.$element&&this.$element.removeClass("loading"),this.settings.onEndLoading(),this.trigger("endLoading")},onSaveElement:function(t){this.settings.onSaveElement(t),this.trigger("saveElement",{response:t}),Craft.cp.runQueue()},onCreateForm:function(t){this.settings.onCreateForm(t)}},{defaults:{hudTrigger:null,showSiteSwitcher:!0,elementId:null,elementType:null,siteId:null,attributes:null,params:null,prevalidate:!1,elementIndex:null,onShowHud:$.noop,onHideHud:$.noop,onBeginLoading:$.noop,onEndLoading:$.noop,onCreateForm:$.noop,onSaveElement:$.noop,validators:[]}}),Craft.BaseElementIndex=Garnish.Base.extend({initialized:!1,elementType:null,instanceState:null,sourceStates:null,sourceStatesStorageKey:null,searchTimeout:null,sourceSelect:null,$container:null,$main:null,$mainSpinner:null,isIndexBusy:!1,$sidebar:null,showingSidebar:null,sourceKey:null,sourceViewModes:null,$source:null,sourcesByKey:null,$visibleSources:null,$customizeSourcesBtn:null,customizeSourcesModal:null,$toolbar:null,$toolbarFlexContainer:null,toolbarOffset:null,$search:null,searching:!1,searchText:null,trashed:!1,drafts:!1,$clearSearchBtn:null,$statusMenuBtn:null,$statusMenuContainer:null,statusMenu:null,status:null,$siteMenuBtn:null,siteMenu:null,siteId:null,$sortMenuBtn:null,sortMenu:null,$sortAttributesList:null,$sortDirectionsList:null,$scoreSortAttribute:null,$structureSortAttribute:null,$elements:null,$viewModeBtnContainer:null,viewModeBtns:null,viewMode:null,view:null,_autoSelectElements:null,$countContainer:null,page:1,$exportBtn:null,actions:null,actionsHeadHtml:null,actionsFootHtml:null,$selectAllContainer:null,$selectAllCheckbox:null,showingActionTriggers:!1,_$detachedToolbarItems:null,_$triggers:null,init:function(t,e,i){if(this.elementType=t,this.$container=e,this.setSettings(i,Craft.BaseElementIndex.defaults),this.instanceState=this.getDefaultInstanceState(),this.sourceStates={},this.settings.storageKey&&$.extend(this.instanceState,Craft.getLocalStorage(this.settings.storageKey),{}),this.sourceStatesStorageKey="BaseElementIndex."+this.elementType+"."+this.settings.context,$.extend(this.sourceStates,Craft.getLocalStorage(this.sourceStatesStorageKey,{})),this.$main=this.$container.find(".main"),this.$toolbar=this.$container.find(".toolbar:first"),this.$toolbarFlexContainer=this.$toolbar.children(".flex"),this.$statusMenuBtn=this.$toolbarFlexContainer.find(".statusmenubtn:first"),this.$statusMenuContainer=this.$statusMenuBtn.parent(),this.$siteMenuBtn=this.$container.find(".sitemenubtn:first"),this.$sortMenuBtn=this.$toolbarFlexContainer.find(".sortmenubtn:first"),this.$search=this.$toolbarFlexContainer.find(".search:first input:first"),this.$clearSearchBtn=this.$toolbarFlexContainer.find(".search:first > .clear"),this.$mainSpinner=this.$toolbarFlexContainer.find(".spinner:first"),this.$sidebar=this.$container.find(".sidebar:first"),this.$customizeSourcesBtn=this.$sidebar.find(".customize-sources"),this.$elements=this.$container.find(".elements:first"),this.$countContainer=this.$container.find("#count-container"),this.$exportBtn=this.$container.find("#export-btn"),this.settings.hideSidebar&&(this.$sidebar.hide(),$(".body, .content",this.$container).removeClass("has-sidebar")),(this.settings.toolbarFixed||null===this.settings.toolbarFixed&&"index"===this.settings.context)&&!Garnish.isMobileBrowser(!0)&&(this.addListener(Garnish.$win,"resize","updateFixedToolbar"),this.addListener(Garnish.$scrollContainer,"scroll","updateFixedToolbar")),this.initSources()){if(this.$customizeSourcesBtn.length&&this.addListener(this.$customizeSourcesBtn,"click","createCustomizeSourcesModal"),this.$statusMenuBtn.length&&(this.statusMenu=this.$statusMenuBtn.menubtn().data("menubtn").menu,this.statusMenu.on("optionselect",$.proxy(this,"_handleStatusChange"))),this.$siteMenuBtn.length){this.siteMenu=this.$siteMenuBtn.menubtn().data("menubtn").menu;var s=this.siteMenu.$options.filter(".sel:first");if(s.length||(s=this.siteMenu.$options.first()),s.length?this._setSite(s.data("site-id")):this.settings.criteria={id:"0"},this.siteMenu.on("optionselect",$.proxy(this,"_handleSiteChange")),this.siteId){var n=Craft.getLocalStorage("BaseElementIndex.siteId");if(n&&n!=this.siteId){var a=this.siteMenu.$options.filter('[data-site-id="'+n+'"]:first');a.length&&a.trigger("click")}}}else this.settings.criteria&&this.settings.criteria.siteId?this._setSite(this.settings.criteria.siteId):this._setSite(Craft.siteId);this.addListener(this.$search,"textchange",$.proxy(function(){!this.searching&&this.$search.val()?this.startSearching():this.searching&&!this.$search.val()&&this.stopSearching(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"updateElementsIfSearchTextChanged"),500)},this)),this.addListener(this.$search,"keypress",$.proxy(function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.updateElementsIfSearchTextChanged())},this)),this.addListener(this.$clearSearchBtn,"click",$.proxy(function(){this.$search.val(""),this.searchTimeout&&clearTimeout(this.searchTimeout),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.stopSearching(),this.updateElementsIfSearchTextChanged()},this)),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.$sortMenuBtn.length&&(this.sortMenu=this.$sortMenuBtn.menubtn().data("menubtn").menu,this.$sortAttributesList=this.sortMenu.$container.children(".sort-attributes"),this.$sortDirectionsList=this.sortMenu.$container.children(".sort-directions"),this.sortMenu.on("optionselect",$.proxy(this,"_handleSortChange"))),this.addListener(this.$exportBtn,"click","_showExportHud"),this.initialized=!0,this.afterInit(),this.selectDefaultSource(),"index"===this.settings.context&&this.setPage(Craft.pageNum),this.updateElements(!0)}},afterInit:function(){this.onAfterInit()},getSourceContainer:function(){return this.$sidebar.find("nav>ul")},get $sources(){if(this.sourceSelect)return this.sourceSelect.$items},initSources:function(){var t=this._getSourcesInList(this.getSourceContainer());return 0!==t.length&&(this.sourceSelect||(this.sourceSelect=new Garnish.Select(this.$sidebar.find("nav"),{multi:!1,allowEmpty:!1,vertical:!0,onSelectionChange:$.proxy(this,"_handleSourceSelectionChange")})),this.sourcesByKey={},this._initSources(t),!0)},selectDefaultSource:function(){var t,e=this.getDefaultSourceKey();e&&(t=this.getSourceByKey(e),-1===this.$visibleSources.index(t)&&(t=null)),e&&t||(t=this.$visibleSources.first()),t.length&&this.selectSource(t)},refreshSources:function(){this.sourceSelect.removeAllItems();var t={context:this.settings.context,elementType:this.elementType};this.setIndexBusy(),Craft.postActionRequest(this.settings.refreshSourcesAction,t,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e?(this.getSourceContainer().replaceWith(t.html),this.initSources(),this.selectDefaultSource()):Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))},updateFixedToolbar:function(t){this.updateFixedToolbar._scrollTop=Garnish.$scrollContainer.scrollTop(),992<Garnish.$win.width()&&17<=this.updateFixedToolbar._scrollTop?((this.updateFixedToolbar._makingFixed=!this.$toolbar.hasClass("fixed"))&&(this.$elements.css("padding-top",this.$toolbar.outerHeight()+21),this.$toolbar.addClass("fixed")),!this.updateFixedToolbar._makingFixed&&"resize"!==t.type||this.$toolbar.css({top:Garnish.$scrollContainer.offset().top,width:this.$main.width()})):this.$toolbar.hasClass("fixed")&&(this.$toolbar.removeClass("fixed"),this.$toolbar.css("width",""),this.$elements.css("padding-top",""),this.$toolbar.css("top","0"))},initSource:function(t){this.sourceSelect.addItems(t),this.initSourceToggle(t),(this.sourcesByKey[t.data("key")]=t).data("hasNestedSources")&&-1!==this.instanceState.expandedSources.indexOf(t.data("key"))&&this._expandSource(t)},initSourceToggle:function(t){this.deinitSourceToggle(t);var e=this._getSourceToggle(t);e.length?(this.addListener(t,"dblclick","_handleSourceDblClick"),this.addListener(e,"click","_handleSourceToggleClick"),t.data("hasNestedSources",!0)):t.data("hasNestedSources",!1)},deinitSource:function(t){this.sourceSelect.removeItems(t),this.deinitSourceToggle(t),delete this.sourcesByKey[t.data("key")]},deinitSourceToggle:function(t){t.data("hasNestedSources")&&(this.removeListener(t,"dblclick"),this.removeListener(this._getSourceToggle(t),"click")),t.removeData("hasNestedSources")},getDefaultInstanceState:function(){return{selectedSource:null,expandedSources:[]}},getDefaultSourceKey:function(){return this.instanceState.selectedSource},getDefaultExpandedSources:function(){return this.instanceState.expandedSources},startSearching:function(){this.$clearSearchBtn.removeClass("hidden"),this.$scoreSortAttribute||(this.$scoreSortAttribute=$('<li><a data-attr="score">'+Craft.t("app","Score")+"</a></li>"),this.sortMenu.addOptions(this.$scoreSortAttribute.children())),this.$scoreSortAttribute.prependTo(this.$sortAttributesList),this.searching=!0,this._updateStructureSortOption(),this.setSortAttribute("score")},stopSearching:function(){this.$clearSearchBtn.addClass("hidden"),this.$scoreSortAttribute.detach(),this.searching=!1,this._updateStructureSortOption()},setInstanceState:function(t,e){"object"==typeof t?$.extend(this.instanceState,t):this.instanceState[t]=e,this.storeInstanceState()},storeInstanceState:function(){this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.instanceState)},getSourceState:function(t,e,i){return void 0===this.sourceStates[t]&&(this.sourceStates[t]={}),void 0===e?this.sourceStates[t]:void 0!==this.sourceStates[t][e]?this.sourceStates[t][e]:void 0!==i?i:null},getSelectedSourceState:function(t,e){return this.getSourceState(this.instanceState.selectedSource,t,e)},setSelecetedSourceState:function(t,e){var i=this.getSelectedSourceState();"object"==typeof t?$.extend(i,t):i[t]=e,this.sourceStates[this.instanceState.selectedSource]=i,Craft.setLocalStorage(this.sourceStatesStorageKey,this.sourceStates)},storeSortAttributeAndDirection:function(){var t=this.getSelectedSortAttribute();"score"!==t&&this.setSelecetedSourceState({order:t,sort:this.getSelectedSortDirection()})},setPage:function(t){t=Math.max(t,1),this.page=t;var e=document.location.href.replace(/\?.*$/,"").replace(new RegExp("/"+Craft.pageTrigger.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\d+$"),"").replace(/\/+$/,"");1!==this.page&&("?"!==Craft.pageTrigger[0]&&(e+="/"),e+=Craft.pageTrigger+this.page),history.replaceState({},"",e)},getViewParams:function(){var t={siteId:this.siteId,search:this.searchText,offset:this.settings.batchSize*(this.page-1),limit:this.settings.batchSize,trashed:this.trashed?1:0,drafts:this.drafts?1:0};Garnish.hasAttr(this.$source,"data-override-status")||(t.status=this.status),$.extend(t,this.settings.criteria);var e={context:this.settings.context,elementType:this.elementType,source:this.instanceState.selectedSource,criteria:t,disabledElementIds:this.settings.disabledElementIds,viewState:$.extend({},this.getSelectedSourceState()),paginated:this._isViewPaginated()?1:0};return e.viewState.order=this.getSelectedSortAttribute(),e.viewState.sort=this.getSelectedSortDirection(),"structure"===this.getSelectedSortAttribute()&&(void 0===this.instanceState.collapsedElementIds&&(this.instanceState.collapsedElementIds=[]),e.collapsedElementIds=this.instanceState.collapsedElementIds),e},updateElements:function(t){if(this.initialized){this.setIndexBusy(),this.view&&(this.view.destroy(),delete this.view),this.$elements.html(""),!0!==t&&(this.$countContainer.html("&nbsp;"),this.setPage(1));var s=this.getViewParams();Craft.postActionRequest(this.settings.updateElementsAction,s,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e){var i=Math.max(Math.ceil(t.count/this.settings.batchSize),1);if(this.page>i)return this.setPage(i),void this.updateElements(!0);this._updateView(s,t)}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}},updateElementsIfSearchTextChanged:function(){this.searchText!==(this.searchText=this.searching?this.$search.val():null)&&this.updateElements()},showActionTriggers:function(){this.showingActionTriggers||(this.$toolbar.css("min-height",this.$toolbar.height()),this._$detachedToolbarItems=this.$toolbarFlexContainer.children().not(this.$selectAllContainer).not(this.$mainSpinner),this._$detachedToolbarItems.detach(),this._$triggers?this._$triggers.insertAfter(this.$selectAllContainer):this._createTriggers(),this.showingActionTriggers=!0)},submitAction:function(t,e){var i=this.view.getSelectedElementIds();if(0!==i.length){for(var s,n=0;n<this.actions.length;n++)if(this.actions[n].type===t){s=this.actions[n];break}if(s&&(!s.confirm||confirm(s.confirm))){var a=this.getViewParams(),r=$.extend(a,e,{elementAction:t,elementIds:i});this.setIndexBusy(),this._autoSelectElements=i,Craft.postActionRequest(this.settings.submitActionsAction,r,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&(t.success?(this._updateView(a,t),t.message&&Craft.cp.displayNotice(t.message),this.afterAction(s,r)):Craft.cp.displayError(t.message))},this))}}},afterAction:function(t,e){Craft.cp.runQueue(),this.onAfterAction(t,e)},hideActionTriggers:function(){this.showingActionTriggers&&(this._$detachedToolbarItems.insertBefore(this.$mainSpinner),this._$triggers.detach(),this.$toolbarFlexContainer.children().not(this.$selectAllContainer).removeClass("hidden"),this.$toolbar.css("min-height",""),this.showingActionTriggers=!1)},updateActionTriggers:function(){if(this.actions){var t=this.view.getSelectedElements().length;0!==t?(t===this.view.getEnabledElements().length?(this.$selectAllCheckbox.removeClass("indeterminate"),this.$selectAllCheckbox.addClass("checked"),this.$selectAllBtn.attr("aria-checked","true")):(this.$selectAllCheckbox.addClass("indeterminate"),this.$selectAllCheckbox.removeClass("checked"),this.$selectAllBtn.attr("aria-checked","mixed")),this.showActionTriggers()):(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false"),this.hideActionTriggers())}},getSelectedElements:function(){return this.view?this.view.getSelectedElements():$()},getSelectedElementIds:function(){return this.view?this.view.getSelectedElementIds():[]},getSortAttributeOption:function(t){return this.$sortAttributesList.find('a[data-attr="'+t+'"]:first')},getSelectedSortAttribute:function(){return this.$sortAttributesList.find("a.sel:first").data("attr")},setSortAttribute:function(t){var e=this.getSortAttributeOption(t);if(e.length){this.$sortAttributesList.find("a.sel").removeClass("sel"),e.addClass("sel");var i=e.text();this.$sortMenuBtn.attr("title",Craft.t("app","Sort by {attribute}",{attribute:i})),this.$sortMenuBtn.text(i),this.setSortDirection("score"===t?"desc":"asc"),"structure"===t?this.$sortDirectionsList.find("a").addClass("disabled"):this.$sortDirectionsList.find("a").removeClass("disabled")}},getSortDirectionOption:function(t){return this.$sortDirectionsList.find("a[data-dir="+t+"]:first")},getSelectedSortDirection:function(){return this.$sortDirectionsList.find("a.sel:first").data("dir")},getSelectedViewMode:function(){return this.getSelectedSourceState("mode")},setSortDirection:function(t){"desc"!==t&&(t="asc"),this.$sortMenuBtn.attr("data-icon",t),this.$sortDirectionsList.find("a.sel").removeClass("sel"),this.getSortDirectionOption(t).addClass("sel")},getSourceByKey:function(t){return void 0===this.sourcesByKey[t]?null:this.sourcesByKey[t]},selectSource:function(t){if(!t||!t.length)return!1;if(this.$source&&this.$source[0]&&this.$source[0]===t[0]&&t.data("key")===this.sourceKey)return!1;if(this.hideActionTriggers(),this.$source=t,this.sourceKey=t.data("key"),this.setInstanceState("selectedSource",this.sourceKey),this.sourceSelect.selectItem(t),Craft.cp.updateSidebarMenuLabel(),this.searching&&(this.searchText=null,this.$search.val(""),this.stopSearching()),Garnish.hasAttr(this.$source,"data-has-structure")?(this.$structureSortAttribute||(this.$structureSortAttribute=$('<li><a data-attr="structure">'+Craft.t("app","Structure")+"</a></li>"),this.sortMenu.addOptions(this.$structureSortAttribute.children())),this.$structureSortAttribute.prependTo(this.$sortAttributesList)):this.$structureSortAttribute&&this.$structureSortAttribute.removeClass("sel").detach(),this.setStoredSortOptionsForSource(),this.$statusMenuBtn.length&&(Garnish.hasAttr(this.$source,"data-override-status")?this.$statusMenuContainer.addClass("hidden"):this.$statusMenuContainer.removeClass("hidden")),this.$viewModeBtnContainer&&this.$viewModeBtnContainer.remove(),this.viewModeBtns={},this.viewMode=null,this.sourceViewModes=this.getViewModesForSource(),1<this.sourceViewModes.length){this.$viewModeBtnContainer=$('<div class="btngroup"/>').insertBefore(this.$mainSpinner);for(var e=0;e<this.sourceViewModes.length;e++){var i=this.sourceViewModes[e],s=$('<div data-view="'+i.mode+'" role="button" class="btn'+(void 0!==i.className?" "+i.className:"")+'" title="'+i.title+'"'+(void 0!==i.icon?' data-icon="'+i.icon+'"':"")+"/>").appendTo(this.$viewModeBtnContainer);this.viewModeBtns[i.mode]=s,this.addListener(s,"click",{mode:i.mode},function(t){this.selectViewMode(t.data.mode),this.updateElements()})}}var n=this.getSelectedViewMode();return n&&this.doesSourceHaveViewMode(n)||(n=this.viewMode&&this.doesSourceHaveViewMode(this.viewMode)?this.viewMode:this.sourceViewModes[0].mode),this.selectViewMode(n),this.onSelectSource(),!0},selectSourceByKey:function(t){var e=this.getSourceByKey(t);return!!e&&this.selectSource(e)},setStoredSortOptionsForSource:function(){var t=this.getSelectedSourceState("order"),e=this.getSelectedSourceState("sort");t&&e||(t=this.getDefaultSort(),Garnish.isArray(t)&&(e=t[1],t=t[0])),"asc"!==e&&"desc"!==e&&(e="asc"),this.setSortAttribute(t),this.setSortDirection(e)},getDefaultSort:function(){return this.$source&&Garnish.hasAttr(this.$source,"data-default-sort")?this.$source.attr("data-default-sort").split(":"):[this.$sortAttributesList.find("a:first").data("attr"),"asc"]},getViewModesForSource:function(){var t=[{mode:"table",title:Craft.t("app","Display in a table"),icon:"list"}];return this.$source&&Garnish.hasAttr(this.$source,"data-has-thumbs")&&t.push({mode:"thumbs",title:Craft.t("app","Display as thumbnails"),icon:"grid"}),t},doesSourceHaveViewMode:function(t){for(var e=0;e<this.sourceViewModes.length;e++)if(this.sourceViewModes[e].mode===t)return!0;return!1},selectViewMode:function(t,e){e||this.doesSourceHaveViewMode(t)||(t=this.sourceViewModes[0].mode),t!==this.viewMode&&(this.viewMode&&void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].removeClass("active"),this.viewMode=t,this.setSelecetedSourceState("mode",this.viewMode),void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].addClass("active"))},createView:function(t,e){return new(this.getViewClass(t))(this,this.$elements,e)},getViewClass:function(t){switch(t){case"table":return Craft.TableElementIndexView;case"thumbs":return Craft.ThumbsElementIndexView;default:throw'View mode "'+t+'" not supported.'}},rememberDisabledElementId:function(t){-1===$.inArray(t,this.settings.disabledElementIds)&&this.settings.disabledElementIds.push(t)},forgetDisabledElementId:function(t){var e=$.inArray(t,this.settings.disabledElementIds);-1!==e&&this.settings.disabledElementIds.splice(e,1)},enableElements:function(t){t.removeClass("disabled").parents(".disabled").removeClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.forgetDisabledElementId(i)}this.onEnableElements(t)},disableElements:function(t){t.removeClass("sel").addClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.rememberDisabledElementId(i)}this.onDisableElements(t)},getElementById:function(t){return this.view.getElementById(t)},enableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.enableElements(s):this.forgetDisabledElementId(i)}},disableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.disableElements(s):this.rememberDisabledElementId(i)}},selectElementAfterUpdate:function(t){null===this._autoSelectElements&&(this._autoSelectElements=[]),this._autoSelectElements.push(t)},addButton:function(t){this.getButtonContainer().append(t)},isShowingSidebar:function(){return null===this.showingSidebar&&(this.showingSidebar=this.$sidebar.length&&!this.$sidebar.hasClass("hidden")),this.showingSidebar},getButtonContainer:function(){if(this.settings.buttonContainer)return $(this.settings.buttonContainer);var t=$("#button-container");return t.length||(t=$('<div id="button-container"/>').appendTo(Craft.cp.$header)),t},setIndexBusy:function(){this.$mainSpinner.removeClass("invisible"),this.isIndexBusy=!0},setIndexAvailable:function(){this.$mainSpinner.addClass("invisible"),this.isIndexBusy=!1},createCustomizeSourcesModal:function(){var t=new Craft.CustomizeSourcesModal(this,{onHide:function(){t.destroy()}});return t},disable:function(){this.sourceSelect&&this.sourceSelect.disable(),this.view&&this.view.disable(),this.base()},enable:function(){this.sourceSelect&&this.sourceSelect.enable(),this.view&&this.view.enable(),this.base()},onAfterInit:function(){this.settings.onAfterInit(),this.trigger("afterInit")},onSelectSource:function(){this.settings.onSelectSource(this.sourceKey),this.trigger("selectSource",{sourceKey:this.sourceKey})},onSelectSite:function(){this.settings.onSelectSite(this.siteId),this.trigger("selectSite",{siteId:this.siteId})},onUpdateElements:function(){this.settings.onUpdateElements(),this.trigger("updateElements")},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},onEnableElements:function(t){this.settings.onEnableElements(t),this.trigger("enableElements",{elements:t})},onDisableElements:function(t){this.settings.onDisableElements(t),this.trigger("disableElements",{elements:t})},onAfterAction:function(t,e){this.settings.onAfterAction(t,e),this.trigger("afterAction",{action:t,params:e})},_handleSourceSelectionChange:function(){this.sourceSelect.totalSelected?this.selectSource(this.sourceSelect.$selectedItems)&&this.updateElements():this.sourceSelect.selectItem(this.$visibleSources.first())},_handleActionTriggerSubmit:function(t){t.preventDefault();var e=$(t.currentTarget);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action"),s=Garnish.getPostData(e);this.submitAction(i,s)}},_handleMenuActionTriggerSubmit:function(t){var e=$(t.option);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action");this.submitAction(i)}},_handleStatusChange:function(t){this.statusMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$statusMenuBtn.html(e.html()),this.trashed=!1,this.drafts=!1,this.status=null,Garnish.hasAttr(e,"data-trashed")?this.trashed=!0:Garnish.hasAttr(e,"data-drafts")?this.drafts=!0:this.status=e.data("status"),this._updateStructureSortOption(),this.updateElements()},_handleSiteChange:function(t){this.siteMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$siteMenuBtn.html(e.html()),this._setSite(e.data("site-id")),this.onSelectSite()},_setSite:function(t){var e,i;this.siteId=t,this.$visibleSources=$();for(var s=!1,n=0;n<this.$sources.length;n++)void 0===(i=this.$sources.eq(n)).data("sites")||-1!==i.data("sites").toString().split(",").indexOf(t.toString())?(i.parent().removeClass("hidden"),this.$visibleSources=this.$visibleSources.add(i),e||(e=i)):(i.parent().addClass("hidden"),this.$source&&this.$source.get(0)==i.get(0)&&(s=!0));s&&this.selectSource(e);var a,r=this.getSourceContainer().children(".heading");for(n=0;n<r.length;n++)0!==(a=r.eq(n)).nextUntil(".heading",":not(.hidden)").length?a.removeClass("hidden"):a.addClass("hidden");this.initialized&&(Craft.setLocalStorage("BaseElementIndex.siteId",t),this.updateElements())},_handleSortChange:function(t){var e=$(t.selectedOption);e.hasClass("disabled")||e.hasClass("sel")||(e.parent().parent().is(this.$sortAttributesList)?this.setSortAttribute(e.data("attr")):this.setSortDirection(e.data("dir")),this.storeSortAttributeAndDirection(),this.updateElements())},_handleSelectionChange:function(){this.updateActionTriggers(),this.onSelectionChange()},_handleSourceDblClick:function(t){this._toggleSource($(t.currentTarget)),t.stopPropagation()},_handleSourceToggleClick:function(t){this._toggleSource($(t.currentTarget).prev("a")),t.stopPropagation()},_updateStructureSortOption:function(){var t=this.getSortAttributeOption("structure");if(t.length)if(this.trashed||this.drafts||this.searching){if(t.addClass("disabled"),"structure"===this.getSelectedSortAttribute()){var e=this.$sortAttributesList.find("a:not(.disabled):first");this.setSortAttribute(e.data("attr")),this.setSortDirection("asc")}}else t.removeClass("disabled"),this.setStoredSortOptionsForSource()},_getSourcesInList:function(t){return t.children("li").children("a")},_getChildSources:function(t){var e=t.siblings("ul");return this._getSourcesInList(e)},_getSourceToggle:function(t){return t.siblings(".toggle")},_initSources:function(t){for(var e=0;e<t.length;e++)this.initSource($(t[e]))},_deinitSources:function(t){for(var e=0;e<t.length;e++)this.deinitSource($(t[e]))},_toggleSource:function(t){t.parent("li").hasClass("expanded")?this._collapseSource(t):this._expandSource(t)},_expandSource:function(t){t.parent("li").addClass("expanded");var e=this._getChildSources(t);this._initSources(e);var i=t.data("key");-1===this.instanceState.expandedSources.indexOf(i)&&(this.instanceState.expandedSources.push(i),this.storeInstanceState())},_collapseSource:function(t){t.parent("li").removeClass("expanded");var e=this._getChildSources(t);this._deinitSources(e);var i=this.instanceState.expandedSources.indexOf(t.data("key"));-1!==i&&(this.instanceState.expandedSources.splice(i,1),this.storeInstanceState())},_isViewPaginated:function(){return"index"===this.settings.context&&"structure"!==this.getSelectedSortAttribute()},_updateView:function(t,e){if(this.actions&&(this.hideActionTriggers(),this.actions=this.actionsHeadHtml=this.actionsFootHtml=this._$triggers=null),this.$selectAllContainer&&this.$selectAllContainer.detach(),this.$countContainer.html(""),!this._isViewPaginated()||e.count<=this.settings.batchSize)this.$countContainer.text(e.countLabel);else{var i=$('<div class="flex pagination"/>').appendTo(this.$countContainer),s=Math.max(Math.ceil(e.count/this.settings.batchSize),1),n=$("<div/>",{class:"page-link"+(1<this.page?"":" disabled"),"data-icon":"leftangle",title:Craft.t("app","Previous Page")}).appendTo(i),a=$("<div/>",{class:"page-link"+(this.page<s?"":" disabled"),"data-icon":"rightangle",title:Craft.t("app","Next Page")}).appendTo(i);$("<div/>",{class:"page-info",text:e.countLabel}).appendTo(i),1<this.page&&this.addListener(n,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page-1),this.updateElements(!0)}),this.page<s&&this.addListener(a,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page+1),this.updateElements(!0)})}e.actions&&e.actions.length&&(this.actions=e.actions,this.actionsHeadHtml=e.actionsHeadHtml,this.actionsFootHtml=e.actionsFootHtml,this.$selectAllContainer?(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false")):(this.$selectAllContainer=$('<div class="selectallcontainer"/>'),this.$selectAllBtn=$('<div class="btn"/>').appendTo(this.$selectAllContainer),this.$selectAllCheckbox=$('<div class="checkbox"/>').appendTo(this.$selectAllBtn),this.$selectAllBtn.attr({role:"checkbox",tabindex:"0","aria-checked":"false"}),this.addListener(this.$selectAllBtn,"click",function(){0===this.view.getSelectedElements().length?this.view.selectAllElements():this.view.deselectAllElements()}),this.addListener(this.$selectAllBtn,"keydown",function(t){t.keyCode===Garnish.SPACE_KEY&&(t.preventDefault(),$(t.currentTarget).trigger("click"))})),this.$selectAllContainer.prependTo(this.$toolbarFlexContainer)),this.$elements.html(e.html),Craft.appendHeadHtml(e.headHtml),Craft.appendFootHtml(e.footHtml);var r=this.actions||this.settings.selectable;if(this.view=this.createView(this.getSelectedViewMode(),{context:this.settings.context,batchSize:"index"!==this.settings.context||"structure"===this.getSelectedSortAttribute()?this.settings.batchSize:null,params:t,selectable:r,multiSelect:this.actions||this.settings.multiSelect,checkboxMode:!!this.actions,onSelectionChange:$.proxy(this,"_handleSelectionChange")}),this._autoSelectElements){if(r)for(var o=0;o<this._autoSelectElements.length;o++)this.view.selectElementById(this._autoSelectElements[o]);this._autoSelectElements=null}this.onUpdateElements()},_createTriggers:function(){var t,e,i=[],s=[],n=[];for(t=0;t<this.actions.length;t++){var a=this.actions[t];if(a.trigger){var r=$('<form id="'+Craft.formatInputId(a.type)+'-actiontrigger"/>').data("action",a.type).append(a.trigger);this.addListener(r,"submit","_handleActionTriggerSubmit"),i.push(r)}else a.destructive?n.push(a):s.push(a)}if(s.length||n.length){var o=$("<form/>");e=$('<div class="btn menubtn" data-icon="settings" title="'+Craft.t("app","Actions")+'"/>').appendTo(o);var l=$('<ul class="menu"/>').appendTo(o),h=this._createMenuTriggerList(s,!1),d=this._createMenuTriggerList(n,!0);h&&h.appendTo(l),h&&d&&$("<hr/>").appendTo(l),d&&d.appendTo(l),i.push(o)}for(this._$triggers=$(),t=0;t<i.length;t++){var c=$("<div/>").append(i[t]);this._$triggers=this._$triggers.add(c)}this._$triggers.insertAfter(this.$selectAllContainer),Craft.appendHeadHtml(this.actionsHeadHtml),Craft.appendFootHtml(this.actionsFootHtml),Craft.initUiElements(this._$triggers),e&&e.data("menubtn").on("optionSelect",$.proxy(this,"_handleMenuActionTriggerSubmit"))},_showExportHud:function(){this.$exportBtn.addClass("active");var t=$("<form/>",{class:"export-form"}),s=Craft.ui.createTextField({label:Craft.t("app","Limit"),placeholder:Craft.t("app","No limit"),type:"number",min:1}).appendTo(t);$("<input/>",{type:"submit",class:"btn submit fullwidth",value:Craft.t("app","Export")}).appendTo(t);var n=$("<div/>",{class:"spinner hidden"}).appendTo(t);new Garnish.HUD(this.$exportBtn,t).on("hide",$.proxy(function(){this.$exportBtn.removeClass("active")},this));var a=!1;this.addListener(t,"submit",function(t){if(t.preventDefault(),!a){a=!0,n.removeClass("hidden");var e=this.getViewParams();delete e.criteria.limit;var i=parseInt(s.find("input").val());i&&!isNaN(i)&&(e.criteria.limit=i),Craft.postActionRequest("element-indexes/create-export-token",e,$.proxy(function(t,e){if(a=!1,n.addClass("hidden"),"success"===e){var i={};i[Craft.tokenParam]=t.token;var s=Craft.getCpUrl("",i);document.location.href=s}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}})},_createMenuTriggerList:function(t,e){if(t&&t.length){for(var i=$("<ul/>"),s=0;s<t.length;s++){var n=t[s].type;$("<li/>").append($("<a/>",{id:Craft.formatInputId(n)+"-actiontrigger",class:e?"error":null,"data-action":n,text:t[s].name})).appendTo(i)}return i}}},{defaults:{context:"index",modal:null,storageKey:null,criteria:null,batchSize:50,disabledElementIds:[],selectable:!1,multiSelect:!1,buttonContainer:null,hideSidebar:!1,refreshSourcesAction:"element-indexes/get-source-tree-html",updateElementsAction:"element-indexes/get-elements",submitActionsAction:"element-indexes/perform-action",toolbarFixed:null,onAfterInit:$.noop,onSelectSource:$.noop,onSelectSite:$.noop,onUpdateElements:$.noop,onSelectionChange:$.noop,onEnableElements:$.noop,onDisableElements:$.noop,onAfterAction:$.noop}}),Craft.BaseElementIndexView=Garnish.Base.extend({$container:null,$loadingMoreSpinner:null,$elementContainer:null,$scroller:null,elementIndex:null,thumbLoader:null,elementSelect:null,loadingMore:!1,_totalVisible:null,_morePending:null,_handleEnableElements:null,_handleDisableElements:null,init:function(t,e,i){this.elementIndex=t,this.$container=$(e),this.setSettings(i,Craft.BaseElementIndexView.defaults),this.$loadingMoreSpinner=$('<div class="centeralign hidden"><div class="spinner loadingmore"></div></div>').insertAfter(this.$container),this.$elementContainer=this.getElementContainer();var s=this.$elementContainer.children();this.setTotalVisible(s.length),this.setMorePending(this.settings.batchSize&&s.length==this.settings.batchSize),this.thumbLoader=new Craft.ElementThumbLoader,this.thumbLoader.load(s),this.settings.selectable&&(this.elementSelect=new Garnish.Select(this.$elementContainer,s.filter(":not(.disabled)"),{multi:this.settings.multiSelect,vertical:this.isVerticalList(),handle:"index"===this.settings.context?".checkbox, .element:first":null,filter:":not(a):not(.toggle)",checkboxMode:this.settings.checkboxMode,onSelectionChange:$.proxy(this,"onSelectionChange")}),this._handleEnableElements=$.proxy(function(t){this.elementSelect.addItems(t.elements)},this),this._handleDisableElements=$.proxy(function(t){this.elementSelect.removeItems(t.elements)},this),this.elementIndex.on("enableElements",this._handleEnableElements),this.elementIndex.on("disableElements",this._handleDisableElements)),"index"===this.settings.context&&(this._handleElementEditing=$.proxy(function(t){var e=$(t.target);if("A"!==e.prop("nodeName")){var i;if(e.hasClass("element"))i=e;else if(!(i=e.closest(".element")).length)return;Garnish.hasAttr(i,"data-editable")&&this.createElementEditor(i)}},this),this.elementIndex.trashed||(this.addListener(this.$elementContainer,"dblclick",this._handleElementEditing),$.isTouchCapable()&&this.addListener(this.$elementContainer,"taphold",this._handleElementEditing))),this.afterInit(),this.settings.batchSize&&("index"===this.settings.context?this.$scroller=Garnish.$scrollContainer:this.$scroller=this.elementIndex.$main,this.$scroller.scrollTop(0),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore())},getElementContainer:function(){throw"Classes that extend Craft.BaseElementIndexView must supply a getElementContainer() method."},afterInit:function(){},getAllElements:function(){return this.$elementContainer.children()},getEnabledElements:function(){return this.$elementContainer.children(":not(.disabled)")},getElementById:function(t){var e=this.$elementContainer.children('[data-id="'+t+'"]:first');return e.length?e:null},getSelectedElements:function(){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.$selectedItems},getSelectedElementIds:function(){var t=this.getSelectedElements(),e=[];if(t)for(var i=0;i<t.length;i++)e.push(t.eq(i).data("id"));return e},selectElement:function(t){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.selectItem(t,!0),!0},selectElementById:function(t){if(!this.elementSelect)throw"This view is not selectable.";var e=this.getElementById(t);return!!e&&(this.elementSelect.selectItem(e,!0),!0)},selectAllElements:function(){this.elementSelect.selectAll()},deselectAllElements:function(){this.elementSelect.deselectAll()},isVerticalList:function(){return!1},getTotalVisible:function(){return this._totalVisible},setTotalVisible:function(t){this._totalVisible=t},getMorePending:function(){return this._morePending},setMorePending:function(t){this._morePending=t},maybeLoadMore:function(){this.canLoadMore()&&this.loadMore()},canLoadMore:function(){if(!this.getMorePending()||!this.settings.batchSize)return!1;if(this.$scroller[0]!==Garnish.$win[0])return this.$scroller.prop("scrollHeight")-this.$scroller.scrollTop()<=this.$scroller.outerHeight()+15;var t=Garnish.$win.innerHeight(),e=Garnish.$win.scrollTop();return this.$container.offset().top+this.$container.height()<=t+e},loadMore:function(){if(this.getMorePending()&&!this.loadingMore&&this.settings.batchSize){this.loadingMore=!0,this.$loadingMoreSpinner.removeClass("hidden"),this.removeListener(this.$scroller,"scroll");var t=this.getLoadMoreParams();Craft.postActionRequest(this.settings.loadMoreElementsAction,t,$.proxy(function(t,e){if(this.loadingMore=!1,this.$loadingMoreSpinner.addClass("hidden"),"success"===e){var i=$(t.html);this.appendElements(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),this.elementSelect&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.setTotalVisible(this.getTotalVisible()+i.length),this.setMorePending(i.length==this.settings.batchSize),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore()}},this))}},getLoadMoreParams:function(){var t=$.extend(!0,{},this.settings.params);return t.criteria.offset=this.getTotalVisible(),t},appendElements:function(t){t.appendTo(this.$elementContainer),this.thumbLoader.load(t),this.onAppendElements(t)},onAppendElements:function(t){this.settings.onAppendElements(t),this.trigger("appendElements",{newElements:t})},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},createElementEditor:function(t){Craft.createElementEditor(t.data("type"),t,{elementIndex:this.elementIndex})},disable:function(){this.elementSelect&&this.elementSelect.disable()},enable:function(){this.elementSelect&&this.elementSelect.enable()},destroy:function(){this.$loadingMoreSpinner.remove(),this.thumbLoader.destroy(),delete this.thumbLoader,this.elementSelect&&(this.elementIndex.off("enableElements",this._handleEnableElements),this.elementIndex.off("disableElements",this._handleDisableElements),this.elementSelect.destroy(),delete this.elementSelect),this.base()}},{defaults:{context:"index",batchSize:null,params:null,selectable:!1,multiSelect:!1,checkboxMode:!1,loadMoreElementsAction:"element-indexes/get-more-elements",onAppendElements:$.noop,onSelectionChange:$.noop}}),Craft.BaseElementSelectInput=Garnish.Base.extend({thumbLoader:null,elementSelect:null,elementSort:null,modal:null,elementEditor:null,$container:null,$elementsContainer:null,$elements:null,$addElementBtn:null,_initialized:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","elementType","sources","criteria","sourceElementId","limit","modalStorageKey","fieldId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.setSettings(t,Craft.BaseElementSelectInput.defaults),this.settings.modalStorageKey&&(this.modalStorageKey="BaseElementSelectInput."+this.settings.modalStorageKey),1==this.settings.limit&&(this.settings.sortable=!1),this.$container=this.getContainer(),this.$container.data("elementSelect",this),this.$elementsContainer=this.getElementsContainer(),this.$addElementBtn=this.getAddElementsBtn(),this.$addElementBtn&&1==this.settings.limit&&this.$addElementBtn.css("position","absolute").css("top",0).css(Craft.left,0),this.thumbLoader=new Craft.ElementThumbLoader,this.initElementSelect(),this.initElementSort(),this.resetElements(),this.$addElementBtn&&this.addListener(this.$addElementBtn,"activate","showModal"),this._initialized=!0},get totalSelected(){return this.$elements.length},getContainer:function(){return $("#"+this.settings.id)},getElementsContainer:function(){return this.$container.children(".elements")},getElements:function(){return this.$elementsContainer.children()},getAddElementsBtn:function(){return this.$container.children(".btn.add")},initElementSelect:function(){this.settings.selectable&&(this.elementSelect=new Garnish.Select({multi:this.settings.sortable,filter:":not(.delete)"}))},initElementSort:function(){this.settings.sortable&&(this.elementSort=new Garnish.DragSort({container:this.$elementsContainer,filter:this.settings.selectable?$.proxy(function(){return this.elementSort.$targetItem.hasClass("sel")?this.elementSelect.getSelectedItems():this.elementSort.$targetItem},this):null,ignoreHandleSelector:".delete",axis:this.getElementSortAxis(),collapseDraggees:!0,magnetStrength:4,helperLagBase:1.5,onSortChange:this.settings.selectable?$.proxy(function(){this.elementSelect.resetItemOrder()},this):null}))},getElementSortAxis:function(){return"list"===this.settings.viewMode?"y":null},canAddMoreElements:function(){return!this.settings.limit||this.$elements.length<this.settings.limit},updateAddElementsBtn:function(){this.canAddMoreElements()?this.enableAddElementsBtn():this.disableAddElementsBtn()},disableAddElementsBtn:function(){this.$addElementBtn&&!this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.addClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeOut",Craft.BaseElementSelectInput.ADD_FX_DURATION):this.$addElementBtn.hide()))},enableAddElementsBtn:function(){this.$addElementBtn&&this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.removeClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeIn",Craft.BaseElementSelectInput.REMOVE_FX_DURATION):this.$addElementBtn.show()))},resetElements:function(){null!==this.$elements?this.removeElements(this.$elements):this.$elements=$(),this.addElements(this.getElements())},addElements:function(t){this.thumbLoader.load(t),this.settings.selectable&&this.elementSelect.addItems(t),this.settings.sortable&&this.elementSort.addItems(t),this.settings.editable&&(this._handleShowElementEditor=$.proxy(function(t){var e=$(t.currentTarget);!Garnish.hasAttr(e,"data-editable")||e.hasClass("disabled")||e.hasClass("loading")||(this.elementEditor=this.createElementEditor(e))},this),this.addListener(t,"dblclick",this._handleShowElementEditor),$.isTouchCapable()&&this.addListener(t,"taphold",this._handleShowElementEditor)),t.find(".delete").on("click",$.proxy(function(t){this.removeElement($(t.currentTarget).closest(".element"))},this)),this.$elements=this.$elements.add(t),this.updateAddElementsBtn()},createElementEditor:function(t,e){return e||(e={}),e.prevalidate=this.settings.prevalidate,Craft.createElementEditor(this.settings.elementType,t,e)},removeElements:function(t){if(this.settings.selectable&&this.elementSelect.removeItems(t),this.modal){for(var e=[],i=0;i<t.length;i++){var s=t.eq(i).data("id");s&&e.push(s)}e.length&&this.modal.elementIndex.enableElementsById(e)}t.children("input").prop("disabled",!0),this.$elements=this.$elements.not(t),this.updateAddElementsBtn(),this.onRemoveElements()},removeElement:function(t){this.removeElements(t),this.animateElementAway(t,function(){t.remove()})},animateElementAway:function(t,e){t.css("z-index",0);var i={opacity:-1};i["margin-"+Craft.left]=-(t.outerWidth()+parseInt(t.css("margin-"+Craft.right))),"list"!==this.settings.viewMode&&0!==this.$elements.length||(i["margin-bottom"]=-(t.outerHeight()+parseInt(t.css("margin-bottom")))),t.velocity(i,Craft.BaseElementSelectInput.REMOVE_FX_DURATION,e)},showModal:function(){this.canAddMoreElements()&&(this.modal?this.modal.show():this.modal=this.createModal())},createModal:function(){return Craft.createElementSelectorModal(this.settings.elementType,this.getModalSettings())},getModalSettings:function(){return $.extend({closeOtherModals:!1,storageKey:this.modalStorageKey,sources:this.settings.sources,criteria:this.settings.criteria,multiSelect:1!=this.settings.limit,showSiteMenu:this.settings.showSiteMenu,disabledElementIds:this.getDisabledElementIds(),onSelect:$.proxy(this,"onModalSelect")},this.settings.modalSettings)},getSelectedElementIds:function(){for(var t=[],e=0;e<this.$elements.length;e++)t.push(this.$elements.eq(e).data("id"));return t},getDisabledElementIds:function(){var t=this.getSelectedElementIds();return this.settings.sourceElementId&&t.push(this.settings.sourceElementId),t},onModalSelect:function(t){if(this.settings.limit){var e=this.settings.limit-this.$elements.length;t.length>e&&(t=t.slice(0,e))}this.selectElements(t),this.updateDisabledElementsInModal()},selectElements:function(t){for(var e=0;e<t.length;e++){var i=t[e],s=this.createNewElement(i);this.appendElement(s),this.addElements(s),this.animateElementIntoPlace(i.$element,s)}this.onSelectElements(t)},createNewElement:function(t){var e=t.$element.clone();return Craft.setElementSize(e,"large"===this.settings.viewMode?"large":"small"),e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e},appendElement:function(t){t.appendTo(this.$elementsContainer)},animateElementIntoPlace:function(t,e){var i=t.offset(),s=e.offset(),n=e.clone().appendTo(Garnish.$bod);e.css("visibility","hidden"),n.css({position:"absolute",zIndex:1e4,top:i.top,left:i.left});var a={top:s.top,left:s.left};n.velocity(a,Craft.BaseElementSelectInput.ADD_FX_DURATION,function(){n.remove(),e.css("visibility","visible")})},updateDisabledElementsInModal:function(){this.modal.elementIndex&&this.modal.elementIndex.disableElementsById(this.getDisabledElementIds())},getElementById:function(t){for(var e=0;e<this.$elements.length;e++){var i=this.$elements.eq(e);if(i.data("id")==t)return i}},onSelectElements:function(t){this.trigger("selectElements",{elements:t}),this.settings.onSelectElements(t),window.draftEditor&&window.draftEditor.checkForm()},onRemoveElements:function(){this.trigger("removeElements"),this.settings.onRemoveElements()}},{ADD_FX_DURATION:200,REMOVE_FX_DURATION:200,defaults:{id:null,name:null,fieldId:null,elementType:null,sources:null,criteria:{},sourceElementId:null,viewMode:"list",limit:null,showSiteMenu:!1,modalStorageKey:null,modalSettings:{},onSelectElements:$.noop,onRemoveElements:$.noop,sortable:!0,selectable:!0,editable:!0,prevalidate:!1,editorSettings:{}}}),Craft.BaseElementSelectorModal=Garnish.Modal.extend({elementType:null,elementIndex:null,$body:null,$selectBtn:null,$sidebar:null,$sources:null,$sourceToggles:null,$main:null,$search:null,$elements:null,$tbody:null,$primaryButtons:null,$secondaryButtons:null,$cancelBtn:null,$footerSpinner:null,init:function(t,e){this.elementType=t,this.setSettings(e,Craft.BaseElementSelectorModal.defaults);var i=$('<div class="modal elementselectormodal"></div>').appendTo(Garnish.$bod),s=$('<div class="body"><div class="spinner big"></div></div>').appendTo(i),n=$('<div class="footer"/>').appendTo(i);this.base(i,this.settings),this.$footerSpinner=$('<div class="spinner hidden"/>').appendTo(n),this.$primaryButtons=$('<div class="buttons right"/>').appendTo(n),this.$secondaryButtons=$('<div class="buttons left secondary-buttons"/>').appendTo(n),this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$primaryButtons),this.$selectBtn=$('<div class="btn disabled submit">'+Craft.t("app","Select")+"</div>").appendTo(this.$primaryButtons),this.$body=s,this.addListener(this.$cancelBtn,"activate","cancel"),this.addListener(this.$selectBtn,"activate","selectElements")},onFadeIn:function(){this.elementIndex?Garnish.isMobileBrowser(!0)||this.elementIndex.$search.trigger("focus"):this._createElementIndex(),this.base()},onSelectionChange:function(){this.updateSelectBtnState()},updateSelectBtnState:function(){this.$selectBtn&&(this.elementIndex.getSelectedElements().length?this.enableSelectBtn():this.disableSelectBtn())},enableSelectBtn:function(){this.$selectBtn.removeClass("disabled")},disableSelectBtn:function(){this.$selectBtn.addClass("disabled")},enableCancelBtn:function(){this.$cancelBtn.removeClass("disabled")},disableCancelBtn:function(){this.$cancelBtn.addClass("disabled")},showFooterSpinner:function(){this.$footerSpinner.removeClass("hidden")},hideFooterSpinner:function(){this.$footerSpinner.addClass("hidden")},cancel:function(){this.$cancelBtn.hasClass("disabled")||this.hide()},selectElements:function(){if(this.elementIndex&&this.elementIndex.getSelectedElements().length){this.elementIndex.view.elementSelect.clearMouseUpTimeout();var t=this.elementIndex.getSelectedElements(),e=this.getElementInfo(t);this.onSelect(e),this.settings.disableElementsOnSelect&&this.elementIndex.disableElements(this.elementIndex.getSelectedElements()),this.settings.hideOnSelect&&this.hide()}},getElementInfo:function(t){for(var e=[],i=0;i<t.length;i++){var s=$(t[i]),n=Craft.getElementInfo(s);e.push(n)}return e},show:function(){this.updateSelectBtnState(),this.base()},onSelect:function(t){this.settings.onSelect(t)},disable:function(){this.elementIndex&&this.elementIndex.disable(),this.base()},enable:function(){this.elementIndex&&this.elementIndex.enable(),this.base()},_createElementIndex:function(){var t={context:"modal",elementType:this.elementType,sources:this.settings.sources};null!==this.settings.showSiteMenu&&"auto"!==this.settings.showSiteMenu&&(t.showSiteMenu=this.settings.showSiteMenu?"1":"0"),Craft.postActionRequest("elements/get-modal-body",t,$.proxy(function(t,e){"success"===e&&(this.$body.html(t.html),this.$body.has(".sidebar:not(.hidden)").length&&this.$body.addClass("has-sidebar"),this.elementIndex=Craft.createElementIndex(this.elementType,this.$body,{context:"modal",modal:this,storageKey:this.settings.storageKey,criteria:this.settings.criteria,disabledElementIds:this.settings.disabledElementIds,selectable:!0,multiSelect:this.settings.multiSelect,buttonContainer:this.$secondaryButtons,onSelectionChange:$.proxy(this,"onSelectionChange"),hideSidebar:this.settings.hideSidebar}),this.addListener(this.elementIndex.$elements,"doubletap",function(t,e){e.firstTap.target===e.secondTap.target&&this.selectElements()}))},this))}},{defaults:{resizable:!0,storageKey:null,sources:null,criteria:null,multiSelect:!1,showSiteMenu:null,disabledElementIds:[],disableElementsOnSelect:!1,hideOnSelect:!0,onCancel:$.noop,onSelect:$.noop,hideIndexSidebar:!1}}),Craft.BaseInputGenerator=Garnish.Base.extend({$source:null,$target:null,$form:null,settings:null,listening:null,timeout:null,init:function(t,e,i){this.$source=$(t),this.$target=$(e),this.$form=this.$source.closest("form"),this.setSettings(i),this.startListening()},setNewSource:function(t){var e=this.listening;this.stopListening(),this.$source=$(t),e&&this.startListening()},startListening:function(){this.listening||(this.listening=!0,this.addListener(this.$source,"textchange","onSourceTextChange"),this.addListener(this.$target,"textchange","onTargetTextChange"),this.addListener(this.$form,"submit","onFormSubmit"))},stopListening:function(){this.listening&&(this.listening=!1,this.timeout&&clearTimeout(this.timeout),this.removeAllListeners(this.$source),this.removeAllListeners(this.$target),this.removeAllListeners(this.$form))},onSourceTextChange:function(){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout($.proxy(this,"updateTarget"),250)},onTargetTextChange:function(){this.$target.get(0)===document.activeElement&&this.stopListening()},onFormSubmit:function(){this.timeout&&clearTimeout(this.timeout),this.updateTarget()},updateTarget:function(){var t=this.$source.val();if(void 0!==t){var e=this.generateTargetValue(t);this.$target.val(e),this.$target.trigger("change"),this.$target.is(":focus")&&Craft.selectFullValue(this.$target)}},generateTargetValue:function(t){return t}}),Craft.AdminTable=Garnish.Base.extend({settings:null,totalItems:null,sorter:null,$noItems:null,$table:null,$tbody:null,$deleteBtns:null,init:function(t){this.setSettings(t,Craft.AdminTable.defaults),this.settings.allowDeleteAll||(this.settings.minItems=1),this.$noItems=$(this.settings.noItemsSelector),this.$table=$(this.settings.tableSelector),this.$tbody=this.$table.children("tbody"),this.totalItems=this.$tbody.children().length,this.settings.sortable&&(this.sorter=new Craft.DataTableSorter(this.$table,{onSortChange:$.proxy(this,"reorderItems")})),this.$deleteBtns=this.$table.find(".delete:not(.disabled)"),this.addListener(this.$deleteBtns,"click","handleDeleteBtnClick"),this.updateUI()},addRow:function(t){if(!(this.settings.maxItems&&this.totalItems>=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){if(this.settings.sortable){for(var i=[],t=0;t<this.sorter.$items.length;t++){var e=$(this.sorter.$items[t]).attr(this.settings.idAttribute);i.push(e)}var s={ids:JSON.stringify(i)};Craft.postActionRequest(this.settings.reorderAction,s,$.proxy(function(t,e){"success"===e&&(t.success?(this.onReorderItems(i),Craft.cp.displayNotice(Craft.t("app",this.settings.reorderSuccessMessage))):Craft.cp.displayError(Craft.t("app",this.settings.reorderFailMessage)))},this))}},handleDeleteBtnClick:function(t){if(!(this.settings.minItems&&this.totalItems<=this.settings.minItems)){var e=$(t.target).closest("tr");this.confirmDeleteItem(e)&&this.deleteItem(e)}},confirmDeleteItem:function(t){var e=this.getItemName(t);return confirm(Craft.t("app",this.settings.confirmDeleteMessage,{name:e}))},deleteItem:function(i){var t={id:this.getItemId(i)};Craft.postActionRequest(this.settings.deleteAction,t,$.proxy(function(t,e){"success"===e&&this.handleDeleteItemResponse(t,i)},this))},handleDeleteItemResponse:function(t,e){var i=this.getItemId(e),s=this.getItemName(e);t.success?(this.sorter&&this.sorter.removeItems(e),e.remove(),this.totalItems--,this.updateUI(),this.onDeleteItem(i),Craft.cp.displayNotice(Craft.t("app",this.settings.deleteSuccessMessage,{name:Craft.escapeHtml(s)}))):Craft.cp.displayError(Craft.t("app",this.settings.deleteFailMessage,{name:Craft.escapeHtml(s)}))},onReorderItems:function(t){this.settings.onReorderItems(t)},onDeleteItem:function(t){this.settings.onDeleteItem(t)},getItemId:function(t){return t.attr(this.settings.idAttribute)},getItemName:function(t){return t.attr(this.settings.nameAttribute)},updateUI:function(){if(0===this.totalItems?(this.$table.hide(),this.$noItems.removeClass("hidden")):(this.$table.show(),this.$noItems.addClass("hidden")),this.settings.sortable){var t=this.$table.find(".move");1===this.totalItems?t.addClass("disabled"):t.removeClass("disabled")}this.settings.minItems&&this.totalItems<=this.settings.minItems?this.$deleteBtns.addClass("disabled"):this.$deleteBtns.removeClass("disabled"),this.settings.newItemBtnSelector&&(this.settings.maxItems&&this.totalItems>=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}}),Craft.AssetEditor=Craft.BaseElementEditor.extend({reloadIndex:!1,updateForm:function(t){if(this.base(t),this.$element.data("id")){var e=this.$fieldsContainer.find("> .meta > .image-preview-container.editable");e.length&&this.addListener(e,"click","showImageEditor")}},showImageEditor:function(){new Craft.AssetImageEditor(this.$element.data("id"),{onSave:function(){this.reloadIndex=!0,this.reloadForm()}.bind(this),allowDegreeFractions:Craft.isImagick})},onHideHud:function(){this.reloadIndex&&this.settings.elementIndex&&this.settings.elementIndex.updateElements(),this.base()}}),Craft.registerElementEditorClass("craft\\elements\\Asset",Craft.AssetEditor),Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinnerCanvas:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,croppingConstraint:!1,spinnerInterval:null,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,renderImage:null,renderCropper:null,init:function(t,e){this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('<form class="modal fitted imageeditor"></form>').appendTo(Garnish.$bod),this.$body=$('<div class="body"></div>').appendTo(this.$container),this.$footer=$('<div class="footer"/>').appendTo(this.$container),this.base(this.$container,this.settings),this.$buttons=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn cancel">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$buttons),this.$replaceBtn=$('<div class="btn submit save replace">'+Craft.t("app","Save")+"</div>").appendTo(this.$buttons),this.settings.allowSavingAsNew&&(this.$saveBtn=$('<div class="btn submit save copy">'+Craft.t("app","Save as a new asset")+"</div>").appendTo(this.$buttons),this.addListener(this.$saveBtn,"activate",this.saveImage.bind(this))),this.addListener(this.$replaceBtn,"activate",this.saveImage.bind(this)),this.addListener(this.$cancelBtn,"activate",$.proxy(this,"hide")),this.removeListener(this.$shade,"click"),this.maxImageSize=this.getMaxImageSize(),Craft.postActionRequest("assets/image-editor",{assetId:t},$.proxy(this,"loadEditor"))},getMaxImageSize:function(){var t=Garnish.$doc.get(0).documentElement.clientWidth,e=Garnish.$doc.get(0).documentElement.clientHeight;return Math.max(e,t)*(1<window.devicePixelRatio?2:1)},loadEditor:function(r){r.html||alert(Craft.t("app","Could not load the image editor.")),this.$body.html(r.html),this.$tabs=$(".tabs li",this.$body),this.$viewsContainer=$(".views",this.$body),this.$views=$("> div",this.$viewsContainer),this.$imageTools=$(".image-container .image-tools",this.$body),this.$editorContainer=$(".image-container .image",this.$body),this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this._showSpinner(),this.updateSizeAndPosition(),this.canvas=new fabric.StaticCanvas("image-canvas"),this.$croppingCanvas=$("#cropping-canvas",this.$editorContainer),this.$croppingCanvas.width(this.editorWidth),this.$croppingCanvas.height(this.editorHeight),this.canvas.enableRetinaScaling=!0,this.renderImage=function(){Garnish.requestAnimationFrame(this.canvas.renderAll.bind(this.canvas))}.bind(this);var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});fabric.Image.fromURL(t,$.proxy(function(t){this.image=t,this.image.set({originX:"center",originY:"center",left:this.editorWidth/2,top:this.editorHeight/2}),this.canvas.add(this.image),this.originalHeight=this.image.getHeight(),this.originalWidth=this.image.getWidth(),this.zoomRatio=1,this.lastLoadedDimensions=this.getScaledImageDimensions(),this._setFittedImageVerticeCoordinates(),this._repositionEditorElements();var e={imageDimensions:this.getScaledImageDimensions(),offsetX:0,offsetY:0},i=!1;if(r.focalPoint){var s=r.focalPoint,n=e.imageDimensions.width*s.x,a=e.imageDimensions.height*s.y;e.offsetX=n-e.imageDimensions.width/2,e.offsetY=a-e.imageDimensions.height/2,i=!0}this.storeFocalPointState(e),i&&this._createFocalPoint(),this._createViewport(),this.storeCropperState(),this._addControlListeners(),this.addListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.addListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.addListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.addListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this._hideSpinner(),this.renderImage(),this.$tabs.first().trigger("click")},this))},_reloadImage:function(){if(!this.imageIsLoading){this.imageIsLoading=!0,this.maxImageSize=this.getMaxImageSize();var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});this.image.setSrc(t,function(t){this.originalHeight=t.getHeight(),this.originalWidth=t.getWidth(),this.lastLoadedDimensions={width:this.originalHeight,height:this.originalWidth},this.updateSizeAndPosition(),this.renderImage(),this.imageIsLoading=!1}.bind(this))}},updateSizeAndPosition:function(){if(this.$container){var t=window.innerWidth,e=window.innerHeight;this.$container.css({width:t,"min-width":t,left:0,height:e,"min-height":e,top:0}),this.$body.css({height:e-58}),t<e?this.$container.addClass("vertical"):this.$container.removeClass("vertical"),this.$spinnerCanvas&&this.$spinnerCanvas.css({left:this.$spinnerCanvas.parent().width()/2-this.$spinnerCanvas.width()/2+"px",top:this.$spinnerCanvas.parent().height()/2-this.$spinnerCanvas.height()/2+"px"}),this.$editorContainer&&this.image&&this._repositionEditorElements()}},_repositionEditorElements:function(){var t={width:this.editorWidth,height:this.editorHeight};this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this.canvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var e=this.getScaledImageDimensions();if("crop"===this.currentView){this.zoomRatio=this.getZoomToFitRatio(this.getScaledImageDimensions());var i=this._getBoundingRectangle(this.imageVerticeCoords);this._setFittedImageVerticeCoordinates(),this._repositionCropper(i)}else this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor;this._repositionImage(t),this._repositionViewport(),this._repositionFocalPoint(t),this._zoomImage(),this.renderImage(),(1.5<e.width/this.lastLoadedDimensions.width||1.5<e.height/this.lastLoadedDimensions.height)&&this._reloadImage()},_repositionImage:function(t){this.image.set({left:this.image.left-(t.width-this.editorWidth)/2,top:this.image.top-(t.height-this.editorHeight)/2})},_createViewport:function(){this.viewport=new fabric.Rect({width:this.image.width,height:this.image.height,fill:"rgba(127,0,0,1)",originX:"center",originY:"center",globalCompositeOperation:"destination-in",left:this.image.left,top:this.image.top}),this.canvas.add(this.viewport),this.renderImage()},_createFocalPoint:function(){var t=this.focalPointState,e=this.getScaledImageDimensions().width/t.imageDimensions.width,i=t.offsetX*e*this.zoomRatio*this.scaleFactor,s=t.offsetY*e*this.zoomRatio*this.scaleFactor;i+=this.image.left,s+=this.image.top;var n=0,a=0;this.viewport&&0===t.offsetX&&0===t.offsetY&&(a="crop"!==this.currentView?(n=this.viewport.left-this.image.left,this.viewport.top-this.image.top):(n=this.clipper.left-this.image.left,this.clipper.top-this.image.top),i+=n,s+=a,t.offsetX+=n/(e*this.zoomRatio*this.scaleFactor),t.offsetY+=a/(e*this.zoomRatio*this.scaleFactor)),this.focalPoint=new fabric.Group([new fabric.Circle({radius:8,fill:"rgba(0,0,0,0.5)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"}),new fabric.Circle({radius:1,fill:"rgba(255,255,255,0)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"})],{originX:"center",originY:"center",left:i,top:s}),this.storeFocalPointState(t),this.canvas.add(this.focalPoint)},toggleFocalPoint:function(){this.focalPoint?(this.canvas.remove(this.focalPoint),this.focalPoint=null):this._createFocalPoint(),this.renderImage()},_repositionViewport:function(){if(this.viewport){var t={left:this.editorWidth/2,top:this.editorHeight/2};if("crop"===this.currentView)t.width=this.editorWidth,t.height=this.editorHeight;else if(this.cropperState){var e=this.cropperState,i=this.getScaledImageDimensions().width/e.imageDimensions.width;t.width=e.width*i*this.zoomRatio,t.height=e.height*i*this.zoomRatio,this.image.set({left:this.editorWidth/2-e.offsetX*i,top:this.editorHeight/2-e.offsetY*i})}else $.extend(t,this.getScaledImageDimensions());this.viewport.set(t)}},_repositionFocalPoint:function(t){if(this.focalPoint){var e=this.focalPoint.left-this.editorWidth/2,i=this.focalPoint.top-this.editorHeight/2,s=this.image.width,n=this.getScaledImageDimensions().width*this.zoomRatio/s/this.scaleFactor;e-=(t.width-this.editorWidth)/2,i-=(t.height-this.editorHeight)/2,e*=n,i*=n,this.focalPoint.set({left:this.editorWidth/2+e,top:this.editorHeight/2+i})}},hasOrientationChanged:function(){return this.viewportRotation%180!=0},getScaledImageDimensions:function(){var t=this.originalHeight/this.originalWidth,e={};return this.editorHeight/this.editorWidth<t?(e.height=Math.min(this.editorHeight,this.originalHeight),e.width=Math.round(this.originalWidth/(this.originalHeight/e.height))):(e.width=Math.min(this.editorWidth,this.originalWidth),e.height=Math.round(this.originalHeight*(e.width/this.originalWidth))),e},_zoomImage:function(){var t=this.getScaledImageDimensions();this.image.set({width:t.width*this.zoomRatio,height:t.height*this.zoomRatio})},_addControlListeners:function(){this.addListener(this.$tabs,"click","_handleTabClick"),this.addListener($(".focal-point"),"click",function(t){this.toggleFocalPoint(t)}.bind(this)),this.addListener($(".rotate-left"),"click",function(){this.rotateImage(-90)}.bind(this)),this.addListener($(".rotate-right"),"click",function(){this.rotateImage(90)}.bind(this)),this.addListener($(".flip-vertical"),"click",function(){this.flipImage("y")}.bind(this)),this.addListener($(".flip-horizontal"),"click",function(){this.flipImage("x")}.bind(this)),this.straighteningInput=new Craft.SlideRuleInput("slide-rule",{onStart:function(){this._showGrid()}.bind(this),onChange:function(t){this.straighten(t)}.bind(this),onEnd:function(){this._hideGrid(),this._cleanupFocalPointAfterStraighten()}.bind(this)}),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!0)}.bind(this)),this.addListener(Garnish.$doc,"keyup",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!1)}.bind(this)),new Garnish.MenuBtn($(".crop .menubtn",this.$container),{onOptionSelect:function(t){$(".constraint",this.$container).html($(t).html()),this.setCroppingConstraint($(t).data("constraint")),this.enforceCroppingConstraint()}.bind(this)}).menu.$container.addClass("dark")},_handleTabClick:function(t){if(!this.animationInProgress){var e=$(t.currentTarget),i=e.data("view");this.$tabs.removeClass("selected"),e.addClass("selected"),this.showView(i)}},showView:function(t){this.currentView!==t&&(this.$views.addClass("hidden"),this.$views.filter('[data-view="'+t+'"]').removeClass("hidden"),"rotate"===t?this.enableSlider():this.disableSlider(),this.updateSizeAndPosition(),"crop"===this.currentView&&"crop"!==t?this.disableCropMode():"crop"!==this.currentView&&"crop"===t&&this.enableCropMode(),this.currentView=t)},storeCropperState:function(t){if(t)this.cropperState=t;else if(this.clipper){var e=1/this.zoomRatio;this.cropperState={offsetX:(this.clipper.left-this.image.left)*e,offsetY:(this.clipper.top-this.image.top)*e,height:this.clipper.height*e,width:this.clipper.width*e,imageDimensions:this.getScaledImageDimensions()}}else{var i=this.getScaledImageDimensions();this.cropperState={offsetX:0,offsetY:0,height:i.height,width:i.width,imageDimensions:i}}},storeFocalPointState:function(t){if(t)this.focalPointState=t;else if(this.focalPoint){var e=1/this.zoomRatio;this.focalPointState={offsetX:(this.focalPoint.left-this.image.left)*e/this.scaleFactor,offsetY:(this.focalPoint.top-this.image.top)*e/this.scaleFactor,imageDimensions:this.getScaledImageDimensions()}}},rotateImage:function(e){if(!this.animationInProgress){if(90!==e&&-90!==e)return!1;this.animationInProgress=!0,this.viewportRotation+=e,this.viewportRotation=parseInt((this.viewportRotation+360)%360,10);var t,i=this.image.angle+e,s=this.getScaledImageDimensions();t=this.hasOrientationChanged()?this.getZoomToCoverRatio({height:s.width,width:s.height}):this.getZoomToCoverRatio(s),this.zoomRatio>t&&(t=this.zoomRatio);var n={angle:90===e?"+=90":"-=90"},a={angle:i,width:s.width*t,height:s.height*t},r=1;this.scaleFactor<1?(r=1/this.scaleFactor,this.scaleFactor=1):(this.viewport.width>this.editorHeight?r=this.editorHeight/this.viewport.width:this.viewport.height>this.editorWidth&&(r=this.editorWidth/this.viewport.height),this.scaleFactor=r),r<1&&(a.width*=r,a.height*=r);var o=this.cropperState,l=o.offsetX,h=o.offsetY,d=e*(Math.PI/180),c=l*Math.cos(d)-h*Math.sin(d),u=l*Math.sin(d)+h*Math.cos(d),p=s.width/o.imageDimensions.width,g=c*p*this.zoomRatio*this.scaleFactor,f=u*p*this.zoomRatio*this.scaleFactor;a.left=this.editorWidth/2-g,a.top=this.editorHeight/2-f,o.offsetX=c,o.offsetY=u;var m=o.width;o.width=o.height,o.height=m,this.storeCropperState(o),this.focalPoint&&this.canvas.remove(this.focalPoint),this.viewport.animate(n,{duration:this.settings.animationDuration,onComplete:function(){var t=this.viewport.height*r;this.viewport.height=this.viewport.width*r,this.viewport.width=t,this.viewport.set({angle:0})}.bind(this)}),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){var t=parseFloat((this.image.angle+360)%360);this.image.set({angle:t}),this.animationInProgress=!1,this.focalPoint?(this._adjustFocalPointByAngle(e),this.straighten(this.straighteningInput),this.canvas.add(this.focalPoint)):this._resetFocalPointPosition()}.bind(this)})}},flipImage:function(t){if(!this.animationInProgress){this.animationInProgress=!0,this.hasOrientationChanged()&&(t="y"===t?"x":"y"),this.focalPoint?this.canvas.remove(this.focalPoint):this._resetFocalPointPosition();var e=this.editorWidth/2,i=this.editorHeight/2;this.straighteningInput.setValue(-this.imageStraightenAngle),this.imageStraightenAngle=-this.imageStraightenAngle;var s,n,a={angle:this.viewportRotation+this.imageStraightenAngle},r=this.cropperState,o=this.focalPointState;"y"===t&&this.hasOrientationChanged()||"y"!==t&&!this.hasOrientationChanged()?(r.offsetX=-r.offsetX,o.offsetX=-o.offsetX,n=this.image.left-e,a.left=e-n):(r.offsetY=-r.offsetY,o.offsetY=-o.offsetY,s=this.image.top-i,a.top=i-s),"y"===t?(a.scaleY=-1*this.image.scaleY,this.flipData.y=1-this.flipData.y):(a.scaleX=-1*this.image.scaleX,this.flipData.x=1-this.flipData.x),this.storeCropperState(r),this.storeFocalPointState(o),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){this.animationInProgress=!1,this.focalPoint&&(this._adjustFocalPointByAngle(0),this.canvas.add(this.focalPoint))}.bind(this)})}},straighten:function(t){if(!this.animationInProgress){this.animationInProgress=!0;var e=this.image.angle;this.imageStraightenAngle=(this.settings.allowDegreeFractions?parseFloat(t.value):Math.round(parseFloat(t.value)))%360,this.image.set({angle:this.viewportRotation+this.imageStraightenAngle}),this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,this._zoomImage(),this.cropperState&&this._adjustEditorElementsOnStraighten(e),this.renderImage(),this.animationInProgress=!1}},_adjustEditorElementsOnStraighten:function(t){var e,i,s,n,a,r=this.getScaledImageDimensions(),o=this.image.angle-t,l=this.cropperState,h=this.zoomRatio,d=1;do{var c=l.offsetX,u=l.offsetY,p=o*(Math.PI/180);s=c*Math.cos(p)-u*Math.sin(p),n=c*Math.sin(p)+u*Math.cos(p),e=s*h*(a=r.width/l.imageDimensions.width),i=n*h*a;var g=this.getImageVerticeCoords(h),f={width:this.viewport.width,height:this.viewport.height,left:this.editorWidth/2-this.viewport.width/2+e,top:this.editorHeight/2-this.viewport.height/2+i};h*=d=this._getZoomRatioToFitRectangle(f,g)}while(1!==d);this.image.set({left:this.editorWidth/2-e,top:this.editorHeight/2-i}),l.offsetX=s,l.offsetY=n,l.width=this.viewport.width/h/a,l.height=this.viewport.height/h/a,this.storeCropperState(l),this.zoomRatio=h,this.focalPoint?(this._adjustFocalPointByAngle(o),this._isCenterInside(this.focalPoint,this.viewport)?this.focalPoint.set({opacity:1}):this.focalPoint.set({opacity:0})):0!=o&&this._resetFocalPointPosition(),this._zoomImage()},_cleanupFocalPointAfterStraighten:function(){if(this.focalPoint&&!this._isCenterInside(this.focalPoint,this.viewport)){this.focalPoint.set({opacity:1});var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t),this.toggleFocalPoint()}},_resetFocalPointPosition:function(){var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t)},_isCenterInside:function(t,e){return t.left>e.left-e.width/2&&t.top>e.top-e.height/2&&t.left<e.left+e.width/2&&t.top<e.top+e.height/2},_adjustFocalPointByAngle:function(t){var e=t*(Math.PI/180),i=this.focalPointState,s=i.offsetX,n=i.offsetY,a=s*Math.cos(e)-n*Math.sin(e),r=s*Math.sin(e)+n*Math.cos(e),o=this.getScaledImageDimensions().width/i.imageDimensions.width,l=a*o*this.zoomRatio,h=r*o*this.zoomRatio;this.focalPoint.left=this.image.left+l,this.focalPoint.top=this.image.top+h,i.offsetX=a,i.offsetY=r,this.storeFocalPointState(i)},_getZoomRatioToFitRectangle:function(t,e){for(var i,s,n=this._getRectangleVertices(t),a=0;a<n.length&&(i=n[a],this.arePointsInsideRectangle([i],e));a++)i=!1;if(i){var r=this._getEdgeCrossed(e,i),o=t.left+t.width/2,l=t.top+t.height/2,h=Math.abs((r[1].y-r[0].y)*i.x-(r[1].x-r[0].x)*i.y+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2)),d=Math.abs((r[1].y-r[0].y)*o-(r[1].x-r[0].x)*l+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2));s=(h+d)/d}else s=1;return s},saveImage:function(t){var e=$(t.currentTarget);if(e.hasClass("disabled"))return!1;$(".btn",this.$buttons).addClass("disabled"),this.$buttons.append('<div class="spinner"></div>');var i={assetId:this.assetId,viewportRotation:this.viewportRotation,imageRotation:this.imageStraightenAngle,replace:e.hasClass("replace")?1:0};if(this.cropperState){var s={};s.height=this.cropperState.height,s.width=this.cropperState.width,s.offsetX=this.cropperState.offsetX,s.offsetY=this.cropperState.offsetY,i.imageDimensions=this.cropperState.imageDimensions,i.cropData=s}else i.imageDimensions=this.getScaledImageDimensions();this.focalPoint&&(i.focalPoint=this.focalPointState),i.flipData=this.flipData,i.zoom=this.zoomRatio,Craft.postActionRequest("assets/save-image",i,function(t){this.$buttons.find(".btn").removeClass("disabled").end().find(".spinner").remove(),t.error?alert(t.error):(this.onSave(),this.hide(),Craft.cp.runQueue())}.bind(this))},getZoomToCoverRatio:function(t){var e=Math.abs(this.imageStraightenAngle)*(Math.PI/180),i=Math.sin(e)*t.height+Math.cos(e)*t.width,s=Math.sin(e)*t.width+Math.cos(e)*t.height;return Math.max(i/t.width,s/t.height)},getZoomToFitRatio:function(t){var e=this._getImageBoundingBox(t),i=1;if(e.height>this.editorHeight||e.width>this.editorWidth){var s=this.editorHeight/e.height,n=this.editorWidth/e.width;i=Math.min(n,s)}return i},getCombinedZoomRatio:function(t){return this.getZoomToCoverRatio(t)/this.getZoomToFitRatio(t)},_showGrid:function(){if(!this.grid){var t,e={strokeWidth:1,stroke:"rgba(255,255,255,0.5)"},i=this.viewport.width,s=this.viewport.height,n=i/9,a=s/9,r=[new fabric.Rect({strokeWidth:2,stroke:"rgba(255,255,255,1)",originX:"center",originY:"center",width:i,height:s,left:i/2,top:s/2,fill:"rgba(255,255,255,0)"})];for(t=1;t<=8;t++)r.push(new fabric.Line([t*n,0,t*n,s],e));for(t=1;t<=8;t++)r.push(new fabric.Line([0,t*a,i,t*a],e));this.grid=new fabric.Group(r,{left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",angle:this.viewport.angle}),this.canvas.add(this.grid),this.renderImage()}},_hideGrid:function(){this.canvas.remove(this.grid),this.grid=null,this.renderImage()},onFadeOut:function(){this.removeListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.removeListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.removeListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.removeListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this.destroy()},show:function(){this.base(),$("html").addClass("noscroll")},hide:function(){this.removeAllListeners(),this.straighteningInput.removeAllListeners(),$("html").removeClass("noscroll"),this.base()},onSave:function(){this.settings.onSave(),this.trigger("save")},enableSlider:function(){this.$imageTools.removeClass("hidden")},disableSlider:function(){this.$imageTools.addClass("hidden")},enableCropMode:function(){var t=this.getScaledImageDimensions();this.zoomRatio=this.getZoomToFitRatio(t);var e={width:this.editorWidth,height:this.editorHeight},i={width:t.width*this.zoomRatio,height:t.height*this.zoomRatio,left:this.editorWidth/2,top:this.editorHeight/2},s=function(){this._setFittedImageVerticeCoordinates();var t=this.cropperState,e=this.getScaledImageDimensions(),i=e.width/t.imageDimensions.width,s={left:this.image.left+t.offsetX*i*this.zoomRatio,top:this.image.top+t.offsetY*i*this.zoomRatio,width:t.width*i*this.zoomRatio,height:t.height*i*this.zoomRatio};this._showCropper(s),this.focalPoint&&(i=e.width/this.focalPointState.imageDimensions.width,this.focalPoint.left=this.image.left+this.focalPointState.offsetX*i*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*i*this.zoomRatio,this.canvas.add(this.focalPoint))}.bind(this);this._editorModeTransition(s,i,e)},disableCropMode:function(){var t={},e={left:this.editorWidth/2,top:this.editorHeight/2};this._hideCropper();var i=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,s=i/this.zoomRatio;this.zoomRatio=i;var n=(this.clipper.left-this.image.left)*s,a=(this.clipper.top-this.image.top)*s;e.left=this.editorWidth/2-n,e.top=this.editorHeight/2-a,t.height=this.clipper.height*s,t.width=this.clipper.width*s,this.focalPoint&&(!this.focalPoint||this._isCenterInside(this.focalPoint,this.clipper))||(this.focalPoint&&this.toggleFocalPoint(),this._resetFocalPointPosition());var r=function(){if(this.focalPoint){var t=this.getScaledImageDimensions().width/this.focalPointState.imageDimensions.width;this.focalPoint.left=this.image.left+this.focalPointState.offsetX*t*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*t*this.zoomRatio,this.canvas.add(this.focalPoint)}}.bind(this);this._editorModeTransition(r,e,t)},_editorModeTransition:function(t,e,i){this.animationInProgress||(this.animationInProgress=!0,this.focalPoint&&(this.canvas.remove(this.focalPoint),this.renderImage()),this.image.animate(e,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){t(),this.animationInProgress=!1,this.renderImage()}.bind(this)}),this.viewport.animate(i,{duration:this.settings.animationDuration}))},_showSpinner:function(){this.$spinnerCanvas=$('<canvas id="spinner-canvas"></canvas>').appendTo($(".image",this.$container));var i=document.getElementById("spinner-canvas").getContext("2d"),s=new Date,n=i.canvas.width,a=i.canvas.height;this.spinnerInterval=window.setInterval(function(){var t=parseInt((new Date-s)/1e3*16)/16;i.save(),i.clearRect(0,0,n,a),i.translate(n/2,a/2),i.rotate(2*Math.PI*t);for(var e=0;e<16;e++)i.beginPath(),i.rotate(2*Math.PI/16),i.moveTo(n/10,0),i.lineTo(n/4,0),i.lineWidth=n/30,i.strokeStyle="rgba(255,255,255,"+e/16+")",i.stroke();i.restore()},1e3/30)},_hideSpinner:function(){window.clearInterval(this.spinnerInterval),this.$spinnerCanvas.remove(),this.$spinnerCanvas=null},_showCropper:function(t){this._setupCropperLayer(t),this._redrawCropperElements(),this.renderCropper()},_hideCropper:function(){this.clipper&&(this.croppingCanvas.remove(this.clipper),this.croppingCanvas.remove(this.croppingShade),this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle),this.croppingCanvas=null,this.renderCropper=null)},_setupCropperLayer:function(t){this.croppingCanvas=new fabric.StaticCanvas("cropping-canvas",{backgroundColor:"rgba(0,0,0,0)",hoverCursor:"default",selection:!1}),this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight}),this.renderCropper=function(){Garnish.requestAnimationFrame(this.croppingCanvas.renderAll.bind(this.croppingCanvas))}.bind(this),$("#cropping-canvas",this.$editorContainer).css({position:"absolute",top:0,left:0}),this.croppingShade=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:this.editorWidth,height:this.editorHeight,fill:"rgba(0,0,0,0.7)"});var e=this.getScaledImageDimensions(),i=0===this.imageStraightenAngle?1:1.2*this.getCombinedZoomRatio(e),s=e.width/i,n=e.height/i;if(this.hasOrientationChanged()){var a=n;n=s,s=a}this.clipper=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:s,height:n,stroke:"black",fill:"rgba(128,0,0,1)",strokeWidth:0}),t&&this.clipper.set(t),this.clipper.globalCompositeOperation="destination-out",this.croppingCanvas.add(this.croppingShade),this.croppingCanvas.add(this.clipper)},_redrawCropperElements:function(){this.cropperHandles&&(this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle));var t={strokeWidth:4,stroke:"rgb(255,255,255)",fill:!1},e={strokeWidth:2,stroke:"rgba(255,255,255,0.5)"},i=[new fabric.Path("M 0,10 L 0,0 L 10,0",t),new fabric.Path("M "+(this.clipper.width-8)+",0 L "+(this.clipper.width+4)+",0 L "+(this.clipper.width+4)+",10",t),new fabric.Path("M "+(this.clipper.width+4)+","+(this.clipper.height-8)+" L"+(this.clipper.width+4)+","+(this.clipper.height+4)+" L "+(this.clipper.width-8)+","+(this.clipper.height+4),t),new fabric.Path("M 10,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height-8),t)];this.cropperHandles=new fabric.Group(i,{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingRectangle=new fabric.Rect({left:this.clipper.left,top:this.clipper.top,width:this.clipper.width,height:this.clipper.height,fill:"rgba(0,0,0,0)",stroke:"rgba(255,255,255,0.8)",strokeWidth:2,originX:"center",originY:"center"}),this.cropperGrid=new fabric.Group([new fabric.Line([.33*this.clipper.width,0,.33*this.clipper.width,this.clipper.height],e),new fabric.Line([.66*this.clipper.width,0,.66*this.clipper.width,this.clipper.height],e),new fabric.Line([0,.33*this.clipper.height,this.clipper.width,.33*this.clipper.height],e),new fabric.Line([0,.66*this.clipper.height,this.clipper.width,.66*this.clipper.height],e)],{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingCanvas.add(this.cropperHandles),this.croppingCanvas.add(this.cropperGrid),this.croppingCanvas.add(this.croppingRectangle)},_repositionCropper:function(t){if(this.croppingCanvas){var e=this.clipper.left-this.croppingCanvas.width/2,i=this.clipper.top-this.croppingCanvas.height/2;this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var s=this._getBoundingRectangle(this.imageVerticeCoords).width/t.width;this.clipper.width=Math.round(this.clipper.width*s),this.clipper.height=Math.round(this.clipper.height*s),this.clipper.left=this.editorWidth/2+e*s,this.clipper.top=this.editorHeight/2+i*s,this.croppingShade.set({width:this.editorWidth,height:this.editorHeight,left:this.editorWidth/2,top:this.editorHeight/2}),this._redrawCropperElements(),this.renderCropper()}},_getBoundingRectangle:function(t){return{width:Math.max(t.a.x,t.b.x,t.c.x,t.d.x)-Math.min(t.a.x,t.b.x,t.c.x,t.d.x),height:Math.max(t.a.y,t.b.y,t.c.y,t.d.y)-Math.min(t.a.y,t.b.y,t.c.y,t.d.y)}},_handleMouseDown:function(t){var e=this.focalPoint&&this._isMouseOver(t,this.focalPoint),i=this.croppingCanvas&&this._isMouseOver(t,this.clipper),s=this.croppingCanvas&&this._cropperHandleHitTest(t);(s||i||e)&&(this.previousMouseX=t.pageX,this.previousMouseY=t.pageY,e?this.draggingFocal=!0:s?this.scalingCropper=s:i&&(this.draggingCropper=!0))},_handleMouseMove:function(t){this.focalPoint&&this.draggingFocal?(this._handleFocalDrag(t),this.storeFocalPointState(),this.renderImage()):this.draggingCropper||this.scalingCropper?(this.draggingCropper?this._handleCropperDrag(t):this._handleCropperResize(t),this._redrawCropperElements(),this.storeCropperState(),this.renderCropper()):this._setMouseCursor(t),this.previousMouseX=t.pageX,this.previousMouseY=t.pageY},_handleMouseUp:function(t){this.draggingCropper=!1,this.scalingCropper=!1,this.draggingFocal=!1},_handleCropperDrag:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0!=e||0!=i){var s={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height},n=this._getRectangleVertices(s,e,i);this.arePointsInsideRectangle(n,this.imageVerticeCoords)&&this.clipper.set({left:this.clipper.left+e,top:this.clipper.top+i})}},_handleFocalDrag:function(t){if(this.focalPoint){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0==e&&0==i)return;var s=this.focalPoint.left+e,n=this.focalPoint.top+i;if("crop"===this.currentView){if(!this.arePointsInsideRectangle([{x:s,y:n}],this.imageVerticeCoords))return}else if(!(this.viewport.left-this.viewport.width/2-s<0&&0<this.viewport.left+this.viewport.width/2-s&&this.viewport.top-this.viewport.height/2-n<0&&0<this.viewport.top+this.viewport.height/2-n))return;this.focalPoint.set({left:this.focalPoint.left+e,top:this.focalPoint.top+i})}},setCroppingConstraint:function(t){switch(this.updateSizeAndPosition(),t){case"none":t=!1;break;case"original":t=this.originalWidth/this.originalHeight;break;case"current":t=this.clipper.width/this.clipper.height;break;default:t=parseFloat(t)}this.croppingConstraint=t},enforceCroppingConstraint:function(){if(!this.animationInProgress&&this.croppingConstraint){this.animationInProgress=!0;var t={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.clipper.width>this.clipper.height*this.croppingConstraint){var e=t.height;t.height=this.clipper.width/this.croppingConstraint,t.top-=(t.height-e)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.width=this.clipper.height*this.croppingConstraint,t.height=t.width/this.croppingConstraint)}else{var i=t.width;t.width=this.clipper.height*this.croppingConstraint,t.left-=(t.width-i)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.height=this.clipper.width/this.croppingConstraint,t.width=t.height*this.croppingConstraint)}var s={height:t.height,width:t.width};this.clipper.animate(s,{onChange:function(){this._redrawCropperElements(),this.croppingCanvas.renderAll()}.bind(this),duration:this.settings.animationDuration,onComplete:function(){this._redrawCropperElements(),this.animationInProgress=!1,this.renderCropper()}.bind(this)})}},_handleCropperResize:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY,s=0,n=0;if("b"!==this.scalingCropper&&"t"!==this.scalingCropper||(e=0),"l"!==this.scalingCropper&&"r"!==this.scalingCropper||(i=0),0!==e||0!==i){var a={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.croppingConstraint){var r=0;switch(this.scalingCropper){case"t":r=-i;break;case"b":r=i;break;case"r":r=e;break;case"l":r=-e;break;case"tr":r=-i+e;break;case"tl":r=-i-e;break;case"br":r=i+e;break;case"bl":r=i-e}1<this.croppingConstraint?i=(e=r)/this.croppingConstraint:e=(i=r)*this.croppingConstraint,a.height+=i,a.width+=e,this.scalingCropper.match(/t/)&&(a.top-=i,a.left-=e/2,s=-i/2),this.scalingCropper.match(/b/)&&(a.left+=-e/2,s=i/2),this.scalingCropper.match(/r/)&&(a.top+=-i/2,n=e/2),this.scalingCropper.match(/l/)&&(a.top-=i/2,a.left-=e,n=-e/2)}else{if(this.shiftKeyHeld&&("tl"===this.scalingCropper||"tr"===this.scalingCropper||"bl"===this.scalingCropper||"br"===this.scalingCropper))Math.abs(e)>Math.abs(i)?(i=e/(this.clipper.width/this.clipper.height),i*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1):(e=i*(this.clipper.width/this.clipper.height),e*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1);this.scalingCropper.match(/t/)&&(a.top+=i,a.height-=i),this.scalingCropper.match(/b/)&&(a.height+=i),this.scalingCropper.match(/r/)&&(a.width+=e),this.scalingCropper.match(/l/)&&(a.left+=e,a.width-=e),s=i/2,n=e/2}a.height<30||a.width<30||this.arePointsInsideRectangle(this._getRectangleVertices(a),this.imageVerticeCoords)&&(this.clipper.set({top:this.clipper.top+s,left:this.clipper.left+n,width:a.width,height:a.height}),this._redrawCropperElements())}},_setMouseCursor:function(t){var e="default",i=this.croppingCanvas&&this._cropperHandleHitTest(t);this.focalPoint&&this._isMouseOver(t,this.focalPoint)?e="pointer":i?"t"===i||"b"===i?e="ns-resize":"l"===i||"r"===i?e="ew-resize":"tl"===i||"br"===i?e="nwse-resize":"bl"!==i&&"tr"!==i||(e="nesw-resize"):this.croppingCanvas&&this._isMouseOver(t,this.clipper)&&(e="move"),$(".body").css("cursor",e)},_cropperHandleHitTest:function(t){var e=this.$croppingCanvas.offset(),i=t.pageX-e.left,s=t.pageY-e.top,n=this.clipper.left-this.clipper.width/2,a=n+this.clipper.width,r=this.clipper.top-this.clipper.height/2,o=r+this.clipper.height;if(i<10+n&&n-3<i){if(s<10+r&&r-3<s)return"tl";if(s<o+3&&o-10<s)return"bl"}if(a-13<i&&i<a+3){if(s<10+r&&r-3<s)return"tr";if(s<o+2&&o-10<s)return"br"}return i<3+n&&n-3<i&&s<o-10&&10+r<s?"l":i<a+1&&a-5<i&&s<o-10&&10+r<s?"r":s<4+r&&r-2<s&&10+n<i&&i<a-10?"t":s<o+2&&o-4<s&&10+n<i&&i<a-10&&"b"},_isMouseOver:function(t,e){var i=this.$croppingCanvas.offset(),s=t.pageX-i.left,n=t.pageY-i.top,a=e.left-e.width/2,r=a+e.width,o=e.top-e.height/2,l=o+e.height;return a<=s&&s<=r&&o<=n&&n<=l},_getRectangleVertices:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var s={x:t.left+e,y:t.top+i},n={x:s.x+t.width,y:s.y},a={x:n.x,y:n.y+t.height};return[s,n,a,{x:s.x,y:a.y}]},_setFittedImageVerticeCoordinates:function(){this.imageVerticeCoords=this.getImageVerticeCoords("fit")},getImageVerticeCoords:function(t){var e,i=-1*((this.hasOrientationChanged()?90:0)+this.imageStraightenAngle)*(Math.PI/180),s=this.getScaledImageDimensions();e="number"==typeof t?t:"cover"===t?this.getZoomToCoverRatio(s):this.getZoomToFitRatio(s);var n=s.height*e,a=s.width*e,r=Math.cos(i)*n,o=Math.sin(i)*a,l=Math.cos(i)*a,h=Math.sin(i)*n,d=(this.editorHeight-(r+o))/2,c=(this.editorWidth-(h+l))/2;return{a:{x:c+l,y:d},b:{x:this.editorWidth-c,y:d+r},c:{x:c+h,y:this.editorHeight-d},d:{x:c,y:d+o}}},_debug:function(t){this.canvas.remove(this.debugger),this.debugger=t,this.canvas.add(this.debugger)},arePointsInsideRectangle:function(t,e){for(var i=this._getVector(e.a,e.b),s=this._getVector(e.b,e.c),n=this._getScalarProduct(i,i),a=this._getScalarProduct(s,s),r=0;r<t.length;r++){var o=t[r],l=this._getVector(e.a,o),h=this._getVector(e.b,o),d=this._getScalarProduct(i,l),c=this._getScalarProduct(s,h);if(!(0<=d&&d<=n)||!(0<=c&&c<=a))return!1}return!0},_getVector:function(t,e){return{x:e.x-t.x,y:e.y-t.y}},_getScalarProduct:function(t,e){return t.x*e.x+t.y*e.y},_getVectorMagnitude:function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},_getAngleBetweenVectors:function(t,e){return Math.round(180*Math.acos(Math.min(1,this._getScalarProduct(t,e)/(this._getVectorMagnitude(t)*this._getVectorMagnitude(e))))/Math.PI*100)/100},_getEdgeCrossed:function(t,e){for(var i=[[t.a,t.b],[t.b,t.c],[t.c,t.d],[t.d,t.a]],s={x:this.editorWidth/2,y:this.editorHeight/2},n=180,a=null,r=0;r<i.length;r++){var o=i[r],l=this._getVector(o[0],s),h=this._getVector(o[0],o[1]),d=this._getVector(o[0],e),c=Math.abs(this._getAngleBetweenVectors(l,d)-(this._getAngleBetweenVectors(l,h)+this._getAngleBetweenVectors(h,d)));c<n&&(n=c,a=o)}return a},_getImageBoundingBox:function(t){var e={},i=Math.abs(this.imageStraightenAngle)*(Math.PI/180),s=t.height/t.width;if(e.height=t.width*(Math.sin(i)+Math.cos(i)*s),e.width=t.width*(Math.cos(i)+Math.sin(i)*s),this.hasOrientationChanged()){var n=e.width;e.width=e.height,e.height=n}return e}},{defaults:{animationDuration:100,allowSavingAsNew:!0,onSave:$.noop,allowDegreeFractions:!0}}),Craft.AssetIndex=Craft.BaseElementIndex.extend({$includeSubfoldersContainer:null,$includeSubfoldersCheckbox:null,showingIncludeSubfoldersCheckbox:!1,$uploadButton:null,$uploadInput:null,$progressBar:null,$folders:null,uploader:null,promptHandler:null,progressBar:null,_uploadTotalFiles:0,_uploadFileProgress:{},_uploadedAssetIds:[],_currentUploaderSettings:{},_assetDrag:null,_folderDrag:null,_expandDropTargetFolderTimeout:null,_tempExpandedFolders:[],_fileConflictTemplate:{choices:[{value:"keepBoth",title:Craft.t("app","Keep both")},{value:"replace",title:Craft.t("app","Replace it")}]},_folderConflictTemplate:{choices:[{value:"replace",title:Craft.t("app","Replace the folder (all existing files will be deleted)")},{value:"merge",title:Craft.t("app","Merge the folder (any conflicting files will be replaced)")}]},init:function(t,e,i){this.base(t,e,i),"index"===this.settings.context?(this._folderDrag||this._initIndexPageMode(),this.addListener(Garnish.$win,"resize,scroll","_positionProgressBar")):(this.addListener(this.$main,"scroll","_positionProgressBar"),this.settings.modal&&this.settings.modal.on("updateSizeAndPosition",$.proxy(this,"_positionProgressBar")))},initSources:function(){return"index"!==this.settings.context||this._folderDrag||this._initIndexPageMode(),this.base()},initSource:function(t){this.base(t),this._createFolderContextMenu(t),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&t.data("folder-id")&&this._folderDrag.addItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},deinitSource:function(t){this.base(t);var e=t.data("contextmenu");e&&e.destroy(),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&this._folderDrag.removeItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},_getSourceLevel:function(t){return t.parentsUntil("nav","ul").length},_initIndexPageMode:function(){if(!this._folderDrag){this.settings.selectable=!0,this.settings.multiSelect=!0;var t=$.proxy(this,"_onDragStart"),e=$.proxy(this,"_onDropTargetChange");this._assetDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){return this.view.getSelectedElements()},this),helper:$.proxy(function(t){return this._getFileDragHelper(t)},this),dropTargets:$.proxy(function(){for(var t=[],e=0;e<this.$sources.length;e++){var i=this.$sources.eq(e);this._getFolderUidFromSourceKey(i.data("key"))&&t.push(i)}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFileDragStop")}),this._folderDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){for(var t=this.sourceSelect.getSelectedItems(),e=[],i=0;i<t.length;i++){var s=t.eq(i);!this._getFolderUidFromSourceKey(s.data("key"))||s.hasClass("sel")&&1<this._getSourceLevel(s)&&e.push(s.parent()[0])}return $(e)},this),helper:$.proxy(function(t){var e=$('<div class="sidebar" style="padding-top: 0; padding-bottom: 0;"/>'),i=$("<nav/>").appendTo(e),s=$("<ul/>").appendTo(i);return t.appendTo(s).removeClass("expanded"),t.children("a").addClass("sel"),t.css({"padding-top":this._folderDrag.$draggee.css("padding-top"),"padding-right":this._folderDrag.$draggee.css("padding-right"),"padding-bottom":this._folderDrag.$draggee.css("padding-bottom"),"padding-left":this._folderDrag.$draggee.css("padding-left")}),e},this),dropTargets:$.proxy(function(){var t=[],e=[];this._folderDrag.$draggee.find("a[data-key]").each(function(){e.push($(this).data("key"))});for(var i=0;i<this.$sources.length;i++){var s=this.$sources.eq(i),n=s.data("key");this._getFolderUidFromSourceKey(n)&&(Craft.inArray(n,e)||t.push(s))}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFolderDragStop")})}},_onFileDragStop:function(){if(this._assetDrag.$activeDropTarget&&this._assetDrag.$activeDropTarget[0]!==this.$source[0]){for(var r=this.$source,o=this._assetDrag.$activeDropTarget.data("folder-id"),l=[],t=0;t<this._assetDrag.$draggee.length;t++){var e=Craft.getElementInfo(this._assetDrag.$draggee[t]).id;l.push(e)}if(l.length){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(l.length),this.progressBar.showProgressBar();var i=[];for(t=0;t<l.length;t++)i.push({action:"assets/move-asset",params:{assetId:l[t],folderId:o}});var h=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var i=t[e];i.conflict&&this.promptHandler.addPrompt({assetId:i.assetId,suggestedFilename:i.suggestedFilename,prompt:{message:i.conflict,choices:this._fileConflictTemplate.choices}}),i.error&&alert(i.error)}this.setIndexAvailable(),this.progressBar.hideProgressBar();function s(){this.sourceSelect.selectItem(r),this._totalVisible-=this._assetDrag.$draggee.length;for(var t=0;t<l.length;t++)$("[data-id="+l[t]+"]").remove();this.view.deselectAllElements(),this._collapseExtraExpandedFolders(o),n&&this.updateElements()}var n=!1;if(this.promptHandler.getPromptCount()){var a=$.proxy(function(t){for(var e=[],i=0;i<t.length;i++)"cancel"!==t[i].choice?("keepBoth"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,filename:t[i].suggestedFilename}}),"replace"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,force:!0}})):n=!0;0===e.length?s.apply(this):(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,h))},this);this._assetDrag.fadeOutHelpers(),this.promptHandler.showBatchPrompts(a)}else s.apply(this),this._assetDrag.fadeOutHelpers()},this);return void this._performBatchRequests(i,h)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._assetDrag.returnHelpersToDraggees()},_onFolderDragStop:function(){if(this._folderDrag.$activeDropTarget&&0===this._folderDrag.$activeDropTarget.siblings("ul").children("li").filter(this._folderDrag.$draggee).length){var t=this._folderDrag.$activeDropTarget.data("folder-id");this._collapseExtraExpandedFolders(t);for(var a=[],e=0;e<this._folderDrag.$draggee.length;e++){var i=this._folderDrag.$draggee.eq(e).children("a").data("folder-id");if(i!=t){a.push(i);break}}if(a.length){a.sort(),a.reverse(),this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(a.length),this.progressBar.showProgressBar();var s=[];for(e=0;e<a.length;e++)s.push({action:"assets/move-folder",params:{folderId:a[e],parentId:t}});this.requestId++;var r=[],o="",l=function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var n=t[e];n.success&&(n.transferList&&(r=n.transferList),n.newFolderId&&(o=this._folderDrag.$activeDropTarget.data("key")+"/folder:"+n.newFolderUid)),n.conflict&&(n.prompt={message:n.conflict,choices:this._folderConflictTemplate.choices},this.promptHandler.addPrompt(n)),n.error&&alert(n.error)}if(this.promptHandler.getPromptCount()){var i=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=[],i={},s=0;s<t.length;s++)"cancel"!==t[s].choice&&("replace"===t[s].choice&&(i.force=!0),"merge"===t[s].choice&&(i.merge=!0),i.folderId=n.folderId,i.parentId=n.parentId,e.push({action:"assets/move-folder",params:i}));0===e.length?$.proxy(this,"_performActualFolderMove",r,a,o)():(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,l))},this);this.promptHandler.showBatchPrompts(i),this.setIndexAvailable(),this.progressBar.hideProgressBar()}else $.proxy(this,"_performActualFolderMove",r,a,o)()}.bind(this);return void this._performBatchRequests(s,l)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._folderDrag.returnHelpersToDraggees()},_performActualFolderMove:function(t,e,n){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(1),this.progressBar.showProgressBar();var i=function(t){for(var e=0,i=t.length,s=0;s<t.length;s++)Craft.postActionRequest("assets/delete-folder",{folderId:t[s]},function(){++e===i&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._folderDrag.returnHelpersToDraggees(),this.setInstanceState("selectedSource",n),this.refreshSources())}.bind(this))}.bind(this);if(0<t.length){for(var s=[],a=0;a<t.length;a++)s.push({action:"assets/move-asset",params:t[a]});this._performBatchRequests(s,function(){i(e)})}else i(e)},_getParentSource:function(t){if(1<this._getSourceLevel(t))return t.parent().parent().siblings("a")},_selectSourceByFolderId:function(t){for(var e=this._getSourceByKey(t),i=e.parent().parents("li"),s=0;s<i.length;s++){var n=$(i[s]);n.hasClass("expanded")||n.children(".toggle").trigger("click")}this.selectSource(e),this.updateElements()},afterInit:function(){this.$uploadButton||(this.$uploadButton=$('<div class="btn submit" data-icon="upload" style="position: relative; overflow: hidden;" role="button">'+Craft.t("app","Upload files")+"</div>"),this.addButton(this.$uploadButton),this.$uploadInput=$('<input type="file" multiple="multiple" name="assets-upload" />').hide().insertBefore(this.$uploadButton)),this.promptHandler=new Craft.PromptHandler,this.progressBar=new Craft.ProgressBar(this.$main,!0);var t={url:Craft.getActionUrl("assets/save-asset"),fileInput:this.$uploadInput,dropZone:this.$container};t.events={fileuploadstart:$.proxy(this,"_onUploadStart"),fileuploadprogressall:$.proxy(this,"_onUploadProgress"),fileuploaddone:$.proxy(this,"_onUploadComplete")},this.settings.criteria&&void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),this._currentUploaderSettings=t,this.uploader=new Craft.Uploader(this.$uploadButton,t),this.$uploadButton.on("click",$.proxy(function(){this.$uploadButton.hasClass("disabled")||this.isIndexBusy||this.$uploadButton.parent().find("input[name=assets-upload]").trigger("click")},this)),this.base()},onSelectSource:function(){this._getSourceByKey(this.sourceKey).data("folder-id")&&this.$source.attr("data-upload")?(this.uploader.setParams({folderId:this.$source.attr("data-folder-id")}),this.$uploadButton.removeClass("disabled")):this.$uploadButton.addClass("disabled"),this.base()},_getFolderUidFromSourceKey:function(t){var e=t.match(/\bfolder:([0-9a-f\-]+)$/);return e?e[1]:null},startSearching:function(){if(this.$source.siblings("ul").length){if(null===this.$includeSubfoldersContainer){var t="includeSubfolders-"+Math.floor(1e9*Math.random());this.$includeSubfoldersContainer=$('<div style="margin-bottom: -23px; opacity: 0;"/>').insertAfter(this.$search);var e=$('<div style="padding-top: 5px;"/>').appendTo(this.$includeSubfoldersContainer);this.$includeSubfoldersCheckbox=$('<input type="checkbox" id="'+t+'" class="checkbox"/>').appendTo(e),$('<label class="light smalltext" for="'+t+'"/>').text(" "+Craft.t("app","Search in subfolders")).appendTo(e),this.addListener(this.$includeSubfoldersCheckbox,"change",function(){this.setSelecetedSourceState("includeSubfolders",this.$includeSubfoldersCheckbox.prop("checked")),this.updateElements()})}else this.$includeSubfoldersContainer.velocity("stop");var i=this.getSelectedSourceState("includeSubfolders",!1);this.$includeSubfoldersCheckbox.prop("checked",i),this.$includeSubfoldersContainer.velocity({marginBottom:0,opacity:1},"fast"),this.showingIncludeSubfoldersCheckbox=!0}this.base()},stopSearching:function(){this.showingIncludeSubfoldersCheckbox&&(this.$includeSubfoldersContainer.velocity("stop"),this.$includeSubfoldersContainer.velocity({marginBottom:-23,opacity:0},"fast"),this.showingIncludeSubfoldersCheckbox=!1),this.base()},getViewParams:function(){var t=this.base();return this.showingIncludeSubfoldersCheckbox&&this.$includeSubfoldersCheckbox.prop("checked")&&(t.criteria.includeSubfolders=!0),t},_onUploadStart:function(){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar(),this.promptHandler.resetPrompts()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){var i=e.result,s=e.files[0].name,n=!0;i.success||i.conflict?(this._uploadedAssetIds.push(i.assetId),i.conflict&&(i.prompt={message:Craft.t("app",i.conflict,{file:i.filename}),choices:this._fileConflictTemplate.choices},this.promptHandler.addPrompt(i)),Craft.cp.runQueue()):(i.error?alert(Craft.t("app","Upload failed. The error message was: “{error}”",{error:i.error})):alert(Craft.t("app","Upload failed for {filename}.",{filename:s})),n=!1),this.uploader.isLastUpload()&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this.promptHandler.getPromptCount()?this.promptHandler.showBatchPrompts($.proxy(this,"_uploadFollowup")):n&&this._updateAfterUpload())},_updateAfterUpload:function(){"index"!==this.settings.context&&(this.setSortAttribute("dateModified"),this.setSortDirection("desc")),this.updateElements()},_uploadFollowup:function(t){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.promptHandler.resetPrompts();var e=function(){this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._updateAfterUpload()}.bind(this);this.progressBar.setItemCount(t.length);var r=function(i,s,n){var t={},e=null,a=function(t,e){"success"===e&&t.assetId?this._uploadedAssetIds.push(t.assetId):t.error&&alert(t.error),s++,this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),s===i.length?n():r(i,s,n)}.bind(this);"replace"===i[s].choice?(e="assets/replace-file",t.sourceAssetId=i[s].assetId,i[s].conflictingAssetId?t.assetId=i[s].conflictingAssetId:t.targetFilename=i[s].filename):"cancel"===i[s].choice&&(e="assets/delete-asset",t.assetId=i[s].assetId),e?Craft.postActionRequest(e,t,a):a({assetId:i[s].assetId},"success")}.bind(this);this.progressBar.showProgressBar(),r(t,0,e)},onUpdateElements:function(){this._onUpdateElements(!1,this.view.getAllElements()),this.view.on("appendElements",$.proxy(function(t){this._onUpdateElements(!0,t.newElements)},this)),this.base()},_onUpdateElements:function(t,e){if("index"===this.settings.context&&(t||this._assetDrag.removeAllItems(),this._assetDrag.addItems(e)),this._uploadedAssetIds.length){if(this.view.settings.selectable)for(var i=0;i<this._uploadedAssetIds.length;i++)this.view.selectElementById(this._uploadedAssetIds[i]);this._uploadedAssetIds=[]}this.base(t,e),this.removeListener(this.$elements,"keydown"),this.addListener(this.$elements,"keydown",this._onKeyDown.bind(this)),this.view.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.view.elementSelect.$focusedItem.find(".element");e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item).find(".element");Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.view.elementSelect,e)},_onDragStart:function(){this._tempExpandedFolders=[]},_getFileDragHelper:function(t){var e,i;switch(this.getSelectedSourceState("mode")){case"table":e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e);var s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.view.$table.children("tbody").children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove(),e.css("margin-"+Craft.left,19);else{var l=$(this._$firstRowCells[r]),h=l.width();l.width(h),o.width(h)}}return e;case"thumbs":return e=$('<div class="elements thumbviewhelper"/>').appendTo(Garnish.$bod),i=$('<ul class="thumbsview"/>').appendTo(e),t.appendTo(i),e}return $()},_onDropTargetChange:function(t){if(clearTimeout(this._expandDropTargetFolderTimeout),t){var e=t.data("folder-id");e?(this.dropTargetFolder=this._getSourceByKey(e),this._hasSubfolders(this.dropTargetFolder)&&!this._isExpanded(this.dropTargetFolder)&&(this._expandDropTargetFolderTimeout=setTimeout($.proxy(this,"_expandFolder"),500))):this.dropTargetFolder=null}t&&t[0]!==this.$source[0]?this.$source.removeClass("sel"):this.$source.addClass("sel")},_collapseExtraExpandedFolders:function(t){var e;clearTimeout(this._expandDropTargetFolderTimeout),t&&(e=this._getSourceByKey(t).parents("li").children("a"));for(var i=this._tempExpandedFolders.length-1;0<=i;i--){var s=this._tempExpandedFolders[i];void 0!==e&&0!==e.filter('[data-key="'+s.data("key")+'"]').length||(this._collapseFolder(s),this._tempExpandedFolders.splice(i,1))}},_getSourceByKey:function(t){return this.$sources.filter('[data-key$="'+t+'"]')},_hasSubfolders:function(t){return t.siblings("ul").find("li").length},_isExpanded:function(t){return t.parent("li").hasClass("expanded")},_expandFolder:function(){this._collapseExtraExpandedFolders(this.dropTargetFolder.data("folder-id")),this.dropTargetFolder.siblings(".toggle").trigger("click"),this._tempExpandedFolders.push(this.dropTargetFolder)},_collapseFolder:function(t){t.parent().hasClass("expanded")&&t.siblings(".toggle").trigger("click")},_createFolderContextMenu:function(t){if(this._getFolderUidFromSourceKey(t.data("key"))){var e=[{label:Craft.t("app","New subfolder"),onClick:$.proxy(this,"_createSubfolder",t)}];"index"===this.settings.context&&1<this._getSourceLevel(t)&&(e.push({label:Craft.t("app","Rename folder"),onClick:$.proxy(this,"_renameFolder",t)}),e.push({label:Craft.t("app","Delete folder"),onClick:$.proxy(this,"_deleteFolder",t)})),new Garnish.ContextMenu(t,e,{menuClass:"menu"})}},_createSubfolder:function(n){var t=prompt(Craft.t("app","Enter the name of the folder"));if(t){var e={parentId:n.data("folder-id"),folderName:t};this.setIndexBusy(),Craft.postActionRequest("assets/create-folder",e,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){this._prepareParentForChildren(n);var i=$('<li><a data-key="'+n.data("key")+"/folder:"+t.folderUid+'"'+(Garnish.hasAttr(n,"data-has-thumbs")?" data-has-thumbs":"")+' data-upload="'+n.attr("data-upload")+'" data-folder-id="'+t.folderId+'">'+t.folderName+"</a></li>"),s=i.children("a:first");this._appendSubfolder(n,i),this.initSource(s)}"success"===e&&t.error&&alert(t.error)},this))}},_deleteFolder:function(s){if(confirm(Craft.t("app","Really delete folder “{folder}”?",{folder:$.trim(s.text())}))){var t={folderId:s.data("folder-id")};this.setIndexBusy(),Craft.postActionRequest("assets/delete-folder",t,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){var i=this._getParentSource(s);this.deinitSource(s),s.parent().remove(),this._cleanUpTree(i)}"success"===e&&t.error&&alert(t.error)},this))}},_renameFolder:function(i){var t=$.trim(i.text()),e=prompt(Craft.t("app","Rename folder"),t);if(e&&e!==t){var s={folderId:i.data("folder-id"),newName:e};this.setIndexBusy(),Craft.postActionRequest("assets/rename-folder",s,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&t.success&&(i.text(t.newName),this._getFolderUidFromSourceKey(this.sourceSelect.$selectedItems.data("key"))===this._getFolderUidFromSourceKey(i.data("key"))&&this.updateElements()),"success"===e&&t.error&&alert(t.error)},this),"json")}},_prepareParentForChildren:function(t){this._hasSubfolders(t)||(t.parent().addClass("expanded").append('<div class="toggle"></div><ul></ul>'),this.initSourceToggle(t))},_appendSubfolder:function(t,e){for(var i=t.siblings("ul").children("li"),s=$.trim(e.children("a:first").text()),n=!1,a=0;a<i.length;a++){var r=$(i[a]);if($.trim(r.children("a:first").text())>s){r.before(e),n=!0;break}}n||t.siblings("ul").append(e)},_cleanUpTree:function(t){null!==t&&0===t.siblings("ul").children("li").length&&(this.deinitSourceToggle(t),t.siblings("ul").remove(),t.siblings(".toggle").remove(),t.parent().removeClass("expanded"))},_positionProgressBar:function(){this.progressBar||(this.progressBar=new Craft.ProgressBar(this.$main,!0));var t=$(),e=0,i=0,s=(e="index"===this.settings.context?(t=this.progressBar.$progressBar.closest("#content"),Garnish.$win.scrollTop()):(t=this.progressBar.$progressBar.closest(".main"),this.$main.scrollTop()))-t.offset().top,n=Garnish.$win.height();i=t.height()>n?n/2-6+s:t.height()/2-6,"index"!==this.settings.context&&(i=e+(t.height()/2-6)),this.progressBar.$progressBar.css({top:i})},_performBatchRequests:function(i,s){for(var n=[],t=function(t){Craft.postActionRequest(t.action,t.params,function(t,e){this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),"success"===e&&(n.push(t),Craft.cp.runQueue()),n.length>=i.length&&s(n)}.bind(this))}.bind(this),e=0;e<i.length;e++)t(i[e])}}),Craft.registerElementIndexClass("craft\\elements\\Asset",Craft.AssetIndex),Craft.AssetSelectInput=Craft.BaseElementSelectInput.extend({requestId:0,hud:null,uploader:null,progressBar:null,originalFilename:"",originalExtension:"",init:function(){0<arguments.length&&"object"==typeof arguments[0]&&(arguments[0].editorSettings={onShowHud:$.proxy(this.resetOriginalFilename,this),onCreateForm:$.proxy(this._renameHelper,this),validators:[$.proxy(this.validateElementForm,this)]}),this.base.apply(this,arguments),this._attachUploader(),this.addListener(this.$elementsContainer,"keydown",this._onKeyDown.bind(this)),this.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.elementSelect.$focusedItem;e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item);Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.elementSelect,e)},createElementEditor:function(t){return this.base(t,{params:{defaultFieldLayoutId:this.settings.defaultFieldLayoutId}})},_attachUploader:function(){this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl("assets/save-asset"),dropZone:this.$container,formData:{fieldId:this.settings.fieldId,elementId:this.settings.sourceElementId}};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),t.canAddMoreFiles=$.proxy(this,"canAddMoreFiles"),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),this.uploader=new Craft.Uploader(this.$container,t)},selectUploadedFile:function(t){if(this.canAddMoreElements()){var e=t.$element;e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e.appendTo(this.$elementsContainer);var i=-(e.outerWidth()+10);this.$addElementBtn.css("margin-"+Craft.left,i+"px");var s={};s["margin-"+Craft.left]=0,this.$addElementBtn.velocity(s,"fast"),this.addElements(e),delete this.modal}},_onUploadStart:function(){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{var i={elementId:e.result.assetId,siteId:this.settings.criteria.siteId,size:this.settings.viewMode};Craft.postActionRequest("elements/get-element-html",i,function(t){if(t.error)alert(t.error);else{var e=$(t.html);Craft.appendHeadHtml(t.headHtml),this.selectUploadedFile(Craft.getElementInfo(e))}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"),window.draftEditor&&window.draftEditor.checkForm())}.bind(this)),Craft.cp.runQueue()}},canAddMoreFiles:function(t){return!this.settings.limit||this.$elements.length+t<this.settings.limit},_parseFilename:function(t){var e=t.split("."),i="";return 1<e.length&&(i=e.pop()),{extension:i,baseFileName:e.join(".")}},_renameHelper:function(t){$(".renameHelper",t).on("focus",$.proxy(function(t){var e=t.currentTarget,i=this._parseFilename(e.value);""===this.originalFilename&&""===this.originalExtension&&(this.originalFilename=i.baseFileName,this.originalExtension=i.extension);var s=i.baseFileName.length;if(void 0!==e.selectionStart)e.selectionStart=0,e.selectionEnd=s;else if(document.selection&&document.selection.createRange){e.select();var n=document.selection.createRange();n.collapse(!0),n.moveEnd("character",s),n.moveStart("character",0),n.select()}},this))},resetOriginalFilename:function(){this.originalFilename="",this.originalExtension=""},validateElementForm:function(){var t=$(".renameHelper",this.elementEditor.hud.$hud.data("elementEditor").$form),e=this._parseFilename(t.val());return e.extension===this.originalExtension||(""===e.extension?this.originalFilename!==e.baseFileName?(t.val(e.baseFileName+"."+this.originalExtension),!0):confirm(Craft.t("app","Are you sure you want to remove the extension “.{ext}”?",{ext:this.originalExtension})):confirm(Craft.t("app","Are you sure you want to change the extension from “.{oldExt}” to “.{newExt}”?",{oldExt:this.originalExtension,newExt:e.extension})))}}),Craft.AssetSelectorModal=Craft.BaseElementSelectorModal.extend({$selectTransformBtn:null,_selectedTransform:null,init:function(t,e){e=$.extend({},Craft.AssetSelectorModal.defaults,e),this.base(t,e),e.transforms.length&&this.createSelectTransformButton(e.transforms)},createSelectTransformButton:function(t){if(t&&t.length){var e=$('<div class="btngroup"/>').appendTo(this.$primaryButtons);this.$selectBtn.appendTo(e),this.$selectTransformBtn=$('<div class="btn menubtn disabled">'+Craft.t("app","Select transform")+"</div>").appendTo(e);for(var i=$('<div class="menu" data-align="right"></div>').insertAfter(this.$selectTransformBtn),s=$("<ul></ul>").appendTo(i),n=0;n<t.length;n++)$('<li><a data-transform="'+t[n].handle+'">'+t[n].name+"</a></li>").appendTo(s);var a=new Garnish.MenuBtn(this.$selectTransformBtn,{onOptionSelect:$.proxy(this,"onSelectTransform")});a.disable(),this.$selectTransformBtn.data("menuButton",a)}},onSelectionChange:function(t){var e=this.elementIndex.getSelectedElements(),i=!1;if(e.length&&this.settings.transforms.length){i=!0;for(var s=0;s<e.length&&$(".element.hasthumb:first",e[s]).length;s++);}var n=null;this.$selectTransformBtn&&(n=this.$selectTransformBtn.data("menuButton")),i?(n&&n.enable(),this.$selectTransformBtn.removeClass("disabled")):this.$selectTransformBtn&&(n&&n.disable(),this.$selectTransformBtn.addClass("disabled")),this.base()},onSelectTransform:function(t){var e=$(t).data("transform");this.selectImagesWithTransform(e)},selectImagesWithTransform:function(t){void 0===Craft.AssetSelectorModal.transformUrls[t]&&(Craft.AssetSelectorModal.transformUrls[t]={});for(var e=this.elementIndex.getSelectedElements(),i=[],s=0;s<e.length;s++){var n=$(e[s]),a=Craft.getElementInfo(n).id;void 0===Craft.AssetSelectorModal.transformUrls[t][a]&&i.push(a)}i.length?(this.showFooterSpinner(),this.fetchMissingTransformUrls(i,t,$.proxy(function(){this.hideFooterSpinner(),this.selectImagesWithTransform(t)},this))):(this._selectedTransform=t,this.selectElements(),this._selectedTransform=null)},fetchMissingTransformUrls:function(i,s,n){var a=i.pop(),t={assetId:a,handle:s};Craft.postActionRequest("assets/generate-transform",t,$.proxy(function(t,e){Craft.AssetSelectorModal.transformUrls[s][a]=!1,"success"!==e||t.url&&(Craft.AssetSelectorModal.transformUrls[s][a]=t.url),i.length?this.fetchMissingTransformUrls(i,s,n):n()},this))},getElementInfo:function(t){var e=this.base(t);if(this._selectedTransform)for(var i=0;i<e.length;i++){var s=e[i].id;void 0!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&!1!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&(e[i].url=Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s])}return e},onSelect:function(t){this.settings.onSelect(t,this._selectedTransform)}},{defaults:{canSelectImageTransforms:!1,transforms:[]},transformUrls:{}}),Craft.registerElementSelectorModalClass("craft\\elements\\Asset",Craft.AssetSelectorModal),Craft.AuthManager=Garnish.Base.extend({remainingSessionTime:null,checkRemainingSessionTimer:null,showLoginModalTimer:null,decrementLogoutWarningInterval:null,showingLogoutWarningModal:!1,showingLoginModal:!1,logoutWarningModal:null,loginModal:null,$logoutWarningPara:null,$passwordInput:null,$passwordSpinner:null,$loginBtn:null,$loginErrorPara:null,submitLoginIfLoggedOut:!1,init:function(){this.updateRemainingSessionTime(Craft.remainingSessionTime)},setCheckRemainingSessionTimer:function(t){this.checkRemainingSessionTimer&&clearTimeout(this.checkRemainingSessionTimer),this.checkRemainingSessionTimer=setTimeout($.proxy(this,"checkRemainingSessionTime"),1e3*t)},checkRemainingSessionTime:function(t){$.ajax({url:Craft.getActionUrl("users/get-remaining-session-time",t?null:"dontExtendSession=1"),type:"GET",dataType:"json",complete:$.proxy(function(t,e){"success"===e?(void 0!==t.responseJSON.csrfTokenValue&&void 0!==Craft.csrfTokenValue&&(Craft.csrfTokenValue=t.responseJSON.csrfTokenValue),this.updateRemainingSessionTime(t.responseJSON.timeout),this.submitLoginIfLoggedOut=!1):this.updateRemainingSessionTime(-1)},this)})},updateRemainingSessionTime:function(t){this.remainingSessionTime=parseInt(t),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime?(this.remainingSessionTime?(this.showingLogoutWarningModal||this.showLogoutWarningModal(),this.remainingSessionTime<Craft.AuthManager.checkInterval&&(this.showLoginModalTimer&&clearTimeout(this.showLoginModalTimer),this.showLoginModalTimer=setTimeout($.proxy(this,"showLoginModal"),1e3*this.remainingSessionTime))):this.showingLoginModal?this.submitLoginIfLoggedOut&&this.submitLogin():this.showLoginModal(),this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval)):(this.hideLogoutWarningModal(),this.hideLoginModal(),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime+Craft.AuthManager.checkInterval?this.setCheckRemainingSessionTimer(this.remainingSessionTime-Craft.AuthManager.minSafeSessiotTime+1):this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval))},showLogoutWarningModal:function(){var t;if(t=!!this.showingLoginModal&&(this.hideLoginModal(!0),!0),this.showingLogoutWarningModal=!0,!this.logoutWarningModal){var e=$('<form id="logoutwarningmodal" class="modal alert fitted"/>'),i=$('<div class="body"/>').appendTo(e),s=$('<div class="buttons right"/>').appendTo(i),n=$('<div class="btn">'+Craft.t("app","Log out now")+"</div>").appendTo(s),a=$('<input type="submit" class="btn submit" value="'+Craft.t("app","Keep me logged in")+'" />').appendTo(s);this.$logoutWarningPara=$("<p/>").prependTo(i),this.logoutWarningModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark logoutwarningmodalshade",onFadeIn:function(){Garnish.isMobileBrowser(!0)||setTimeout(function(){a.trigger("focus")},100)}}),this.addListener(n,"activate","logout"),this.addListener(e,"submit","renewSession")}t?this.logoutWarningModal.quickShow():this.logoutWarningModal.show(),this.updateLogoutWarningMessage(),this.decrementLogoutWarningInterval=setInterval($.proxy(this,"decrementLogoutWarning"),1e3)},updateLogoutWarningMessage:function(){this.$logoutWarningPara.text(Craft.t("app","Your session will expire in {time}.",{time:Craft.secondsToHumanTimeDuration(this.remainingSessionTime)})),this.logoutWarningModal.updateSizeAndPosition()},decrementLogoutWarning:function(){0<this.remainingSessionTime&&(this.remainingSessionTime--,this.updateLogoutWarningMessage()),0===this.remainingSessionTime&&clearInterval(this.decrementLogoutWarningInterval)},hideLogoutWarningModal:function(t){this.showingLogoutWarningModal=!1,this.logoutWarningModal&&(t?this.logoutWarningModal.quickHide():this.logoutWarningModal.hide(),this.decrementLogoutWarningInterval&&clearInterval(this.decrementLogoutWarningInterval))},showLoginModal:function(){var t;if(t=!!this.showingLogoutWarningModal&&(this.hideLogoutWarningModal(!0),!0),this.showingLoginModal=!0,!this.loginModal){var e=$('<form id="loginmodal" class="modal alert fitted"/>'),i=$('<div class="body"><h2>'+Craft.t("app","Your session has ended.")+"</h2><p>"+Craft.t("app","Enter your password to log back in.")+"</p></div>").appendTo(e),s=$('<div class="inputcontainer">').appendTo(i),n=$('<div class="flex"/>').appendTo(s),a=$('<div class="flex-grow"/>').appendTo(n),r=$("<div/>").appendTo(n),o=$('<div class="passwordwrapper"/>').appendTo(a);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'"/>').appendTo(o),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(s),this.$loginBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Login")+'" />').appendTo(r),this.$loginErrorPara=$('<p class="error"/>').appendTo(i),this.loginModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark loginmodalshade",onFadeIn:$.proxy(function(){Garnish.isMobileBrowser(!0)||setTimeout($.proxy(function(){this.$passwordInput.trigger("focus")},this),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(e,"submit","login")}t?this.loginModal.quickShow():this.loginModal.show()},hideLoginModal:function(t){this.showingLoginModal=!1,this.loginModal&&(t?this.loginModal.quickHide():this.loginModal.hide())},logout:function(){$.get({url:Craft.getActionUrl("users/logout"),dataType:"json",success:$.proxy(function(){Craft.redirectTo("")},this)})},renewSession:function(t){t&&t.preventDefault(),this.hideLogoutWarningModal(),this.checkRemainingSessionTime(!0)},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$loginBtn.removeClass("disabled"),!0):(this.$loginBtn.addClass("disabled"),!1)},login:function(t){t&&t.preventDefault(),this.validatePassword()&&(this.$passwordSpinner.removeClass("hidden"),this.clearLoginError(),void 0!==Craft.csrfTokenValue?(this.submitLoginIfLoggedOut=!0,this.checkRemainingSessionTime()):this.submitLogin())},submitLogin:function(){var t={loginName:Craft.username,password:this.$passwordInput.val()};Craft.postActionRequest("users/login",t,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.hideLoginModal(),this.checkRemainingSessionTime()):(this.showLoginError(t.error),Garnish.shake(this.loginModal.$container),Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")):this.showLoginError()},this))},showLoginError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$loginErrorPara.text(t),this.loginModal.updateSizeAndPosition()},clearLoginError:function(){this.showLoginError("")}},{checkInterval:60,minSafeSessiotTime:120}),Craft.CategoryIndex=Craft.BaseElementIndex.extend({editableGroups:null,$newCategoryBtnGroup:null,$newCategoryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.editableGroups=[];for(var t=0;t<Craft.editableCategoryGroups.length;t++){var e=Craft.editableCategoryGroups[t];this.getSourceByKey("group:"+e.uid)&&this.editableGroups.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultGroupHandle)for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultGroupHandle)return e.data("key")}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s=this.$source.data("handle");if(this.editableGroups.length){var n,a;if(this.$newCategoryBtnGroup&&this.$newCategoryBtnGroup.remove(),s)for(t=0;t<this.editableGroups.length;t++)if(this.editableGroups[t].handle===s){n=this.editableGroups[t];break}if(this.$newCategoryBtnGroup=$('<div class="btngroup submit"/>'),n?(e=this._getGroupTriggerHref(n),i="index"===this.settings.context?Craft.t("app","New category"):Craft.t("app","New {group} category",{group:n.name}),this.$newCategoryBtn=$('<a class="btn submit add icon" '+e+">"+Craft.escapeHtml(i)+"</a>").appendTo(this.$newCategoryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newCategoryBtn,"click",function(t){this._openCreateCategoryModal(t.currentTarget.getAttribute("data-id"))}),1<this.editableGroups.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newCategoryBtnGroup))):this.$newCategoryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New category")+"</div>").appendTo(this.$newCategoryBtnGroup),a){var r='<div class="menu"><ul>';for(t=0;t<this.editableGroups.length;t++){var o=this.editableGroups[t];"index"!==this.settings.context&&o===n||(e=this._getGroupTriggerHref(o),i="index"===this.settings.context?o.name:Craft.t("app","New {group} category",{group:o.name}),r+="<li><a "+e+'">'+Craft.escapeHtml(i)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newCategoryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateCategoryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newCategoryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="categories";s&&(h+="/"+s),history.replaceState({},"",Craft.getUrl(h))}}},_getGroupTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="categories/"+t.handle+"/new";if(this.siteId&&this.siteId!=Craft.primarySiteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(e+="/"+Craft.sites[i].handle);return'href="'+Craft.getUrl(e)+'"'},_openCreateCategoryModal:function(t){if(!this.$newCategoryBtn.hasClass("loading")){for(var i,e=0;e<this.editableGroups.length;e++)if(this.editableGroups[e].id==t){i=this.editableGroups[e];break}if(i){this.$newCategoryBtn.addClass("inactive");var s=this.$newCategoryBtn.text();this.$newCategoryBtn.text(Craft.t("app","New {group} category",{group:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newCategoryBtnGroup,elementType:"craft\\elements\\Category",siteId:this.siteId,attributes:{groupId:t},onBeginLoading:$.proxy(function(){this.$newCategoryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newCategoryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newCategoryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="group:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Category",Craft.CategoryIndex),Craft.CategorySelectInput=Craft.BaseElementSelectInput.extend({setSettings:function(){this.base.apply(this,arguments),this.settings.sortable=!1},getModalSettings:function(){var t=this.base();return t.hideOnSelect=!1,t},getElements:function(){return this.$elementsContainer.find(".element")},onModalSelect:function(o){this.modal.disable(),this.modal.disableCancelBtn(),this.modal.disableSelectBtn(),this.modal.showFooterSpinner();for(var t=this.getSelectedElementIds(),e=0;e<o.length;e++)t.push(o[e].id);var i={categoryIds:t,siteId:o[0].siteId,id:this.settings.id,name:this.settings.name,branchLimit:this.settings.branchLimit,selectionLabel:this.settings.selectionLabel};Craft.postActionRequest("elements/get-categories-input-html",i,$.proxy(function(t,e){if(this.modal.enable(),this.modal.enableCancelBtn(),this.modal.enableSelectBtn(),this.modal.hideFooterSpinner(),"success"===e){var i=$(t.html).children(".elements");this.$elementsContainer.replaceWith(i),this.$elementsContainer=i,this.resetElements();for(var s=[],n=0;n<o.length;n++){var a=o[n],r=this.getElementById(a.id);r&&(this.animateElementIntoPlace(a.$element,r),s.push(a))}this.updateDisabledElementsInModal(),this.modal.hide(),this.onSelectElements(s)}},this))},removeElement:function(t){var e=t.add(t.parent().siblings("ul").find(".element"));this.removeElements(e);for(var i=0;i<e.length;i++)this._animateCategoryAway(e,i)},_animateCategoryAway:function(i,t){var e;t===i.length-1&&(e=$.proxy(function(){var t=i.first().parent().parent(),e=t.parent();e[0]===this.$elementsContainer[0]||t.siblings().length?t.remove():e.remove()},this));var s=$.proxy(function(){this.animateElementAway(i.eq(t),e)},this);0===t?s():setTimeout(s,100*t)}}),Craft.charts={},Craft.charts.DataTable=Garnish.Base.extend({columns:null,rows:null,init:function(t){columns=t.columns,rows=t.rows,rows.forEach($.proxy(function(i){$.each(i,function(t){var e;switch(columns[t].type){case"date":e=d3.timeParse("%Y-%m-%d"),i[t]=e(i[t]);break;case"datetime":e=d3.timeParse("%Y-%m-%d %H:00:00"),i[t]=e(i[t]);break;case"percent":i[t]=i[t]/100;break;case"number":i[t]=+i[t]}})},this)),this.columns=columns,this.rows=rows}}),Craft.charts.Tip=Garnish.Base.extend({$container:null,$tip:null,init:function(t){this.$container=t,this.$tip=$('<div class="tooltip"></div>').appendTo(this.$container),this.hide()},setContent:function(t){this.$tip.html(t)},setPosition:function(t){this.$tip.css("left",t.left+"px"),this.$tip.css("top",t.top+"px")},show:function(){this.$tip.css("display","block")},hide:function(){this.$tip.css("display","none")}}),Craft.charts.BaseChart=Garnish.Base.extend({$container:null,$chart:null,chartBaseClass:"cp-chart",dataTable:null,formatLocale:null,timeFormatLocale:null,orientation:null,svg:null,width:null,height:null,init:function(t,e){this.$container=t,this.setSettings(Craft.charts.BaseChart.defaults),this.setSettings(e);var i={formats:window.d3Formats,formatLocaleDefinition:window.d3FormatLocaleDefinition,timeFormatLocaleDefinition:window.d3TimeFormatLocaleDefinition};this.setSettings(i),d3.select(window).on("resize",$.proxy(function(){this.resize()},this))},setSettings:function(t,e){var i=void 0===this.settings?{}:this.settings;this.settings=$.extend(!0,{},i,e,t)},draw:function(t,e){this.setSettings(e),this.dataTable=t,this.formatLocale=d3.formatLocale(this.settings.formatLocaleDefinition),this.timeFormatLocale=d3.timeFormatLocale(this.settings.timeFormatLocaleDefinition),this.orientation=this.settings.orientation,this.$chart&&this.$chart.remove();var i=this.chartBaseClass;this.settings.chartClass&&(i+=" "+this.settings.chartClass),this.$chart=$('<div class="'+i+'" />').appendTo(this.$container)},resize:function(){this.draw(this.dataTable,this.settings)},onAfterDrawTicks:function(){$(".tick",this.$chart).each(function(t,e){var i=$("text",e);i.clone().appendTo(e),i.attr("stroke","#ffffff"),i.attr("stroke-width",3)})}},{defaults:{formatLocaleDefinition:null,timeFormatLocaleDefinition:null,formats:{numberFormat:",.2f",percentFormat:",.2%",currencyFormat:"$,.2f",shortDateFormats:{day:"%-m/%-d",month:"%-m/%y",year:"%Y"}},margin:{top:0,right:0,bottom:0,left:0},chartClass:null,colors:["#0594D1","#DE3800","#FF9A00","#009802","#9B009B"]}}),Craft.charts.Area=Craft.charts.BaseChart.extend({tip:null,drawingArea:null,init:function(t,e){this.base(t,Craft.charts.Area.defaults),this.setSettings(e)},draw:function(t,e){this.base(t,e),this.tip&&(this.tip=null);var i=this.getChartMargin();this.width=this.$chart.width()-i.left-i.right,this.height=this.$chart.height()-i.top-i.bottom;var s={width:this.width+(i.left+i.right),height:this.height+(i.top+i.bottom),translateX:"rtl"!==this.orientation?i.left:i.right,translateY:i.top};this.svg=d3.select(this.$chart.get(0)).append("svg").attr("width",s.width).attr("height",s.height),this.drawingArea=this.svg.append("g").attr("transform","translate("+s.translateX+","+s.translateY+")"),this.drawTicks(),this.drawAxes(),this.drawChart(),this.drawTipTriggers()},drawTicks:function(){var t=this.getX(!0),e=d3.axisBottom(t).tickFormat(this.getXFormatter()).ticks(3);this.drawingArea.append("g").attr("class","x ticks-axis").attr("transform","translate(0, "+this.height+")").call(e);var i,s=this.getY();"rtl"!==this.orientation?(i=d3.axisLeft(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").call(i)):(i=d3.axisRight(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").attr("transform","translate("+this.width+",0)").call(i)),this.onAfterDrawTicks()},drawAxes:function(){if(this.settings.xAxis.showAxis){var t=this.getX(),e=d3.axisBottom(t).ticks(0).tickSizeOuter(0);this.drawingArea.append("g").attr("class","x axis").attr("transform","translate(0, "+this.height+")").call(e)}if(this.settings.yAxis.showAxis){var i,s=this.getY();"rtl"===this.orientation?(i=d3.axisLeft(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate("+(this.width-0)+", 0)").call(i)):(i=d3.axisRight(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(i))}},drawChart:function(){var e=this.getX(!0),i=this.getY();if(this.settings.xAxis.gridlines){var t=d3.axisBottom(e);this.drawingArea.append("g").attr("class","x grid-line").attr("transform","translate(0,"+this.height+")").call(t.tickSize(-this.height,0,0).tickFormat(""))}if(this.settings.yAxis.gridlines){var s=d3.axisLeft(i);this.drawingArea.append("g").attr("class","y grid-line").attr("transform","translate(0 , 0)").call(s.tickSize(-this.width,0).tickFormat("").tickValues(this.getYTickValues()).ticks(2))}var n=d3.line().x(function(t){return e(t[0])}).y(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-line").append("path").datum(this.dataTable.rows).style("fill","none").style("stroke",this.settings.colors[0]).style("stroke-width","3px").attr("d",n);var a=d3.area().x(function(t){return e(t[0])}).y0(this.height).y1(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-area").append("path").datum(this.dataTable.rows).style("fill",this.settings.colors[0]).style("fill-opacity","0.3").attr("d",a),this.settings.plots&&this.drawingArea.append("g").attr("class","plots").selectAll("circle").data(this.dataTable.rows).enter().append("circle").style("fill",this.settings.colors[0]).attr("class",$.proxy(function(t,e){return"plot plot-"+e},this)).attr("r",4).attr("cx",$.proxy(function(t){return e(t[0])},this)).attr("cy",$.proxy(function(t){return i(t[1])},this))},drawTipTriggers:function(){if(this.settings.tips){this.tip||(this.tip=new Craft.charts.Tip(this.$chart));var t=this.getChartMargin(),e=(this.drawingArea.select(".x path.domain").node().getTotalLength()-t.left-t.right-12)/(this.dataTable.rows.length-1),i=Math.max(0,e),c=this.getX(!0),u=this.getY();this.drawingArea.append("g").attr("class","tip-triggers").selectAll("rect").data(this.dataTable.rows).enter().append("rect").attr("class","tip-trigger").style("fill","transparent").style("fill-opacity","1").attr("width",i).attr("height",this.height).attr("x",$.proxy(function(t){return c(t[0])-i/2},this)).on("mouseover",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",5);var i=$("<div />"),s=$('<div class="x-value" />').appendTo(i),n=$('<div class="y-value" />').appendTo(i);s.html(this.getXFormatter()(t[0])),n.html(this.getYFormatter()(t[1]));var a=i.get(0);this.tip.setContent(a);var r,o=this.getChartMargin(),l=u(t[1])+24;if("rtl"!==this.orientation){r=c(t[0])+o.left+24;var h=this.$chart.offset().left+r+this.tip.$tip.width();this.$chart.offset().left+this.$chart.width()-24<h&&(r=c(t[0])-(this.tip.$tip.width()+24))}else r=c(t[0])-(this.tip.$tip.width()+o.left+24);r<0&&(r=c(t[0])+o.left+24);var d={top:l,left:r};this.tip.setPosition(d),this.tip.show()},this)).on("mouseout",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",4),this.tip.hide()},this))}},getChartMargin:function(){var t=this.settings.margin,e=this.getYTickValues(),s=0;return $.each(e,$.proxy(function(t,e){var i=8*this.getYFormatter()(e).length;s<i&&(s=i)},this)),s+=10,t.left=s,t},getX:function(t){var e=d3.min(this.dataTable.rows,function(t){return t[0]}),i=d3.max(this.dataTable.rows,function(t){return t[0]}),s=[e,i];"rtl"===this.orientation&&(s=[i,e]);var n=0,a=0;t&&(a=n=0);var r=d3.scaleTime().range([n,this.width-a]);return r.domain(s),r},getY:function(){var t=[0,this.getYMaxValue()],e=d3.scaleLinear().range([this.height,0]);return e.domain(t),e},getXFormatter:function(){return this.settings.xAxis.formatter!==$.noop?this.settings.xAxis.formatter(this):Craft.charts.utils.getTimeFormatter(this.timeFormatLocale,this.settings)},getYFormatter:function(){return this.settings.yAxis.formatter!==$.noop?this.settings.yAxis.formatter(this):Craft.charts.utils.getNumberFormatter(this.formatLocale,this.dataTable.columns[1].type,this.settings)},getYMaxValue:function(){return d3.max(this.dataTable.rows,function(t){return t[1]})},getYTickValues:function(){var t=this.getYMaxValue();return 1<t?[t/2,t]:[0,t]}},{defaults:{chartClass:"area",margin:{top:25,right:5,bottom:25,left:0},plots:!0,tips:!0,xAxis:{gridlines:!1,showAxis:!0,formatter:$.noop},yAxis:{gridlines:!0,showAxis:!1,formatter:$.noop}}}),Craft.charts.utils={getDuration:function(t){var e=parseInt(t,10),i={hours:Math.floor(e/3600),minutes:Math.floor((e-3600*i.hours)/60),seconds:e-3600*i.hours-60*i.minutes};return i.hours<10&&(i.hours="0"+i.hours),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds),i.hours+":"+i.minutes+":"+i.seconds},getTimeFormatter:function(t,e){switch(e.dataScale){case"year":return t.format("%Y");case"month":return t.format(e.formats.shortDateFormats.month);case"hour":return t.format(e.formats.shortDateFormats.day+" %H:00:00");default:return t.format(e.formats.shortDateFormats.day)}},getNumberFormatter:function(t,e,i){switch(e){case"currency":return t.format(i.formats.currencyFormat);case"percent":return t.format(i.formats.percentFormat);case"time":return Craft.charts.utils.getDuration;case"number":return t.format(i.formats.numberFormat)}}},Craft.ColorInput=Garnish.Base.extend({$container:null,$input:null,$colorContainer:null,$colorPreview:null,$colorInput:null,init:function(t){this.$container=$(t),this.$input=this.$container.children(".color-input"),this.$colorContainer=this.$container.children(".color"),this.$colorPreview=this.$colorContainer.children(".color-preview"),this.createColorInput(),this.handleTextChange(),this.addListener(this.$input,"textchange","handleTextChange")},createColorInput:function(){var t=document.createElement("input");t.setAttribute("type","color"),"color"===t.type&&(this.$colorContainer.removeClass("static"),this.$colorInput=$(t).addClass("hidden").insertAfter(this.$input),this.addListener(this.$colorContainer,"click",function(){this.$colorInput.trigger("click")}),this.addListener(this.$colorInput,"change","updateColor"))},updateColor:function(){this.$input.val(this.$colorInput.val()),this.$input.data("garnish-textchange-value",this.$colorInput.val()),this.handleTextChange()},handleTextChange:function(){var t=this.$input.val();t.length&&"#"!==t?("#"!==t[0]&&(t="#"+t,this.$input.val(t),this.$input.data("garnish-textchange-value",t)),this.$colorPreview.css("background-color",t),this.$colorInput&&this.$colorInput.val(t)):this.$colorPreview.css("background-color","")}},{_browserSupportsColorInputs:null,doesBrowserSupportColorInputs:function(){return Craft.ColorInput._browserSupportsColorInputs,Craft.ColorInput._browserSupportsColorInputs}}),Craft.CP=Garnish.Base.extend({authManager:null,$nav:null,$mainContainer:null,$alerts:null,$crumbs:null,$notificationContainer:null,$main:null,$primaryForm:null,$header:null,$mainContent:null,$details:null,$selectedTab:null,$sidebar:null,$contentContainer:null,$edition:null,$collapsibleTables:null,fixedHeader:!1,enableQueue:!0,jobInfo:null,displayedJobInfo:null,displayedJobInfoUnchanged:1,trackJobProgressTimeout:null,jobProgressIcon:null,checkingForUpdates:!1,forcingRefreshOnUpdatesCheck:!1,checkForUpdatesCallbacks:null,init:function(){0!==Craft.remainingSessionTime&&(this.authManager=new Craft.AuthManager),this.$nav=$("#nav"),this.$mainContainer=$("#main-container"),this.$alerts=$("#alerts"),this.$crumbs=$("#crumbs"),this.$notificationContainer=$("#notifications"),this.$main=$("#main"),this.$primaryForm=$("#main-form"),this.$header=$("#header"),this.$mainContent=$("#main-content"),this.$details=$("#details"),this.$sidebar=$("#sidebar"),this.$contentContainer=$("#content-container"),this.$collapsibleTables=$("table.collapsible"),this.$edition=$("#edition"),this.updateSidebarMenuLabel(),this.addListener(Garnish.$win,"scroll","updateFixedHeader"),this.updateFixedHeader(),Garnish.$doc.ready($.proxy(function(){this.addListener(Garnish.$win,"resize","updateResponsiveTables"),this.updateResponsiveTables();var t=this.$notificationContainer.children(".error"),e=this.$notificationContainer.children(":not(.error)");t.delay(2*Craft.CP.notificationDuration).velocity("fadeOut"),e.delay(Craft.CP.notificationDuration).velocity("fadeOut"),Garnish.requestAnimationFrame($.proxy(this,"initConfirmUnloadForms"))},this)),this.$alerts.length&&this.initAlerts(),this.addListener($("#nav-toggle"),"click","toggleNav"),this.addListener($("#sidebar-toggle"),"click","toggleSidebar"),this.$primaryForm.length||(this.$primaryForm=$("form[data-saveshortcut]:first")),this.$primaryForm.length&&Garnish.hasAttr(this.$primaryForm,"data-saveshortcut")&&this.addListener(Garnish.$doc,"keydown",function(t){return Garnish.isCtrlKeyPressed(t)&&t.keyCode===Garnish.S_KEY&&(t.preventDefault(),this.submitPrimaryForm()),!0}),this.initTabs(),this.$edition.hasClass("hot")&&this.addListener(this.$edition,"click",function(){document.location.href=Craft.getUrl("plugin-store/upgrade-craft")}),$.isTouchCapable()&&(this.$mainContainer.on("focus","input, textarea, .focusable-input",$.proxy(this,"_handleInputFocus")),this.$mainContainer.on("blur","input, textarea, .focusable-input",$.proxy(this,"_handleInputBlur"))),$("a").each(function(){this.hostname.length&&this.hostname!==location.hostname&&void 0===$(this).attr("target")&&$(this).attr("rel","noopener").attr("target","_blank")})},initConfirmUnloadForms:function(){if(this.$confirmUnloadForms=$("form[data-confirm-unload]"),this.$confirmUnloadForms.length){for(var t,e,i=0;i<this.$confirmUnloadForms.length;i++)(t=this.$confirmUnloadForms.eq(i)).data("initialSerializedValue")||(e="function"==typeof t.data("serializer")?t.data("serializer")():t.serialize(),t.data("initialSerializedValue",e)),this.addListener(t,"submit",function(){this.removeListener(Garnish.$win,"beforeunload")});this.addListener(Garnish.$win,"beforeunload",function(t){var e,i,s=!1;if(void 0!==Craft.livePreview&&Craft.livePreview.inPreviewMode)s=!0;else for(var n=0;n<this.$confirmUnloadForms.length;n++)if(i="function"==typeof(e=this.$confirmUnloadForms.eq(n)).data("serializer")?e.data("serializer")():e.serialize(),e.data("initialSerializedValue")!==i){s=!0;break}if(s){var a=Craft.t("app","Any changes will be lost if you leave this page.");return t?t.originalEvent.returnValue=a:window.event.returnValue=a,a}})}},_handleInputFocus:function(){this.updateFixedHeader()},_handleInputBlur:function(){this.updateFixedHeader()},submitPrimaryForm:function(){this.trigger("beforeSaveShortcut"),this.$primaryForm.data("saveshortcut-redirect")&&$('<input type="hidden" name="redirect" value="'+this.$primaryForm.data("saveshortcut-redirect")+'"/>').appendTo(this.$primaryForm),this.$primaryForm.trigger({type:"submit",saveShortcut:!0})},updateSidebarMenuLabel:function(){var t=this.$sidebar.find("a.sel:first"),e=t.children(".label");$("#selected-sidebar-item-label").text(e.length?e.text():t.text()),Garnish.$bod.removeClass("showing-sidebar")},toggleNav:function(){Garnish.$bod.toggleClass("showing-nav")},toggleSidebar:function(){Garnish.$bod.toggleClass("showing-sidebar")},initTabs:function(){this.$selectedTab=null;var t,e,i,s=$("#tabs").find("> ul > li"),n=[],a=[],r=0;for(t=0;t<s.length;t++)n[t]=$(s[t]),a[t]=n[t].width(),r+=a[t],(i=(e=n[t].children("a")).attr("href"))&&"#"===i.charAt(0)&&(this.addListener(e,"click",function(t){t.preventDefault(),this.selectTab(t.currentTarget)}),encodeURIComponent(i.substr(1))===document.location.hash.substr(1)&&this.selectTab(e)),!this.$selectedTab&&e.hasClass("sel")&&(this.$selectedTab=e);for(t=0;t<s.length;t++)n[t].css("max-width",100*a[t]/r+"%")},selectTab:function(t){var e=$(t);if(this.$selectedTab){if(this.$selectedTab.get(0)===e.get(0))return;this.deselectTab()}e.addClass("sel");var i=e.attr("href");$(i).removeClass("hidden"),"undefined"!=typeof history&&history.replaceState(void 0,void 0,i),Garnish.$win.trigger("resize"),Garnish.$doc.trigger("scroll"),this.$selectedTab=e},deselectTab:function(){this.$selectedTab&&(this.$selectedTab.removeClass("sel"),"#"===this.$selectedTab.attr("href").charAt(0)&&$(this.$selectedTab.attr("href")).addClass("hidden"),this.$selectedTab=null)},updateResponsiveTables:function(){for(this.updateResponsiveTables._i=0;this.updateResponsiveTables._i<this.$collapsibleTables.length;this.updateResponsiveTables._i++)this.updateResponsiveTables._$table=this.$collapsibleTables.eq(this.updateResponsiveTables._i),this.updateResponsiveTables._containerWidth=this.updateResponsiveTables._$table.parent().width(),this.updateResponsiveTables._check=!1,0<this.updateResponsiveTables._containerWidth&&(void 0===this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._check=!0:(this.updateResponsiveTables._isCollapsed=this.updateResponsiveTables._$table.hasClass("collapsed"),this.updateResponsiveTables._containerWidth>this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._isCollapsed&&(this.updateResponsiveTables._$table.removeClass("collapsed"),this.updateResponsiveTables._check=!0):this.updateResponsiveTables._isCollapsed||(this.updateResponsiveTables._check=!0)),!this.updateResponsiveTables._check||this.updateResponsiveTables._$table.width()>this.updateResponsiveTables._containerWidth&&this.updateResponsiveTables._$table.addClass("collapsed"),this.updateResponsiveTables._$table.data("lastContainerWidth",this.updateResponsiveTables._containerWidth))},updateFixedHeader:function(){if(this.$main.length&&this.$main[0].getBoundingClientRect().top<0){if(!this.fixedHeader){var t=this.$header.outerHeight(),e={top:t+"px","max-height":"calc(100vh - "+t+"px)"};this.$sidebar.css(e),this.$details.css(e),this.$mainContent.css("margin-top",this.$header.outerHeight()),Garnish.$bod.addClass("fixed-header"),this.fixedheader=!0}}else this.fixedheader&&(Garnish.$bod.removeClass("fixed-header"),this.$details.css({top:null,"max-height":null}),this.$header.css("top",0),this.$mainContent.css("margin-top",0),this.fixedheader=!1)},displayNotification:function(t,e){var i=Craft.CP.notificationDuration;"error"===t&&(i*=2);var s=$('<div class="notification '+t+'">'+e+"</div>").appendTo(this.$notificationContainer),n=-s.outerWidth()/2+"px";s.hide().css({opacity:0,"margin-left":n,"margin-right":n}).velocity({opacity:1,"margin-left":"2px","margin-right":"2px"},{display:"inline-block",duration:"fast"}).delay(i).velocity({opacity:0,"margin-left":n,"margin-right":n},{complete:function(){s.remove()}}),this.trigger("displayNotification",{notificationType:t,message:e})},displayNotice:function(t){this.displayNotification("notice",t)},displayError:function(t){t||(t=Craft.t("app","An unknown error occurred.")),this.displayNotification("error",t)},fetchAlerts:function(){var t={path:Craft.path};Craft.queueActionRequest("app/get-cp-alerts",t,$.proxy(this,"displayAlerts"))},displayAlerts:function(t){if(this.$alerts.remove(),Garnish.isArray(t)&&t.length){this.$alerts=$('<ul id="alerts"/>').prependTo(this.$mainContainer);for(var e=0;e<t.length;e++)$("<li>"+t[e]+"</li>").appendTo(this.$alerts);var i=this.$alerts.outerHeight();this.$alerts.css("margin-top",-i).velocity({"margin-top":0},"fast"),this.initAlerts()}},initAlerts:function(){for(var t=this.$alerts.find('a[class^="shun:"]'),e=0;e<t.length;e++)this.addListener(t[e],"click",$.proxy(function(t){t.preventDefault();var i=$(t.currentTarget),e={message:i.prop("className").substr(5)};Craft.queueActionRequest("app/shun-cp-alert",e,$.proxy(function(t,e){"success"===e&&(t.success?i.parent().remove():this.displayError(t.error))},this))},this))},checkForUpdates:function(t,e){if(this.checkingForUpdates&&!0===t&&!this.forcingRefreshOnUpdatesCheck){var i=e;e=function(){Craft.cp.checkForUpdates(!0,i)}}if("function"==typeof e&&(Garnish.isArray(this.checkForUpdatesCallbacks)||(this.checkForUpdatesCallbacks=[]),this.checkForUpdatesCallbacks.push(e)),!this.checkingForUpdates){this.checkingForUpdates=!0,this.forcingRefreshOnUpdatesCheck=!0===t;var s={forceRefresh:!0===t};Craft.queueActionRequest("app/check-for-updates",s,$.proxy(function(t){if(this.updateUtilitiesBadge(),this.checkingForUpdates=!1,Garnish.isArray(this.checkForUpdatesCallbacks)){var e=this.checkForUpdatesCallbacks;this.checkForUpdatesCallbacks=null;for(var i=0;i<e.length;i++)e[i](t)}this.trigger("checkForUpdates",{updateInfo:t})},this))}},updateUtilitiesBadge:function(){var i=$("#nav-utilities").find("> a:not(.sel)");i.length&&Craft.queueActionRequest("app/get-utilities-badge-count",$.proxy(function(t){var e=i.children(".badge");t.badgeCount?(e.length||(e=$('<span class="badge"/>').appendTo(i)),e.text(t.badgeCount)):e.length&&e.remove()},this))},runQueue:function(){this.enableQueue&&(Craft.runQueueAutomatically?Craft.queueActionRequest("queue/run",$.proxy(function(t,e){"success"===e&&this.trackJobProgress(!1,!0)},this)):this.trackJobProgress(!1,!0))},trackJobProgress:function(t,e){if(e&&this.trackJobProgressTimeout&&(clearTimeout(this.trackJobProgressTimeout),this.trackJobProgressTimeout=null),!this.trackJobProgressTimeout&&this.enableQueue)if(!0===t){var i=Math.min(6e4,500*this.displayedJobInfoUnchanged);this.trackJobProgressTimeout=setTimeout($.proxy(this,"_trackJobProgressInternal"),i)}else this._trackJobProgressInternal()},_trackJobProgressInternal:function(){Craft.queueActionRequest("queue/get-job-info?dontExtendSession=1",$.proxy(function(t,e){"success"===e&&(this.trackJobProgressTimeout=null,this.setJobInfo(t,!0),this.jobInfo.length&&this.trackJobProgress(!0))},this))},setJobInfo:function(t,e){if(this.enableQueue){this.jobInfo=t;var i=this.displayedJobInfo;this.displayedJobInfo=this.getDisplayedJobInfo(),i&&this.displayedJobInfo&&i.id===this.displayedJobInfo.id&&i.progress===this.displayedJobInfo.progress&&i.progressLabel===this.displayedJobInfo.progressLabel&&i.status===this.displayedJobInfo.status?this.displayedJobInfoUnchanged++:this.displayedJobInfoUnchanged=1,this.updateJobIcon(e),this.trigger("setJobInfo")}},getDisplayedJobInfo:function(){if(!this.enableQueue)return null;for(var t=[Craft.CP.JOB_STATUS_RESERVED,Craft.CP.JOB_STATUS_FAILED,Craft.CP.JOB_STATUS_WAITING],e=0;e<t.length;e++)for(var i=0;i<this.jobInfo.length;i++)if(this.jobInfo[i].status===t[e])return this.jobInfo[i]},updateJobIcon:function(t){this.enableQueue&&this.$nav.length&&(this.displayedJobInfo?(this.jobProgressIcon||(this.jobProgressIcon=new e),this.displayedJobInfo.status===Craft.CP.JOB_STATUS_RESERVED||this.displayedJobInfo.status===Craft.CP.JOB_STATUS_WAITING?(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.setDescription(this.displayedJobInfo.description),this.jobProgressIcon.setProgress(this.displayedJobInfo.progress,t)):this.displayedJobInfo.status===Craft.CP.JOB_STATUS_FAILED&&this.jobProgressIcon.showFailMode(Craft.t("app","Failed"))):this.jobProgressIcon&&(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.complete(),delete this.jobProgressIcon))}},{notificationDuration:2e3,JOB_STATUS_WAITING:1,JOB_STATUS_RESERVED:2,JOB_STATUS_DONE:3,JOB_STATUS_FAILED:4}),Garnish.$scrollContainer=$("#content"),Craft.cp=new Craft.CP;var e=Garnish.Base.extend({$li:null,$a:null,$label:null,hud:null,failMode:!1,_canvasSupported:null,_$bgCanvas:null,_$staticCanvas:null,_$hoverCanvas:null,_$failCanvas:null,_staticCtx:null,_hoverCtx:null,_canvasSize:null,_arcPos:null,_arcRadius:null,_lineWidth:null,_arcStartPos:0,_arcEndPos:0,_arcStartStepSize:null,_arcEndStepSize:null,_arcStep:null,_arcStepTimeout:null,_arcAnimateCallback:null,_progressBar:null,init:function(){if(this.$li=$("<li/>").appendTo(Craft.cp.$nav.children("ul")),this.$a=$('<a id="job-icon"/>').appendTo(this.$li),this.$canvasContainer=$('<span class="icon"/>').appendTo(this.$a),this.$label=$('<span class="label"></span>').appendTo(this.$a),this._canvasSupported=!!document.createElement("canvas").getContext,this._canvasSupported){var t=1<window.devicePixelRatio?2:1;this._canvasSize=18*t,this._arcPos=this._canvasSize/2,this._arcRadius=7*t,this._lineWidth=3*t,this._$bgCanvas=this._createCanvas("bg","#61666b"),this._$staticCanvas=this._createCanvas("static","#d7d9db"),this._$hoverCanvas=this._createCanvas("hover","#fff"),this._$failCanvas=this._createCanvas("fail","#da5a47").hide(),this._staticCtx=this._$staticCanvas[0].getContext("2d"),this._hoverCtx=this._$hoverCanvas[0].getContext("2d"),this._drawArc(this._$bgCanvas[0].getContext("2d"),0,1),this._drawArc(this._$failCanvas[0].getContext("2d"),0,1)}else this._progressBar=new Craft.ProgressBar(this.$canvasContainer),this._progressBar.showProgressBar();this.addListener(this.$a,"click","toggleHud")},setDescription:function(t){this.$a.attr("title",t),this.$label.text(t)},setProgress:function(t,e){this._canvasSupported?e?this._animateArc(0,t/100):this._setArc(0,t/100):this._progressBar.setProgressPercentage(t)},complete:function(){this._canvasSupported?this._animateArc(0,1,$.proxy(function(){this._$bgCanvas.velocity("fadeOut"),this._animateArc(1,1,$.proxy(function(){this.$a.remove(),this.destroy()},this))},this)):(this._progressBar.setProgressPercentage(100),this.$a.velocity("fadeOut"))},showFailMode:function(t){this.failMode||(this.failMode=!0,this._canvasSupported?(this._$bgCanvas.hide(),this._$staticCanvas.hide(),this._$hoverCanvas.hide(),this._$failCanvas.show()):(this._progressBar.$progressBar.css("border-color","#da5a47"),this._progressBar.$innerProgressBar.css("background-color","#da5a47"),this._progressBar.setProgressPercentage(50)),this.setDescription(t))},hideFailMode:function(){this.failMode&&(this.failMode=!1,this._canvasSupported?(this._$bgCanvas.show(),this._$staticCanvas.show(),this._$hoverCanvas.show(),this._$failCanvas.hide()):(this._progressBar.$progressBar.css("border-color",""),this._progressBar.$innerProgressBar.css("background-color",""),this._progressBar.setProgressPercentage(50)))},toggleHud:function(){this.hud?this.hud.toggle():this.hud=new o},_createCanvas:function(t,e){var i=$('<canvas id="job-icon-'+t+'" width="'+this._canvasSize+'" height="'+this._canvasSize+'"/>').appendTo(this.$canvasContainer),s=i[0].getContext("2d");return s.strokeStyle=e,s.lineWidth=this._lineWidth,s.lineCap="round",i},_setArc:function(t,e){this._arcStartPos=t,this._arcEndPos=e,this._drawArc(this._staticCtx,t,e),this._drawArc(this._hoverCtx,t,e)},_drawArc:function(t,e,i){t.clearRect(0,0,this._canvasSize,this._canvasSize),t.beginPath(),t.arc(this._arcPos,this._arcPos,this._arcRadius,(1.5+2*e)*Math.PI,(1.5+2*i)*Math.PI),t.stroke(),t.closePath()},_animateArc:function(t,e,i){this._arcStepTimeout&&clearTimeout(this._arcStepTimeout),this._arcStep=0,this._arcStartStepSize=(t-this._arcStartPos)/10,this._arcEndStepSize=(e-this._arcEndPos)/10,this._arcAnimateCallback=i,this._takeNextArcStep()},_takeNextArcStep:function(){this._setArc(this._arcStartPos+this._arcStartStepSize,this._arcEndPos+this._arcEndStepSize),this._arcStep++,this._arcStep<10?this._arcStepTimeout=setTimeout($.proxy(this,"_takeNextArcStep"),50):this._arcAnimateCallback&&this._arcAnimateCallback()}}),o=Garnish.HUD.extend({jobsById:null,completedJobs:null,updateViewProxy:null,init:function(){this.jobsById={},this.completedJobs=[],this.updateViewProxy=$.proxy(this,"updateView"),this.base(Craft.cp.jobProgressIcon.$a),this.$main.attr("id","queue-hud")},onShow:function(){Craft.cp.on("setJobInfo",this.updateViewProxy),this.updateView(),this.base()},onHide:function(){if(Craft.cp.off("setJobInfo",this.updateViewProxy),this.completedJobs.length){for(var t=0;t<this.completedJobs.length;t++)this.completedJobs[t].destroy();this.completedJobs=[]}this.base()},updateView:function(){var t,e=[];if(Craft.cp.jobInfo)for(t=0;t<Craft.cp.jobInfo.length;t++)e.push(parseInt(Craft.cp.jobInfo[t].id));for(var i in this.jobsById)this.jobsById.hasOwnProperty(i)&&(Craft.inArray(parseInt(i),e)||(this.jobsById[i].complete(),this.completedJobs.push(this.jobsById[i]),delete this.jobsById[i]));if(Craft.cp.jobInfo&&Craft.cp.jobInfo.length)for(t=0;t<Craft.cp.jobInfo.length;t++){var s=Craft.cp.jobInfo[t];if(this.jobsById[s.id])this.jobsById[s.id].updateStatus(s);else{this.jobsById[s.id]=new o.Job(this,s);for(var n=!1,a=t+1;a<Craft.cp.jobInfo.length;a++)if(this.jobsById[Craft.cp.jobInfo[a].id]){this.jobsById[s.id].$container.insertBefore(this.jobsById[Craft.cp.jobInfo[a].id].$container),n=!0;break}if(!n){var r=this.$main.children("object");r.length?this.jobsById[s.id].$container.insertBefore(r):this.jobsById[s.id].$container.appendTo(this.$main)}}}else this.hide()}});o.Job=Garnish.Base.extend({hud:null,id:null,description:null,status:null,progress:null,$container:null,$statusContainer:null,$descriptionContainer:null,$progressLabel:null,_progressBar:null,init:function(t,e){this.hud=t,this.id=e.id,this.description=e.description,this.$container=$("<div/>",{class:"job"});var i=$("<div/>",{class:"flex"}).appendTo(this.$container);$("<div/>",{class:"flex-grow"}).text(e.description).appendTo(i),this.$statusContainer=$('<div class="job-status"/>').appendTo(i),this.$container.data("job",this),this.updateStatus(e)},updateStatus:function(t){if(this.status!==(this.status=t.status))switch(this.$statusContainer.empty(),this.status){case Craft.CP.JOB_STATUS_WAITING:this.$statusContainer.text(Craft.t("app","Pending"));break;case Craft.CP.JOB_STATUS_RESERVED:this._progressBar=new Craft.ProgressBar(this.$statusContainer),this._progressBar.showProgressBar();break;case Craft.CP.JOB_STATUS_FAILED:$("<span/>",{class:"error",text:Craft.t("app","Failed"),title:t.error}).appendTo(this.$statusContainer);var e=$('<a class="menubtn error" title="'+Craft.t("app","Options")+'"/>').appendTo(this.$statusContainer);$('<div class="menu"><ul><li><a data-action="retry">'+Craft.t("app","Try again")+'</a></li><li><a data-action="release">'+Craft.t("app","Cancel")+"</a></li></ul></div>").appendTo(this.$statusContainer),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"performErrorAction")})}this.status===Craft.CP.JOB_STATUS_RESERVED?(this._progressBar.setProgressPercentage(t.progress),t.progressLabel&&(this.$progressLabel||(this.$progressLabel=$('<div class="light smalltext"/>').appendTo(this.$container)),this.$progressLabel.text(t.progressLabel))):this.$progressLabel&&(this.$progressLabel.remove(),this.$progressLabel=null)},performErrorAction:function(t){switch($(t).data("action")){case"retry":Craft.cp.displayedJobInfo.status=Craft.CP.JOB_STATUS_WAITING,Craft.cp.displayedJobInfo.progress=0,Craft.cp.updateJobIcon(!1),Craft.postActionRequest("queue/retry",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this));break;case"release":Craft.postActionRequest("queue/release",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this))}},complete:function(){this.$statusContainer.empty(),$('<div data-icon="check"/>').appendTo(this.$statusContainer)},destroy:function(){this.hud.jobsById[this.id]&&delete this.hud.jobsById[this.id],this.$container.remove(),this.base()}}),Craft.CustomizeSourcesModal=Garnish.Modal.extend({elementIndex:null,$elementIndexSourcesContainer:null,$sidebar:null,$sourcesContainer:null,$sourceSettingsContainer:null,$newHeadingBtn:null,$footer:null,$footerBtnContainer:null,$saveBtn:null,$cancelBtn:null,$saveSpinner:null,$loadingSpinner:null,sourceSort:null,sources:null,selectedSource:null,updateSourcesOnSave:!1,availableTableAttributes:null,init:function(t,e){this.base(),this.setSettings(e,{resizable:!0}),this.elementIndex=t,this.$elementIndexSourcesContainer=this.elementIndex.$sidebar.children("nav").children("ul");var i=$('<form class="modal customize-sources-modal"/>').appendTo(Garnish.$bod);this.$sidebar=$('<div class="cs-sidebar block-types"/>').appendTo(i),this.$sourcesContainer=$('<div class="sources">').appendTo(this.$sidebar),this.$sourceSettingsContainer=$('<div class="source-settings">').appendTo(i),this.$footer=$('<div class="footer"/>').appendTo(i),this.$footerBtnContainer=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn" role="button"/>').text(Craft.t("app","Cancel")).appendTo(this.$footerBtnContainer),this.$saveBtn=$('<div class="btn submit disabled" role="button"/>').text(Craft.t("app","Save")).appendTo(this.$footerBtnContainer),this.$saveSpinner=$('<div class="spinner hidden"/>').appendTo(this.$footerBtnContainer),this.$newHeadingBtn=$('<div class="btn submit add icon"/>').text(Craft.t("app","New heading")).appendTo($('<div class="buttons left secondary-buttons"/>').appendTo(this.$footer)),this.$loadingSpinner=$('<div class="spinner"/>').appendTo(i),this.setContainer(i),this.show();var s={elementType:this.elementIndex.elementType};Craft.postActionRequest("element-index-settings/get-customize-sources-modal-data",s,$.proxy(function(t,e){this.$loadingSpinner.remove(),"success"===e&&(this.$saveBtn.removeClass("disabled"),this.buildModal(t))},this)),this.addListener(this.$newHeadingBtn,"click","handleNewHeadingBtnClick"),this.addListener(this.$cancelBtn,"click","hide"),this.addListener(this.$saveBtn,"click","save"),this.addListener(this.$container,"submit","save")},buildModal:function(t){this.availableTableAttributes=t.availableTableAttributes,this.sourceSort=new Garnish.DragSort({handle:".move",axis:"y",onSortChange:$.proxy(function(){this.updateSourcesOnSave=!0},this)}),this.sources=[];for(var e=0;e<t.sources.length;e++){var i=this.addSource(t.sources[e]);this.sources.push(i)}this.selectedSource||void 0===this.sources[0]||this.sources[0].select()},addSource:function(t){var e,i=$('<div class="customize-sources-item"/>').appendTo(this.$sourcesContainer),s=$('<div class="label"/>').appendTo(i),n=$('<input type="hidden"/>').appendTo(i);return $('<a class="move icon" title="'+Craft.t("app","Reorder")+'" role="button"></a>').appendTo(i),void 0!==t.heading?(i.addClass("heading"),n.attr("name","sourceOrder[][heading]"),(e=new Craft.CustomizeSourcesModal.Heading(this,i,s,n,t)).updateItemLabel(t.heading)):(n.attr("name","sourceOrder[][key]").val(t.key),(e=new Craft.CustomizeSourcesModal.Source(this,i,s,n,t)).updateItemLabel(t.label),(this.elementIndex.sourceKey+"/").substr(0,t.key.length+1)===t.key+"/"&&e.select()),this.sourceSort.addItems(i),e},handleNewHeadingBtnClick:function(){var t=this.addSource({heading:""});Garnish.scrollContainerToElement(this.$sidebar,t.$item),t.select(),this.updateSourcesOnSave=!0},save:function(t){if(t&&t.preventDefault(),!this.$saveBtn.hasClass("disabled")&&this.$saveSpinner.hasClass("hidden")){this.$saveSpinner.removeClass("hidden");var e=this.$container.serialize()+"&elementType="+this.elementIndex.elementType;Craft.postActionRequest("element-index-settings/save-customize-sources-modal-settings",e,$.proxy(function(t,e){if(this.$saveSpinner.addClass("hidden"),"success"===e&&t.success){if(this.updateSourcesOnSave&&this.$elementIndexSourcesContainer.length){for(var i,s=null,n=0;n<this.sourceSort.$items.length;n++){var a=this.sourceSort.$items.eq(n).data("source"),r=a.getIndexSource();r&&(a.isHeading()?i=r:(i&&(this.appendSource(i,s),s=i,i=null),this.appendSource(r,s),s=r))}if(s){var o=s.nextAll();this.elementIndex.sourceSelect.removeItems(o),o.remove()}}this.selectedSource&&this.selectedSource.sourceData.key&&(this.elementIndex.selectSourceByKey(this.selectedSource.sourceData.key),this.elementIndex.updateElements()),Craft.cp.displayNotice(Craft.t("app","Source settings saved")),this.hide()}else{var l="success"===e&&t.error?t.error:Craft.t("app","An unknown error occurred.");Craft.cp.displayError(l)}},this))}},appendSource:function(t,e){e?t.insertAfter(e):t.prependTo(this.$elementIndexSourcesContainer)},destroy:function(){for(var t=0;t<this.sources.length;t++)this.sources[t].destroy();delete this.sources,this.base()}}),Craft.CustomizeSourcesModal.BaseSource=Garnish.Base.extend({modal:null,$item:null,$itemLabel:null,$itemInput:null,$settingsContainer:null,sourceData:null,init:function(t,e,i,s,n){this.modal=t,this.$item=e,this.$itemLabel=i,this.$itemInput=s,this.sourceData=n,this.$item.data("source",this),this.addListener(this.$item,"click","select")},isHeading:function(){return!1},isSelected:function(){return this.modal.selectedSource===this},select:function(){this.isSelected()||(this.modal.selectedSource&&this.modal.selectedSource.deselect(),this.$item.addClass("sel"),(this.modal.selectedSource=this).$settingsContainer?this.$settingsContainer.removeClass("hidden"):this.$settingsContainer=$("<div/>").append(this.createSettings()).appendTo(this.modal.$sourceSettingsContainer),this.modal.$sourceSettingsContainer.scrollTop(0))},createSettings:function(){},getIndexSource:function(){},deselect:function(){this.$item.removeClass("sel"),this.modal.selectedSource=null,this.$settingsContainer.addClass("hidden")},updateItemLabel:function(t){this.$itemLabel.text(t)},destroy:function(){this.$item.data("source",null),this.base()}}),Craft.CustomizeSourcesModal.Source=Craft.CustomizeSourcesModal.BaseSource.extend({createSettings:function(){if(this.sourceData.tableAttributes.length){var t,e,i,s,n=this.sourceData.tableAttributes[0],a=n[0],r=n[1],o=this.createTableColumnOption(a,r,!0,!0),l=$("<div/>"),h=[a];for($('<input type="hidden" name="sources['+this.sourceData.key+'][tableAttributes][]" value=""/>').appendTo(l),t=1;t<this.sourceData.tableAttributes.length;t++)i=(e=this.sourceData.tableAttributes[t])[0],s=e[1],l.append(this.createTableColumnOption(i,s,!1,!0)),h.push(i);for(t=0;t<this.modal.availableTableAttributes.length;t++)i=(e=this.modal.availableTableAttributes[t])[0],s=e[1],Craft.inArray(i,h)||l.append(this.createTableColumnOption(i,s,!1,!1));return new Garnish.DragSort(l.children(),{handle:".move",axis:"y"}),Craft.ui.createField($([o[0],l[0]]),{label:Craft.t("app","Table Columns"),instructions:Craft.t("app","Choose which table columns should be visible for this source, and in which order.")})}},createTableColumnOption:function(t,e,i,s){var n=$('<div class="customize-sources-table-column"/>').append('<div class="icon move"/>').append(Craft.ui.createCheckbox({label:e,name:"sources["+this.sourceData.key+"][tableAttributes][]",value:t,checked:s,disabled:i}));return i&&n.children(".move").addClass("disabled"),n},getIndexSource:function(){var t=this.modal.elementIndex.getSourceByKey(this.sourceData.key);if(t)return t.closest("li")}}),Craft.CustomizeSourcesModal.Heading=Craft.CustomizeSourcesModal.BaseSource.extend({$labelField:null,$labelInput:null,$deleteBtn:null,isHeading:function(){return!0},select:function(){this.base(),this.$labelInput.trigger("focus")},createSettings:function(){return this.$labelField=Craft.ui.createTextField({label:Craft.t("app","Heading"),instructions:Craft.t("app","This can be left blank if you just want an unlabeled separator."),value:this.sourceData.heading}),this.$labelInput=this.$labelField.find(".text"),this.$deleteBtn=$('<a class="error delete"/>').text(Craft.t("app","Delete heading")),this.addListener(this.$labelInput,"textchange","handleLabelInputChange"),this.addListener(this.$deleteBtn,"click","deleteHeading"),$([this.$labelField[0],$("<hr/>")[0],this.$deleteBtn[0]])},handleLabelInputChange:function(){this.updateItemLabel(this.$labelInput.val()),this.modal.updateSourcesOnSave=!0},updateItemLabel:function(t){this.$itemLabel.html((t?Craft.escapeHtml(t):'<em class="light">'+Craft.t("app","(blank)")+"</em>")+"&nbsp;"),this.$itemInput.val(t)},deleteHeading:function(){this.modal.sourceSort.removeItems(this.$item),this.modal.sources.splice($.inArray(this,this.modal.sources),1),this.modal.updateSourcesOnSave=!0,this.isSelected()&&(this.deselect(),this.modal.sources.length&&this.modal.sources[0].select()),this.$item.remove(),this.$settingsContainer.remove(),this.destroy()},getIndexSource:function(){var t=this.$labelInput?this.$labelInput.val():this.sourceData.heading;return $('<li class="heading"/>').append($("<span/>").text(t))}}),Craft.DataTableSorter=Garnish.DragSort.extend({$table:null,init:function(t,e){this.$table=$(t);var i=this.$table.children("tbody").children(":not(.filler)");(e=$.extend({},Craft.DataTableSorter.defaults,e)).container=this.$table.children("tbody"),e.helper=$.proxy(this,"getHelper"),e.caboose="<tr/>",e.axis=Garnish.Y_AXIS,e.magnetStrength=4,e.helperLagBase=1.5,this.base(i,e)},getHelper:function(t){var e=$('<div class="'+this.settings.helperClass+'"/>').appendTo(Garnish.$bod),i=$("<table/>").appendTo(e),s=$("<tbody/>").appendTo(i);t.appendTo(s),i.width(this.$table.width()),i.prop("className",this.$table.prop("className"));for(var n=this.$table.find("tr:first").children(),a=t.children(),r=0;r<a.length;r++)$(a[r]).width($(n[r]).width());return e}},{defaults:{handle:".move",helperClass:"datatablesorthelper"}}),Craft.DeleteUserModal=Garnish.Modal.extend({id:null,userId:null,$deleteActionRadios:null,$deleteSpinner:null,userSelect:null,_deleting:!1,init:function(t,e){this.id=Math.floor(1e9*Math.random()),this.userId=t,e=$.extend(Craft.DeleteUserModal.defaults,e);var i,s=$('<form class="modal fitted deleteusermodal" method="post" accept-charset="UTF-8">'+Craft.getCsrfInput()+'<input type="hidden" name="action" value="users/delete-user"/>'+(Garnish.isArray(this.userId)?"":'<input type="hidden" name="userId" value="'+this.userId+'"/>')+(e.redirect?'<input type="hidden" name="redirect" value="'+e.redirect+'"/>':"")+"</form>").appendTo(Garnish.$bod),n=$('<div class="body"><div class="content-summary"><p>'+Craft.t("app","What do you want to do with their content?")+'</p><ul class="bullets"></ul></div><div class="options"><label><input type="radio" name="contentAction" value="transfer"/> '+Craft.t("app","Transfer it to:")+'</label><div id="transferselect'+this.id+'" class="elementselect"><div class="elements"></div><div class="btn add icon dashed">'+Craft.t("app","Choose a user")+'</div></div></div><div><label class="error"><input type="radio" name="contentAction" value="delete"/> '+Craft.t("app","Delete it")+"</label></div></div>").appendTo(s),a=$('<div class="buttons right"/>').appendTo(n),r=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(a);if(e.contentSummary.length)for(var o=0;o<e.contentSummary.length;o++)n.find("ul").append($("<li/>",{text:e.contentSummary[o]}));else n.find("ul").remove();if(this.$deleteActionRadios=n.find("input[type=radio]"),this.$deleteSubmitBtn=$('<input type="submit" class="btn submit disabled" value="'+(Garnish.isArray(this.userId)?Craft.t("app","Delete users"):Craft.t("app","Delete user"))+'" />').appendTo(a),this.$deleteSpinner=$('<div class="spinner hidden"/>').appendTo(a),Garnish.isArray(this.userId)){i=["and"];for(o=0;o<this.userId.length;o++)i.push("not "+this.userId[o])}else i="not "+this.userId;this.userSelect=new Craft.BaseElementSelectInput({id:"transferselect"+this.id,name:"transferContentTo",elementType:"craft\\elements\\User",criteria:{id:i},limit:1,modalSettings:{closeOtherModals:!1},onSelectElements:$.proxy(function(){this.updateSizeAndPosition(),this.$deleteActionRadios.first().prop("checked")?this.validateDeleteInputs():this.$deleteActionRadios.first().trigger("click")},this),onRemoveElements:$.proxy(this,"validateDeleteInputs"),selectable:!1,editable:!1}),this.addListener(r,"click","hide"),this.addListener(this.$deleteActionRadios,"change","validateDeleteInputs"),this.addListener(s,"submit","handleSubmit"),this.base(s,e)},validateDeleteInputs:function(){var t=!1;return this.$deleteActionRadios.eq(0).prop("checked")?t=!!this.userSelect.totalSelected:this.$deleteActionRadios.eq(1).prop("checked")&&(t=!0),t?this.$deleteSubmitBtn.removeClass("disabled"):this.$deleteSubmitBtn.addClass("disabled"),t},handleSubmit:function(t){!this._deleting&&this.validateDeleteInputs()?(this.$deleteSubmitBtn.addClass("active"),this.$deleteSpinner.removeClass("hidden"),this.disable(),this.userSelect.disable(),!(this._deleting=!0)===this.settings.onSubmit()&&t.preventDefault()):t.preventDefault()},onFadeIn:function(){Garnish.isMobileBrowser(!0)||this.$deleteActionRadios.first().trigger("focus"),this.base()}},{defaults:{contentSummary:[],onSubmit:$.noop,redirect:null}}),Craft.DraftEditor=Garnish.Base.extend({$revisionBtn:null,$revisionLabel:null,$spinner:null,$statusIcon:null,$editMetaBtn:null,metaHud:null,$nameTextInput:null,$notesTextInput:null,$saveMetaBtn:null,lastSerializedValue:null,timeout:null,saving:!1,saveXhr:null,checkFormAfterUpdate:!1,submittingForm:!1,duplicatedElements:null,errors:null,preview:null,previewToken:null,init:function(t){if(this.setSettings(t,Craft.DraftEditor.defaults),this.duplicatedElements={},this.$revisionBtn=$("#revision-btn"),this.$revisionLabel=$("#revision-label"),this.$spinner=$("#revision-spinner"),this.$statusIcon=$("#revision-status"),this.settings.previewTargets.length){this.settings.enablePreview&&this.addListener($("#preview-btn"),"click","openPreview");var e=$("#share-btn");1===this.settings.previewTargets.length?this.addListener(e,"click",function(){this.openShareLink(this.settings.previewTargets[0].url)}):this.createShareMenu(e)}this.settings.revisionId||(this.lastSerializedValue=this.serializeForm(!0),Craft.cp.$primaryForm.data("initialSerializedValue",this.lastSerializedValue),Craft.cp.$primaryForm.data("serializer",function(){return this.serializeForm(!0)}.bind(this)),this.settings.draftId?this.initForDraft():(this.addListener($("#save-draft-btn"),"click",function(t){t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut")}.bind(this)),this.settings.canUpdateSource||this.addListener(Craft.cp.$primaryForm,"submit.saveShortcut",function(t){t.saveShortcut&&(t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut"))}.bind(this))))},initForDraft:function(){this.createEditMetaBtn(),this.addListener(Garnish.$bod,"keypress keyup change focus blur click mousedown mouseup",function(t){$(t.target).is(this.statusIcons())||(clearTimeout(this.timeout),Craft.inArray(t.type,["keypress","keyup","change"])?this.timeout=setTimeout(this.checkForm.bind(this),500):this.checkForm())}),this.addListener(Craft.cp.$primaryForm,"submit","handleFormSubmit"),this.addListener(this.$statusIcon,"click",function(){this.showStatusHud(this.$statusIcon)}.bind(this))},showStatusHud:function(t){if(null===this.errors)e="<p>"+Craft.t("app","The draft has been saved.")+"</p>";else{var e='<p class="error">'+Craft.t("app","The draft could not be saved.")+"</p>";if(this.errors.length){for(e+='<ul class="errors">',i=0;i<this.errors.length;i++)e+="<li>"+Craft.escapeHtml(this.errors[i])+"</li>";e+="</ul>"}}var s=new Garnish.HUD(t,e,{onHide:function(){s.destroy(),delete s}})},spinners:function(){return this.preview?this.$spinner.add(this.preview.$spinner):this.$spinner},statusIcons:function(){return this.preview?this.$statusIcon.add(this.preview.$statusIcon):this.$statusIcon},createEditMetaBtn:function(){this.$editMetaBtn=$("<a/>",{class:"btn edit icon",title:Craft.t("app","Edit draft settings")}).appendTo($("#revision-btngroup")),this.addListener(this.$editMetaBtn,"click","showMetaHud")},createShareMenu:function(t){t.addClass("menubtn");for(var e,i,s=$("<div/>",{class:"menu"}).insertAfter(t),n=$("<ul/>").appendTo(s),a=0;a<this.settings.previewTargets.length;a++)e=$("<li/>").appendTo(n),i=$("<a/>",{text:this.settings.previewTargets[a].label}).appendTo(e),this.addListener(i,"click",{target:a},function(t){this.openShareLink(this.settings.previewTargets[t.data.target].url)}.bind(this))},getPreviewToken:function(){return new Promise(function(i,s){this.previewToken?i(this.previewToken):Craft.postActionRequest("preview/create-token",{elementType:this.settings.elementType,sourceId:this.settings.sourceId,siteId:this.settings.siteId,draftId:this.settings.draftId,revisionId:this.settings.revisionId},function(t,e){"success"===e?(this.previewToken=t.token,i(this.previewToken)):s()}.bind(this))}.bind(this))},getTokenizedPreviewUrl:function(s,n){return new Promise(function(e,t){var i={};!n&&this.settings.isLive||(i[n||"x-craft-preview"]=Craft.randomString(10)),this.settings.isLive?e(Craft.getUrl(s,i)):this.getPreviewToken().then(function(t){i[Craft.tokenParam]=t,e(Craft.getUrl(s,i))}).catch(t)}.bind(this))},openShareLink:function(t){this.getTokenizedPreviewUrl(t).then(function(t){window.open(t)})},getPreview:function(){return this.preview||(this.preview=new Craft.Preview(this)),this.preview},openPreview:function(){return new Promise(function(t,e){this.ensureIsDraftOrRevision().then(function(){this.getPreview().open(),t()}.bind(this)).catch(e)}.bind(this))},ensureIsDraftOrRevision:function(){return new Promise(function(t,e){this.settings.draftId||this.settings.revisionid?t():this.createDraft().then(t).catch(e)}.bind(this))},serializeForm:function(t){var e=Craft.cp.$primaryForm.serialize();return this.isPreviewActive()&&(e=e.replace("__PREVIEW_FIELDS__=1",this.preview.$editor.serialize())),t&&!this.settings.isUnsavedDraft&&(e=(e=e.replace(/&action=[^&]*/,"")).replace(/&redirect=[^&]*/,"")),e},checkForm:function(t){if(this.settings.draftId){clearTimeout(this.timeout),this.timeout=null;var e=this.serializeForm(!0);!t&&e===this.lastSerializedValue||this.saveDraft(e)}},isPreviewActive:function(){return this.preview&&this.preview.isActive},createDraft:function(){return new Promise(function(t,e){this.saveDraft(this.serializeForm(!0)).then(t).catch(e)}.bind(this))},saveDraft:function(b){return new Promise(function(f,m){if(this.submittingForm)m();else if(this.lastSerializedValue=b,this.saving)this.checkFormAfterUpdate=!0;else{this.saving=!0;var v=this.spinners().removeClass("hidden"),C=this.statusIcons().removeClass("invisible checkmark-icon alert-icon").addClass("hidden");this.$saveMetaBtn&&this.$saveMetaBtn.addClass("active"),this.errors=null;var t=Craft.getActionUrl(this.settings.saveDraftAction);this.saveXhr=Craft.postActionRequest(t,this.prepareData(b),function(t,e){if(v.addClass("hidden"),this.$saveMetaBtn&&this.$saveMetaBtn.removeClass("active"),this.saving=!1,"abort"!==e){if("success"!==e||t.errors)return this.errors=(t?t.errors:null)||[],C.removeClass("hidden checkmark-icon").addClass("alert-icon").attr("title",Craft.t("app","The draft could not be saved.")),void m();t.title&&$("#header h1").text(t.title),t.docTitle&&(document.title=t.docTitle),this.$revisionLabel.text(t.draftName),this.settings.draftName=t.draftName,this.settings.draftNotes=t.draftNotes;var i=this.$revisionBtn.data("menubtn")?this.$revisionBtn.data("menubtn").menu:null,s=!this.settings.draftId;if(s){var n,a=document.location.href.search("#");n=-1!==a?document.location.href.substr(0,a):document.location.href,n+=(n.match(/\?/)?"&":"?")+"draftId="+t.draftId,-1!==a&&(n+=document.location.href.substr(a)),history.replaceState({},"",n);var r=$("#save-btn-container");r.length&&r.replaceWith($("<input/>",{type:"submit",class:"btn submit",value:Craft.t("app","Update {type}",{type:this.settings.elementTypeDisplayName})}));var o=$("#save-draft-btn-container");if(o.add(o.prev(".spacer")).remove(),this.settings.draftId=t.draftId,this.settings.isLive=!1,this.settings.canDeleteDraft=!0,this.previewToken=null,this.initForDraft(),i){i.$options.filter(":not(.site-option)").removeClass("sel");var l=i.$container.find(".revision-group-drafts");if(!l.length){var h=$("<h6/>",{text:Craft.t("app","Drafts")}).insertAfter(i.$container.find(".revision-group-current"));l=$("<ul/>",{class:"padded revision-group-drafts"}).insertAfter(h)}var d=$("<li/>").appendTo(l),c=$("<a/>",{class:"sel",html:'<span class="draft-name"></span> <span class="draft-creator light"></span>'}).appendTo(d);i.addOptions(c),i.selectOption(c);for(var u=i.$options.filter(".site-option[href]"),p=0;p<u.length;p++){var g=u.eq(p);g.attr("href",Craft.getUrl(g.attr("href"),{draftId:t.draftId}))}}}i&&(i.$options.filter(".sel").find(".draft-name").text(t.draftName),i.$options.filter(".sel").find(".draft-creator").text(Craft.t("app","by {creator}",{creator:t.creator}))),t.previewTargets&&JSON.stringify(t.previewTargets)!==JSON.stringify(this.settings.previewTargets)&&this.updatePreviewTargets(t.previewTargets),this.afterUpdate(b),s&&this.trigger("createDraft"),this.$nameTextInput&&this.checkMetaValues(),$.extend(this.duplicatedElements,t.duplicatedElements),f()}}.bind(this))}}.bind(this))},prepareData:function(t){for(var e in this.duplicatedElements)this.duplicatedElements.hasOwnProperty(e)&&(t=t.replace(new RegExp(Craft.escapeRegex(encodeURIComponent("]["+e+"]")),"g"),"]["+this.duplicatedElements[e]+"]"));return this.settings.draftId&&(t+="&draftId="+this.settings.draftId+"&draftName="+encodeURIComponent(this.settings.draftName)+"&draftNotes="+encodeURIComponent(this.settings.draftNotes||"")),t},updatePreviewTargets:function(t){for(var e={},i=0;i<this.settings.previewTargets.length;i++)e[this.settings.previewTargets[i].label]=this.settings.previewTargets[i];for(i=0;i<t.length;i++)e[t[i].label]&&(e[t[i].label].url=t[i].url)},afterUpdate:function(t){Craft.cp.$primaryForm.data("initialSerializedValue",t),this.statusIcons().removeClass("hidden").addClass("checkmark-icon").attr("title",Craft.t("app","The draft has been saved.")),this.trigger("update"),this.checkFormAfterUpdate&&(this.checkFormAfterUpdate=!1,this.timeout||this.checkForm())},showMetaHud:function(){this.metaHud?this.metaHud.show():(this.createMetaHud(),this.onMetaHudShow()),Garnish.isMobileBrowser(!0)||this.$nameTextInput.trigger("focus")},createMetaHud:function(){var t,e,i=$("<div/>");t=$('<div class="field"><div class="heading"><label for="draft-name">'+Craft.t("app","Draft Name")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$nameTextInput=$('<input type="text" class="text fullwidth" id="draft-name"/>').appendTo(e).val(this.settings.draftName),t=$('<div class="field"><div class="heading"><label for="draft-notes">'+Craft.t("app","Notes")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$notesTextInput=$('<textarea class="text fullwidth" id="draft-notes" rows="2"/>').appendTo(e).val(this.settings.draftNotes);var s=$('<div class="hud-footer flex flex-center"/>').appendTo(i);if(this.settings.canDeleteDraft)var n=$('<a class="error" role="button">'+Craft.t("app","Delete")+"</a>").appendTo(s);$('<div class="flex-grow"></div>').appendTo(s),this.$saveMetaBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Save")+'"/>').appendTo(s),this.metaHud=new Garnish.HUD(this.$editMetaBtn,i,{onSubmit:this.saveMeta.bind(this)}),new Garnish.NiceText(this.$notesTextInput),this.addListener(this.$notesTextInput,"keydown","onNotesKeydown"),this.addListener(this.$nameTextInput,"textchange","checkMetaValues"),this.addListener(this.$notesTextInput,"textchange","checkMetaValues"),this.metaHud.on("show",this.onMetaHudShow.bind(this)),this.metaHud.on("hide",this.onMetaHudHide.bind(this)),this.metaHud.on("escape",this.onMetaHudEscape.bind(this)),n&&this.addListener(n,"click","deleteDraft")},onMetaHudShow:function(){this.$editMetaBtn.addClass("active")},onMetaHudHide:function(){this.$editMetaBtn.removeClass("active")},onMetaHudEscape:function(){this.$nameTextInput.val(this.settings.draftName),this.$notesTextInput.val(this.settings.draftNotes)},onNotesKeydown:function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.metaHud.submit())},checkMetaValues:function(){return!this.$nameTextInput.val()||this.$nameTextInput.val()===this.settings.draftName&&this.$notesTextInput.val()===this.settings.draftNotes?(this.$saveMetaBtn.addClass("disabled"),!1):(this.$saveMetaBtn.removeClass("disabled"),!0)},shakeMetaHud:function(){Garnish.shake(this.metaHud.$hud)},saveMeta:function(){this.checkMetaValues()?(this.settings.draftName=this.$nameTextInput.val(),this.settings.draftNotes=this.$notesTextInput.val(),this.metaHud.hide(),this.checkForm(!0)):this.shakeMetaHud()},deleteDraft:function(){confirm(Craft.t("app","Are you sure you want to delete this draft?"))&&Craft.postActionRequest(this.settings.deleteDraftAction,{draftId:this.settings.draftId},function(t,e){"success"===e&&(window.location.href=this.settings.cpEditUrl)}.bind(this))},handleFormSubmit:function(t){if(t.preventDefault(),!this.submittingForm&&(t.customTrigger||this.settings.isUnsavedDraft||!this.settings.draftId||this.settings.canUpdateSource)){Craft.cp.$confirmUnloadForms=Craft.cp.$confirmUnloadForms.not(Craft.cp.$primaryForm),this.saving&&this.saveXhr.abort();for(var e,i=$("<form/>",{attr:{"accept-charset":Craft.cp.$primaryForm.attr("accept-charset"),action:Craft.cp.$primaryForm.attr("action"),enctype:Craft.cp.$primaryForm.attr("enctype"),method:Craft.cp.$primaryForm.attr("method"),target:Craft.cp.$primaryForm.attr("target")}}),s=this.prepareData(this.serializeForm(!1)).split("&"),n=0;n<s.length;n++)e=s[n].split("=",2),$("<input/>",{type:"hidden",name:decodeURIComponent(e[0]),value:decodeURIComponent(e[1]||"")}).appendTo(i);t.customTrigger&&t.customTrigger.data("action")||$("<input/>",{type:"hidden",name:"action",value:this.settings.applyDraftAction}).appendTo(i),t.saveShortcut&&Craft.cp.$primaryForm.data("saveshortcut-redirect")||t.customTrigger&&t.customTrigger.data("redirect")||$("<input/>",{type:"hidden",name:"redirect",value:this.settings.hashedRedirectUrl}).appendTo(i),i.appendTo(Garnish.$bod),i.submit(),this.submittingForm=!0}}},{defaults:{elementType:null,sourceId:null,siteId:null,isLive:!1,cpEditUrl:null,draftId:null,revisionId:null,draftName:null,draftNotes:null,canDeleteDraft:!1,canUpdateSource:!1,saveDraftAction:null,deleteDraftAction:null,applyDraftAction:null,enablePreview:!1,previewTargets:[]}}),Craft.DynamicGenerator=Craft.BaseInputGenerator.extend({callback:$.noop,init:function(t,e,i){this.callback=i,this.base(t,e)},generateTargetValue:function(t){return this.callback(t)}}),Craft.EditableTable=Garnish.Base.extend({initialized:!1,id:null,baseName:null,columns:null,sorter:null,biggestId:-1,$table:null,$tbody:null,$addRowBtn:null,rowCount:0,hasMaxRows:!1,hasMinRows:!1,radioCheckboxes:null,init:function(t,e,i,s){if(this.id=t,this.baseName=e,this.columns=i,this.setSettings(s,Craft.EditableTable.defaults),this.radioCheckboxes={},this.$table=$("#"+t),this.$tbody=this.$table.children("tbody"),this.rowCount=this.$tbody.find("tr").length,this.$table.data("editable-table")&&(Garnish.log("Double-instantiating an editable table on an element"),this.$table.data("editable-table").destroy()),this.$table.data("editable-table",this),this.sorter=new Craft.DataTableSorter(this.$table,{helperClass:"editabletablesorthelper",copyDraggeeInputValuesToHelper:!0}),this.isVisible()?this.initialize():setTimeout($.proxy(this,"initializeIfVisible"),500),this.settings.minRows&&this.rowCount<this.settings.minRows)for(var n=this.rowCount;n<this.settings.minRows;n++)this.addRow()},isVisible:function(){return 0<this.$table.height()},initialize:function(){if(this.initialized)return!1;this.initialized=!0,this.removeListener(Garnish.$win,"resize");for(var t=this.$tbody.children(),e=0;e<t.length;e++)this.createRowObj(t[e]);return this.$addRowBtn=this.$table.next(".add"),this.updateAddRowButton(),this.addListener(this.$addRowBtn,"activate","addRow"),!0},initializeIfVisible:function(){this.removeListener(Garnish.$win,"resize"),this.isVisible()?this.initialize():this.addListener(Garnish.$win,"resize","initializeIfVisible")},updateAddRowButton:function(){this.canAddRow()?(this.$addRowBtn.css("opacity","1"),this.$addRowBtn.css("pointer-events","auto")):(this.$addRowBtn.css("opacity","0.2"),this.$addRowBtn.css("pointer-events","none"))},canDeleteRow:function(){return this.rowCount>this.settings.minRows},deleteRow:function(t){this.canDeleteRow()&&(this.sorter.removeItems(t.$tr),t.$tr.remove(),this.rowCount--,this.updateAddRowButton(),this.settings.onDeleteRow(t.$tr),t.destroy())},canAddRow:function(){return!this.settings.staticRows&&(!this.settings.maxRows||this.rowCount<this.settings.maxRows)},addRow:function(t,e){if(this.canAddRow()){var i=this.settings.rowIdPrefix+(this.biggestId+1),s=this.createRow(i,this.columns,this.baseName,$.extend({},this.settings.defaultValues));e?s.prependTo(this.$tbody):s.appendTo(this.$tbody);var n=this.createRowObj(s);return this.sorter.addItems(s),!1!==t&&s.find("input:visible,textarea:visible,select:visible").first().trigger("focus"),this.rowCount++,this.updateAddRowButton(),this.settings.onAddRow(s),n}},createRow:function(t,e,i,s){return Craft.EditableTable.createRow(t,e,i,s)},createRowObj:function(t){return new Craft.EditableTable.Row(this,t)},focusOnPrevRow:function(t,e,i){var s,n=t.prev("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1,!0))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnPrevRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}},focusOnNextRow:function(t,e,i){var s,n=t.next("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnNextRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}}},{textualColTypes:["color","date","email","multiline","number","singleline","template","time","url"],defaults:{rowIdPrefix:"",defaultValues:{},staticRows:!1,minRows:null,maxRows:null,onAddRow:$.noop,onDeleteRow:$.noop},createRow:function(t,e,i,s){var n=$("<tr/>",{"data-id":t});for(var a in e)if(e.hasOwnProperty(a)){var r,o=e[a],l=void 0!==s[a]?s[a]:"";if("heading"===o.type)r=$("<th/>",{scope:"row",class:o.class,html:l});else{var h=i+"["+t+"]["+a+"]",d=Craft.inArray(o.type,Craft.EditableTable.textualColTypes);switch(r=$("<td/>",{class:o.class,width:o.width}),d&&r.addClass("textual"),o.code&&r.addClass("code"),o.type){case"checkbox":Craft.ui.createCheckbox({name:h,value:o.value||"1",checked:!!l}).appendTo(r);break;case"color":Craft.ui.createColorInput({name:h,value:l,small:!0}).appendTo(r);break;case"date":Craft.ui.createDateInput({name:h,value:l}).appendTo(r);break;case"lightswitch":Craft.ui.createLightswitch({name:h,value:o.value||"1",on:!!l,small:!0}).appendTo(r);break;case"select":Craft.ui.createSelect({name:h,options:o.options,value:l||function(){for(var t in o.options)if(o.options.hasOwnProperty(t)&&o.options[t].default)return void 0!==o.options[t].value?o.options[t].value:t;return null}(),class:"small"}).appendTo(r);break;case"time":Craft.ui.createTimeInput({name:h,value:l}).appendTo(r);break;case"email":case"url":Craft.ui.createTextInput({name:h,value:l,type:o.type,placeholder:o.placeholder||null}).appendTo(r);break;default:$("<textarea/>",{name:h,rows:1,val:l,placeholder:o.placeholder}).appendTo(r)}}r.appendTo(n)}return $("<td/>",{class:"thin action"}).append($("<a/>",{class:"move icon",title:Craft.t("app","Reorder")})).appendTo(n),$("<td/>",{class:"thin action"}).append($("<a/>",{class:"delete icon",title:Craft.t("app","Delete")})).appendTo(n),n}}),Craft.EditableTable.Row=Garnish.Base.extend({table:null,id:null,niceTexts:null,$tr:null,$tds:null,tds:null,$textareas:null,$deleteBtn:null,init:function(t,e){this.table=t,this.$tr=$(e),this.$tds=this.$tr.children(),this.tds=[],this.id=this.$tr.attr("data-id"),this.$tr.data("editable-table-row",this);var i=parseInt(this.id.substr(this.table.settings.rowIdPrefix.length));i>this.table.biggestId&&(this.table.biggestId=i),this.$textareas=$(),this.niceTexts=[];var s,n,a,r,o,l={},h=0;for(s in this.table.columns)this.table.columns.hasOwnProperty(s)&&(n=this.table.columns[s],a=this.tds[s]=this.$tds[h],Craft.inArray(n.type,Craft.EditableTable.textualColTypes)?(r=$("textarea, input.text",a),this.$textareas=this.$textareas.add(r),this.addListener(r,"focus","onTextareaFocus"),this.addListener(r,"mousedown","ignoreNextTextareaFocus"),this.niceTexts.push(new Garnish.NiceText(r,{onHeightChange:$.proxy(this,"onTextareaHeightChange")})),this.addListener(r,"keypress",{tdIndex:h,type:n.type},"handleKeypress"),this.addListener(r,"textchange",{type:n.type},"validateValue"),r.trigger("textchange"),l[s]=r):"checkbox"===n.type&&(o=$('input[type="checkbox"]',a),n.radioMode&&(void 0===this.table.radioCheckboxes[s]&&(this.table.radioCheckboxes[s]=[]),this.table.radioCheckboxes[s].push(o[0]),this.addListener(o,"change",{colId:s},"onRadioCheckboxChange")),n.toggle&&this.addListener(o,"change",{colId:s},function(t){this.applyToggleCheckbox(t.data.colId)})),h++);for(s in this.onTextareaHeightChange(),this.table.columns)!this.table.columns.hasOwnProperty(s)||"checkbox"===(n=this.table.columns[s]).type&&n.toggle&&this.applyToggleCheckbox(s);for(s in this.table.columns)!this.table.columns.hasOwnProperty(s)||(n=this.table.columns[s]).autopopulate&&void 0!==l[n.autopopulate]&&!l[s].val()&&new Craft.HandleGenerator(l[s],l[n.autopopulate],{allowNonAlphaStart:!0});var d=this.$tr.children().last().find(".delete");this.addListener(d,"click","deleteRow")},onTextareaFocus:function(t){this.onTextareaHeightChange();var e=$(t.currentTarget);e.data("ignoreNextFocus")?e.data("ignoreNextFocus",!1):setTimeout(function(){Craft.selectFullValue(e)},0)},onRadioCheckboxChange:function(t){if(t.currentTarget.checked)for(var e=0;e<this.table.radioCheckboxes[t.data.colId].length;e++){var i=this.table.radioCheckboxes[t.data.colId][e];i.checked=i===t.currentTarget}},applyToggleCheckbox:function(t){for(var e,i,s=this.table.columns[t],n=$('input[type="checkbox"]',this.tds[t]).prop("checked"),a=0;a<s.toggle.length;a++)e=s.toggle[a],this.table.colum,(i="!"===e[0])&&(e=e.substr(1)),n&&!i||!n&&i?$(this.tds[e]).removeClass("disabled").find("textarea, input").prop("disabled",!1):$(this.tds[e]).addClass("disabled").find("textarea, input").prop("disabled",!0)},ignoreNextTextareaFocus:function(t){$.data(t.currentTarget,"ignoreNextFocus",!0)},handleKeypress:function(t){var e=t.keyCode?t.keyCode:t.charCode,i=Garnish.isCtrlKeyPressed(t);if(e===Garnish.RETURN_KEY&&("multiline"!==t.data.type||i))return t.preventDefault(),void(t.shiftKey?this.table.focusOnPrevRow(this.$tr,t.data.tdIndex,t.currentTarget):this.table.focusOnNextRow(this.$tr,t.data.tdIndex,t.currentTarget));"number"!==t.data.type||i||Craft.inArray(e,Craft.EditableTable.Row.numericKeyCodes)||t.preventDefault()},validateValue:function(t){if("multiline"!==t.data.type){var e;if("number"===t.data.type){var i=t.currentTarget.value.match(/^\s*(-?[\d\\.]*)/);e=null!==i?i[1]:""}else e=t.currentTarget.value.replace(/[\r\n]/g,"");e!==t.currentTarget.value&&(t.currentTarget.value=e)}},onTextareaHeightChange:function(){for(var t=-1,e=0;e<this.niceTexts.length;e++)this.niceTexts[e].height>t&&(t=this.niceTexts[e].height);this.$textareas.css("min-height",t);var i=this.$textareas.filter(":visible").first().parent().height();t<i&&this.$textareas.css("min-height",i)},deleteRow:function(){this.table.deleteRow(this)}},{numericKeyCodes:[9,8,37,38,39,40,45,91,46,190,48,49,50,51,52,53,54,55,56,57]}),Craft.ElementActionTrigger=Garnish.Base.extend({maxLevels:null,newChildUrl:null,$trigger:null,$selectedItems:null,triggerEnabled:!0,init:function(t){this.setSettings(t,Craft.ElementActionTrigger.defaults),this.$trigger=$("#"+t.type.replace(/[\[\]\\]+/g,"-")+"-actiontrigger"),this.settings.activate&&(this.$trigger.data("custom-handler",!0),"FORM"===this.$trigger.prop("nodeName")?this.addListener(this.$trigger,"submit","handleTriggerActivation"):this.addListener(this.$trigger,"click","handleTriggerActivation")),this.updateTrigger(),Craft.elementIndex.on("selectionChange",$.proxy(this,"updateTrigger"))},updateTrigger:function(){0!==Craft.elementIndex.getSelectedElements().length&&(this.validateSelection()?this.enableTrigger():this.disableTrigger())},validateSelection:function(){var t=!0;return this.$selectedItems=Craft.elementIndex.getSelectedElements(),!this.settings.batch&&1<this.$selectedItems.length?t=!1:"function"==typeof this.settings.validateSelection&&(t=this.settings.validateSelection(this.$selectedItems)),t},enableTrigger:function(){this.triggerEnabled||(this.$trigger.removeClass("disabled"),this.triggerEnabled=!0)},disableTrigger:function(){this.triggerEnabled&&(this.$trigger.addClass("disabled"),this.triggerEnabled=!1)},handleTriggerActivation:function(t){t.preventDefault(),t.stopPropagation(),this.triggerEnabled&&this.settings.activate(this.$selectedItems)}},{defaults:{type:null,batch:!0,validateSelection:null,activate:null}}),Craft.ElementThumbLoader=Garnish.Base.extend({queue:null,workers:[],init:function(){this.queue=[];for(var t=0;t<3;t++)this.workers.push(new Craft.ElementThumbLoader.Worker(this))},load:function(t){if(this.queue=this.queue.concat(t.find(".elementthumb").toArray()),this.queue.length)for(var e=0;e<this.workers.length;e++)this.workers[e].active||this.workers[e].loadNext()},destroy:function(){for(var t=0;t<this.workers.length;t++)this.workers[t].destroy();this.base()}}),Craft.ElementThumbLoader.Worker=Garnish.Base.extend({loader:null,active:!1,init:function(t){this.loader=t},loadNext:function(){var t=this.loader.queue.shift();if(void 0!==t){this.active=!0;var e=$(t);if(e.find("img").length)this.loadNext();else{var i=$("<img/>",{sizes:e.attr("data-sizes"),srcset:e.attr("data-srcset"),alt:""});this.addListener(i,"load","loadNext"),i.appendTo(e),picturefill({elements:[i[0]]})}}else this.active=!1}}),Craft.ElevatedSessionForm=Garnish.Base.extend({$form:null,inputs:null,init:function(t,e){if(this.$form=$(t),void 0!==e){this.inputs=[],e=$.makeArray(e);for(var i=0;i<e.length;i++)for(var s=$(e[i]),n=0;n<s.length;n++){var a=s.eq(n);this.inputs.push({input:a,val:Garnish.getInputPostVal(a)})}}this.addListener(this.$form,"submit","handleFormSubmit")},handleFormSubmit:function(t){if(Craft.elevatedSessionManager.fetchingTimeout)t.preventDefault();else{if(this.inputs){for(var e,i=!1,s=0;s<this.inputs.length;s++)if((e=this.inputs[s].input).data("passwordInput")&&(e=e.data("passwordInput").$currentInput),Garnish.getInputPostVal(e)!==this.inputs[s].val){i=!0;break}if(!i)return}t.preventDefault(),Craft.elevatedSessionManager.requireElevatedSession($.proxy(this,"submitForm"))}},submitForm:function(){this.disable(),this.$form.trigger("submit"),this.enable()}}),Craft.ElevatedSessionManager=Garnish.Base.extend({fetchingTimeout:!1,passwordModal:null,$passwordInput:null,$passwordSpinner:null,$submitBtn:null,$errorPara:null,callback:null,requireElevatedSession:function(t){this.callback=t,this.fetchingTimeout=!0,Craft.postActionRequest("users/get-elevated-session-timeout",$.proxy(function(t,e){this.fetchingTimeout=!1,"success"===e&&(!1===t.timeout||t.timeout>=Craft.ElevatedSessionManager.minSafeElevatedSessionTimeout?this.callback():this.showPasswordModal())},this))},showPasswordModal:function(){if(this.passwordModal)this.passwordModal.show();else{var t=$('<form id="elevatedsessionmodal" class="modal secure fitted"/>'),e=$('<div class="body"><p>'+Craft.t("app","Enter your password to continue.")+"</p></div>").appendTo(t),i=$('<div class="inputcontainer">').appendTo(e),s=$('<div class="flex"/>').appendTo(i),n=$('<div class="flex-grow"/>').appendTo(s),a=$("<td/>").appendTo(s),r=$('<div class="passwordwrapper"/>').appendTo(n);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'" autocomplete="current-password"/>').appendTo(r),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(i),this.$submitBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Submit")+'" />').appendTo(a),this.$errorPara=$('<p class="error"/>').appendTo(e),this.passwordModal=new Garnish.Modal(t,{closeOtherModals:!1,onFadeIn:$.proxy(function(){setTimeout($.proxy(this,"focusPasswordInput"),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(t,"submit","submitPassword")}},focusPasswordInput:function(){Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$submitBtn.removeClass("disabled"),!0):(this.$submitBtn.addClass("disabled"),!1)},submitPassword:function(t){if(t&&t.preventDefault(),this.validatePassword()){this.$passwordSpinner.removeClass("hidden"),this.clearLoginError();var e={currentPassword:this.$passwordInput.val()};Craft.postActionRequest("users/start-elevated-session",e,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.passwordModal.hide(),this.callback()):(this.showPasswordError(t.message||Craft.t("app","Incorrect password.")),Garnish.shake(this.passwordModal.$container),this.focusPasswordInput()):this.showPasswordError()},this))}},showPasswordError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$errorPara.text(t),this.passwordModal.updateSizeAndPosition()},clearLoginError:function(){this.showPasswordError("")}},{minSafeElevatedSessionTimeout:5}),Craft.elevatedSessionManager=new Craft.ElevatedSessionManager,Craft.EntryIndex=Craft.BaseElementIndex.extend({publishableSections:null,$newEntryBtnGroup:null,$newEntryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.publishableSections=[];for(var t=0;t<Craft.publishableSections.length;t++){var e=Craft.publishableSections[t];this.getSourceByKey("section:"+e.uid)&&this.publishableSections.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultSectionHandle){if("singles"===defaultSectionHandle)return"singles";for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultSectionHandle)return e.data("key")}}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s;if(t="singles"===this.$source.data("key")?"singles":this.$source.data("handle"),this.publishableSections.length){var n,a;if(this.$newEntryBtnGroup&&this.$newEntryBtnGroup.remove(),t)for(e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].handle===t){n=this.publishableSections[e];break}if(this.$newEntryBtnGroup=$('<div class="btngroup submit"/>'),n?(i=this._getSectionTriggerHref(n),s="index"===this.settings.context?Craft.t("app","New entry"):Craft.t("app","New {section} entry",{section:n.name}),this.$newEntryBtn=$('<a class="btn submit add icon" '+i+">"+Craft.escapeHtml(s)+"</a>").appendTo(this.$newEntryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newEntryBtn,"click",function(t){this._openCreateEntryModal(t.currentTarget.getAttribute("data-id"))}),1<this.publishableSections.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newEntryBtnGroup))):this.$newEntryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New entry")+"</div>").appendTo(this.$newEntryBtnGroup),a){var r='<div class="menu"><ul>';for(e=0;e<this.publishableSections.length;e++){var o=this.publishableSections[e];("index"===this.settings.context&&-1!==$.inArray(this.siteId,o.sites)||"index"!==this.settings.context&&o!==n)&&(i=this._getSectionTriggerHref(o),s="index"===this.settings.context?o.name:Craft.t("app","New {section} entry",{section:o.name}),r+="<li><a "+i+'">'+Craft.escapeHtml(s)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newEntryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateEntryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newEntryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="entries";t&&(h+="/"+t),history.replaceState({},"",Craft.getUrl(h))}}},_getSectionTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="entries/"+t.handle+"/new";if(params={},this.siteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(params.site=Craft.sites[i].handle);return'href="'+Craft.getUrl(e,params)+'"'},_openCreateEntryModal:function(t){if(!this.$newEntryBtn.hasClass("loading")){for(var i,e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].id==t){i=this.publishableSections[e];break}if(i){this.$newEntryBtn.addClass("inactive");var s=this.$newEntryBtn.text();this.$newEntryBtn.text(Craft.t("app","New {section} entry",{section:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newEntryBtnGroup,elementType:"craft\\elements\\Entry",siteId:this.siteId,attributes:{sectionId:t,typeId:i.entryTypes[0].id},onBeginLoading:$.proxy(function(){this.$newEntryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newEntryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newEntryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="section:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Entry",Craft.EntryIndex),Craft.FieldLayoutDesigner=Garnish.Base.extend({$container:null,$tabContainer:null,$unusedFieldContainer:null,$newTabBtn:null,$allFields:null,tabGrid:null,unusedFieldGrid:null,tabDrag:null,fieldDrag:null,init:function(t,e){this.$container=$(t),this.setSettings(e,Craft.FieldLayoutDesigner.defaults),this.$tabContainer=this.$container.children(".fld-tabs"),this.$unusedFieldContainer=this.$container.children(".unusedfields"),this.$newTabBtn=this.$container.find("> .newtabbtn-container > .btn"),this.$allFields=this.$unusedFieldContainer.find(".fld-field"),this.tabGrid=new Craft.Grid(this.$tabContainer,Craft.FieldLayoutDesigner.gridSettings),this.unusedFieldGrid=new Craft.Grid(this.$unusedFieldContainer,Craft.FieldLayoutDesigner.gridSettings);for(var i=this.$tabContainer.children(),s=0;s<i.length;s++)this.initTab($(i[s]));this.fieldDrag=new Craft.FieldLayoutDesigner.FieldDrag(this),this.settings.customizableTabs&&(this.tabDrag=new Craft.FieldLayoutDesigner.TabDrag(this),this.addListener(this.$newTabBtn,"activate","addTab"))},initTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);$('<li><a data-action="rename">'+Craft.t("app","Rename")+"</a></li>").appendTo(s),$('<li><a data-action="delete">'+Craft.t("app","Delete")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onTabOptionSelect")})}for(var n=t.children(".fld-tabcontent").children(),a=0;a<n.length;a++)this.initField($(n[a]))},initField:function(t){var e=t.find(".settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);t.hasClass("fld-required")?$('<li><a data-action="toggle-required">'+Craft.t("app","Make not required")+"</a></li>").appendTo(s):$('<li><a data-action="toggle-required">'+Craft.t("app","Make required")+"</a></li>").appendTo(s),$('<li><a data-action="remove">'+Craft.t("app","Remove")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onFieldOptionSelect")})},onTabOptionSelect:function(t){if(this.settings.customizableTabs){var e=$(t),i=e.data("menu").$anchor.parent().parent().parent();switch(e.data("action")){case"rename":this.renameTab(i);break;case"delete":this.deleteTab(i)}}},onFieldOptionSelect:function(t){var e=$(t),i=e.data("menu").$anchor.parent();switch(e.data("action")){case"toggle-required":this.toggleRequiredField(i,e);break;case"remove":this.removeField(i)}},renameTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .tab span"),i=e.text(),s=prompt(Craft.t("app","Give your tab a name."),i);s&&s!==i&&(e.text(s),t.find(".id-input").attr("name",this.getFieldInputName(s)))}},deleteTab:function(t){if(this.settings.customizableTabs){for(var e=t.find(".fld-field"),i=0;i<e.length;i++){var s=$(e[i]).attr("data-id");this.removeFieldById(s)}this.tabGrid.removeItems(t),this.tabDrag.removeItems(t),t.remove()}},toggleRequiredField:function(t,e){t.hasClass("fld-required")?(t.removeClass("fld-required"),t.find(".required-input").remove(),setTimeout(function(){e.text(Craft.t("app","Make required"))},500)):(t.addClass("fld-required"),$('<input class="required-input" type="hidden" name="'+this.settings.requiredFieldInputName+'" value="'+t.data("id")+'">').appendTo(t),setTimeout(function(){e.text(Craft.t("app","Make not required"))},500))},removeField:function(t){var e=t.attr("data-id");t.remove(),this.removeFieldById(e),this.tabGrid.refreshCols(!0)},removeFieldById:function(t){var e=this.$allFields.filter("[data-id="+t+"]:first"),i=e.closest(".fld-tab");e.removeClass("hidden"),i.hasClass("hidden")?(i.removeClass("hidden"),this.unusedFieldGrid.addItems(i),this.settings.customizableTabs&&this.tabDrag.addItems(i)):this.unusedFieldGrid.refreshCols(!0)},addTab:function(){if(this.settings.customizableTabs){var t=$('<div class="fld-tab"><div class="tabs"><div class="tab sel draggable"><span>Tab '+(this.tabGrid.$items.length+1)+'</span><a class="settings icon" title="'+Craft.t("app","Rename")+'"></a></div></div><div class="fld-tabcontent"></div></div>').appendTo(this.$tabContainer);this.tabGrid.addItems(t),this.tabDrag.addItems(t),this.initTab(t)}},getFieldInputName:function(t){return this.settings.fieldInputName.replace(/__TAB_NAME__/g,Craft.encodeUriComponent(t))}},{gridSettings:{itemSelector:".fld-tab:not(.hidden)",minColWidth:240,fillMode:"grid",snapToGrid:30},defaults:{customizableTabs:!0,fieldInputName:"fieldLayout[__TAB_NAME__][]",requiredFieldInputName:"requiredFields[]"}}),Craft.FieldLayoutDesigner.BaseDrag=Garnish.Drag.extend({designer:null,$insertion:null,showingInsertion:!1,$caboose:null,draggingUnusedItem:!1,addToTabGrid:!1,init:function(t,e){this.designer=t;var i=this.designer.$tabContainer.find(this.itemSelector).add(this.designer.$unusedFieldContainer.find(this.itemSelector));this.base(i,e)},onDragStart:function(){this.base(),this.draggingUnusedItem=this.$draggee.hasClass("unused"),this.$insertion=this.getInsertion(),this.addCaboose(),this.$items=$().add(this.$items.add(this.$caboose)),this.addToTabGrid&&this.designer.tabGrid.addItems(this.$caboose),this.draggingUnusedItem?this.showingInsertion=!1:(this.$insertion.insertBefore(this.$draggee),this.$draggee.detach(),this.$items=$().add(this.$items.not(this.$draggee).add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$draggee),this.designer.tabGrid.addItems(this.$insertion))),this.setMidpoints()},addCaboose:$.noop,getItemContainer:$.noop,isItemInTabContainer:function(t){return this.getItemContainer(t)[0]===this.designer.$tabContainer[0]},setMidpoints:function(){for(var t=0;t<this.$items.length;t++){var e=$(this.$items[t]);if(this.isItemInTabContainer(e)){var i=e.offset();e.data("midpoint",{left:i.left+e.outerWidth()/2,top:i.top+e.outerHeight()/2})}}},onDrag:function(){this.draggingUnusedItem&&!Garnish.hitTest(this.mouseX,this.mouseY,this.designer.$tabContainer)?this.showingInsertion&&(this.$insertion.remove(),this.$items=$().add(this.$items.not(this.$insertion)),this.showingInsertion=!1,this.addToTabGrid?this.designer.tabGrid.removeItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints()):(this.onDrag._closestItem=this.getClosestItem(),this.onDrag._closestItem!==this.$insertion[0]&&(this.showingInsertion&&$.inArray(this.$insertion[0],this.$items)<$.inArray(this.onDrag._closestItem,this.$items)&&-1===$.inArray(this.onDrag._closestItem,this.$caboose)?this.$insertion.insertAfter(this.onDrag._closestItem):this.$insertion.insertBefore(this.onDrag._closestItem),this.$items=$().add(this.$items.add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid?this.designer.tabGrid.addItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints())),this.base()},getClosestItem:function(){for(this.getClosestItem._closestItem=null,this.getClosestItem._closestItemMouseDiff=null,this.getClosestItem._i=0;this.getClosestItem._i<this.$items.length;this.getClosestItem._i++)this.getClosestItem._$item=$(this.$items[this.getClosestItem._i]),this.isItemInTabContainer(this.getClosestItem._$item)&&(this.getClosestItem._midpoint=this.getClosestItem._$item.data("midpoint"),this.getClosestItem._mouseDiff=Garnish.getDist(this.getClosestItem._midpoint.left,this.getClosestItem._midpoint.top,this.mouseX,this.mouseY),(null===this.getClosestItem._closestItem||this.getClosestItem._mouseDiff<this.getClosestItem._closestItemMouseDiff)&&(this.getClosestItem._closestItem=this.getClosestItem._$item[0],this.getClosestItem._closestItemMouseDiff=this.getClosestItem._mouseDiff));return this.getClosestItem._closestItem},onDragStop:function(){this.showingInsertion&&(this.$insertion.replaceWith(this.$draggee),this.$items=$().add(this.$items.not(this.$insertion).add(this.$draggee)),this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$insertion),this.designer.tabGrid.addItems(this.$draggee))),this.$items=this.$items.not(this.$caboose),this.$caboose.remove(),this.addToTabGrid&&this.designer.tabGrid.removeItems(this.$caboose),this.$draggee.css({display:this.draggeeDisplay,visibility:"hidden"}),this.designer.tabGrid.refreshCols(!0),this.designer.unusedFieldGrid.refreshCols(!0),this.returnHelpersToDraggees(),this.base()}}),Craft.FieldLayoutDesigner.TabDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab",addToTabGrid:!0,init:function(t){this.base(t,{handle:".tab"})},addCaboose:function(){this.$caboose=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(this.designer.$tabContainer)},getInsertion:function(){var t=this.$draggee.find(".tab");return $('<div class="fld-tab fld-insertion" style="height: '+this.$draggee.height()+'px;"><div class="tabs"><div class="tab sel draggable" style="width: '+t.width()+"px; height: "+t.height()+'px;"></div></div><div class="fld-tabcontent" style="height: '+this.$draggee.find(".fld-tabcontent").height()+'px;"></div></div>')},getItemContainer:function(t){return t.parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused"),e=t.find(".tab span").text();t.find(".fld-field").removeClass("unused"),t.find(".tabs .tab").append('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');var i=t.find(".fld-field"),s=i.filter(".hidden").remove();(i=i.not(s)).prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');for(var n=0;n<i.length;n++){var a=$(i[n]),r=this.designer.getFieldInputName(e);a.append('<input class="id-input" type="hidden" name="'+r+'" value="'+a.data("id")+'">')}this.designer.fieldDrag.addItems(i),this.designer.initTab(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),this.$draggee.find(".fld-field").addClass("hidden"),this.$draggee=t,this.addItems(t),this.designer.tabGrid.addItems(t),this.designer.unusedFieldGrid.removeItems(this.$draggee)}this.base()}}),Craft.FieldLayoutDesigner.FieldDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab .fld-field",addCaboose:function(){this.$caboose=$();for(var t=this.designer.$tabContainer.children().children(".fld-tabcontent"),e=0;e<t.length;e++){var i=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(t[e]);this.$caboose=this.$caboose.add(i)}},getInsertion:function(){return $('<div class="fld-field fld-insertion" style="height: '+this.$draggee.height()+'px;"/>')},getItemContainer:function(t){return t.parent().parent().parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused");if(t.prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>'),this.designer.initField(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),0===this.$draggee.siblings(":not(.hidden)").length){var e=this.$draggee.parent().parent();e.addClass("hidden"),this.designer.unusedFieldGrid.removeItems(e)}this.$draggee=t,this.addItems(t)}if(this.showingInsertion){var i=this.$insertion.parent().parent().find(".tab span").text(),s=this.designer.getFieldInputName(i);this.draggingUnusedItem?this.$draggee.append('<input class="id-input" type="hidden" name="'+s+'" value="'+this.$draggee.data("id")+'">'):this.$draggee.find(".id-input").attr("name",s)}this.base()}}),Craft.FieldToggle=Garnish.Base.extend({$toggle:null,targetPrefix:null,targetSelector:null,reverseTargetSelector:null,_$target:null,_$reverseTarget:null,type:null,init:function(t){this.$toggle=$(t),this.$toggle.data("fieldtoggle")&&(Garnish.log("Double-instantiating a field toggle on an element"),this.$toggle.data("fieldtoggle").destroy()),this.$toggle.data("fieldtoggle",this),this.type=this.getType(),"select"===this.type?this.targetPrefix=this.$toggle.attr("data-target-prefix")||"":(this.targetSelector=this.normalizeTargetSelector(this.$toggle.data("target")),this.reverseTargetSelector=this.normalizeTargetSelector(this.$toggle.data("reverse-target"))),this.findTargets(),"link"===this.type?this.addListener(this.$toggle,"click","onToggleChange"):this.addListener(this.$toggle,"change","onToggleChange")},normalizeTargetSelector:function(t){return t&&!t.match(/^[#\.]/)&&(t="#"+t),t},getType:function(){return"INPUT"===this.$toggle.prop("nodeName")&&"checkbox"===this.$toggle.attr("type").toLowerCase()?"checkbox":"SELECT"===this.$toggle.prop("nodeName")?"select":"A"===this.$toggle.prop("nodeName")?"link":"DIV"===this.$toggle.prop("nodeName")&&this.$toggle.hasClass("lightswitch")?"lightswitch":void 0},findTargets:function(){"select"===this.type?this._$target=$(this.normalizeTargetSelector(this.targetPrefix+this.getToggleVal())):(this.targetSelector&&(this._$target=$(this.targetSelector)),this.reverseTargetSelector&&(this._$reverseTarget=$(this.reverseTargetSelector)))},getToggleVal:function(){if("lightswitch"===this.type)return this.$toggle.children("input").val();var t=Garnish.getInputPostVal(this.$toggle);return null===t?null:t.replace(/[\[\]\\]+/g,"-")},onToggleChange:function(){"select"===this.type?(this.hideTarget(this._$target),this.findTargets(),this.showTarget(this._$target)):("link"===this.type?this.onToggleChange._show=this.$toggle.hasClass("collapsed")||!this.$toggle.hasClass("expanded"):this.onToggleChange._show=!!this.getToggleVal(),this.onToggleChange._show?(this.showTarget(this._$target),this.hideTarget(this._$reverseTarget)):(this.hideTarget(this._$target),this.showTarget(this._$reverseTarget)),delete this.onToggleChange._show)},showTarget:function(t){t&&t.length&&(this.showTarget._currentHeight=t.height(),t.removeClass("hidden"),"select"!==this.type&&("link"===this.type&&(this.$toggle.removeClass("collapsed"),this.$toggle.addClass("expanded")),t.height("auto"),this.showTarget._targetHeight=t.height(),t.css({height:this.showTarget._currentHeight,overflow:"hidden"}),t.velocity("stop"),t.velocity({height:this.showTarget._targetHeight},"fast",function(){t.css({height:"",overflow:""})}),delete this.showTarget._targetHeight),delete this.showTarget._currentHeight,Garnish.$win.trigger("resize"))},hideTarget:function(t){t&&t.length&&("select"===this.type?t.addClass("hidden"):("link"===this.type&&(this.$toggle.removeClass("expanded"),this.$toggle.addClass("collapsed")),t.css("overflow","hidden"),t.velocity("stop"),t.velocity({height:0},"fast",function(){t.addClass("hidden")})))}}),Craft.Grid=Garnish.Base.extend({$container:null,$items:null,items:null,totalCols:null,colGutterDrop:null,colPctWidth:null,possibleItemColspans:null,possibleItemPositionsByColspan:null,itemPositions:null,itemColspansByPosition:null,layouts:null,layout:null,itemHeights:null,leftPadding:null,_refreshingCols:!1,_refreshColsAfterRefresh:!1,_forceRefreshColsAfterRefresh:!1,init:function(t,e){this.$container=$(t),this.$container.data("grid")&&(Garnish.log("Double-instantiating a grid on an element"),this.$container.data("grid").destroy()),this.$container.data("grid",this),this.setSettings(e,Craft.Grid.defaults),this.handleContainerHeightProxy=$.proxy(function(){this.refreshCols(!1,!0)},this),this.$items=this.$container.children(this.settings.itemSelector),this.setItems(),this.refreshCols(!0,!1),Garnish.$doc.ready($.proxy(function(){this.refreshCols(!1,!1)},this))},addItems:function(t){this.$items=$().add(this.$items.add(t)),this.setItems(),this.refreshCols(!0,!0)},removeItems:function(t){this.$items=$().add(this.$items.not(t)),this.setItems(),this.refreshCols(!0,!0)},resetItemOrder:function(){this.$items=$().add(this.$items),this.setItems(),this.refreshCols(!0,!0)},setItems:function(){for(this.setItems._={},this.items=[],this.setItems._.i=0;this.setItems._.i<this.$items.length;this.setItems._.i++)this.items.push($(this.$items[this.setItems._.i]));delete this.setItems._},refreshCols:function(t){if(this._refreshingCols)return this._refreshColsAfterRefresh=!0,void(t&&(this._forceRefreshColsAfterRefresh=!0));if(this._refreshingCols=!0,this.items.length)if(this.refreshCols._={},this.refreshCols._.oldHeight=this.$container[0].style.height,this.$container[0].style.height=1,this.refreshCols._.scrollHeight=this.$container[0].scrollHeight,this.$container[0].style.height=this.refreshCols._.oldHeight,0!==this.refreshCols._.scrollHeight)if(this.settings.cols?this.refreshCols._.totalCols=this.settings.cols:(this.refreshCols._.totalCols=Math.floor(this.$container.width()/this.settings.minColWidth),null!==this.totalCols&&this.refreshCols._.totalCols>this.totalCols&&(this.refreshCols._.totalCols=Math.floor((this.$container.width()-20)/this.settings.minColWidth)),this.settings.maxCols&&this.refreshCols._.totalCols>this.settings.maxCols&&(this.refreshCols._.totalCols=this.settings.maxCols)),0===this.refreshCols._.totalCols&&(this.refreshCols._.totalCols=1),!0===t||this.totalCols!==this.refreshCols._.totalCols){if(this.totalCols=this.refreshCols._.totalCols,this.colGutterDrop=this.settings.gutter*(this.totalCols-1)/this.totalCols,this.removeListener(this.$container,"resize"),"grid"===this.settings.fillMode)for(this.refreshCols._.itemIndex=0;this.refreshCols._.itemIndex<this.items.length;){for(this.refreshCols._.tallestItemHeight=-1,this.refreshCols._.colIndex=0,this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.itemHeight=this.items[this.refreshCols._.i].height("auto").height(),this.refreshCols._.itemHeight>this.refreshCols._.tallestItemHeight&&(this.refreshCols._.tallestItemHeight=this.refreshCols._.itemHeight),this.refreshCols._.colIndex++;for(this.settings.snapToGrid&&(this.refreshCols._.remainder=this.refreshCols._.tallestItemHeight%this.settings.snapToGrid,this.refreshCols._.remainder&&(this.refreshCols._.tallestItemHeight+=this.settings.snapToGrid-this.refreshCols._.remainder)),this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.items[this.refreshCols._.i].height(this.refreshCols._.tallestItemHeight);this.refreshCols._.itemIndex+=this.totalCols}else if(this.removeListener(this.$items,"resize"),1===this.totalCols)this.$container.height("auto"),this.$items.show().css({position:"relative",width:"auto",top:0}).css(Craft.left,0);else{for(this.$items.css("position","absolute"),this.colPctWidth=100/this.totalCols,this.layouts=[],this.itemPositions=[],this.itemColspansByPosition=[],this.possibleItemColspans=[],this.possibleItemPositionsByColspan=[],this.itemHeightsByColspan=[],this.refreshCols._.item=0;this.refreshCols._.item<this.items.length;this.refreshCols._.item++)for(this.possibleItemColspans[this.refreshCols._.item]=[],this.possibleItemPositionsByColspan[this.refreshCols._.item]={},this.itemHeightsByColspan[this.refreshCols._.item]={},this.refreshCols._.$item=this.items[this.refreshCols._.item].show(),this.refreshCols._.positionRight="right"===this.refreshCols._.$item.data("position"),this.refreshCols._.positionLeft="left"===this.refreshCols._.$item.data("position"),this.refreshCols._.minColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("min-colspan")?this.refreshCols._.$item.data("min-colspan"):1,this.refreshCols._.maxColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("max-colspan")?this.refreshCols._.$item.data("max-colspan"):this.totalCols,this.refreshCols._.minColspan>this.totalCols&&(this.refreshCols._.minColspan=this.totalCols),this.refreshCols._.maxColspan>this.totalCols&&(this.refreshCols._.maxColspan=this.totalCols),this.refreshCols._.colspan=this.refreshCols._.minColspan;this.refreshCols._.colspan<=this.refreshCols._.maxColspan;this.refreshCols._.colspan++)for(this.refreshCols._.$item.css("width",this.getItemWidthCss(this.refreshCols._.colspan)),this.itemHeightsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=this.refreshCols._.$item.outerHeight(),this.possibleItemColspans[this.refreshCols._.item].push(this.refreshCols._.colspan),this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=[],this.refreshCols._.positionLeft?(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=0):this.refreshCols._.positionRight?(this.refreshCols._.minPosition=this.totalCols-this.refreshCols._.colspan,this.refreshCols._.maxPosition=this.refreshCols._.minPosition):(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=this.totalCols-this.refreshCols._.colspan),this.refreshCols._.position=this.refreshCols._.minPosition;this.refreshCols._.position<=this.refreshCols._.maxPosition;this.refreshCols._.position++)this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan].push(this.refreshCols._.position);for(this.refreshCols._.colHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.totalCols;this.refreshCols._.i++)this.refreshCols._.colHeights.push(0);for(this.createLayouts(0,[],[],this.refreshCols._.colHeights,0),this.refreshCols._.layoutTotalCols=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)for(this.refreshCols._.layoutTotalCols[this.refreshCols._.i]=0,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j]&&this.refreshCols._.layoutTotalCols[this.refreshCols._.i]++;for(this.refreshCols._.highestTotalCols=Math.max.apply(null,this.refreshCols._.layoutTotalCols),this.refreshCols._.i=this.layouts.length-1;0<=this.refreshCols._.i;this.refreshCols._.i--)this.refreshCols._.layoutTotalCols[this.refreshCols._.i]!==this.refreshCols._.highestTotalCols&&this.layouts.splice(this.refreshCols._.i,1);for(this.refreshCols._.layoutHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)this.refreshCols._.layoutHeights.push(Math.max.apply(null,this.layouts[this.refreshCols._.i].colHeights));for(this.refreshCols._.shortestHeight=Math.min.apply(null,this.refreshCols._.layoutHeights),this.refreshCols._.shortestLayouts=[],this.refreshCols._.emptySpaces=[],this.refreshCols._.i=0;this.refreshCols._.i<this.refreshCols._.layoutHeights.length;this.refreshCols._.i++)if(this.refreshCols._.layoutHeights[this.refreshCols._.i]===this.refreshCols._.shortestHeight){for(this.refreshCols._.shortestLayouts.push(this.layouts[this.refreshCols._.i]),this.refreshCols._.emptySpace=this.layouts[this.refreshCols._.i].emptySpace,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.refreshCols._.emptySpace+=this.refreshCols._.shortestHeight-this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j];this.refreshCols._.emptySpaces.push(this.refreshCols._.emptySpace)}for(this.layout=this.refreshCols._.shortestLayouts[$.inArray(Math.min.apply(null,this.refreshCols._.emptySpaces),this.refreshCols._.emptySpaces)],this.refreshCols._.i=0;this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.css={width:this.getItemWidthCss(this.layout.colspans[this.refreshCols._.i])},this.refreshCols._.css[Craft.left]=this.getItemLeftPosCss(this.layout.positions[this.refreshCols._.i]),this.items[this.refreshCols._.i].css(this.refreshCols._.css);this.isSimpleLayout()?(this.$container.height("auto"),this.$items.css({position:"relative",top:0,"margin-bottom":this.settings.gutter+"px"})):(this.$items.css("position","absolute"),this.positionItems(),this.addListener(this.$items,"resize","onItemResize"))}this.completeRefreshCols(),this.addListener(this.$container,"resize",this.handleContainerHeightProxy),this.onRefreshCols()}else this.completeRefreshCols();else this.completeRefreshCols();else this.completeRefreshCols()},completeRefreshCols:function(){if(void 0!==this.refreshCols._&&delete this.refreshCols._,this._refreshingCols=!1,this._refreshColsAfterRefresh){var t=this._forceRefreshColsAfterRefresh;this._refreshColsAfterRefresh=!1,this._forceRefreshColsAfterRefresh=!1,Garnish.requestAnimationFrame($.proxy(function(){this.refreshCols(t)},this))}},getItemWidth:function(t){return this.colPctWidth*t},getItemWidthCss:function(t){return"calc("+this.getItemWidth(t)+"% - "+this.colGutterDrop+"px)"},getItemWidthInPx:function(t){return this.getItemWidth(t)/100*this.$container.width()-this.colGutterDrop},getItemLeftPosCss:function(t){return"calc(("+this.getItemWidth(1)+"% + "+(this.settings.gutter-this.colGutterDrop)+"px) * "+t+")"},getItemLeftPosInPx:function(t){return(this.getItemWidth(1)/100*this.$container.width()+(this.settings.gutter-this.colGutterDrop))*t},createLayouts:function(t,e,i,s,n){new Craft.Grid.LayoutGenerator(this).createLayouts(t,e,i,s,n)},isSimpleLayout:function(){for(this.isSimpleLayout._={},this.isSimpleLayout._.i=0;this.isSimpleLayout._.i<this.layout.positions.length;this.isSimpleLayout._.i++)if(0!==this.layout.positions[this.isSimpleLayout._.i])return delete this.isSimpleLayout._,!1;return delete this.isSimpleLayout._,!0},positionItems:function(){for(this.positionItems._={},this.positionItems._.colHeights=[],this.positionItems._.i=0;this.positionItems._.i<this.totalCols;this.positionItems._.i++)this.positionItems._.colHeights.push(0);for(this.positionItems._.i=0;this.positionItems._.i<this.items.length;this.positionItems._.i++){for(this.positionItems._.endingCol=this.layout.positions[this.positionItems._.i]+this.layout.colspans[this.positionItems._.i]-1,this.positionItems._.affectedColHeights=[],this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.affectedColHeights.push(this.positionItems._.colHeights[this.positionItems._.col]);for(this.positionItems._.top=Math.max.apply(null,this.positionItems._.affectedColHeights),0<this.positionItems._.top&&(this.positionItems._.top+=this.settings.gutter),this.items[this.positionItems._.i].css("top",this.positionItems._.top),this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.colHeights[this.positionItems._.col]=this.positionItems._.top+this.itemHeightsByColspan[this.positionItems._.i][this.layout.colspans[this.positionItems._.i]]}this.$container.height(Math.max.apply(null,this.positionItems._.colHeights)),delete this.positionItems._},onItemResize:function(t){this.onItemResize._={},t.stopPropagation(),this.onItemResize._.item=$.inArray(t.currentTarget,this.$items),-1!==this.onItemResize._.item&&(this.onItemResize._.newHeight=this.items[this.onItemResize._.item].outerHeight(),this.onItemResize._.newHeight!==this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]&&(this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]=this.onItemResize._.newHeight,this.positionItems(!1))),delete this.onItemResize._},onRefreshCols:function(){this.trigger("refreshCols"),this.settings.onRefreshCols()}},{defaults:{itemSelector:".item",cols:null,maxCols:null,minColWidth:320,gutter:14,fillMode:"top",colClass:"col",snapToGrid:null,onRefreshCols:$.noop}}),Craft.Grid.LayoutGenerator=Garnish.Base.extend({grid:null,_:null,init:function(t){this.grid=t},createLayouts:function(t,e,i,s,n){for(this._={},this._.c=0;this._.c<this.grid.possibleItemColspans[t].length;this._.c++){for(this._.colspan=this.grid.possibleItemColspans[t][this._.c],this._.tallestColHeightsByPosition=[],this._.p=0;this._.p<this.grid.possibleItemPositionsByColspan[t][this._.colspan].length;this._.p++){for(this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.colHeightsForPosition=[],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.colHeightsForPosition.push(s[this._.col]);this._.tallestColHeightsByPosition[this._.p]=Math.max.apply(null,this._.colHeightsForPosition)}for(this._.p=$.inArray(Math.min.apply(null,this._.tallestColHeightsByPosition),this._.tallestColHeightsByPosition),this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.positions=e.slice(0),this._.colspans=i.slice(0),this._.colHeights=s.slice(0),this._.emptySpace=n,this._.positions.push(this._.position),this._.colspans.push(this._.colspan),this._.tallestColHeight=this._.tallestColHeightsByPosition[this._.p],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.emptySpace+=this._.tallestColHeight-this._.colHeights[this._.col],this._.colHeights[this._.col]=this._.tallestColHeight+this.grid.itemHeightsByColspan[t][this._.colspan];t===this.grid.items.length-1?this.grid.layouts.push({positions:this._.positions,colspans:this._.colspans,colHeights:this._.colHeights,emptySpace:this._.emptySpace}):this.grid.createLayouts(t+1,this._.positions,this._.colspans,this._.colHeights,this._.emptySpace)}delete this._}}),Craft.HandleGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){var e=t.replace("/<(.*?)>/g","");e=(e=e.replace(/['"‘’“”\[\]\(\)\{\}:]/g,"")).toLowerCase(),e=Craft.asciiString(e),this.settings.allowNonAlphaStart||(e=e.replace(/^[^a-z]+/,""));var i=Craft.filterArray(e.split(/[^a-z0-9]+/));e="";for(var s=0;s<i.length;s++)e+=0===s?i[s]:i[s].charAt(0).toUpperCase()+i[s].substr(1);return e}}),Craft.ImageUpload=Garnish.Base.extend({$container:null,progressBar:null,uploader:null,init:function(t){this.setSettings(t,Craft.ImageUpload.defaults),this.initImageUpload()},initImageUpload:function(){this.$container=$(this.settings.containerSelector),this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl(this.settings.uploadAction),formData:this.settings.postParameters,fileInput:this.$container.find(this.settings.fileInputSelector),paramName:this.settings.uploadParamName};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),t.events.fileuploadfail=$.proxy(this,"_onUploadError"),this.uploader=new Craft.Uploader(this.$container,t),this.initButtons()},initButtons:function(){this.$container.find(this.settings.uploadButtonSelector).on("click",$.proxy(function(t){this.$container.find(this.settings.fileInputSelector).trigger("click")},this)),this.$container.find(this.settings.deleteButtonSelector).on("click",$.proxy(function(t){confirm(Craft.t("app","Are you sure you want to delete this image?"))&&($(t.currentTarget).parent().append('<div class="blocking-modal"></div>'),Craft.postActionRequest(this.settings.deleteAction,this.settings.postParameters,$.proxy(function(t,e){"success"===e&&this.refreshImage(t)},this)))},this))},refreshImage:function(t){$(this.settings.containerSelector).replaceWith(t.html),this.settings.onAfterRefreshImage(t),this.initImageUpload()},_onUploadStart:function(t){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{$(e.result.html);this.refreshImage(e.result)}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"))},_onUploadError:function(t,e){e.jqXHR.responseJSON.error&&(alert(e.jqXHR.responseJSON.error),this.$container.removeClass("uploading"),this.progressBar.hideProgressBar(),this.progressBar.resetProgressBar())}},{defaults:{postParameters:{},uploadAction:"",deleteAction:"",fileInputSelector:"",onAfterRefreshImage:$.noop,containerSelector:null,uploadButtonSelector:null,deleteButtonSelector:null,uploadParamName:"files"}}),Craft.InfoIcon=Garnish.Base.extend({$icon:null,hud:null,init:function(t){this.$icon=$(t),this.addListener(this.$icon,"click","showHud")},showHud:function(){this.hud?this.hud.show():this.hud=new Garnish.HUD(this.$icon,this.$icon.html(),{hudClass:"hud info-hud",closeOtherHUDs:!1})}}),Craft.LightSwitch=Garnish.Base.extend({settings:null,$outerContainer:null,$innerContainer:null,$input:null,small:!1,on:null,dragger:null,dragStartMargin:null,init:function(t,e){this.$outerContainer=$(t),this.$outerContainer.data("lightswitch")&&(Garnish.log("Double-instantiating a lightswitch on an element"),this.$outerContainer.data("lightswitch").destroy()),this.$outerContainer.data("lightswitch",this),this.small=this.$outerContainer.hasClass("small"),this.setSettings(e,Craft.LightSwitch.defaults),this.$innerContainer=this.$outerContainer.find(".lightswitch-container:first"),this.$input=this.$outerContainer.find("input:first"),this.$input.prop("disabled")||(this.on=this.$outerContainer.hasClass("on"),this.$outerContainer.attr({role:"checkbox","aria-checked":this.on?"true":"false"}),this.addListener(this.$outerContainer,"mousedown","_onMouseDown"),this.addListener(this.$outerContainer,"keydown","_onKeyDown"),this.dragger=new Garnish.BaseDrag(this.$outerContainer,{axis:Garnish.X_AXIS,ignoreHandleSelector:null,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}))},turnOn:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=0,this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(this.settings.value),this.$outerContainer.addClass("on"),this.$outerContainer.attr("aria-checked","true"),this.on!==(this.on=!0)&&this.onChange()},turnOff:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=this._getOffMargin(),this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(""),this.$outerContainer.removeClass("on"),this.$outerContainer.attr("aria-checked","false"),this.on!==(this.on=!1)&&this.onChange()},toggle:function(t){this.on?this.turnOff():this.turnOn()},onChange:function(){this.trigger("change"),this.settings.onChange(),this.$outerContainer.trigger("change")},_onMouseDown:function(){this.addListener(Garnish.$doc,"mouseup","_onMouseUp")},_onMouseUp:function(){this.removeListener(Garnish.$doc,"mouseup"),this.dragger.dragging||this.toggle()},_onKeyDown:function(t){switch(t.keyCode){case Garnish.SPACE_KEY:this.toggle(),t.preventDefault();break;case Garnish.RIGHT_KEY:"ltr"===Craft.orientation?this.turnOn():this.turnOff(),t.preventDefault();break;case Garnish.LEFT_KEY:"ltr"===Craft.orientation?this.turnOff():this.turnOn(),t.preventDefault()}},_getMargin:function(){return parseInt(this.$innerContainer.css("margin-"+Craft.left))},_onDragStart:function(){this.$outerContainer.addClass("dragging"),this.dragStartMargin=this._getMargin()},_onDrag:function(){var t;(t="ltr"===Craft.orientation?this.dragStartMargin+this.dragger.mouseDistX:this.dragStartMargin-this.dragger.mouseDistX)<this._getOffMargin()?t=this._getOffMargin():0<t&&(t=0),this.$innerContainer.css("margin-"+Craft.left,t)},_onDragStop:function(){this._getMargin()>this._getOffMargin()/2?this.turnOn():this.turnOff()},_onSettle:function(){this.$outerContainer.removeClass("dragging")},destroy:function(){this.base(),this.dragger.destroy()},_getOffMargin:function(){return this.small?-9:-11}},{animationDuration:100,defaults:{value:"1",onChange:$.noop}}),Craft.LivePreview=Garnish.Base.extend({$extraFields:null,$trigger:null,$shade:null,$editorContainer:null,$editor:null,$dragHandle:null,$iframeContainer:null,$iframe:null,$fieldPlaceholder:null,previewUrl:null,token:null,basePostData:null,inPreviewMode:!1,fields:null,lastPostData:null,updateIframeInterval:null,loading:!1,checkAgain:!1,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_handleSuccessProxy:null,_handleErrorProxy:null,_forceUpdateIframeProxy:null,_scrollX:null,_scrollY:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.setSettings(t,Craft.LivePreview.defaults),this.settings.previewUrl?this.previewUrl=this.settings.previewUrl:this.previewUrl=Craft.baseSiteUrl.replace(/\/+$/,"")+"/","https:"===document.location.protocol&&(this.previewUrl=this.previewUrl.replace(/^http:/,"https:")),this.basePostData=$.extend({},this.settings.previewParams),this._handleSuccessProxy=$.proxy(this,"handleSuccess"),this._handleErrorProxy=$.proxy(this,"handleError"),this._forceUpdateIframeProxy=$.proxy(this,"forceUpdateIframe"),this.$extraFields=$(this.settings.extraFields),this.$trigger=$(this.settings.trigger),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.LivePreview.defaultEditorWidth),this.addListener(this.$trigger,"activate","toggle"),Craft.cp.on("beforeSaveShortcut",$.proxy(function(){this.inPreviewMode&&this.moveFieldsBack()},this))},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.LivePreview.minEditorWidthInPx&&(t=(e=Craft.LivePreview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},toggle:function(){this.inPreviewMode?this.exit():this.enter()},enter:function(){if(!this.inPreviewMode)if(this.token){if(this.trigger("beforeEnter"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$iframeContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);$("<div/>",{class:"flex-grow"}).appendTo(t);var i=$('<div class="btn submit">'+Craft.t("app","Save")+"</div>").appendTo(t);this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","exit"),this.addListener(i,"click","save")}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)+"px"),this.$iframeContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];for(var s=$(this.settings.fields),n=0;n<s.length;n++){var a=$(s[n]),r=this._getClone(a);this.$fieldPlaceholder.insertAfter(a),a.detach(),this.$fieldPlaceholder.replaceWith(r),a.appendTo(this.$editor),this.fields.push({$field:a,$clone:r})}this.updateIframe()?this._slideInOnIframeLoad=!0:this.slideIn(),Garnish.on(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._forceUpdateIframeProxy),this.inPreviewMode=!0,this.trigger("enter")}else this.createToken()},createToken:function(){Craft.postActionRequest("live-preview/create-token",{previewAction:this.settings.previewAction},$.proxy(function(t,e){"success"===e&&(this.token=t.token,this.enter())},this))},save:function(){Craft.cp.submitPrimaryForm()},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$iframeContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.updateIframeInterval=setInterval($.proxy(this,"updateIframe"),1e3),this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.exit()})},this))},exit:function(){this.inPreviewMode&&(this.trigger("beforeExit"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.updateIframeInterval&&clearInterval(this.updateIframeInterval),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$iframeContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$iframeContainer.hide()},this)),Garnish.off(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),this.inPreviewMode=!1,this.trigger("exit"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$iframeContainer.width(this.getIframeWidth())},updateIframe:function(t){if(t&&(this.lastPostData=null),!this.inPreviewMode)return!1;if(this.loading)return!(this.checkAgain=!0);var e=$.extend(Garnish.getPostData(this.$editor),Garnish.getPostData(this.$extraFields));if(this.lastPostData&&Craft.compare(e,this.lastPostData,!1))return!1;this.lastPostData=e,this.loading=!0;var i=this.$iframe?$(this.$iframe[0].contentWindow.document):null;return this._scrollX=i?i.scrollLeft():0,this._scrollY=i?i.scrollTop():0,$.ajax({url:this.previewUrl+(-1!==this.previewUrl.indexOf("?")?"&":"?")+Craft.tokenParam+"="+this.token,method:"POST",data:$.extend({},e,this.basePostData),headers:{"X-Craft-Token":this.token},xhrFields:{withCredentials:!0},crossDomain:!0,success:this._handleSuccessProxy,error:this._handleErrorProxy}),!0},forceUpdateIframe:function(){return this.updateIframe(!0)},handleSuccess:function(t){var e=t+'<script type="text/javascript">window.scrollTo('+this._scrollX+", "+this._scrollY+");<\/script>",i=$('<iframe class="lp-preview" frameborder="0"/>');this.$iframe?i.insertBefore(this.$iframe):i.appendTo(this.$iframeContainer),this.addListener(i,"load",function(){this.$iframe&&this.$iframe.remove(),this.$iframe=i,this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1),this.removeListener(i,"load")}),Garnish.requestAnimationFrame($.proxy(function(){i[0].contentWindow.document.open(),i[0].contentWindow.document.write(e),i[0].contentWindow.document.close(),this.onResponse()},this))},handleError:function(){this.onResponse()},onResponse:function(){this.loading=!1,this.checkAgain&&(this.checkAgain=!1,this.updateIframe())},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$iframeContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$iframeContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:4,defaults:{trigger:".livepreviewbtn",fields:null,extraFields:null,previewUrl:null,previewAction:null,previewParams:{}}}),Craft.LivePreview.init=function(t){Craft.livePreview=new Craft.LivePreview(t)},Craft.PasswordInput=Garnish.Base.extend({$passwordInput:null,$textInput:null,$currentInput:null,$showPasswordToggle:null,showingPassword:null,init:function(t,e){this.$passwordInput=$(t),this.settings=$.extend({},Craft.PasswordInput.defaults,e),this.$passwordInput.data("passwordInput")&&(Garnish.log("Double-instantiating a password input on an element"),this.$passwordInput.data("passwordInput").destroy()),this.$passwordInput.data("passwordInput",this),this.$showPasswordToggle=$("<a/>").hide(),this.$showPasswordToggle.addClass("password-toggle"),this.$showPasswordToggle.insertAfter(this.$passwordInput),this.addListener(this.$showPasswordToggle,"mousedown","onToggleMouseDown"),this.hidePassword()},setCurrentInput:function(t){this.$currentInput&&(t.addClass("focus"),t.insertAfter(this.$currentInput),this.$currentInput.detach(),t.trigger("focus"),t.removeClass("focus"),t.val(this.$currentInput.val())),this.$currentInput=t,this.addListener(this.$currentInput,"keypress,keyup,change,blur","onInputChange")},updateToggleLabel:function(t){this.$showPasswordToggle.text(t)},showPassword:function(){this.showingPassword||(this.$textInput||(this.$textInput=this.$passwordInput.clone(!0),this.$textInput.attr("type","text")),this.setCurrentInput(this.$textInput),this.updateToggleLabel(Craft.t("app","Hide")),this.showingPassword=!0)},hidePassword:function(){!1!==this.showingPassword&&(this.setCurrentInput(this.$passwordInput),this.updateToggleLabel(Craft.t("app","Show")),this.showingPassword=!1,this.addListener(this.$passwordInput,"keydown","onKeyDown"))},togglePassword:function(){this.showingPassword?this.hidePassword():this.showPassword(),this.settings.onToggleInput(this.$currentInput)},onKeyDown:function(t){t.keyCode===Garnish.ALT_KEY&&this.$currentInput.val()&&(this.showPassword(),this.$showPasswordToggle.hide(),this.addListener(this.$textInput,"keyup","onKeyUp"))},onKeyUp:function(t){t.preventDefault(),t.keyCode===Garnish.ALT_KEY&&(this.hidePassword(),this.$showPasswordToggle.show())},onInputChange:function(){this.$currentInput.val()?this.$showPasswordToggle.show():this.$showPasswordToggle.hide()},onToggleMouseDown:function(t){if(t.preventDefault(),this.$currentInput[0].setSelectionRange){var e=this.$currentInput[0].selectionStart,i=this.$currentInput[0].selectionEnd;this.togglePassword(),this.$currentInput[0].setSelectionRange(e,i)}else this.togglePassword()}},{defaults:{onToggleInput:$.noop}}),Craft.Preview=Garnish.Base.extend({draftEditor:null,$shade:null,$editorContainer:null,$editor:null,$spinner:null,$statusIcon:null,$dragHandle:null,$previewContainer:null,$targetBtn:null,$targetMenu:null,$iframe:null,$tempInput:null,$fieldPlaceholder:null,isActive:!1,activeTarget:0,url:null,fields:null,scrollLeft:0,scrollTop:0,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_updateIframeProxy:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.draftEditor=t,this._updateIframeProxy=$.proxy(this,"updateIframe"),this.$tempInput=$("<input/>",{type:"hidden",name:"__PREVIEW_FIELDS__",value:"1"}),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.Preview.defaultEditorWidth)},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.Preview.minEditorWidthInPx&&(t=(e=Craft.Preview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},open:function(){if(!this.isActive){if(this.isActive=!0,this.trigger("beforeOpen"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$previewContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);if($("<div/>",{class:"flex-grow"}).appendTo(t),this.$spinner=$("<div/>",{class:"spinner hidden",title:Craft.t("app","Saving")}).appendTo(t),this.$statusIcon=$("<div/>",{class:"invisible"}).appendTo(t),1<this.draftEditor.settings.previewTargets.length){var i=$("<header/>",{class:"flex"}).appendTo(this.$previewContainer);this.$targetBtn=$("<div/>",{class:"btn menubtn",text:this.draftEditor.settings.previewTargets[0].label,role:"btn"}).appendTo(i),this.$targetMenu=$("<div/>",{class:"menu lp-target-menu"}).insertAfter(this.$targetBtn);for(var s,n=$("<ul/>",{class:"padded"}).appendTo(this.$targetMenu),a=0;a<this.draftEditor.settings.previewTargets.length;a++)s=$("<li/>").appendTo(n),$("<a/>",{data:{target:a},text:this.draftEditor.settings.previewTargets[a].label,class:0===a?"sel":null}).appendTo(s);new Garnish.MenuBtn(this.$targetBtn,{onOptionSelect:$.proxy(function(t){this.switchTarget($(t).data("target"))},this)})}this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","close"),this.addListener(this.$statusIcon,"click",function(){this.draftEditor.showStatusHud(this.$statusIcon)}.bind(this))}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)+"px"),this.$previewContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];var r=$("#content .field").not($("#content .field .field"));if(r.length){this.$tempInput.insertBefore(r.get(0));for(a=0;a<r.length;a++){var o=$(r[a]),l=this._getClone(o);this.$fieldPlaceholder.insertAfter(o),o.detach(),this.$fieldPlaceholder.replaceWith(l),o.appendTo(this.$editor),this.fields.push({$field:o,$clone:l})}}this._slideInOnIframeLoad=!0,this.updateIframe(),this.draftEditor.on("update",this._updateIframeProxy),Garnish.on(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.trigger("open")}},switchTarget:function(t){this.activeTarget=t,this.$targetBtn.text(this.draftEditor.settings.previewTargets[t].label),this.$targetMenu.find("a.sel").removeClass("sel"),this.$targetMenu.find("a").eq(t).addClass("sel"),this.updateIframe(!0)},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$previewContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.close()})},this))},close:function(){this.isActive&&(this.trigger("beforeClose"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.$tempInput.detach(),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.Preview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$previewContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$previewContainer.hide()},this)),this.draftEditor.off("update",this._updateIframeProxy),Garnish.off(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.off(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.isActive=!1,this.trigger("close"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$previewContainer.width(this.getIframeWidth())},updateIframe:function(n){if(!this.isActive)return!1;n=!0===n;var t=this.draftEditor.settings.previewTargets[this.activeTarget].url;this.draftEditor.getTokenizedPreviewUrl(t,"x-craft-live-preview").then(function(t){var e;if(n)this.scrollLeft=0,this.scrolllTop=0;else if((e=Craft.isSameHost(t))&&this.$iframe&&this.$iframe[0].contentWindow){var i=$(this.$iframe[0].contentWindow.document);this.scrollLeft=i.scrollLeft(),this.scrollTop=i.scrollTop()}var s=$("<iframe/>",{class:"lp-preview",frameborder:0,src:t});!n&&e&&s.on("load",function(){var t=$(s[0].contentWindow.document);t.scrollLeft(this.scrollLeft),t.scrollTop(this.scrollTop)}.bind(this)),this.$iframe?this.$iframe.replaceWith(s):s.appendTo(this.$previewContainer),this.url=t,this.$iframe=s,this.afterUpdateIframe()}.bind(this))},afterUpdateIframe:function(){this.trigger("afterUpdateIframe"),this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1)},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e.find("[name]").prop("disabled",!0),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$previewContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$previewContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:2}),Craft.PreviewFileModal=Garnish.Modal.extend({assetId:null,$spinner:null,elementSelect:null,type:null,loaded:null,requestId:0,init:function(t,e,i){if((i=$.extend(this.defaultSettings,i)).onHide=this._onHide.bind(this),Craft.PreviewFileModal.openInstance){var s=Craft.PreviewFileModal.openInstance;return s.assetId!==t&&(s.loadAsset(t,i.startingWidth,i.startingHeight),s.elementSelect=e),this.destroy()}(Craft.PreviewFileModal.openInstance=this).elementSelect=e,this.$container=$('<div id="previewmodal" class="modal loading"/>').appendTo(Garnish.$bod),this.base(this.$container,$.extend({resizable:!0},i)),this.$container&&(this.$container.velocity("stop"),this.$container.show().css("opacity",1),this.$shade.velocity("stop"),this.$shade.show().css("opacity",1)),this.loadAsset(t,i.startingWidth,i.startingHeight)},_onHide:function(){return Craft.PreviewFileModal.openInstance=null,this.elementSelect.focusItem(this.elementSelect.$focusedItem),this.$shade.remove(),this.destroy()},selfDestruct:function(){var t=Craft.PreviewFileModal.openInstance;return t.hide(),t.$shade.remove(),t.destroy(),!(Craft.PreviewFileModal.openInstance=null)},loadAsset:function(t,e,i){this.assetId=t,this.$container.empty(),this.loaded=!1,this.desiredHeight=null,this.desiredWidth=null;var n=.66*Garnish.$win.height(),a=Math.min(n/3*4,Garnish.$win.width()-2*this.settings.minGutter);if(n=a/4*3,e&&i){var s=e/i;a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=Math.min(a/s,Garnish.$win.height()-2*this.settings.minGutter),(a=n*s)>Math.min(e,Garnish.$win.width()-2*this.settings.minGutter)&&(a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=a/s)}this._resizeContainer(a,n),this.$spinner=$('<div class="spinner centeralign"></div>').appendTo(this.$container);var r=this.$container.height()/2-this.$spinner.height()/2+"px",o=this.$container.width()/2-this.$spinner.width()/2+"px";this.$spinner.css({left:o,top:r,position:"absolute"}),this.requestId++,Craft.postActionRequest("assets/preview-file",{assetId:t,requestId:this.requestId},function(t,e){if("success"===e)if(t.success){if(t.requestId!=this.requestId)return;this.$container.removeClass("loading"),this.$spinner.remove(),this.loaded=!0,this.$container.append(t.modalHtml);var i=this.$container.find(".highlight");if(i.length&&i.hasClass("json")){var s=i.find("code");s.html(JSON.stringify(JSON.parse(s.html()),void 0,4))}i.length?Prism.highlightElement(i.find("code").get(0)):this.$container.find("img").css({width:a,height:n}),this.updateSizeAndPosition()}else alert(t.error),this.hide()}.bind(this))},updateSizeAndPosition:function(){if(this.loaded){var t=this.$container.find("img");if(this.loaded&&t.length){var e=t.data("maxwidth"),i=t.data("maxheight"),s=e/i,n=this.desiredWidth?this.desiredWidth:this.$container.width(),a=(this.desiredHeight?this.desiredHeight:this.$container.height(),Math.min(n,e)),r=Math.round(Math.min(i,a/s));a=Math.round(r*s),t.css({width:a,height:r}),this._resizeContainer(a,r),this.desiredWidth=a,this.desiredHeight=r}if(this.base(),this.loaded&&t.length){var o=Math.round(Math.min(Math.max(t.height()*s),Garnish.$win.width()-2*this.settings.minGutter)),l=Math.round(Math.min(Math.max(o/s),Garnish.$win.height()-2*this.settings.minGutter));(o=Math.round(l*s))>Math.min(o,Garnish.$win.width()-2*this.settings.minGutter)&&(l=(o=Math.min(o,Garnish.$win.width()-2*this.settings.minGutter))/s),this._resizeContainer(o,l),t.css({width:o,height:l})}else this.loaded&&this.$container.find(".highlight").height(this.$container.height()).width(this.$container.width()).css({overflow:"auto"})}},_resizeContainer:function(t,e){this.$container.css({width:t,"min-width":t,"max-width":t,height:e,"min-height":e,"max-height":e,top:(Garnish.$win.height()-e)/2,left:(Garnish.$win.width()-t)/2})}},{defaultSettings:{startingWidth:null,startingHeight:null}}),Craft.ProgressBar=Garnish.Base.extend({$progressBar:null,$innerProgressBar:null,$progressBarStatus:null,_itemCount:0,_processedItemCount:0,_displaySteps:!1,init:function(t,e){e&&(this._displaySteps=!0),this.$progressBar=$('<div class="progressbar pending hidden"/>').appendTo(t),this.$innerProgressBar=$('<div class="progressbar-inner"/>').appendTo(this.$progressBar),this.$progressBarStatus=$('<div class="progressbar-status hidden" />').insertAfter(this.$progressBar),this.resetProgressBar()},resetProgressBar:function(){this.setProgressPercentage(100),this.$progressBar.addClass("pending"),this.setItemCount(1),this.setProcessedItemCount(0),this.$progressBarStatus.html(""),this._displaySteps&&this.$progressBar.addClass("has-status")},hideProgressBar:function(){this.$progressBar.fadeTo("fast",.01,$.proxy(function(){this.$progressBar.addClass("hidden").fadeTo(1,1,$.noop)},this))},showProgressBar:function(){this.$progressBar.removeClass("hidden"),this.$progressBarStatus.removeClass("hidden")},setItemCount:function(t){this._itemCount=t},incrementItemCount:function(t){this._itemCount+=t},setProcessedItemCount:function(t){this._processedItemCount=t},incrementProcessedItemCount:function(t){this._processedItemCount+=t},updateProgressBar:function(){this._itemCount=Math.max(this._itemCount,1);var t=Math.min(100,Math.round(100*this._processedItemCount/this._itemCount));this.setProgressPercentage(t),this._displaySteps&&this.$progressBarStatus.html(this._processedItemCount+" / "+this._itemCount)},setProgressPercentage:function(t,e){0===t?this.$progressBar.addClass("pending"):(this.$progressBar.removeClass("pending"),e?this.$innerProgressBar.velocity("stop").velocity({width:t+"%"},"fast"):this.$innerProgressBar.velocity("stop").width(t+"%"))}}),Craft.PromptHandler=Garnish.Base.extend({modal:null,$modalContainerDiv:null,$prompt:null,$promptApplyToRemainingContainer:null,$promptApplyToRemainingCheckbox:null,$promptApplyToRemainingLabel:null,$pomptChoices:null,_prompts:[],_promptBatchCallback:$.noop,_promptBatchReturnData:[],_promptBatchNum:0,resetPrompts:function(){this._prompts=[],this._promptBatchCallback=$.noop,this._promptBatchReturnData=[],this._promptBatchNum=0},addPrompt:function(t){this._prompts.push(t)},getPromptCount:function(){return this._prompts.length},showBatchPrompts:function(t){this._promptBatchCallback=t,this._promptBatchReturnData=[],this._promptBatchNum=0,this._showNextPromptInBatch()},_showNextPromptInBatch:function(){var t=this._prompts[this._promptBatchNum].prompt,e=this._prompts.length-(this._promptBatchNum+1);this._showPrompt(t.message,t.choices,$.proxy(this,"_handleBatchPromptSelection"),e)},_handleBatchPromptSelection:function(t,e){var i=this._prompts[this._promptBatchNum],s=this._prompts.length-(this._promptBatchNum+1),n=$.extend(i,{choice:t});this._promptBatchReturnData.push(n),s?(this._promptBatchNum++,e?this._handleBatchPromptSelection(t,!0):this._showNextPromptInBatch()):"function"==typeof this._promptBatchCallback&&this._promptBatchCallback(this._promptBatchReturnData)},_showPrompt:function(t,e,i,s){this._promptCallback=i,null===this.modal&&(this.modal=new Garnish.Modal({closeOtherModals:!1})),null===this.$modalContainerDiv&&(this.$modalContainerDiv=$('<div class="modal fitted prompt-modal"></div>').addClass().appendTo(Garnish.$bod)),this.$prompt=$('<div class="body"></div>').appendTo(this.$modalContainerDiv.empty()),this.$promptMessage=$('<p class="prompt-msg"/>').appendTo(this.$prompt),this.$promptChoices=$('<div class="options"></div>').appendTo(this.$prompt),this.$promptApplyToRemainingContainer=$('<label class="assets-applytoremaining"/>').appendTo(this.$prompt).hide(),this.$promptApplyToRemainingCheckbox=$('<input type="checkbox"/>').appendTo(this.$promptApplyToRemainingContainer),this.$promptApplyToRemainingLabel=$("<span/>").appendTo(this.$promptApplyToRemainingContainer),this.$promptButtons=$('<div class="buttons right"/>').appendTo(this.$prompt),this.modal.setContainer(this.$modalContainerDiv),this.$promptMessage.html(t);for(var n=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$promptButtons),a=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","OK")+'" />').appendTo(this.$promptButtons),r=0;r<e.length;r++){var o=$('<div><label><input type="radio" name="promptAction" value="'+e[r].value+'"/> '+e[r].title+"</label></div>").appendTo(this.$promptChoices).find("input");this.addListener(o,"click",function(){a.removeClass("disabled")})}this.addListener(a,"activate",function(t){var e=$(t.currentTarget).parents(".modal").find("input[name=promptAction]:checked").val(),i=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice(e,i)}),this.addListener(n,"activate",function(){var t=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice("cancel",t)}),s&&(this.$promptApplyToRemainingContainer.show(),this.$promptApplyToRemainingLabel.html(" "+Craft.t("app","Apply this to the {number} remaining conflicts?",{number:s}))),this.modal.show(),this.modal.removeListener(Garnish.Modal.$shade,"click"),this.addListener(Garnish.Modal.$shade,"click","_cancelPrompt")},_selectPromptChoice:function(t,e){this.$prompt.fadeOut("fast",$.proxy(function(){this.modal.hide(),this._promptCallback(t,e)},this))},_cancelPrompt:function(){this._selectPromptChoice("cancel",!0)}}),Craft.SlideRuleInput=Garnish.Base.extend({$container:null,$options:null,$selectedOption:null,$input:null,value:null,startPositionX:null,init:function(t,e){this.setSettings(e,Craft.SlideRuleInput.defaultSettings),this.value=0,this.graduationsMin=-70,this.graduationsMax=70,this.slideMin=-45,this.slideMax=45,this.$container=$("#"+t),this.$overlay=$('<div class="overlay"></div>').appendTo(this.$container),this.$cursor=$('<div class="cursor"></div>').appendTo(this.$container),this.$graduations=$('<div class="graduations"></div>').appendTo(this.$container),this.$graduationsUl=$("<ul></ul>").appendTo(this.$graduations);for(var i=this.graduationsMin;i<=this.graduationsMax;i++){var s=$('<li class="graduation" data-graduation="'+i+'"><div class="label">'+i+"</div></li>").appendTo(this.$graduationsUl);i%5==0&&s.addClass("main-graduation"),0===i&&s.addClass("selected")}this.$options=this.$container.find(".graduation"),this.addListener(this.$container,"resize",$.proxy(this,"_handleResize")),this.addListener(this.$container,"tapstart",$.proxy(this,"_handleTapStart")),this.addListener(Garnish.$bod,"tapmove",$.proxy(this,"_handleTapMove")),this.addListener(Garnish.$bod,"tapend",$.proxy(this,"_handleTapEnd")),setTimeout($.proxy(function(){this.graduationsCalculatedWidth=10*(this.$options.length-1),this.$graduationsUl.css("left",-this.graduationsCalculatedWidth/2+this.$container.width()/2)},this),50)},_handleResize:function(){var t=this.valueToPosition(this.value);this.$graduationsUl.css("left",t)},_handleTapStart:function(t,e){t.preventDefault(),this.startPositionX=e.position.x,this.startLeft=this.$graduationsUl.position().left,this.dragging=!0,this.onStart()},_handleTapMove:function(t,e){if(this.dragging){t.preventDefault();var i=this.startPositionX-e.position.x,s=this.startLeft-i,n=this.positionToValue(s);this.setValue(n),this.onChange()}},setValue:function(i){var t=this.valueToPosition(i);i<this.slideMin?(i=this.slideMin,t=this.valueToPosition(i)):i>this.slideMax&&(i=this.slideMax,t=this.valueToPosition(i)),this.$graduationsUl.css("left",t),i>=this.slideMin&&i<=this.slideMax&&(this.$options.removeClass("selected"),$.each(this.$options,function(t,e){0<$(e).data("graduation")&&$(e).data("graduation")<=i&&$(e).addClass("selected"),$(e).data("graduation")<0&&$(e).data("graduation")>=i&&$(e).addClass("selected"),0==$(e).data("graduation")&&$(e).addClass("selected")})),this.value=i},_handleTapEnd:function(t){this.dragging&&(t.preventDefault(),this.dragging=!1,this.onEnd())},positionToValue:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return(this.$graduations.width()/2+-1*t)/this.graduationsCalculatedWidth*i-e},valueToPosition:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return-((t+e)*this.graduationsCalculatedWidth/i-this.$graduations.width()/2)},onStart:function(){"function"==typeof this.settings.onChange&&this.settings.onStart(this)},onChange:function(){"function"==typeof this.settings.onChange&&this.settings.onChange(this)},onEnd:function(){"function"==typeof this.settings.onChange&&this.settings.onEnd(this)},defaultSettings:{onStart:$.noop,onChange:$.noop,onEnd:$.noop}}),Craft.SlugGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace(/<(.*?)>/g,"")).replace(/['"‘’“”\[\]\(\)\{\}:]/g,""),Craft.allowUppercaseInSlug||(t=t.toLowerCase()),Craft.limitAutoSlugsToAscii&&(t=Craft.asciiString(t,this.settings.charMap));var e=Craft.filterArray(XRegExp.matchChain(t,[XRegExp("[\\p{L}\\p{N}\\p{M}]+")]));return e.length?e.join(Craft.slugWordSeparator):""}}),Craft.Structure=Garnish.Base.extend({id:null,$container:null,state:null,structureDrag:null,init:function(t,e,i){this.id=t,this.$container=$(e),this.setSettings(i,Craft.Structure.defaults),this.$container.data("structure")&&(Garnish.log("Double-instantiating a structure on an element"),this.$container.data("structure").destroy()),this.$container.data("structure",this),this.state={},this.settings.storageKey&&$.extend(this.state,Craft.getLocalStorage(this.settings.storageKey,{})),void 0===this.state.collapsedElementIds&&(this.state.collapsedElementIds=[]);for(var s=this.$container.find("ul").prev(".row"),n=0;n<s.length;n++){var a=$(s[n]),r=a.parent(),o=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(a);-1!==$.inArray(a.children(".element").data("id"),this.state.collapsedElementIds)&&r.addClass("collapsed"),this.initToggle(o)}this.settings.sortable&&(this.structureDrag=new Craft.StructureDrag(this,this.settings.maxLevels)),this.settings.newChildUrl&&this.initNewChildMenus(this.$container.find(".add"))},initToggle:function(t){t.on("click",$.proxy(function(t){var e=$(t.currentTarget).closest("li"),i=e.children(".row").find(".element:first").data("id"),s=$.inArray(i,this.state.collapsedElementIds);e.hasClass("collapsed")?(e.removeClass("collapsed"),-1!==s&&this.state.collapsedElementIds.splice(s,1)):(e.addClass("collapsed"),-1===s&&this.state.collapsedElementIds.push(i)),this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.state)},this))},initNewChildMenus:function(t){this.addListener(t,"click","onNewChildMenuClick")},onNewChildMenuClick:function(t){var e=$(t.currentTarget);if(!e.data("menubtn")){var i=e.parent().children(".element").data("id"),s=Craft.getUrl(this.settings.newChildUrl,"parentId="+i);$('<div class="menu"><ul><li><a href="'+s+'">'+Craft.t("app","New child")+"</a></li></ul></div>").insertAfter(e),new Garnish.MenuBtn(e).showMenu()}},getIndent:function(t){return Craft.Structure.baseIndent+(t-1)*Craft.Structure.nestedIndent},addElement:function(t){var e=$('<li data-level="1"/>').appendTo(this.$container),i=$('<div class="row" style="margin-'+Craft.left+": -"+Craft.Structure.baseIndent+"px; padding-"+Craft.left+": "+Craft.Structure.baseIndent+'px;">').appendTo(e);if(i.append(t),this.settings.sortable&&(i.append('<a class="move icon" title="'+Craft.t("app","Move")+'"></a>'),this.structureDrag.addItems(e)),this.settings.newChildUrl){var s=$('<a class="add icon" title="'+Craft.t("app","New child")+'"></a>').appendTo(i);this.initNewChildMenus(s)}i.css("margin-bottom",-30),i.velocity({"margin-bottom":0},"fast")},removeElement:function(t){var e,i=t.parent().parent();this.settings.sortable&&this.structureDrag.removeItems(i),i.siblings().length||(e=i.parent()),i.css("visibility","hidden").velocity({marginBottom:-i.height()},"fast",$.proxy(function(){i.remove(),void 0!==e&&this._removeUl(e)},this))},_removeUl:function(t){t.siblings(".row").children(".toggle").remove(),t.remove()}},{baseIndent:8,nestedIndent:35,defaults:{storageKey:null,sortable:!1,newChildUrl:null,maxLevels:null}}),Craft.StructureDrag=Garnish.Drag.extend({structure:null,maxLevels:null,draggeeLevel:null,$helperLi:null,$targets:null,draggeeHeight:null,init:function(t,e){this.structure=t,this.maxLevels=e,this.$insertion=$('<li class="draginsertion"/>');var i=this.structure.$container.find("li");this.base(i,{handle:".element:first, .move:first",helper:$.proxy(this,"getHelper")})},getHelper:function(t){this.$helperLi=t;var e=$('<ul class="structure draghelper"/>').append(t);return t.css("padding-"+Craft.left,this.$draggee.css("padding-"+Craft.left)),t.find(".move").removeAttr("title"),e},onDragStart:function(){this.$targets=$(),this.findTargets(this.structure.$container),this.draggeeLevel=0;for(var t=this.$draggee;this.draggeeLevel++,(t=t.find("> ul > li")).length;);this.draggeeHeight=this.$draggee.height(),this.$draggee.velocity({height:0},"fast",$.proxy(function(){this.$draggee.addClass("hidden")},this)),this.base(),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.ESC_KEY&&this.cancelDrag()})},findTargets:function(t){for(var e=t.children().not(this.$draggee),i=0;i<e.length;i++){var s=$(e[i]);this.$targets=this.$targets.add(s.children(".row")),s.hasClass("collapsed")||this.findTargets(s.children("ul"))}},onDrag:function(){for(this._.$closestTarget&&(this._.$closestTarget.removeClass("draghover"),this.$insertion.remove()),this._.$closestTarget=null,this._.closestTargetPos=null,this._.closestTargetYDiff=null,this._.closestTargetOffset=null,this._.closestTargetHeight=null,this._.i=0;this._.i<this.$targets.length&&(this._.$target=$(this.$targets[this._.i]),this._.targetOffset=this._.$target.offset(),this._.targetHeight=this._.$target.outerHeight(),this._.targetYMidpoint=this._.targetOffset.top+this._.targetHeight/2,this._.targetYDiff=Math.abs(this.mouseY-this._.targetYMidpoint),0===this._.i||this.mouseY>=this._.targetOffset.top+5&&this._.targetYDiff<this._.closestTargetYDiff);this._.i++)this._.$closestTarget=this._.$target,this._.closestTargetPos=this._.i,this._.closestTargetYDiff=this._.targetYDiff,this._.closestTargetOffset=this._.targetOffset,this._.closestTargetHeight=this._.targetHeight;if(this._.$closestTarget)if(0===this._.closestTargetPos&&this.mouseY<this._.closestTargetOffset.top+5)this.$insertion.prependTo(this.structure.$container);else if(this._.$closestTargetLi=this._.$closestTarget.parent(),this._.closestTargetLevel=this._.$closestTargetLi.data("level"),this._.closestTargetPos<this.$targets.length-1?(this._.$nextTargetLi=$(this.$targets[this._.closestTargetPos+1]).parent(),this._.nextTargetLevel=this._.$nextTargetLi.data("level")):(this._.$nextTargetLi=null,this._.nextTargetLevel=null),this._.hoveringBetweenRows=this.mouseY>=this._.closestTargetOffset.top+this._.closestTargetHeight-5,this._.$nextTargetLi&&this._.nextTargetLevel==this._.closestTargetLevel)this._.hoveringBetweenRows?(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel-1)&&this.$insertion.insertAfter(this._.$closestTargetLi):(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover");else if(this._.$nextTargetLi&&this._.nextTargetLevel>this._.closestTargetLevel)(!this.maxLevels||this.maxLevels>=this._.nextTargetLevel+this.draggeeLevel-1)&&(this._.hoveringBetweenRows?this.$insertion.insertBefore(this._.$nextTargetLi):(this._.$closestTarget.addClass("draghover"),this.$insertion.appendTo(this._.$closestTargetLi.children("ul"))));else if(this._.hoveringBetweenRows){for(this._.draggeeX=this.mouseX-this.targetItemMouseDiffX,"rtl"===Craft.orientation&&(this._.draggeeX+=this.$helperLi.width()),this._.$parentLis=this._.$closestTarget.parentsUntil(this.structure.$container,"li"),this._.$closestParentLi=null,this._.closestParentLiXDiff=null,this._.closestParentLevel=null,this._.i=0;this._.i<this._.$parentLis.length;this._.i++)this._.$parentLi=$(this._.$parentLis[this._.i]),this._.parentLiX=this._.$parentLi.offset().left,"rtl"===Craft.orientation&&(this._.parentLiX+=this._.$parentLi.width()),this._.parentLiXDiff=Math.abs(this._.parentLiX-this._.draggeeX),this._.parentLevel=this._.$parentLi.data("level"),(!this.maxLevels||this.maxLevels>=this._.parentLevel+this.draggeeLevel-1)&&(!this._.$closestParentLi||this._.parentLiXDiff<this._.closestParentLiXDiff&&(!this._.$nextTargetLi||this._.parentLevel>=this._.nextTargetLevel))&&(this._.$closestParentLi=this._.$parentLi,this._.closestParentLiXDiff=this._.parentLiXDiff,this._.closestParentLevel=this._.parentLevel);this._.$closestParentLi&&this.$insertion.insertAfter(this._.$closestParentLi)}else(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover")},cancelDrag:function(){this.$insertion.remove(),this._.$closestTarget&&this._.$closestTarget.removeClass("draghover"),this.onMouseUp()},onDragStop:function(){if(this._.$closestTarget&&(this.$insertion.parent().length||this._.$closestTarget.hasClass("draghover"))){var t,e;if(this.$draggee.siblings().length||(t=this.$draggee.parent()),this.$insertion.parent().length){var i=this.$insertion.next().add(this.$insertion.prev());e=-1===$.inArray(this.$draggee[0],i)?(this.$insertion.replaceWith(this.$draggee),!0):(this.$insertion.remove(),!1)}else{var s=this._.$closestTargetLi.children("ul");if(t&&s.length&&s[0]===t[0])e=!1;else{if(s.length)this._.$closestTargetLi.hasClass("collapsed")&&this._.$closestTarget.children(".toggle").trigger("click");else{var n=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(this._.$closestTarget);this.structure.initToggle(n),s=$("<ul>").appendTo(this._.$closestTargetLi)}this.$draggee.appendTo(s),e=!0}}if(this._.$closestTarget.removeClass("draghover"),e){t&&this.structure._removeUl(t);var a,r=this.$draggee.parentsUntil(this.structure.$container,"li").length+1;r!=this.$draggee.data("level")&&(1==this.$draggee.data("level")?((a={})["padding-"+Craft.left]=38,this.$helperLi.velocity(a,"fast")):1==r&&((a={})["padding-"+Craft.left]=Craft.Structure.baseIndent,this.$helperLi.velocity(a,"fast")),this.setLevel(this.$draggee,r));var o=this.$draggee.children(".row").children(".element"),l={structureId:this.structure.id,elementId:o.data("id"),siteId:o.data("site-id"),prevId:this.$draggee.prev().children(".row").children(".element").data("id"),parentId:this.$draggee.parent("ul").parent("li").children(".row").children(".element").data("id")};Craft.postActionRequest("structures/move-element",l,function(t,e){"success"===e&&Craft.cp.displayNotice(Craft.t("app","New order saved."))})}}this.$draggee.velocity("stop").removeClass("hidden").velocity({height:this.draggeeHeight},"fast",$.proxy(function(){this.$draggee.css("height","auto")},this)),this.returnHelpersToDraggees(),this.base()},setLevel:function(t,e){t.data("level",e);var i=this.structure.getIndent(e),s={};s["margin-"+Craft.left]="-"+i+"px",s["padding-"+Craft.left]=i+"px",this.$draggee.children(".row").css(s);for(var n=t.children("ul").children(),a=0;a<n.length;a++)this.setLevel($(n[a]),e+1)}}),Craft.StructureTableSorter=Garnish.DragSort.extend({tableView:null,structureId:null,maxLevels:null,_helperMargin:null,_$firstRowCells:null,_$titleHelperCell:null,_titleHelperCellOuterWidth:null,_ancestors:null,_updateAncestorsFrame:null,_updateAncestorsProxy:null,_draggeeLevel:null,_draggeeLevelDelta:null,draggingLastElements:null,_loadingDraggeeLevelDelta:!1,_targetLevel:null,_targetLevelBounds:null,_positionChanged:null,init:function(t,e,i){this.tableView=t,this.structureId=this.tableView.$table.data("structure-id"),this.maxLevels=parseInt(this.tableView.$table.attr("data-max-levels")),i=$.extend({},Craft.StructureTableSorter.defaults,i,{handle:".move",collapseDraggees:!0,singleHelper:!0,helperSpacingY:2,magnetStrength:4,helper:$.proxy(this,"getHelper"),helperLagBase:1.5,axis:Garnish.Y_AXIS}),this.base(e,i)},startDragging:function(){this._helperMargin=Craft.StructureTableSorter.HELPER_MARGIN+(this.tableView.elementIndex.actions?24:0),this.base()},findDraggee:function(){this._draggeeLevel=this._targetLevel=this.$targetItem.data("level"),this._draggeeLevelDelta=0;for(var t=$(this.$targetItem),e=this.$targetItem.next();e.length;){var i=e.data("level");if(i<=this._draggeeLevel)break;var s=i-this._draggeeLevel;s>this._draggeeLevelDelta&&(this._draggeeLevelDelta=s),t=t.add(e),e=e.next()}if(this.draggingLastElements=!e.length,this.maxLevels&&this.draggingLastElements&&this.tableView.getMorePending()){this._loadingDraggeeLevelDelta=!0;var n=this._getAjaxBaseData(this.$targetItem);Craft.postActionRequest("structures/get-element-level-delta",n,$.proxy(function(t,e){"success"===e&&(this._loadingDraggeeLevelDelta=!1,this.dragging&&(this._draggeeLevelDelta=t.delta,this.drag(!1)))},this))}return t},getHelper:function(t){var e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e),s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.tableView.$elementContainer.children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove();else{var l=$(this._$firstRowCells[r]),h=l.width();if(l.width(h),o.width(h),Garnish.hasAttr(l,"data-titlecell")){this._$titleHelperCell=o;var d=parseInt(l.css("padding-"+Craft.left));this._titleHelperCellOuterWidth=h+d-(this.tableView.elementIndex.actions?12:0),o.css("padding-"+Craft.left,Craft.StructureTableSorter.BASE_PADDING)}}}return e},canInsertBefore:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t.prev(),t)},canInsertAfter:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t,t.next())},onDragStart:function(){this._ancestors=this._getAncestors(this.$targetItem,this.$targetItem.data("level")),this._setTargetLevelBounds(),this.tableView.maybeLoadMore(),this.base()},onDrag:function(){this.base(),this._updateIndent()},onInsertionPointChange:function(){this._setTargetLevelBounds(),this._updateAncestorsBeforeRepaint(),this.base()},onDragStop:function(){if(this._positionChanged=!1,this.base(),this._targetLevel!=this._draggeeLevel){for(var t=this._targetLevel-this._draggeeLevel,e=0;e<this.$draggee.length;e++){var i=$(this.$draggee[e]),s=i.data("level")+t,n=Craft.StructureTableSorter.BASE_PADDING+(this.tableView.elementIndex.actions?7:0)+this._getLevelIndent(s);i.data("level",s),i.find(".element").data("level",s),i.children("[data-titlecell]:first").css("padding-"+Craft.left,n)}this._positionChanged=!0}if(this._positionChanged){for(var a=this._getAjaxBaseData(this.$draggee),r=this.$draggee.first().prev();r.length;){var o=r.data("level");if(o==this._targetLevel){a.prevId=r.data("id");break}if(o<this._targetLevel){a.parentId=r.data("id");var l=r.find("> td > .toggle");if(!l.hasClass("expanded")){l.addClass("expanded");var h=this.tableView._createSpinnerRowAfter(r);this.tableView.elementSelect&&this.tableView.elementSelect.removeItems(this.$targetItem),this.removeItems(this.$targetItem),this.$targetItem.remove(),this.tableView._totalVisible--}break}r=r.prev()}Craft.postActionRequest("structures/move-element",a,$.proxy(function(t,e){if("success"===e){if(!t.success)return Craft.cp.displayError(Craft.t("app","An unknown error occurred.")),void this.tableView.elementIndex.updateElements();Craft.cp.displayNotice(Craft.t("app","New position saved.")),this.onPositionChange(),h&&h.parent().length&&(h.remove(),this.tableView._expandElement(l,!0)),Craft.cp.runQueue()}},this))}},onSortChange:function(){this.tableView.elementSelect&&this.tableView.elementSelect.resetItemOrder(),this._positionChanged=!0,this.base()},onPositionChange:function(){Garnish.requestAnimationFrame($.proxy(function(){this.trigger("positionChange"),this.settings.onPositionChange()},this))},onReturnHelpersToDraggees:function(){if(this._$firstRowCells.css("width",""),this.draggingLastElements&&this.tableView.getMorePending()){this.tableView._totalVisible+=this.newDraggeeIndexes[0]-this.oldDraggeeIndexes[0];var t=this.$draggee.last().nextAll();t.length&&(this.removeItems(t),t.remove(),this.tableView.maybeLoadMore())}this.base()},_getLevelBounds:function(t,e){if(e&&e.length?this._getLevelBounds._minLevel=e.data("level"):this._getLevelBounds._minLevel=1,t&&t.length?this._getLevelBounds._maxLevel=t.data("level")+1:this._getLevelBounds._maxLevel=1,this.maxLevels){if(1!=this._getLevelBounds._minLevel&&this._getLevelBounds._minLevel+this._draggeeLevelDelta>this.maxLevels)return!1;this._getLevelBounds._maxLevel+this._draggeeLevelDelta>this.maxLevels&&(this._getLevelBounds._maxLevel=this.maxLevels-this._draggeeLevelDelta,this._getLevelBounds._maxLevel<this._getLevelBounds._minLevel&&(this._getLevelBounds._maxLevel=this._getLevelBounds._minLevel))}return{min:this._getLevelBounds._minLevel,max:this._getLevelBounds._maxLevel}},_setTargetLevelBounds:function(){this._targetLevelBounds=this._getLevelBounds(this.$draggee.first().prev(),this.$draggee.last().next())},_updateIndent:function(t){this._updateIndent._mouseDist=this.realMouseX-this.mousedownX,"rtl"===Craft.orientation&&(this._updateIndent._mouseDist*=-1),this._updateIndent._indentationDist=Math.round(this._updateIndent._mouseDist/Craft.StructureTableSorter.LEVEL_INDENT),this._updateIndent._targetLevel=this._draggeeLevel+this._updateIndent._indentationDist,this._updateIndent._targetLevel<this._targetLevelBounds.min?(this._updateIndent._indentationDist+=this._targetLevelBounds.min-this._updateIndent._targetLevel,this._updateIndent._targetLevel=this._targetLevelBounds.min):this._updateIndent._targetLevel>this._targetLevelBounds.max&&(this._updateIndent._indentationDist-=this._updateIndent._targetLevel-this._targetLevelBounds.max,this._updateIndent._targetLevel=this._targetLevelBounds.max),this._targetLevel!==(this._targetLevel=this._updateIndent._targetLevel)&&this._updateAncestorsBeforeRepaint(),this._updateIndent._targetLevelMouseDiff=this._updateIndent._mouseDist-this._updateIndent._indentationDist*Craft.StructureTableSorter.LEVEL_INDENT,this._updateIndent._magnetImpact=Math.round(this._updateIndent._targetLevelMouseDiff/15),Math.abs(this._updateIndent._magnetImpact)>Craft.StructureTableSorter.MAX_GIVE&&(this._updateIndent._magnetImpact=(0<this._updateIndent._magnetImpact?1:-1)*Craft.StructureTableSorter.MAX_GIVE),this._updateIndent._closestLevelMagnetIndent=this._getLevelIndent(this._targetLevel)+this._updateIndent._magnetImpact,this.helpers[0].css("margin-"+Craft.left,this._updateIndent._closestLevelMagnetIndent+this._helperMargin),this._$titleHelperCell.width(this._titleHelperCellOuterWidth-(this._updateIndent._closestLevelMagnetIndent+Craft.StructureTableSorter.BASE_PADDING))},_getLevelIndent:function(t){return(t-1)*Craft.StructureTableSorter.LEVEL_INDENT},_getAjaxBaseData:function(t){return{structureId:this.structureId,elementId:t.data("id"),siteId:t.find(".element:first").data("site-id")}},_getAncestors:function(t,e){if(this._getAncestors._ancestors=[],0!=e)for(this._getAncestors._level=e,this._getAncestors._$prevRow=t.prev();this._getAncestors._$prevRow.length&&!(this._getAncestors._$prevRow.data("level")<this._getAncestors._level&&(this._getAncestors._ancestors.unshift(this._getAncestors._$prevRow),this._getAncestors._level=this._getAncestors._$prevRow.data("level"),0==this._getAncestors._level));)this._getAncestors._$prevRow=this._getAncestors._$prevRow.prev();return this._getAncestors._ancestors},_updateAncestorsBeforeRepaint:function(){this._updateAncestorsFrame&&Garnish.cancelAnimationFrame(this._updateAncestorsFrame),this._updateAncestorsProxy||(this._updateAncestorsProxy=$.proxy(this,"_updateAncestors")),this._updateAncestorsFrame=Garnish.requestAnimationFrame(this._updateAncestorsProxy)},_updateAncestors:function(){for(this._updateAncestorsFrame=null,this._updateAncestors._i=0;this._updateAncestors._i<this._ancestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._ancestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")-1),0==this._updateAncestors._$ancestor.data("descendants")&&this._updateAncestors._$ancestor.find("> td > .toggle:first").remove();for(this._updateAncestors._newAncestors=this._getAncestors(this.$targetItem,this._targetLevel),this._updateAncestors._i=0;this._updateAncestors._i<this._updateAncestors._newAncestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._updateAncestors._newAncestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")+1),1==this._updateAncestors._$ancestor.data("descendants")&&$('<span class="toggle expanded" title="'+Craft.t("app","Show/hide children")+'"></span>').insertAfter(this._updateAncestors._$ancestor.find("> td .move:first"));this._ancestors=this._updateAncestors._newAncestors,delete this._updateAncestors._i,delete this._updateAncestors._$ancestor,delete this._updateAncestors._newAncestors}},{BASE_PADDING:36,HELPER_MARGIN:-7,LEVEL_INDENT:44,MAX_GIVE:22,defaults:{onPositionChange:$.noop}}),Craft.TableElementIndexView=Craft.BaseElementIndexView.extend({$table:null,$selectedSortHeader:null,structureTableSort:null,_totalVisiblePostStructureTableDraggee:null,_morePendingPostStructureTableDraggee:!1,getElementContainer:function(){return this.$table=this.$container.find("table:first"),this.$table.children("tbody:first")},afterInit:function(){Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.add(this.$table),Craft.cp.updateResponsiveTables(),this.initTableHeaders(),"index"===this.elementIndex.settings.context&&"structure"===this.elementIndex.getSelectedSortAttribute()&&Garnish.hasAttr(this.$table,"data-structure-id")?this.structureTableSort=new Craft.StructureTableSorter(this,this.getAllElements(),{onSortChange:$.proxy(this,"_onStructureTableSortChange")}):this.structureTableSort=null,"structure"===this.elementIndex.getSelectedSortAttribute()&&this.addListener(this.$elementContainer,"click",function(t){var e=$(t.target);!e.hasClass("toggle")||!1===this._collapseElement(e)&&this._expandElement(e)})},initTableHeaders:function(){for(var t=this.elementIndex.getSelectedSortAttribute(),e=this.$table.children("thead").children().children("[data-attribute]"),i=0;i<e.length;i++){var s=e.eq(i),n=s.attr("data-attribute");if(n===t){this.$selectedSortHeader=s;var a=this.elementIndex.getSelectedSortDirection();s.addClass("ordered "+a).on("click",$.proxy(this,"_handleSelectedSortHeaderClick"))}else{this.elementIndex.getSortAttributeOption(n).length&&s.addClass("orderable").on("click",$.proxy(this,"_handleUnselectedSortHeaderClick"))}}},isVerticalList:function(){return!0},getTotalVisible:function(){return this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee:this._totalVisible},setTotalVisible:function(t){this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee=t:this._totalVisible=t},getMorePending:function(){return this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee:this._morePending},setMorePending:function(t){this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee=t:this._morePending=this._morePendingPostStructureTableDraggee=t},getLoadMoreParams:function(){var t=this.base();return this._isStructureTableDraggingLastElements()&&(t.criteria.positionedAfter=this.structureTableSort.$targetItem.data("id")),t},appendElements:function(t){this.base(t),this.structureTableSort&&this.structureTableSort.addItems(t),Craft.cp.updateResponsiveTables()},destroy:function(){this.$table&&(Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.not(this.$table)),this.base()},createElementEditor:function(e){Craft.createElementEditor(e.data("type"),e,{params:{includeTableAttributesForSource:this.elementIndex.sourceKey},onSaveElement:$.proxy(function(t){t.tableAttributes&&this._updateTableAttributes(e,t.tableAttributes)},this),elementIndex:this.elementIndex})},_collapseElement:function(t,e){if(!e&&!t.hasClass("expanded"))return!1;t.removeClass("expanded");for(var i=t.parent().parent(),s=i.data("id"),n=i.data("level"),a=i.next();a.length;){if(!Garnish.hasAttr(a,"data-spinnerrow")){if(a.data("level")<=n)break;this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),this._totalVisible--}var r=a.next();a.remove(),a=r}this.elementIndex.instanceState.collapsedElementIds||(this.elementIndex.instanceState.collapsedElementIds=[]),this.elementIndex.instanceState.collapsedElementIds.push(s),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds),this.maybeLoadMore()},_expandElement:function(t,e){if(!e&&t.hasClass("expanded"))return!1;if(t.addClass("expanded"),this.elementIndex.instanceState.collapsedElementIds){var i=t.parent().parent(),s=i.data("id"),n=$.inArray(s,this.elementIndex.instanceState.collapsedElementIds);if(-1!==n){this.elementIndex.instanceState.collapsedElementIds.splice(n,1),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds);var r=this._createSpinnerRowAfter(i),a=$.extend(!0,{},this.settings.params);a.criteria.descendantOf=s,Craft.postActionRequest("element-indexes/get-more-elements",a,$.proxy(function(t,e){if(r.parent().length&&"success"===e){var i=$(t.html),s=this._totalVisible+i.length,n=this.settings.batchSize&&i.length===this.settings.batchSize;if(n){var a=r.nextAll();this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),a.remove(),s-=a.length}else n=this._morePending;r.replaceWith(i),this.thumbLoader.load(i),(this.elementIndex.actions||this.settings.selectable)&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.structureTableSort&&this.structureTableSort.addItems(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.cp.updateResponsiveTables(),this.setTotalVisible(s),this.setMorePending(n),this.maybeLoadMore()}},this))}}},_createSpinnerRowAfter:function(t){return $('<tr data-spinnerrow><td class="centeralign" colspan="'+t.children().length+'"><div class="spinner"/></td></tr>').insertAfter(t)},_isStructureTableDraggingLastElements:function(){return this.structureTableSort&&this.structureTableSort.dragging&&this.structureTableSort.draggingLastElements},_handleSelectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i="asc"===this.elementIndex.getSelectedSortDirection()?"desc":"asc";this.elementIndex.setSortDirection(i),this._handleSortHeaderClick(t,e)}},_handleUnselectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i=e.attr("data-attribute");this.elementIndex.setSortAttribute(i),this._handleSortHeaderClick(t,e)}},_handleSortHeaderClick:function(t,e){this.$selectedSortHeader&&this.$selectedSortHeader.removeClass("ordered asc desc"),e.removeClass("orderable").addClass("ordered loading"),this.elementIndex.storeSortAttributeAndDirection(),this.elementIndex.updateElements(),this.elementIndex.setIndexAvailable()},_updateTableAttributes:function(t,e){var i=t.closest("tr");for(var s in e)e.hasOwnProperty(s)&&i.children('td[data-attr="'+s+'"]:first').html(e[s])}}),Craft.TagSelectInput=Craft.BaseElementSelectInput.extend({searchTimeout:null,searchMenu:null,$container:null,$elementsContainer:null,$elements:null,$addTagInput:null,$spinner:null,_ignoreBlur:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","tagGroupId","sourceElementId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.base($.extend({},Craft.TagSelectInput.defaults,t)),this.$addTagInput=this.$container.children(".add").children(".text"),this.$spinner=this.$addTagInput.next(),this.addListener(this.$addTagInput,"textchange",$.proxy(function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"searchForTags"),500)},this)),this.addListener(this.$addTagInput,"keypress",function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchMenu&&this.selectTag(this.searchMenu.$options[0]))}),this.addListener(this.$addTagInput,"focus",function(){this.searchMenu&&this.searchMenu.show()}),this.addListener(this.$addTagInput,"blur",function(){this._ignoreBlur?this._ignoreBlur=!1:setTimeout($.proxy(function(){this.searchMenu&&this.searchMenu.hide()},this),1)})},getAddElementsBtn:$.noop,getElementSortAxis:function(){return null},searchForTags:function(){if(this.searchMenu&&this.killSearchMenu(),this.$addTagInput.val()){this.$spinner.removeClass("hidden");for(var t=[],e=0;e<this.$elements.length;e++){var i=$(this.$elements[e]).data("id");i&&t.push(i)}this.settings.sourceElementId&&t.push(this.settings.sourceElementId);var r={search:this.$addTagInput.val(),tagGroupId:this.settings.tagGroupId,excludeIds:t};Craft.postActionRequest("tags/search-for-tags",r,$.proxy(function(t,e){if(this.searchMenu&&this.killSearchMenu(),this.$spinner.addClass("hidden"),"success"===e){for(var i,s=$('<div class="menu tagmenu"/>').appendTo(Garnish.$bod),n=$("<ul/>").appendTo(s),a=0;a<t.tags.length;a++)i=$("<li/>").appendTo(n),$('<a data-icon="tag"/>').appendTo(i).text(t.tags[a].title).data("id",t.tags[a].id).addClass(t.tags[a].exclude?"disabled":"");t.exactMatch||(i=$("<li/>").appendTo(n),$('<a data-icon="plus"/>').appendTo(i).text(r.search)),n.find("a:not(.disabled):first").addClass("hover"),this.searchMenu=new Garnish.Menu(s,{attachToElement:this.$addTagInput,onOptionSelect:$.proxy(this,"selectTag")}),this.addListener(s,"mousedown",$.proxy(function(){this._ignoreBlur=!0},this)),this.searchMenu.show()}},this))}else this.$spinner.addClass("hidden")},selectTag:function(t){var e=$(t);if(!e.hasClass("disabled")){var i=e.data("id"),s=e.text(),n=$("<div/>",{class:"element small removable","data-id":i,"data-site-id":this.settings.targetSiteId,"data-label":s,"data-editable":"1"}).appendTo(this.$elementsContainer),a=$("<input/>",{type:"hidden",name:this.settings.name+"[]",value:i}).appendTo(n);$("<a/>",{class:"delete icon",title:Craft.t("app","Remove")}).appendTo(n);var r=$("<div/>",{class:"label"}).appendTo(n);$("<span/>",{class:"title",text:s}).appendTo(r);var o=-(n.outerWidth()+10);this.$addTagInput.css("margin-"+Craft.left,o+"px");var l={};if(l["margin-"+Craft.left]=0,this.$addTagInput.velocity(l,"fast"),this.$elements=this.$elements.add(n),this.addElements(n),this.killSearchMenu(),this.$addTagInput.val(""),this.$addTagInput.trigger("focus"),!i){n.addClass("loading disabled");var h={groupId:this.settings.tagGroupId,title:s};Craft.postActionRequest("tags/create-tag",h,$.proxy(function(t,e){"success"===e&&t.success?(n.attr("data-id",t.id),a.val(t.id),n.removeClass("loading disabled")):(this.removeElement(n),"success"===e&&Craft.cp.displayError(Craft.t("app","An unknown error occurred.")))},this))}}},killSearchMenu:function(){this.searchMenu.hide(),this.searchMenu.destroy(),this.searchMenu=null}},{defaults:{tagGroupId:null}}),Craft.ThumbsElementIndexView=Craft.BaseElementIndexView.extend({getElementContainer:function(){return this.$container.children("ul")}}),Craft.ui={createTextInput:function(t){var e=$("<input/>",{attr:{class:"text",type:t.type||"text",id:t.id,size:t.size,name:t.name,value:t.value,maxlength:t.maxlength,autofocus:this.getAutofocusValue(t.autofocus),autocomplete:void 0!==t.autocomplete&&t.autocomplete?null:"off",disabled:this.getDisabledValue(t.disabled),readonly:t.readonly,title:t.title,placeholder:t.placeholder,step:t.step,min:t.min,max:t.max}});return t.class&&e.addClass(t.class),t.placeholder&&e.addClass("nicetext"),"password"===t.type&&e.addClass("password"),t.disabled&&e.addClass("disabled"),t.size||e.addClass("fullwidth"),t.showCharsLeft&&t.maxlength&&e.attr("data-show-chars-left").css("padding-"+("ltr"===Craft.orientation?"right":"left"),7.2*t.maxlength.toString().length+14+"px"),(t.placeholder||t.showCharsLeft)&&new Garnish.NiceText(e),"password"===t.type?$('<div class="passwordwrapper"/>').append(e):e},createTextField:function(t){return this.createField(this.createTextInput(t),t)},createTextarea:function(t){var e=$("<textarea/>",{class:"text",rows:t.rows||2,cols:t.cols||50,id:t.id,name:t.name,maxlength:t.maxlength,autofocus:t.autofocus&&!Garnish.isMobileBrowser(!0),disabled:!!t.disabled,placeholder:t.placeholder,html:t.value});return t.showCharsLeft&&e.attr("data-show-chars-left",""),t.class&&e.addClass(t.class),t.size||e.addClass("fullwidth"),e},createTextareaField:function(t){return this.createField(this.createTextarea(t),t)},createSelect:function(t){var e=$("<div/>",{class:"select"});t.class&&e.addClass(t.class);var i=$("<select/>",{id:t.id,name:t.name,autofocus:t.autofocus&&Garnish.isMobileBrowser(!0),disabled:t.disabled,"data-target-prefix":t.targetPrefix}).appendTo(e),s=null;for(var n in t.options)if(t.options.hasOwnProperty(n)){var a=t.options[n];if(void 0!==a.optgroup)s=$("<optgroup/>",{label:a.label}).appendTo(i);else{var r=void 0!==a.label?a.label:a,o=void 0!==a.value?a.value:n,l=void 0!==a.disabled&&a.disabled;$("<option/>",{value:o,selected:o==t.value,disabled:l,html:r}).appendTo(s||i)}}return t.toggle&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),e},createSelectField:function(t){return this.createField(this.createSelect(t),t)},createCheckbox:function(t){var e=t.id||"checkbox"+Math.floor(1e9*Math.random()),i=$("<input/>",{type:"checkbox",value:void 0!==t.value?t.value:"1",id:e,class:"checkbox",name:t.name,checked:t.checked?"checked":null,autofocus:this.getAutofocusValue(t.autofocus),disabled:this.getDisabledValue(t.disabled),"data-target":t.toggle,"data-reverse-target":t.reverseToggle});t.class&&i.addClass(t.class),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i));var s=$("<label/>",{for:e,text:t.label});return t.name&&(t.name.length<3||"[]"!==t.name.substr(-2))?$([$("<input/>",{type:"hidden",name:t.name,value:""})[0],i[0],s[0]]):$([i[0],s[0]])},createCheckboxField:function(t){var e=$('<div class="field checkboxfield"/>',{id:t.id?t.id+"-field":null});return t.first&&e.addClass("first"),t.instructions&&e.addClass("has-instructions"),this.createCheckbox(t).appendTo(e),t.instructions&&$('<div class="instructions"/>').text(t.instructions).appendTo(e),e},createCheckboxSelect:function(t){var e,i,s=$('<div class="checkbox-select"/>');t.class&&s.addClass(t.class),t.showAllOption?(e=t.allValue||"*",i=t.values==e,$("<div/>").appendTo(s).append(this.createCheckbox({id:t.id,class:"all",label:"<b>"+(t.allLabel||Craft.t("app","All"))+"</b>",name:t.name,value:e,checked:i,autofocus:t.autofocus}))):i=!1;for(var n=0;n<t.options.length;n++){var a=t.options[n];a.value!=e&&$("<div/>").appendTo(s).append(this.createCheckbox({label:a.label,name:t.name?t.name+"[]":null,value:a.value,checked:i||Craft.inArray(a.value,t.values),disabled:i}))}return new Garnish.CheckboxSelect(s),s},createCheckboxSelectField:function(t){return this.createField(this.createCheckboxSelect(t),t)},createLightswitch:function(t){var e=t.value||"1",i=$("<div/>",{class:"lightswitch",tabindex:"0","data-value":e,id:t.id,"aria-labelledby":t.labelId,"data-target":t.toggle,"data-reverse-target":t.reverseToggle});return t.on&&i.addClass("on"),t.small&&i.addClass("small"),t.disabled&&i.addClass("disabled"),$('<div class="lightswitch-container"><div class="label on"></div><div class="handle"></div><div class="label off"></div></div>').appendTo(i),t.name&&$("<input/>",{type:"hidden",name:t.name,value:t.on?e:"",disabled:t.disabled}).appendTo(i),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),i.lightswitch()},createLightswitchField:function(t){return this.createField(this.createLightswitch(t),t)},createColorInput:function(t){var e=t.id||"color"+Math.floor(1e9*Math.random()),i=t.containerId||e+"-container",s=t.name||null,n=t.value||null,a=t.small||!1,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{id:i,class:"flex color-container"}),h=$("<div/>",{class:"color static"+(a?" small":"")}).appendTo(l);$("<div/>",{class:"color-preview",style:t.value?{backgroundColor:t.value}:null}).appendTo(h),this.createTextInput({id:e,name:s,value:n,size:10,class:"color-input",autofocus:r,disabled:o}).appendTo(l);return new Craft.ColorInput(l),l},createColorField:function(t){return this.createField(this.createColorInput(t),t)},createDateInput:function(t){var e=(t.id||"date"+Math.floor(1e9*Math.random()))+"-date",i=t.name||null,s=i?i+"[date]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=n?Craft.formatDate(n):null,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{class:"datewrapper"}),h=this.createTextInput({id:e,name:s,value:a,placeholder:" ",autocomplete:!1,autofocus:r,disabled:o}).appendTo(l);return $('<div data-icon="date"></div>').appendTo(l),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(l),h.datepicker($.extend({defaultDate:n||new Date},Craft.datepickerOptions)),l},createDateField:function(t){return this.createField(this.createDateInput(t),t)},createTimeInput:function(t){var e=(t.id||"time"+Math.floor(1e9*Math.random()))+"-time",i=t.name||null,s=i?i+"[time]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=t.autofocus&&Garnish.isMobileBrowser(!0),r=t.disabled||!1,o=$("<div/>",{class:"timewrapper"}),l=this.createTextInput({id:e,name:s,placeholder:" ",autocomplete:!1,autofocus:a,disabled:r}).appendTo(o);return $('<div data-icon="time"></div>').appendTo(o),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(o),l.timepicker(Craft.timepickerOptions),n&&l.timepicker("setTime",3600*n.getHours()+60*n.getMinutes()+n.getSeconds()),o},createTimeField:function(t){return this.createField(this.createTimeInput(t),t)},createField:function(t,e){var i=e.label&&"__blank__"!==e.label?e.label:null,s=Craft.isMultiSite&&e.siteId?e.siteId:null,n=$("<div/>",{class:"field",id:e.fieldId||(e.id?e.id+"-field":null)});if(e.first&&n.addClass("first"),i||e.instructions){var a=$('<div class="heading"/>').appendTo(n);if(i){var r=$("<label/>",{id:e.labelId||(e.id?e.id+"-label":null),class:e.required?"required":null,for:e.id,text:i}).appendTo(a);if(s)for(var o=0;o<Craft.sites.length;o++)if(Craft.sites[o].id==s){$('<span class="site"/>').text(Craft.sites[o].name).appendTo(r);break}}e.instructions&&$('<div class="instructions"/>').text(e.instructions).appendTo(a)}return $('<div class="input"/>').append(t).appendTo(n),e.warning&&$('<p class="warning"/>').text(e.warning).appendTo(n),e.errors&&this.addErrorsToField(n,e.errors),n},createErrorList:function(t){var e=$('<ul class="errors"/>');return t&&this.addErrorsToList(e,t),e},addErrorsToList:function(t,e){for(var i=0;i<e.length;i++)$("<li/>").text(e[i]).appendTo(t)},addErrorsToField:function(t,e){if(e){t.addClass("has-errors"),t.children(".input").addClass("errors");var i=t.children("ul.errors");i.length||(i=this.createErrorList().appendTo(t)),this.addErrorsToList(i,e)}},clearErrorsFromField:function(t){t.removeClass("has-errors"),t.children(".input").removeClass("errors"),t.children("ul.errors").remove()},getAutofocusValue:function(t){return t&&!Garnish.isMobileBrowser(!0)?"autofocus":null},getDisabledValue:function(t){return t?"disabled":null}},Craft.Uploader=Garnish.Base.extend({uploader:null,allowedKinds:null,$element:null,settings:null,_rejectedFiles:{},_extensionList:null,_totalFileCounter:0,_validFileCounter:0,init:function(t,e){this._rejectedFiles={size:[],type:[],limit:[]},this.$element=t,this.allowedKinds=null,this._extensionList=null,this._totalFileCounter=0,this._validFileCounter=0;var i=(e=$.extend({},Craft.Uploader.defaults,e)).events;for(var s in delete e.events,e.allowedKinds&&e.allowedKinds.length&&("string"==typeof e.allowedKinds&&(e.allowedKinds=[e.allowedKinds]),this.allowedKinds=e.allowedKinds,delete e.allowedKinds),e.autoUpload=!1,this.uploader=this.$element.fileupload(e),i)i.hasOwnProperty(s)&&this.uploader.on(s,i[s]);this.settings=e,this.uploader.on("fileuploadadd",$.proxy(this,"onFileAdd"))},setParams:function(t){void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t[Craft.csrfTokenName]=Craft.csrfTokenValue),this.uploader.fileupload("option",{formData:t})},getInProgress:function(){return this.uploader.fileupload("active")},isLastUpload:function(){return this.getInProgress()<2},onFileAdd:function(t,s){t.stopPropagation();var n=!1;return this.allowedKinds&&(this._extensionList||this._createExtensionList(),n=!0),s.process().done($.proxy(function(){var t=s.files[0],e=!0;if(n){var i=t.name.match(/\.([a-z0-4_]+)$/i)[1];-1===$.inArray(i.toLowerCase(),this._extensionList)&&(e=!1,this._rejectedFiles.type.push("“"+t.name+"”"))}t.size>this.settings.maxFileSize&&(this._rejectedFiles.size.push("“"+t.name+"”"),e=!1),e&&"function"==typeof this.settings.canAddMoreFiles&&!this.settings.canAddMoreFiles(this._validFileCounter)&&(this._rejectedFiles.limit.push("“"+t.name+"”"),e=!1),e&&(this._validFileCounter++,s.submit()),++this._totalFileCounter===s.originalFiles.length&&(this._totalFileCounter=0,this._validFileCounter=0,this.processErrorMessages())},this)),!0},processErrorMessages:function(){var t;this._rejectedFiles.type.length&&(t=1===this._rejectedFiles.type.length?"The file {files} could not be uploaded. The allowed file kinds are: {kinds}.":"The files {files} could not be uploaded. The allowed file kinds are: {kinds}.",t=Craft.t("app",t,{files:this._rejectedFiles.type.join(", "),kinds:this.allowedKinds.join(", ")}),this._rejectedFiles.type=[],alert(t)),this._rejectedFiles.size.length&&(t=1===this._rejectedFiles.size.length?"The file {files} could not be uploaded, because it exceeds the maximum upload size of {size}.":"The files {files} could not be uploaded, because they exceeded the maximum upload size of {size}.",t=Craft.t("app",t,{files:this._rejectedFiles.size.join(", "),size:this.humanFileSize(Craft.maxUploadSize)}),this._rejectedFiles.size=[],alert(t)),this._rejectedFiles.limit.length&&(t=1===this._rejectedFiles.limit.length?"The file {files} could not be uploaded, because the field limit has been reached.":"The files {files} could not be uploaded, because the field limit has been reached.",t=Craft.t("app",t,{files:this._rejectedFiles.limit.join(", ")}),this._rejectedFiles.limit=[],alert(t))},humanFileSize:function(t){if(t<1024)return t+" B";for(var e=-1;++e,1024<=(t/=1024););return t.toFixed(1)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][e]},_createExtensionList:function(){this._extensionList=[];for(var t=0;t<this.allowedKinds.length;t++){var e=this.allowedKinds[t];if(void 0!==Craft.fileKinds[e])for(var i=0;i<Craft.fileKinds[e].extensions.length;i++){var s=Craft.fileKinds[e].extensions[i];this._extensionList.push(s)}}},destroy:function(){this.$element.fileupload("destroy"),this.base()}},{defaults:{dropZone:null,pasteZone:null,fileInput:null,sequentialUploads:!0,maxFileSize:Craft.maxUploadSize,allowedKinds:null,events:{},canAddMoreFiles:null,headers:{Accept:"application/json;q=0.9,*/*;q=0.8"},paramName:"assets-upload"}}),Craft.UriFormatGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace("/<(.*?)>/g","")).toLowerCase(),t=(t=(t=Craft.asciiString(t)).replace(/^[^a-z]+/,"")).replace(/[^a-z0-9]+$/,"");var e=Craft.filterArray(t.split(/[^a-z0-9]+/)).join("-");return e&&this.settings.suffix&&(e+=this.settings.suffix),e}})}(jQuery);
+!function($){$.extend(Craft,{navHeight:48,t:function(t,e,i){if(void 0!==Craft.translations[t]&&void 0!==Craft.translations[t][e]&&(e=Craft.translations[t][e]),i)for(var s in i)i.hasOwnProperty(s)&&(e=e.replace("{"+s+"}",i[s]));return e},formatDate:function(t){return"object"!=typeof t&&(t=new Date(t)),$.datepicker.formatDate(Craft.datepickerOptions.dateFormat,t)},formatNumber:function(t,e){return void 0===e&&(e=",.0f"),d3.formatLocale(d3FormatLocaleDefinition).format(e)(t)},escapeHtml:function(t){return $("<div/>").text(t).html()},escapeRegex:function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getText:function(t){return $("<div/>").html(t).text()},encodeUriComponent:function(t){t=encodeURIComponent(t);var e={"!":"%21","*":"%2A","'":"%27","(":"%28",")":"%29"};for(var i in e){var s=new RegExp("\\"+i,"g");t=t.replace(s,e[i])}return t},selectFullValue:function(t){var e=$(t),i=e.val();if(void 0!==e[0].setSelectionRange){var s=2*i.length;e[0].setSelectionRange(0,s)}else e.val(i)},formatInputId:function(t){return this.rtrim(t.replace(/[\[\]\\]+/g,"-"),"-")},getUrl:function(t,e,i){"string"!=typeof t&&(t="");var s="";if($.isPlainObject(e)){var n=[];for(var a in e)if(e.hasOwnProperty(a)){var r=e[a];"#"===a?s=r:null!==r&&""!==r&&n.push(a+"="+r)}e=n}e=Garnish.isArray(e)?e.join("&"):Craft.trim(e,"&?");var o,l=t.indexOf("?");if(-1!==l&&(e=t.substr(l+1)+(e?"&"+e:""),t=t.substr(0,l)),-1!==t.search("://")||"/"===t[0])return t+(e?"?"+e:"");if(t=Craft.trim(t,"/"),i){if(o=i,t){var h=o.match(new RegExp("[&?]"+Craft.escapeRegex(Craft.pathParam)+"=[^&]+"));h&&(o=o.replace(h[0],Craft.rtrim(h[0],"/")+"/"+t),t="")}}else o=Craft.baseUrl;if(-1!==(l=o.indexOf("?"))&&(e=o.substr(l+1)+(e?"&"+e:""),o=o.substr(0,l)),!Craft.omitScriptNameInUrls&&t)if(Craft.usePathInfo)-1===o.search(Craft.scriptName)&&(o=Craft.rtrim(o,"/")+"/"+Craft.scriptName);else{if(e&&e.substr(0,Craft.pathParam.length+1)===Craft.pathParam+"="){var d,c=e.indexOf("&");e=-1!==c?(d=e.substring(2,c),e.substr(c+1)):(d=e.substr(2),null),t=(d=Craft.rtrim(d))+(t?"/"+t:"")}e=Craft.pathParam+"="+t+(e?"&"+e:""),t=null}return t&&(o=Craft.rtrim(o,"/")+"/"+t),e&&(o+="?"+e),s&&(o+="#"+s),o},getCpUrl:function(t,e){return this.getUrl(t,e,Craft.baseCpUrl)},getSiteUrl:function(t,e){return this.getUrl(t,e,Craft.baseSiteUrl)},getActionUrl:function(t,e){return Craft.getUrl(t,e,Craft.actionUrl)},redirectTo:function(t){document.location.href=this.getUrl(t)},getCsrfInput:function(){return Craft.csrfTokenName?'<input type="hidden" name="'+Craft.csrfTokenName+'" value="'+Craft.csrfTokenValue+'"/>':""},postActionRequest:function(t,e,s,i){"function"==typeof e&&(i=s,s=e,e={});var n={"X-Registered-Asset-Bundles":Object.keys(Craft.registeredAssetBundles).join(","),"X-Registered-Js-Files":Object.keys(Craft.registeredJsFiles).join(",")};Craft.csrfTokenValue&&Craft.csrfTokenName&&(n["X-CSRF-Token"]=Craft.csrfTokenValue);var a=$.ajax($.extend({url:Craft.getActionUrl(t),type:"POST",dataType:"json",headers:n,data:e,success:s,error:function(t,e,i){4===t.readyState&&(void 0!==Craft.cp?Craft.cp.displayError():alert(Craft.t("app","An unknown error occurred.")),s&&s(null,e,t))}},i));return i&&"function"==typeof i.send&&i.send(a),a},_waitingOnAjax:!1,_ajaxQueue:[],queueActionRequest:function(t,e,i,s){"function"==typeof e&&(s=i,i=e,e=void 0),Craft._ajaxQueue.push([t,e,i,s]),Craft._waitingOnAjax||Craft._postNextActionRequestInQueue()},_postNextActionRequestInQueue:function(){Craft._waitingOnAjax=!0;var s=Craft._ajaxQueue.shift();Craft.postActionRequest(s[0],s[1],function(t,e,i){s[2]&&"function"==typeof s[2]&&s[2](t,e,i),Craft._ajaxQueue.length?Craft._postNextActionRequestInQueue():Craft._waitingOnAjax=!1},s[3])},stringToArray:function(t){if("string"!=typeof t)return t;for(var e=t.split(","),i=0;i<e.length;i++)e[i]=$.trim(e[i]);return e},expandPostArray:function(t){var e,i={};for(var s in t)if(t.hasOwnProperty(s)){var n,a=t[s],r=s.match(/^(\w+)(\[.*)?/);if(r[2])for(n=r[2].match(/\[[^\[\]]*\]/g),e=0;e<n.length;e++)n[e]=n[e].substring(1,n[e].length-1);else n=[];n.unshift(r[1]);var o=i;for(e=0;e<n.length;e++)e<n.length-1?("object"!=typeof o[n[e]]&&(n[e+1]&&parseInt(n[e+1])!=n[e+1]?o[n[e]]={}:o[n[e]]=[]),o=o[n[e]]):(n[e]||(n[e]=o.length),o[n[e]]=a)}return i},compare:function(t,e,i){if(typeof t!=typeof e)return!1;if("object"!=typeof t)return t===e;if(t.length!==e.length)return!1;if(t instanceof Array!=e instanceof Array)return!1;if(!(t instanceof Array))if(void 0===i||!0===i){if(!Craft.compare(Craft.getObjectKeys(t).sort(),Craft.getObjectKeys(e).sort()))return!1}else if(!Craft.compare(Craft.getObjectKeys(t),Craft.getObjectKeys(e)))return!1;for(var s in t)if(t.hasOwnProperty(s)&&!Craft.compare(t[s],e[s]))return!1;return!0},getObjectKeys:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e},escapeChars:function(t){Garnish.isArray(t)||(t=t.split());for(var e="",i=0;i<t.length;i++)e+="\\"+t[i];return e},ltrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("^["+Craft.escapeChars(e)+"]+");return t.replace(i,"")},rtrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("["+Craft.escapeChars(e)+"]+$");return t.replace(i,"")},trim:function(t,e){return t=Craft.ltrim(t,e),t=Craft.rtrim(t,e)},startsWith:function(t,e){return t.substr(0,e.length)===e},filterArray:function(t,e){for(var i=[],s=0;s<t.length;s++){("function"==typeof e?e(t[s],s):t[s])&&i.push(t[s])}return i},inArray:function(t,e){return-1!==$.inArray(t,e)},removeFromArray:function(t,e){var i=$.inArray(t,e);return-1!==i&&(e.splice(i,1),!0)},getLast:function(t){return t.length?t[t.length-1]:null},uppercaseFirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},lowercaseFirst:function(t){return t.charAt(0).toLowerCase()+t.slice(1)},parseUrl:function(t){var e=t.match(/^(?:(https?):\/\/|\/\/)([^\/\:]*)(?:\:(\d+))?(\/[^\?]*)?(?:\?([^#]*))?(#.*)?/);return e?{scheme:e[1],host:e[2]+(e[3]?":"+e[3]:""),hostname:e[2],port:e[3]||null,path:e[4]||"/",query:e[5]||null,hash:e[6]||null}:{}},isSameHost:function(t){var e=this.parseUrl(document.location.href);if(!e)return!1;var i=this.parseUrl(t);return!!i&&e.host===i.host},secondsToHumanTimeDuration:function(t,e){void 0===e&&(e=!0);var i=Math.floor(t/604800);t%=604800;var s=Math.floor(t/86400);t%=86400;var n,a=Math.floor(t/3600);t%=3600,e?(n=Math.floor(t/60),t%=60):(n=Math.round(t/60),t=0);var r=[];return i&&r.push(i+" "+(1===i?Craft.t("app","week"):Craft.t("app","weeks"))),s&&r.push(s+" "+(1===s?Craft.t("app","day"):Craft.t("app","days"))),a&&r.push(a+" "+(1===a?Craft.t("app","hour"):Craft.t("app","hours"))),!n&&(e||i||s||a)||r.push(n+" "+(1===n?Craft.t("app","minute"):Craft.t("app","minutes"))),!t&&(!e||i||s||a||n)||r.push(t+" "+(1===t?Craft.t("app","second"):Craft.t("app","seconds"))),r.join(", ")},asciiString:function(t,e){for(var i,s="",n=0;n<t.length;n++)i=t.charAt(n),s+=(e||Craft.asciiCharMap)[i]||i;return s},randomString:function(t){for(var e="",i=0;i<t;i++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e},preventOutlineOnMouseFocus:function(t){var e=$(t),i=".preventOutlineOnMouseFocus";e.on("mousedown"+i,function(){e.addClass("no-outline"),e.trigger("focus")}).on("keydown"+i+" blur"+i,function(t){t.keyCode!==Garnish.SHIFT_KEY&&t.keyCode!==Garnish.CTRL_KEY&&t.keyCode!==Garnish.CMD_KEY&&e.removeClass("no-outline")})},createErrorList:function(t){for(var e=$(document.createElement("ul")).addClass("errors"),i=0;i<t.length;i++){var s=$(document.createElement("li"));s.appendTo(e),s.html(t[i])}return e},appendHeadHtml:function(t){if(t){var e=$("link[href]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("href").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<link\\s[^>]*href="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}$("head").append(t)}},appendFootHtml:function(t){if(t){var e=$("script[src]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("src").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<script\\s[^>]*src="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}Garnish.$bod.append(t)}},initUiElements:function(t){$(".grid",t).grid(),$(".info",t).infoicon(),$(".checkbox-select",t).checkboxselect(),$(".fieldtoggle",t).fieldtoggle(),$(".lightswitch",t).lightswitch(),$(".nicetext",t).nicetext(),$(".pill",t).pill(),$(".formsubmit",t).formsubmit(),$(".menubtn",t).menubtn()},_elementIndexClasses:{},_elementSelectorModalClasses:{},_elementEditorClasses:{},registerElementIndexClass:function(t,e){if(void 0!==this._elementIndexClasses[t])throw"An element index class has already been registered for the element type “"+t+"”.";this._elementIndexClasses[t]=e},registerElementSelectorModalClass:function(t,e){if(void 0!==this._elementSelectorModalClasses[t])throw"An element selector modal class has already been registered for the element type “"+t+"”.";this._elementSelectorModalClasses[t]=e},registerElementEditorClass:function(t,e){if(void 0!==this._elementEditorClasses[t])throw"An element editor class has already been registered for the element type “"+t+"”.";this._elementEditorClasses[t]=e},createElementIndex:function(t,e,i){return new(void 0!==this._elementIndexClasses[t]?this._elementIndexClasses[t]:Craft.BaseElementIndex)(t,e,i)},createElementSelectorModal:function(t,e){return new(void 0!==this._elementSelectorModalClasses[t]?this._elementSelectorModalClasses[t]:Craft.BaseElementSelectorModal)(t,e)},createElementEditor:function(t,e,i){return new(void 0!==this._elementEditorClasses[t]?this._elementEditorClasses[t]:Craft.BaseElementEditor)(e,i)},getLocalStorage:function(t,e){return t="Craft-"+Craft.systemUid+"."+t,"undefined"!=typeof localStorage&&void 0!==localStorage[t]?JSON.parse(localStorage[t]):e},setLocalStorage:function(t,e){if("undefined"!=typeof localStorage){t="Craft-"+Craft.systemUid+"."+t;try{localStorage[t]=JSON.stringify(e)}catch(t){}}},getElementInfo:function(t){var e=$(t);return e.hasClass("element")||(e=e.find(".element:first")),{id:e.data("id"),siteId:e.data("site-id"),label:e.data("label"),status:e.data("status"),url:e.data("url"),hasThumb:e.hasClass("hasthumb"),$element:e}},setElementSize:function(t,e){var i=$(t);if("small"!==e&&"large"!==e&&(e="small"),!i.hasClass(e)){var s="small"===e?"large":"small";if(i.addClass(e).removeClass(s),i.hasClass("hasthumb")){var n=i.find("> .elementthumb > img"),a=$("<img/>",{sizes:("small"===e?"30":"100")+"px",srcset:n.attr("srcset")||n.attr("data-pfsrcset")});n.replaceWith(a),picturefill({elements:[a[0]]})}}}}),$.extend($.fn,{animateLeft:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({left:t},e,i,s):this.velocity({right:t},e,i,s)},animateRight:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({right:t},e,i,s):this.velocity({left:t},e,i,s)},disable:function(){return this.each(function(){var t=$(this);t.addClass("disabled"),t.data("activatable")&&t.removeAttr("tabindex")})},enable:function(){return this.each(function(){var t=$(this);t.removeClass("disabled"),t.data("activatable")&&t.attr("tabindex","0")})},grid:function(){return this.each(function(){var t=$(this),e={};t.data("item-selector")&&(e.itemSelector=t.data("item-selector")),t.data("cols")&&(e.cols=parseInt(t.data("cols"))),t.data("max-cols")&&(e.maxCols=parseInt(t.data("max-cols"))),t.data("min-col-width")&&(e.minColWidth=parseInt(t.data("min-col-width"))),t.data("mode")&&(e.mode=t.data("mode")),t.data("fill-mode")&&(e.fillMode=t.data("fill-mode")),t.data("col-class")&&(e.colClass=t.data("col-class")),t.data("snap-to-grid")&&(e.snapToGrid=!!t.data("snap-to-grid")),new Craft.Grid(this,e)})},infoicon:function(){return this.each(function(){new Craft.InfoIcon(this)})},checkboxselect:function(){return this.each(function(){$.data(this,"checkboxselect")||new Garnish.CheckboxSelect(this)})},fieldtoggle:function(){return this.each(function(){$.data(this,"fieldtoggle")||new Craft.FieldToggle(this)})},lightswitch:function(e,t,i){return"settings"===e?("string"==typeof t?(e={})[t]=i:e=t,this.each(function(){var t=$.data(this,"lightswitch");t&&t.setSettings(e)})):($.isPlainObject(e)||(e={}),this.each(function(){var t=$.extend({},e);Garnish.hasAttr(this,"data-value")&&(t.value=$(this).attr("data-value")),$.data(this,"lightswitch")||new Craft.LightSwitch(this,t)}))},nicetext:function(){return this.each(function(){$.data(this,"nicetext")||new Garnish.NiceText(this)})},pill:function(){return this.each(function(){$.data(this,"pill")||new Garnish.Pill(this)})},formsubmit:function(){this.on("click",function(t){var e=$(t.currentTarget);if(!e.attr("data-confirm")||confirm(e.attr("data-confirm"))){var i=e.data("menu")?e.data("menu").$anchor:e,s=i.attr("data-form")?$("#"+i.attr("data-form")):i.closest("form");e.data("action")&&$('<input type="hidden" name="action"/>').val(e.data("action")).appendTo(s),e.data("redirect")&&$('<input type="hidden" name="redirect"/>').val(e.data("redirect")).appendTo(s),e.data("param")&&$('<input type="hidden"/>').attr({name:e.data("param"),value:e.data("value")}).appendTo(s),s.trigger({type:"submit",customTrigger:e})}})},menubtn:function(){return this.each(function(){var t=$(this);if(!t.data("menubtn")&&t.next().hasClass("menu")){var e={};t.data("menu-anchor")&&(e.menuAnchor=t.data("menu-anchor")),new Garnish.MenuBtn(t,e)}})}}),Garnish.$doc.ready(function(){Craft.initUiElements()}),Craft.BaseElementEditor=Garnish.Base.extend({$element:null,elementId:null,siteId:null,$form:null,$fieldsContainer:null,$cancelBtn:null,$saveBtn:null,$spinner:null,$siteSelect:null,$siteSpinner:null,hud:null,init:function(t,e){void 0===e&&$.isPlainObject(t)&&(e=t,t=null),this.$element=$(t),this.setSettings(e,Craft.BaseElementEditor.defaults),this.loadHud()},setElementAttribute:function(t,e){this.settings.attributes||(this.settings.attributes={}),null===e?delete this.settings.attributes[t]:this.settings.attributes[t]=e},getBaseData:function(){var t=$.extend({},this.settings.params);return this.settings.siteId?t.siteId=this.settings.siteId:this.$element&&this.$element.data("site-id")&&(t.siteId=this.$element.data("site-id")),this.settings.elementId?t.elementId=this.settings.elementId:this.$element&&this.$element.data("id")&&(t.elementId=this.$element.data("id")),this.settings.elementType&&(t.elementType=this.settings.elementType),this.settings.attributes&&(t.attributes=this.settings.attributes),this.settings.prevalidate&&(t.prevalidate=1),t},loadHud:function(){this.onBeginLoading();var t=this.getBaseData();t.includeSites=Craft.isMultiSite&&this.settings.showSiteSwitcher,Craft.postActionRequest("elements/get-editor-html",t,$.proxy(this,"showHud"))},showHud:function(t,e){if(this.onEndLoading(),"success"===e){var i=$();if(t.sites){var s=$('<div class="hud-header"/>');if(1===t.sites.length)$("<h5/>",{text:t.sites[0].name}).appendTo(s);else{var n=$('<div class="select"/>').appendTo(s);this.$siteSelect=$("<select/>").appendTo(n),this.$siteSpinner=$('<div class="spinner hidden"/>').appendTo(s);for(var a=0;a<t.sites.length;a++){var r=t.sites[a];$('<option value="'+r.id+'"'+(r.id==t.siteId?' selected="selected"':"")+">"+r.name+"</option>").appendTo(this.$siteSelect)}this.addListener(this.$siteSelect,"change","switchSite")}i=i.add(s)}this.$form=$("<div/>"),this.$fieldsContainer=$('<div class="fields"/>').appendTo(this.$form),this.updateForm(t),this.onCreateForm(this.$form);var o=$('<div class="hud-footer"/>').appendTo(this.$form),l=$('<div class="buttons right"/>').appendTo(o);if(this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(l),this.$saveBtn=$('<input class="btn submit" type="submit" value="'+Craft.t("app","Save")+'"/>').appendTo(l),this.$spinner=$('<div class="spinner hidden"/>').appendTo(l),i=i.add(this.$form),this.hud)this.hud.updateBody(i),this.hud.updateSizeAndPosition();else{var h=this.settings.hudTrigger||this.$element;this.hud=new Garnish.HUD(h,i,{bodyClass:"body elementeditor",closeOtherHUDs:!1,onShow:$.proxy(this,"onShowHud"),onHide:$.proxy(this,"onHideHud"),onSubmit:$.proxy(this,"saveElement")}),this.hud.$hud.data("elementEditor",this),this.hud.on("hide",$.proxy(function(){delete this.hud},this))}i.find(".text:first").trigger("focus"),this.addListener(this.$cancelBtn,"click",function(){this.hud.hide()})}},switchSite:function(){var t=this.$siteSelect.val();t!=this.siteId&&(this.$siteSpinner.removeClass("hidden"),this.reloadForm({siteId:t},$.proxy(function(t){this.$siteSpinner.addClass("hidden"),"success"!==t&&this.$siteSelect.val(this.siteId)},this)))},reloadForm:function(t,i){t=$.extend(this.getBaseData(),t),Craft.postActionRequest("elements/get-editor-html",t,$.proxy(function(t,e){"success"===e&&this.updateForm(t),i&&i(e)},this))},updateForm:function(t){this.siteId=t.siteId,this.$fieldsContainer.html(t.html);for(var e=this.$fieldsContainer.find("> .meta > .field > .heading > .instructions"),i=0;i<e.length;i++)e.eq(i).replaceWith($("<span/>",{class:"info",html:e.eq(i).children().html()})).infoicon();Garnish.requestAnimationFrame($.proxy(function(){Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.initUiElements(this.$fieldsContainer)},this))},saveElement:function(){var t=this.settings.validators;if($.isArray(t))for(var e=0;e<t.length;e++)if($.isFunction(t[e])&&!t[e].call())return!1;this.$spinner.removeClass("hidden");var i=$.param(this.getBaseData())+"&"+this.hud.$body.serialize();Craft.postActionRequest("elements/save-element",i,$.proxy(function(t,e){if(this.$spinner.addClass("hidden"),"success"===e)if(t.success){if(this.$element&&this.siteId==this.$element.data("site-id")){var i=this.$element.find(".title"),s=i.find("a");s.length&&t.cpEditUrl?(s.attr("href",t.cpEditUrl),s.text(t.newTitle)):i.text(t.newTitle)}this.closeHud(),this.onSaveElement(t)}else this.updateForm(t),Garnish.shake(this.hud.$hud)},this))},closeHud:function(){this.hud.hide(),delete this.hud},onShowHud:function(){this.settings.onShowHud(),this.trigger("showHud")},onHideHud:function(){this.settings.onHideHud(),this.trigger("hideHud")},onBeginLoading:function(){this.$element&&this.$element.addClass("loading"),this.settings.onBeginLoading(),this.trigger("beginLoading")},onEndLoading:function(){this.$element&&this.$element.removeClass("loading"),this.settings.onEndLoading(),this.trigger("endLoading")},onSaveElement:function(t){this.settings.onSaveElement(t),this.trigger("saveElement",{response:t}),Craft.cp.runQueue()},onCreateForm:function(t){this.settings.onCreateForm(t)}},{defaults:{hudTrigger:null,showSiteSwitcher:!0,elementId:null,elementType:null,siteId:null,attributes:null,params:null,prevalidate:!1,elementIndex:null,onShowHud:$.noop,onHideHud:$.noop,onBeginLoading:$.noop,onEndLoading:$.noop,onCreateForm:$.noop,onSaveElement:$.noop,validators:[]}}),Craft.BaseElementIndex=Garnish.Base.extend({initialized:!1,elementType:null,instanceState:null,sourceStates:null,sourceStatesStorageKey:null,searchTimeout:null,sourceSelect:null,$container:null,$main:null,$mainSpinner:null,isIndexBusy:!1,$sidebar:null,showingSidebar:null,sourceKey:null,sourceViewModes:null,$source:null,sourcesByKey:null,$visibleSources:null,$customizeSourcesBtn:null,customizeSourcesModal:null,$toolbar:null,$toolbarFlexContainer:null,toolbarOffset:null,$search:null,searching:!1,searchText:null,trashed:!1,drafts:!1,$clearSearchBtn:null,$statusMenuBtn:null,$statusMenuContainer:null,statusMenu:null,status:null,$siteMenuBtn:null,siteMenu:null,siteId:null,$sortMenuBtn:null,sortMenu:null,$sortAttributesList:null,$sortDirectionsList:null,$scoreSortAttribute:null,$structureSortAttribute:null,$elements:null,$viewModeBtnContainer:null,viewModeBtns:null,viewMode:null,view:null,_autoSelectElements:null,$countContainer:null,page:1,$exportBtn:null,actions:null,actionsHeadHtml:null,actionsFootHtml:null,$selectAllContainer:null,$selectAllCheckbox:null,showingActionTriggers:!1,_$detachedToolbarItems:null,_$triggers:null,init:function(t,e,i){if(this.elementType=t,this.$container=e,this.setSettings(i,Craft.BaseElementIndex.defaults),this.instanceState=this.getDefaultInstanceState(),this.sourceStates={},this.settings.storageKey&&$.extend(this.instanceState,Craft.getLocalStorage(this.settings.storageKey),{}),this.sourceStatesStorageKey="BaseElementIndex."+this.elementType+"."+this.settings.context,$.extend(this.sourceStates,Craft.getLocalStorage(this.sourceStatesStorageKey,{})),this.$main=this.$container.find(".main"),this.$toolbar=this.$container.find(".toolbar:first"),this.$toolbarFlexContainer=this.$toolbar.children(".flex"),this.$statusMenuBtn=this.$toolbarFlexContainer.find(".statusmenubtn:first"),this.$statusMenuContainer=this.$statusMenuBtn.parent(),this.$siteMenuBtn=this.$container.find(".sitemenubtn:first"),this.$sortMenuBtn=this.$toolbarFlexContainer.find(".sortmenubtn:first"),this.$search=this.$toolbarFlexContainer.find(".search:first input:first"),this.$clearSearchBtn=this.$toolbarFlexContainer.find(".search:first > .clear"),this.$mainSpinner=this.$toolbarFlexContainer.find(".spinner:first"),this.$sidebar=this.$container.find(".sidebar:first"),this.$customizeSourcesBtn=this.$sidebar.find(".customize-sources"),this.$elements=this.$container.find(".elements:first"),this.$countContainer=this.$container.find("#count-container"),this.$exportBtn=this.$container.find("#export-btn"),this.settings.hideSidebar&&(this.$sidebar.hide(),$(".body, .content",this.$container).removeClass("has-sidebar")),(this.settings.toolbarFixed||null===this.settings.toolbarFixed&&"index"===this.settings.context)&&!Garnish.isMobileBrowser(!0)&&(this.addListener(Garnish.$win,"resize","updateFixedToolbar"),this.addListener(Garnish.$scrollContainer,"scroll","updateFixedToolbar")),this.initSources()){if(this.$customizeSourcesBtn.length&&this.addListener(this.$customizeSourcesBtn,"click","createCustomizeSourcesModal"),this.$statusMenuBtn.length&&(this.statusMenu=this.$statusMenuBtn.menubtn().data("menubtn").menu,this.statusMenu.on("optionselect",$.proxy(this,"_handleStatusChange"))),this.$siteMenuBtn.length){this.siteMenu=this.$siteMenuBtn.menubtn().data("menubtn").menu;var s=this.siteMenu.$options.filter(".sel:first");if(s.length||(s=this.siteMenu.$options.first()),s.length?this._setSite(s.data("site-id")):this.settings.criteria={id:"0"},this.siteMenu.on("optionselect",$.proxy(this,"_handleSiteChange")),this.siteId){var n=Craft.getLocalStorage("BaseElementIndex.siteId");if(n&&n!=this.siteId){var a=this.siteMenu.$options.filter('[data-site-id="'+n+'"]:first');a.length&&a.trigger("click")}}}else this.settings.criteria&&this.settings.criteria.siteId?this._setSite(this.settings.criteria.siteId):this._setSite(Craft.siteId);this.addListener(this.$search,"textchange",$.proxy(function(){!this.searching&&this.$search.val()?this.startSearching():this.searching&&!this.$search.val()&&this.stopSearching(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"updateElementsIfSearchTextChanged"),500)},this)),this.addListener(this.$search,"keypress",$.proxy(function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.updateElementsIfSearchTextChanged())},this)),this.addListener(this.$clearSearchBtn,"click",$.proxy(function(){this.$search.val(""),this.searchTimeout&&clearTimeout(this.searchTimeout),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.stopSearching(),this.updateElementsIfSearchTextChanged()},this)),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.$sortMenuBtn.length&&(this.sortMenu=this.$sortMenuBtn.menubtn().data("menubtn").menu,this.$sortAttributesList=this.sortMenu.$container.children(".sort-attributes"),this.$sortDirectionsList=this.sortMenu.$container.children(".sort-directions"),this.sortMenu.on("optionselect",$.proxy(this,"_handleSortChange"))),this.addListener(this.$exportBtn,"click","_showExportHud"),this.initialized=!0,this.afterInit(),this.selectDefaultSource(),"index"===this.settings.context&&this.setPage(Craft.pageNum),this.updateElements(!0)}},afterInit:function(){this.onAfterInit()},getSourceContainer:function(){return this.$sidebar.find("nav>ul")},get $sources(){if(this.sourceSelect)return this.sourceSelect.$items},initSources:function(){var t=this._getSourcesInList(this.getSourceContainer());return 0!==t.length&&(this.sourceSelect||(this.sourceSelect=new Garnish.Select(this.$sidebar.find("nav"),{multi:!1,allowEmpty:!1,vertical:!0,onSelectionChange:$.proxy(this,"_handleSourceSelectionChange")})),this.sourcesByKey={},this._initSources(t),!0)},selectDefaultSource:function(){var t,e=this.getDefaultSourceKey();e&&(t=this.getSourceByKey(e),-1===this.$visibleSources.index(t)&&(t=null)),e&&t||(t=this.$visibleSources.first()),t.length&&this.selectSource(t)},refreshSources:function(){this.sourceSelect.removeAllItems();var t={context:this.settings.context,elementType:this.elementType};this.setIndexBusy(),Craft.postActionRequest(this.settings.refreshSourcesAction,t,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e?(this.getSourceContainer().replaceWith(t.html),this.initSources(),this.selectDefaultSource()):Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))},updateFixedToolbar:function(t){this.updateFixedToolbar._scrollTop=Garnish.$scrollContainer.scrollTop(),992<Garnish.$win.width()&&17<=this.updateFixedToolbar._scrollTop?((this.updateFixedToolbar._makingFixed=!this.$toolbar.hasClass("fixed"))&&(this.$elements.css("padding-top",this.$toolbar.outerHeight()+21),this.$toolbar.addClass("fixed")),!this.updateFixedToolbar._makingFixed&&"resize"!==t.type||this.$toolbar.css({top:Garnish.$scrollContainer.offset().top,width:this.$main.width()})):this.$toolbar.hasClass("fixed")&&(this.$toolbar.removeClass("fixed"),this.$toolbar.css("width",""),this.$elements.css("padding-top",""),this.$toolbar.css("top","0"))},initSource:function(t){this.sourceSelect.addItems(t),this.initSourceToggle(t),(this.sourcesByKey[t.data("key")]=t).data("hasNestedSources")&&-1!==this.instanceState.expandedSources.indexOf(t.data("key"))&&this._expandSource(t)},initSourceToggle:function(t){this.deinitSourceToggle(t);var e=this._getSourceToggle(t);e.length?(this.addListener(t,"dblclick","_handleSourceDblClick"),this.addListener(e,"click","_handleSourceToggleClick"),t.data("hasNestedSources",!0)):t.data("hasNestedSources",!1)},deinitSource:function(t){this.sourceSelect.removeItems(t),this.deinitSourceToggle(t),delete this.sourcesByKey[t.data("key")]},deinitSourceToggle:function(t){t.data("hasNestedSources")&&(this.removeListener(t,"dblclick"),this.removeListener(this._getSourceToggle(t),"click")),t.removeData("hasNestedSources")},getDefaultInstanceState:function(){return{selectedSource:null,expandedSources:[]}},getDefaultSourceKey:function(){return this.instanceState.selectedSource},getDefaultExpandedSources:function(){return this.instanceState.expandedSources},startSearching:function(){this.$clearSearchBtn.removeClass("hidden"),this.$scoreSortAttribute||(this.$scoreSortAttribute=$('<li><a data-attr="score">'+Craft.t("app","Score")+"</a></li>"),this.sortMenu.addOptions(this.$scoreSortAttribute.children())),this.$scoreSortAttribute.prependTo(this.$sortAttributesList),this.searching=!0,this._updateStructureSortOption(),this.setSortAttribute("score")},stopSearching:function(){this.$clearSearchBtn.addClass("hidden"),this.$scoreSortAttribute.detach(),this.searching=!1,this._updateStructureSortOption()},setInstanceState:function(t,e){"object"==typeof t?$.extend(this.instanceState,t):this.instanceState[t]=e,this.storeInstanceState()},storeInstanceState:function(){this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.instanceState)},getSourceState:function(t,e,i){return void 0===this.sourceStates[t]&&(this.sourceStates[t]={}),void 0===e?this.sourceStates[t]:void 0!==this.sourceStates[t][e]?this.sourceStates[t][e]:void 0!==i?i:null},getSelectedSourceState:function(t,e){return this.getSourceState(this.instanceState.selectedSource,t,e)},setSelecetedSourceState:function(t,e){var i=this.getSelectedSourceState();"object"==typeof t?$.extend(i,t):i[t]=e,this.sourceStates[this.instanceState.selectedSource]=i,Craft.setLocalStorage(this.sourceStatesStorageKey,this.sourceStates)},storeSortAttributeAndDirection:function(){var t=this.getSelectedSortAttribute();"score"!==t&&this.setSelecetedSourceState({order:t,sort:this.getSelectedSortDirection()})},setPage:function(t){t=Math.max(t,1),this.page=t;var e=document.location.href.replace(/\?.*$/,"").replace(new RegExp("/"+Craft.pageTrigger.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\d+$"),"").replace(/\/+$/,"");1!==this.page&&("?"!==Craft.pageTrigger[0]&&(e+="/"),e+=Craft.pageTrigger+this.page),history.replaceState({},"",e)},getViewParams:function(){var t={siteId:this.siteId,search:this.searchText,offset:this.settings.batchSize*(this.page-1),limit:this.settings.batchSize,trashed:this.trashed?1:0,drafts:this.drafts?1:0};Garnish.hasAttr(this.$source,"data-override-status")||(t.status=this.status),$.extend(t,this.settings.criteria);var e={context:this.settings.context,elementType:this.elementType,source:this.instanceState.selectedSource,criteria:t,disabledElementIds:this.settings.disabledElementIds,viewState:$.extend({},this.getSelectedSourceState()),paginated:this._isViewPaginated()?1:0};return e.viewState.order=this.getSelectedSortAttribute(),e.viewState.sort=this.getSelectedSortDirection(),"structure"===this.getSelectedSortAttribute()&&(void 0===this.instanceState.collapsedElementIds&&(this.instanceState.collapsedElementIds=[]),e.collapsedElementIds=this.instanceState.collapsedElementIds),e},updateElements:function(t){if(this.initialized){this.setIndexBusy(),this.view&&(this.view.destroy(),delete this.view),this.$elements.html(""),!0!==t&&(this.$countContainer.html("&nbsp;"),this.setPage(1));var s=this.getViewParams();Craft.postActionRequest(this.settings.updateElementsAction,s,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e){var i=Math.max(Math.ceil(t.count/this.settings.batchSize),1);if(this.page>i)return this.setPage(i),void this.updateElements(!0);this._updateView(s,t)}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}},updateElementsIfSearchTextChanged:function(){this.searchText!==(this.searchText=this.searching?this.$search.val():null)&&this.updateElements()},showActionTriggers:function(){this.showingActionTriggers||(this.$toolbar.css("min-height",this.$toolbar.height()),this._$detachedToolbarItems=this.$toolbarFlexContainer.children().not(this.$selectAllContainer).not(this.$mainSpinner),this._$detachedToolbarItems.detach(),this._$triggers?this._$triggers.insertAfter(this.$selectAllContainer):this._createTriggers(),this.showingActionTriggers=!0)},submitAction:function(t,e){var i=this.view.getSelectedElementIds();if(0!==i.length){for(var s,n=0;n<this.actions.length;n++)if(this.actions[n].type===t){s=this.actions[n];break}if(s&&(!s.confirm||confirm(s.confirm))){var a=this.getViewParams(),r=$.extend(a,e,{elementAction:t,elementIds:i});this.setIndexBusy(),this._autoSelectElements=i,Craft.postActionRequest(this.settings.submitActionsAction,r,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&(t.success?(this._updateView(a,t),t.message&&Craft.cp.displayNotice(t.message),this.afterAction(s,r)):Craft.cp.displayError(t.message))},this))}}},afterAction:function(t,e){Craft.cp.runQueue(),this.onAfterAction(t,e)},hideActionTriggers:function(){this.showingActionTriggers&&(this._$detachedToolbarItems.insertBefore(this.$mainSpinner),this._$triggers.detach(),this.$toolbarFlexContainer.children().not(this.$selectAllContainer).removeClass("hidden"),this.$toolbar.css("min-height",""),this.showingActionTriggers=!1)},updateActionTriggers:function(){if(this.actions){var t=this.view.getSelectedElements().length;0!==t?(t===this.view.getEnabledElements().length?(this.$selectAllCheckbox.removeClass("indeterminate"),this.$selectAllCheckbox.addClass("checked"),this.$selectAllBtn.attr("aria-checked","true")):(this.$selectAllCheckbox.addClass("indeterminate"),this.$selectAllCheckbox.removeClass("checked"),this.$selectAllBtn.attr("aria-checked","mixed")),this.showActionTriggers()):(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false"),this.hideActionTriggers())}},getSelectedElements:function(){return this.view?this.view.getSelectedElements():$()},getSelectedElementIds:function(){return this.view?this.view.getSelectedElementIds():[]},getSortAttributeOption:function(t){return this.$sortAttributesList.find('a[data-attr="'+t+'"]:first')},getSelectedSortAttribute:function(){return this.$sortAttributesList.find("a.sel:first").data("attr")},setSortAttribute:function(t){var e=this.getSortAttributeOption(t);if(e.length){this.$sortAttributesList.find("a.sel").removeClass("sel"),e.addClass("sel");var i=e.text();this.$sortMenuBtn.attr("title",Craft.t("app","Sort by {attribute}",{attribute:i})),this.$sortMenuBtn.text(i),this.setSortDirection("score"===t?"desc":"asc"),"structure"===t?this.$sortDirectionsList.find("a").addClass("disabled"):this.$sortDirectionsList.find("a").removeClass("disabled")}},getSortDirectionOption:function(t){return this.$sortDirectionsList.find("a[data-dir="+t+"]:first")},getSelectedSortDirection:function(){return this.$sortDirectionsList.find("a.sel:first").data("dir")},getSelectedViewMode:function(){return this.getSelectedSourceState("mode")},setSortDirection:function(t){"desc"!==t&&(t="asc"),this.$sortMenuBtn.attr("data-icon",t),this.$sortDirectionsList.find("a.sel").removeClass("sel"),this.getSortDirectionOption(t).addClass("sel")},getSourceByKey:function(t){return void 0===this.sourcesByKey[t]?null:this.sourcesByKey[t]},selectSource:function(t){if(!t||!t.length)return!1;if(this.$source&&this.$source[0]&&this.$source[0]===t[0]&&t.data("key")===this.sourceKey)return!1;if(this.hideActionTriggers(),this.$source=t,this.sourceKey=t.data("key"),this.setInstanceState("selectedSource",this.sourceKey),this.sourceSelect.selectItem(t),Craft.cp.updateSidebarMenuLabel(),this.searching&&(this.searchText=null,this.$search.val(""),this.stopSearching()),Garnish.hasAttr(this.$source,"data-has-structure")?(this.$structureSortAttribute||(this.$structureSortAttribute=$('<li><a data-attr="structure">'+Craft.t("app","Structure")+"</a></li>"),this.sortMenu.addOptions(this.$structureSortAttribute.children())),this.$structureSortAttribute.prependTo(this.$sortAttributesList)):this.$structureSortAttribute&&this.$structureSortAttribute.removeClass("sel").detach(),this.setStoredSortOptionsForSource(),this.$statusMenuBtn.length&&(Garnish.hasAttr(this.$source,"data-override-status")?this.$statusMenuContainer.addClass("hidden"):this.$statusMenuContainer.removeClass("hidden")),this.$viewModeBtnContainer&&this.$viewModeBtnContainer.remove(),this.viewModeBtns={},this.viewMode=null,this.sourceViewModes=this.getViewModesForSource(),1<this.sourceViewModes.length){this.$viewModeBtnContainer=$('<div class="btngroup"/>').insertBefore(this.$mainSpinner);for(var e=0;e<this.sourceViewModes.length;e++){var i=this.sourceViewModes[e],s=$('<div data-view="'+i.mode+'" role="button" class="btn'+(void 0!==i.className?" "+i.className:"")+'" title="'+i.title+'"'+(void 0!==i.icon?' data-icon="'+i.icon+'"':"")+"/>").appendTo(this.$viewModeBtnContainer);this.viewModeBtns[i.mode]=s,this.addListener(s,"click",{mode:i.mode},function(t){this.selectViewMode(t.data.mode),this.updateElements()})}}var n=this.getSelectedViewMode();return n&&this.doesSourceHaveViewMode(n)||(n=this.viewMode&&this.doesSourceHaveViewMode(this.viewMode)?this.viewMode:this.sourceViewModes[0].mode),this.selectViewMode(n),this.onSelectSource(),!0},selectSourceByKey:function(t){var e=this.getSourceByKey(t);return!!e&&this.selectSource(e)},setStoredSortOptionsForSource:function(){var t=this.getSelectedSourceState("order"),e=this.getSelectedSourceState("sort");t&&e||(t=this.getDefaultSort(),Garnish.isArray(t)&&(e=t[1],t=t[0])),"asc"!==e&&"desc"!==e&&(e="asc"),this.setSortAttribute(t),this.setSortDirection(e)},getDefaultSort:function(){return this.$source&&Garnish.hasAttr(this.$source,"data-default-sort")?this.$source.attr("data-default-sort").split(":"):[this.$sortAttributesList.find("a:first").data("attr"),"asc"]},getViewModesForSource:function(){var t=[{mode:"table",title:Craft.t("app","Display in a table"),icon:"list"}];return this.$source&&Garnish.hasAttr(this.$source,"data-has-thumbs")&&t.push({mode:"thumbs",title:Craft.t("app","Display as thumbnails"),icon:"grid"}),t},doesSourceHaveViewMode:function(t){for(var e=0;e<this.sourceViewModes.length;e++)if(this.sourceViewModes[e].mode===t)return!0;return!1},selectViewMode:function(t,e){e||this.doesSourceHaveViewMode(t)||(t=this.sourceViewModes[0].mode),t!==this.viewMode&&(this.viewMode&&void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].removeClass("active"),this.viewMode=t,this.setSelecetedSourceState("mode",this.viewMode),void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].addClass("active"))},createView:function(t,e){return new(this.getViewClass(t))(this,this.$elements,e)},getViewClass:function(t){switch(t){case"table":return Craft.TableElementIndexView;case"thumbs":return Craft.ThumbsElementIndexView;default:throw'View mode "'+t+'" not supported.'}},rememberDisabledElementId:function(t){-1===$.inArray(t,this.settings.disabledElementIds)&&this.settings.disabledElementIds.push(t)},forgetDisabledElementId:function(t){var e=$.inArray(t,this.settings.disabledElementIds);-1!==e&&this.settings.disabledElementIds.splice(e,1)},enableElements:function(t){t.removeClass("disabled").parents(".disabled").removeClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.forgetDisabledElementId(i)}this.onEnableElements(t)},disableElements:function(t){t.removeClass("sel").addClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.rememberDisabledElementId(i)}this.onDisableElements(t)},getElementById:function(t){return this.view.getElementById(t)},enableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.enableElements(s):this.forgetDisabledElementId(i)}},disableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.disableElements(s):this.rememberDisabledElementId(i)}},selectElementAfterUpdate:function(t){null===this._autoSelectElements&&(this._autoSelectElements=[]),this._autoSelectElements.push(t)},addButton:function(t){this.getButtonContainer().append(t)},isShowingSidebar:function(){return null===this.showingSidebar&&(this.showingSidebar=this.$sidebar.length&&!this.$sidebar.hasClass("hidden")),this.showingSidebar},getButtonContainer:function(){if(this.settings.buttonContainer)return $(this.settings.buttonContainer);var t=$("#button-container");return t.length||(t=$('<div id="button-container"/>').appendTo(Craft.cp.$header)),t},setIndexBusy:function(){this.$mainSpinner.removeClass("invisible"),this.isIndexBusy=!0},setIndexAvailable:function(){this.$mainSpinner.addClass("invisible"),this.isIndexBusy=!1},createCustomizeSourcesModal:function(){var t=new Craft.CustomizeSourcesModal(this,{onHide:function(){t.destroy()}});return t},disable:function(){this.sourceSelect&&this.sourceSelect.disable(),this.view&&this.view.disable(),this.base()},enable:function(){this.sourceSelect&&this.sourceSelect.enable(),this.view&&this.view.enable(),this.base()},onAfterInit:function(){this.settings.onAfterInit(),this.trigger("afterInit")},onSelectSource:function(){this.settings.onSelectSource(this.sourceKey),this.trigger("selectSource",{sourceKey:this.sourceKey})},onSelectSite:function(){this.settings.onSelectSite(this.siteId),this.trigger("selectSite",{siteId:this.siteId})},onUpdateElements:function(){this.settings.onUpdateElements(),this.trigger("updateElements")},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},onEnableElements:function(t){this.settings.onEnableElements(t),this.trigger("enableElements",{elements:t})},onDisableElements:function(t){this.settings.onDisableElements(t),this.trigger("disableElements",{elements:t})},onAfterAction:function(t,e){this.settings.onAfterAction(t,e),this.trigger("afterAction",{action:t,params:e})},_handleSourceSelectionChange:function(){this.sourceSelect.totalSelected?this.selectSource(this.sourceSelect.$selectedItems)&&this.updateElements():this.sourceSelect.selectItem(this.$visibleSources.first())},_handleActionTriggerSubmit:function(t){t.preventDefault();var e=$(t.currentTarget);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action"),s=Garnish.getPostData(e);this.submitAction(i,s)}},_handleMenuActionTriggerSubmit:function(t){var e=$(t.option);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action");this.submitAction(i)}},_handleStatusChange:function(t){this.statusMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$statusMenuBtn.html(e.html()),this.trashed=!1,this.drafts=!1,this.status=null,Garnish.hasAttr(e,"data-trashed")?this.trashed=!0:Garnish.hasAttr(e,"data-drafts")?this.drafts=!0:this.status=e.data("status"),this._updateStructureSortOption(),this.updateElements()},_handleSiteChange:function(t){this.siteMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$siteMenuBtn.html(e.html()),this._setSite(e.data("site-id")),this.onSelectSite()},_setSite:function(t){var e,i;this.siteId=t,this.$visibleSources=$();for(var s=!1,n=0;n<this.$sources.length;n++)void 0===(i=this.$sources.eq(n)).data("sites")||-1!==i.data("sites").toString().split(",").indexOf(t.toString())?(i.parent().removeClass("hidden"),this.$visibleSources=this.$visibleSources.add(i),e||(e=i)):(i.parent().addClass("hidden"),this.$source&&this.$source.get(0)==i.get(0)&&(s=!0));s&&this.selectSource(e);var a,r=this.getSourceContainer().children(".heading");for(n=0;n<r.length;n++)0!==(a=r.eq(n)).nextUntil(".heading",":not(.hidden)").length?a.removeClass("hidden"):a.addClass("hidden");this.initialized&&(Craft.setLocalStorage("BaseElementIndex.siteId",t),this.updateElements())},_handleSortChange:function(t){var e=$(t.selectedOption);e.hasClass("disabled")||e.hasClass("sel")||(e.parent().parent().is(this.$sortAttributesList)?this.setSortAttribute(e.data("attr")):this.setSortDirection(e.data("dir")),this.storeSortAttributeAndDirection(),this.updateElements())},_handleSelectionChange:function(){this.updateActionTriggers(),this.onSelectionChange()},_handleSourceDblClick:function(t){this._toggleSource($(t.currentTarget)),t.stopPropagation()},_handleSourceToggleClick:function(t){this._toggleSource($(t.currentTarget).prev("a")),t.stopPropagation()},_updateStructureSortOption:function(){var t=this.getSortAttributeOption("structure");if(t.length)if(this.trashed||this.drafts||this.searching){if(t.addClass("disabled"),"structure"===this.getSelectedSortAttribute()){var e=this.$sortAttributesList.find("a:not(.disabled):first");this.setSortAttribute(e.data("attr")),this.setSortDirection("asc")}}else t.removeClass("disabled"),this.setStoredSortOptionsForSource()},_getSourcesInList:function(t){return t.children("li").children("a")},_getChildSources:function(t){var e=t.siblings("ul");return this._getSourcesInList(e)},_getSourceToggle:function(t){return t.siblings(".toggle")},_initSources:function(t){for(var e=0;e<t.length;e++)this.initSource($(t[e]))},_deinitSources:function(t){for(var e=0;e<t.length;e++)this.deinitSource($(t[e]))},_toggleSource:function(t){t.parent("li").hasClass("expanded")?this._collapseSource(t):this._expandSource(t)},_expandSource:function(t){t.parent("li").addClass("expanded");var e=this._getChildSources(t);this._initSources(e);var i=t.data("key");-1===this.instanceState.expandedSources.indexOf(i)&&(this.instanceState.expandedSources.push(i),this.storeInstanceState())},_collapseSource:function(t){t.parent("li").removeClass("expanded");var e=this._getChildSources(t);this._deinitSources(e);var i=this.instanceState.expandedSources.indexOf(t.data("key"));-1!==i&&(this.instanceState.expandedSources.splice(i,1),this.storeInstanceState())},_isViewPaginated:function(){return"index"===this.settings.context&&"structure"!==this.getSelectedSortAttribute()},_updateView:function(t,e){if(this.actions&&(this.hideActionTriggers(),this.actions=this.actionsHeadHtml=this.actionsFootHtml=this._$triggers=null),this.$selectAllContainer&&this.$selectAllContainer.detach(),this.$countContainer.html(""),!this._isViewPaginated()||e.count<=this.settings.batchSize)this.$countContainer.text(e.countLabel);else{var i=$('<div class="flex pagination"/>').appendTo(this.$countContainer),s=Math.max(Math.ceil(e.count/this.settings.batchSize),1),n=$("<div/>",{class:"page-link"+(1<this.page?"":" disabled"),"data-icon":"leftangle",title:Craft.t("app","Previous Page")}).appendTo(i),a=$("<div/>",{class:"page-link"+(this.page<s?"":" disabled"),"data-icon":"rightangle",title:Craft.t("app","Next Page")}).appendTo(i);$("<div/>",{class:"page-info",text:e.countLabel}).appendTo(i),1<this.page&&this.addListener(n,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page-1),this.updateElements(!0)}),this.page<s&&this.addListener(a,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page+1),this.updateElements(!0)})}e.actions&&e.actions.length&&(this.actions=e.actions,this.actionsHeadHtml=e.actionsHeadHtml,this.actionsFootHtml=e.actionsFootHtml,this.$selectAllContainer?(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false")):(this.$selectAllContainer=$('<div class="selectallcontainer"/>'),this.$selectAllBtn=$('<div class="btn"/>').appendTo(this.$selectAllContainer),this.$selectAllCheckbox=$('<div class="checkbox"/>').appendTo(this.$selectAllBtn),this.$selectAllBtn.attr({role:"checkbox",tabindex:"0","aria-checked":"false"}),this.addListener(this.$selectAllBtn,"click",function(){0===this.view.getSelectedElements().length?this.view.selectAllElements():this.view.deselectAllElements()}),this.addListener(this.$selectAllBtn,"keydown",function(t){t.keyCode===Garnish.SPACE_KEY&&(t.preventDefault(),$(t.currentTarget).trigger("click"))})),this.$selectAllContainer.prependTo(this.$toolbarFlexContainer)),this.$elements.html(e.html),Craft.appendHeadHtml(e.headHtml),Craft.appendFootHtml(e.footHtml);var r=this.actions||this.settings.selectable;if(this.view=this.createView(this.getSelectedViewMode(),{context:this.settings.context,batchSize:"index"!==this.settings.context||"structure"===this.getSelectedSortAttribute()?this.settings.batchSize:null,params:t,selectable:r,multiSelect:this.actions||this.settings.multiSelect,checkboxMode:!!this.actions,onSelectionChange:$.proxy(this,"_handleSelectionChange")}),this._autoSelectElements){if(r)for(var o=0;o<this._autoSelectElements.length;o++)this.view.selectElementById(this._autoSelectElements[o]);this._autoSelectElements=null}this.onUpdateElements()},_createTriggers:function(){var t,e,i=[],s=[],n=[];for(t=0;t<this.actions.length;t++){var a=this.actions[t];if(a.trigger){var r=$('<form id="'+Craft.formatInputId(a.type)+'-actiontrigger"/>').data("action",a.type).append(a.trigger);this.addListener(r,"submit","_handleActionTriggerSubmit"),i.push(r)}else a.destructive?n.push(a):s.push(a)}if(s.length||n.length){var o=$("<form/>");e=$('<div class="btn menubtn" data-icon="settings" title="'+Craft.t("app","Actions")+'"/>').appendTo(o);var l=$('<ul class="menu"/>').appendTo(o),h=this._createMenuTriggerList(s,!1),d=this._createMenuTriggerList(n,!0);h&&h.appendTo(l),h&&d&&$("<hr/>").appendTo(l),d&&d.appendTo(l),i.push(o)}for(this._$triggers=$(),t=0;t<i.length;t++){var c=$("<div/>").append(i[t]);this._$triggers=this._$triggers.add(c)}this._$triggers.insertAfter(this.$selectAllContainer),Craft.appendHeadHtml(this.actionsHeadHtml),Craft.appendFootHtml(this.actionsFootHtml),Craft.initUiElements(this._$triggers),e&&e.data("menubtn").on("optionSelect",$.proxy(this,"_handleMenuActionTriggerSubmit"))},_showExportHud:function(){this.$exportBtn.addClass("active");var t=$("<form/>",{class:"export-form"}),s=Craft.ui.createTextField({label:Craft.t("app","Limit"),placeholder:Craft.t("app","No limit"),type:"number",min:1}).appendTo(t);$("<input/>",{type:"submit",class:"btn submit fullwidth",value:Craft.t("app","Export")}).appendTo(t);var n=$("<div/>",{class:"spinner hidden"}).appendTo(t);new Garnish.HUD(this.$exportBtn,t).on("hide",$.proxy(function(){this.$exportBtn.removeClass("active")},this));var a=!1;this.addListener(t,"submit",function(t){if(t.preventDefault(),!a){a=!0,n.removeClass("hidden");var e=this.getViewParams();delete e.criteria.limit;var i=parseInt(s.find("input").val());i&&!isNaN(i)&&(e.criteria.limit=i),Craft.postActionRequest("element-indexes/create-export-token",e,$.proxy(function(t,e){if(a=!1,n.addClass("hidden"),"success"===e){var i={};i[Craft.tokenParam]=t.token;var s=Craft.getCpUrl("",i);document.location.href=s}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}})},_createMenuTriggerList:function(t,e){if(t&&t.length){for(var i=$("<ul/>"),s=0;s<t.length;s++){var n=t[s].type;$("<li/>").append($("<a/>",{id:Craft.formatInputId(n)+"-actiontrigger",class:e?"error":null,"data-action":n,text:t[s].name})).appendTo(i)}return i}}},{defaults:{context:"index",modal:null,storageKey:null,criteria:null,batchSize:50,disabledElementIds:[],selectable:!1,multiSelect:!1,buttonContainer:null,hideSidebar:!1,refreshSourcesAction:"element-indexes/get-source-tree-html",updateElementsAction:"element-indexes/get-elements",submitActionsAction:"element-indexes/perform-action",toolbarFixed:null,onAfterInit:$.noop,onSelectSource:$.noop,onSelectSite:$.noop,onUpdateElements:$.noop,onSelectionChange:$.noop,onEnableElements:$.noop,onDisableElements:$.noop,onAfterAction:$.noop}}),Craft.BaseElementIndexView=Garnish.Base.extend({$container:null,$loadingMoreSpinner:null,$elementContainer:null,$scroller:null,elementIndex:null,thumbLoader:null,elementSelect:null,loadingMore:!1,_totalVisible:null,_morePending:null,_handleEnableElements:null,_handleDisableElements:null,init:function(t,e,i){this.elementIndex=t,this.$container=$(e),this.setSettings(i,Craft.BaseElementIndexView.defaults),this.$loadingMoreSpinner=$('<div class="centeralign hidden"><div class="spinner loadingmore"></div></div>').insertAfter(this.$container),this.$elementContainer=this.getElementContainer();var s=this.$elementContainer.children();this.setTotalVisible(s.length),this.setMorePending(this.settings.batchSize&&s.length==this.settings.batchSize),this.thumbLoader=new Craft.ElementThumbLoader,this.thumbLoader.load(s),this.settings.selectable&&(this.elementSelect=new Garnish.Select(this.$elementContainer,s.filter(":not(.disabled)"),{multi:this.settings.multiSelect,vertical:this.isVerticalList(),handle:"index"===this.settings.context?".checkbox, .element:first":null,filter:":not(a):not(.toggle)",checkboxMode:this.settings.checkboxMode,onSelectionChange:$.proxy(this,"onSelectionChange")}),this._handleEnableElements=$.proxy(function(t){this.elementSelect.addItems(t.elements)},this),this._handleDisableElements=$.proxy(function(t){this.elementSelect.removeItems(t.elements)},this),this.elementIndex.on("enableElements",this._handleEnableElements),this.elementIndex.on("disableElements",this._handleDisableElements)),"index"===this.settings.context&&(this._handleElementEditing=$.proxy(function(t){var e=$(t.target);if("A"!==e.prop("nodeName")){var i;if(e.hasClass("element"))i=e;else if(!(i=e.closest(".element")).length)return;Garnish.hasAttr(i,"data-editable")&&this.createElementEditor(i)}},this),this.elementIndex.trashed||(this.addListener(this.$elementContainer,"dblclick",this._handleElementEditing),$.isTouchCapable()&&this.addListener(this.$elementContainer,"taphold",this._handleElementEditing))),this.afterInit(),this.settings.batchSize&&("index"===this.settings.context?this.$scroller=Garnish.$scrollContainer:this.$scroller=this.elementIndex.$main,this.$scroller.scrollTop(0),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore())},getElementContainer:function(){throw"Classes that extend Craft.BaseElementIndexView must supply a getElementContainer() method."},afterInit:function(){},getAllElements:function(){return this.$elementContainer.children()},getEnabledElements:function(){return this.$elementContainer.children(":not(.disabled)")},getElementById:function(t){var e=this.$elementContainer.children('[data-id="'+t+'"]:first');return e.length?e:null},getSelectedElements:function(){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.$selectedItems},getSelectedElementIds:function(){var t=this.getSelectedElements(),e=[];if(t)for(var i=0;i<t.length;i++)e.push(t.eq(i).data("id"));return e},selectElement:function(t){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.selectItem(t,!0),!0},selectElementById:function(t){if(!this.elementSelect)throw"This view is not selectable.";var e=this.getElementById(t);return!!e&&(this.elementSelect.selectItem(e,!0),!0)},selectAllElements:function(){this.elementSelect.selectAll()},deselectAllElements:function(){this.elementSelect.deselectAll()},isVerticalList:function(){return!1},getTotalVisible:function(){return this._totalVisible},setTotalVisible:function(t){this._totalVisible=t},getMorePending:function(){return this._morePending},setMorePending:function(t){this._morePending=t},maybeLoadMore:function(){this.canLoadMore()&&this.loadMore()},canLoadMore:function(){if(!this.getMorePending()||!this.settings.batchSize)return!1;if(this.$scroller[0]!==Garnish.$win[0])return this.$scroller.prop("scrollHeight")-this.$scroller.scrollTop()<=this.$scroller.outerHeight()+15;var t=Garnish.$win.innerHeight(),e=Garnish.$win.scrollTop();return this.$container.offset().top+this.$container.height()<=t+e},loadMore:function(){if(this.getMorePending()&&!this.loadingMore&&this.settings.batchSize){this.loadingMore=!0,this.$loadingMoreSpinner.removeClass("hidden"),this.removeListener(this.$scroller,"scroll");var t=this.getLoadMoreParams();Craft.postActionRequest(this.settings.loadMoreElementsAction,t,$.proxy(function(t,e){if(this.loadingMore=!1,this.$loadingMoreSpinner.addClass("hidden"),"success"===e){var i=$(t.html);this.appendElements(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),this.elementSelect&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.setTotalVisible(this.getTotalVisible()+i.length),this.setMorePending(i.length==this.settings.batchSize),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore()}},this))}},getLoadMoreParams:function(){var t=$.extend(!0,{},this.settings.params);return t.criteria.offset=this.getTotalVisible(),t},appendElements:function(t){t.appendTo(this.$elementContainer),this.thumbLoader.load(t),this.onAppendElements(t)},onAppendElements:function(t){this.settings.onAppendElements(t),this.trigger("appendElements",{newElements:t})},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},createElementEditor:function(t){Craft.createElementEditor(t.data("type"),t,{elementIndex:this.elementIndex})},disable:function(){this.elementSelect&&this.elementSelect.disable()},enable:function(){this.elementSelect&&this.elementSelect.enable()},destroy:function(){this.$loadingMoreSpinner.remove(),this.thumbLoader.destroy(),delete this.thumbLoader,this.elementSelect&&(this.elementIndex.off("enableElements",this._handleEnableElements),this.elementIndex.off("disableElements",this._handleDisableElements),this.elementSelect.destroy(),delete this.elementSelect),this.base()}},{defaults:{context:"index",batchSize:null,params:null,selectable:!1,multiSelect:!1,checkboxMode:!1,loadMoreElementsAction:"element-indexes/get-more-elements",onAppendElements:$.noop,onSelectionChange:$.noop}}),Craft.BaseElementSelectInput=Garnish.Base.extend({thumbLoader:null,elementSelect:null,elementSort:null,modal:null,elementEditor:null,$container:null,$elementsContainer:null,$elements:null,$addElementBtn:null,_initialized:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","elementType","sources","criteria","sourceElementId","limit","modalStorageKey","fieldId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.setSettings(t,Craft.BaseElementSelectInput.defaults),this.settings.modalStorageKey&&(this.modalStorageKey="BaseElementSelectInput."+this.settings.modalStorageKey),1==this.settings.limit&&(this.settings.sortable=!1),this.$container=this.getContainer(),this.$container.data("elementSelect",this),this.$elementsContainer=this.getElementsContainer(),this.$addElementBtn=this.getAddElementsBtn(),this.$addElementBtn&&1==this.settings.limit&&this.$addElementBtn.css("position","absolute").css("top",0).css(Craft.left,0),this.thumbLoader=new Craft.ElementThumbLoader,this.initElementSelect(),this.initElementSort(),this.resetElements(),this.$addElementBtn&&this.addListener(this.$addElementBtn,"activate","showModal"),this._initialized=!0},get totalSelected(){return this.$elements.length},getContainer:function(){return $("#"+this.settings.id)},getElementsContainer:function(){return this.$container.children(".elements")},getElements:function(){return this.$elementsContainer.children()},getAddElementsBtn:function(){return this.$container.children(".btn.add")},initElementSelect:function(){this.settings.selectable&&(this.elementSelect=new Garnish.Select({multi:this.settings.sortable,filter:":not(.delete)"}))},initElementSort:function(){this.settings.sortable&&(this.elementSort=new Garnish.DragSort({container:this.$elementsContainer,filter:this.settings.selectable?$.proxy(function(){return this.elementSort.$targetItem.hasClass("sel")?this.elementSelect.getSelectedItems():this.elementSort.$targetItem},this):null,ignoreHandleSelector:".delete",axis:this.getElementSortAxis(),collapseDraggees:!0,magnetStrength:4,helperLagBase:1.5,onSortChange:this.settings.selectable?$.proxy(function(){this.elementSelect.resetItemOrder()},this):null}))},getElementSortAxis:function(){return"list"===this.settings.viewMode?"y":null},canAddMoreElements:function(){return!this.settings.limit||this.$elements.length<this.settings.limit},updateAddElementsBtn:function(){this.canAddMoreElements()?this.enableAddElementsBtn():this.disableAddElementsBtn()},disableAddElementsBtn:function(){this.$addElementBtn&&!this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.addClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeOut",Craft.BaseElementSelectInput.ADD_FX_DURATION):this.$addElementBtn.hide()))},enableAddElementsBtn:function(){this.$addElementBtn&&this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.removeClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeIn",Craft.BaseElementSelectInput.REMOVE_FX_DURATION):this.$addElementBtn.show()))},resetElements:function(){null!==this.$elements?this.removeElements(this.$elements):this.$elements=$(),this.addElements(this.getElements())},addElements:function(t){this.thumbLoader.load(t),this.settings.selectable&&this.elementSelect.addItems(t),this.settings.sortable&&this.elementSort.addItems(t),this.settings.editable&&(this._handleShowElementEditor=$.proxy(function(t){var e=$(t.currentTarget);!Garnish.hasAttr(e,"data-editable")||e.hasClass("disabled")||e.hasClass("loading")||(this.elementEditor=this.createElementEditor(e))},this),this.addListener(t,"dblclick",this._handleShowElementEditor),$.isTouchCapable()&&this.addListener(t,"taphold",this._handleShowElementEditor)),t.find(".delete").on("click",$.proxy(function(t){this.removeElement($(t.currentTarget).closest(".element"))},this)),this.$elements=this.$elements.add(t),this.updateAddElementsBtn()},createElementEditor:function(t,e){return e||(e={}),e.prevalidate=this.settings.prevalidate,Craft.createElementEditor(this.settings.elementType,t,e)},removeElements:function(t){if(this.settings.selectable&&this.elementSelect.removeItems(t),this.modal){for(var e=[],i=0;i<t.length;i++){var s=t.eq(i).data("id");s&&e.push(s)}e.length&&this.modal.elementIndex.enableElementsById(e)}t.children("input").prop("disabled",!0),this.$elements=this.$elements.not(t),this.updateAddElementsBtn(),this.onRemoveElements()},removeElement:function(t){this.removeElements(t),this.animateElementAway(t,function(){t.remove()})},animateElementAway:function(t,e){t.css("z-index",0);var i={opacity:-1};i["margin-"+Craft.left]=-(t.outerWidth()+parseInt(t.css("margin-"+Craft.right))),"list"!==this.settings.viewMode&&0!==this.$elements.length||(i["margin-bottom"]=-(t.outerHeight()+parseInt(t.css("margin-bottom")))),t.velocity(i,Craft.BaseElementSelectInput.REMOVE_FX_DURATION,e)},showModal:function(){this.canAddMoreElements()&&(this.modal?this.modal.show():this.modal=this.createModal())},createModal:function(){return Craft.createElementSelectorModal(this.settings.elementType,this.getModalSettings())},getModalSettings:function(){return $.extend({closeOtherModals:!1,storageKey:this.modalStorageKey,sources:this.settings.sources,criteria:this.settings.criteria,multiSelect:1!=this.settings.limit,showSiteMenu:this.settings.showSiteMenu,disabledElementIds:this.getDisabledElementIds(),onSelect:$.proxy(this,"onModalSelect")},this.settings.modalSettings)},getSelectedElementIds:function(){for(var t=[],e=0;e<this.$elements.length;e++)t.push(this.$elements.eq(e).data("id"));return t},getDisabledElementIds:function(){var t=this.getSelectedElementIds();return this.settings.sourceElementId&&t.push(this.settings.sourceElementId),t},onModalSelect:function(t){if(this.settings.limit){var e=this.settings.limit-this.$elements.length;t.length>e&&(t=t.slice(0,e))}this.selectElements(t),this.updateDisabledElementsInModal()},selectElements:function(t){for(var e=0;e<t.length;e++){var i=t[e],s=this.createNewElement(i);this.appendElement(s),this.addElements(s),this.animateElementIntoPlace(i.$element,s)}this.onSelectElements(t)},createNewElement:function(t){var e=t.$element.clone();return Craft.setElementSize(e,"large"===this.settings.viewMode?"large":"small"),e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e},appendElement:function(t){t.appendTo(this.$elementsContainer)},animateElementIntoPlace:function(t,e){var i=t.offset(),s=e.offset(),n=e.clone().appendTo(Garnish.$bod);e.css("visibility","hidden"),n.css({position:"absolute",zIndex:1e4,top:i.top,left:i.left});var a={top:s.top,left:s.left};n.velocity(a,Craft.BaseElementSelectInput.ADD_FX_DURATION,function(){n.remove(),e.css("visibility","visible")})},updateDisabledElementsInModal:function(){this.modal.elementIndex&&this.modal.elementIndex.disableElementsById(this.getDisabledElementIds())},getElementById:function(t){for(var e=0;e<this.$elements.length;e++){var i=this.$elements.eq(e);if(i.data("id")==t)return i}},onSelectElements:function(t){this.trigger("selectElements",{elements:t}),this.settings.onSelectElements(t),window.draftEditor&&window.draftEditor.checkForm()},onRemoveElements:function(){this.trigger("removeElements"),this.settings.onRemoveElements()}},{ADD_FX_DURATION:200,REMOVE_FX_DURATION:200,defaults:{id:null,name:null,fieldId:null,elementType:null,sources:null,criteria:{},sourceElementId:null,viewMode:"list",limit:null,showSiteMenu:!1,modalStorageKey:null,modalSettings:{},onSelectElements:$.noop,onRemoveElements:$.noop,sortable:!0,selectable:!0,editable:!0,prevalidate:!1,editorSettings:{}}}),Craft.BaseElementSelectorModal=Garnish.Modal.extend({elementType:null,elementIndex:null,$body:null,$selectBtn:null,$sidebar:null,$sources:null,$sourceToggles:null,$main:null,$search:null,$elements:null,$tbody:null,$primaryButtons:null,$secondaryButtons:null,$cancelBtn:null,$footerSpinner:null,init:function(t,e){this.elementType=t,this.setSettings(e,Craft.BaseElementSelectorModal.defaults);var i=$('<div class="modal elementselectormodal"></div>').appendTo(Garnish.$bod),s=$('<div class="body"><div class="spinner big"></div></div>').appendTo(i),n=$('<div class="footer"/>').appendTo(i);this.base(i,this.settings),this.$footerSpinner=$('<div class="spinner hidden"/>').appendTo(n),this.$primaryButtons=$('<div class="buttons right"/>').appendTo(n),this.$secondaryButtons=$('<div class="buttons left secondary-buttons"/>').appendTo(n),this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$primaryButtons),this.$selectBtn=$('<div class="btn disabled submit">'+Craft.t("app","Select")+"</div>").appendTo(this.$primaryButtons),this.$body=s,this.addListener(this.$cancelBtn,"activate","cancel"),this.addListener(this.$selectBtn,"activate","selectElements")},onFadeIn:function(){this.elementIndex?Garnish.isMobileBrowser(!0)||this.elementIndex.$search.trigger("focus"):this._createElementIndex(),this.base()},onSelectionChange:function(){this.updateSelectBtnState()},updateSelectBtnState:function(){this.$selectBtn&&(this.elementIndex.getSelectedElements().length?this.enableSelectBtn():this.disableSelectBtn())},enableSelectBtn:function(){this.$selectBtn.removeClass("disabled")},disableSelectBtn:function(){this.$selectBtn.addClass("disabled")},enableCancelBtn:function(){this.$cancelBtn.removeClass("disabled")},disableCancelBtn:function(){this.$cancelBtn.addClass("disabled")},showFooterSpinner:function(){this.$footerSpinner.removeClass("hidden")},hideFooterSpinner:function(){this.$footerSpinner.addClass("hidden")},cancel:function(){this.$cancelBtn.hasClass("disabled")||this.hide()},selectElements:function(){if(this.elementIndex&&this.elementIndex.getSelectedElements().length){this.elementIndex.view.elementSelect.clearMouseUpTimeout();var t=this.elementIndex.getSelectedElements(),e=this.getElementInfo(t);this.onSelect(e),this.settings.disableElementsOnSelect&&this.elementIndex.disableElements(this.elementIndex.getSelectedElements()),this.settings.hideOnSelect&&this.hide()}},getElementInfo:function(t){for(var e=[],i=0;i<t.length;i++){var s=$(t[i]),n=Craft.getElementInfo(s);e.push(n)}return e},show:function(){this.updateSelectBtnState(),this.base()},onSelect:function(t){this.settings.onSelect(t)},disable:function(){this.elementIndex&&this.elementIndex.disable(),this.base()},enable:function(){this.elementIndex&&this.elementIndex.enable(),this.base()},_createElementIndex:function(){var t={context:"modal",elementType:this.elementType,sources:this.settings.sources};null!==this.settings.showSiteMenu&&"auto"!==this.settings.showSiteMenu&&(t.showSiteMenu=this.settings.showSiteMenu?"1":"0"),Craft.postActionRequest("elements/get-modal-body",t,$.proxy(function(t,e){"success"===e&&(this.$body.html(t.html),this.$body.has(".sidebar:not(.hidden)").length&&this.$body.addClass("has-sidebar"),this.elementIndex=Craft.createElementIndex(this.elementType,this.$body,{context:"modal",modal:this,storageKey:this.settings.storageKey,criteria:this.settings.criteria,disabledElementIds:this.settings.disabledElementIds,selectable:!0,multiSelect:this.settings.multiSelect,buttonContainer:this.$secondaryButtons,onSelectionChange:$.proxy(this,"onSelectionChange"),hideSidebar:this.settings.hideSidebar}),this.addListener(this.elementIndex.$elements,"doubletap",function(t,e){e.firstTap.target===e.secondTap.target&&this.selectElements()}))},this))}},{defaults:{resizable:!0,storageKey:null,sources:null,criteria:null,multiSelect:!1,showSiteMenu:null,disabledElementIds:[],disableElementsOnSelect:!1,hideOnSelect:!0,onCancel:$.noop,onSelect:$.noop,hideIndexSidebar:!1}}),Craft.BaseInputGenerator=Garnish.Base.extend({$source:null,$target:null,$form:null,settings:null,listening:null,timeout:null,init:function(t,e,i){this.$source=$(t),this.$target=$(e),this.$form=this.$source.closest("form"),this.setSettings(i),this.startListening()},setNewSource:function(t){var e=this.listening;this.stopListening(),this.$source=$(t),e&&this.startListening()},startListening:function(){this.listening||(this.listening=!0,this.addListener(this.$source,"textchange","onSourceTextChange"),this.addListener(this.$target,"textchange","onTargetTextChange"),this.addListener(this.$form,"submit","onFormSubmit"))},stopListening:function(){this.listening&&(this.listening=!1,this.timeout&&clearTimeout(this.timeout),this.removeAllListeners(this.$source),this.removeAllListeners(this.$target),this.removeAllListeners(this.$form))},onSourceTextChange:function(){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout($.proxy(this,"updateTarget"),250)},onTargetTextChange:function(){this.$target.get(0)===document.activeElement&&this.stopListening()},onFormSubmit:function(){this.timeout&&clearTimeout(this.timeout),this.updateTarget()},updateTarget:function(){var t=this.$source.val();if(void 0!==t){var e=this.generateTargetValue(t);this.$target.val(e),this.$target.trigger("change"),this.$target.is(":focus")&&Craft.selectFullValue(this.$target)}},generateTargetValue:function(t){return t}}),Craft.AdminTable=Garnish.Base.extend({settings:null,totalItems:null,sorter:null,$noItems:null,$table:null,$tbody:null,$deleteBtns:null,init:function(t){this.setSettings(t,Craft.AdminTable.defaults),this.settings.allowDeleteAll||(this.settings.minItems=1),this.$noItems=$(this.settings.noItemsSelector),this.$table=$(this.settings.tableSelector),this.$tbody=this.$table.children("tbody"),this.totalItems=this.$tbody.children().length,this.settings.sortable&&(this.sorter=new Craft.DataTableSorter(this.$table,{onSortChange:$.proxy(this,"reorderItems")})),this.$deleteBtns=this.$table.find(".delete:not(.disabled)"),this.addListener(this.$deleteBtns,"click","handleDeleteBtnClick"),this.updateUI()},addRow:function(t){if(!(this.settings.maxItems&&this.totalItems>=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){if(this.settings.sortable){for(var i=[],t=0;t<this.sorter.$items.length;t++){var e=$(this.sorter.$items[t]).attr(this.settings.idAttribute);i.push(e)}var s={ids:JSON.stringify(i)};Craft.postActionRequest(this.settings.reorderAction,s,$.proxy(function(t,e){"success"===e&&(t.success?(this.onReorderItems(i),Craft.cp.displayNotice(Craft.t("app",this.settings.reorderSuccessMessage))):Craft.cp.displayError(Craft.t("app",this.settings.reorderFailMessage)))},this))}},handleDeleteBtnClick:function(t){if(!(this.settings.minItems&&this.totalItems<=this.settings.minItems)){var e=$(t.target).closest("tr");this.confirmDeleteItem(e)&&this.deleteItem(e)}},confirmDeleteItem:function(t){var e=this.getItemName(t);return confirm(Craft.t("app",this.settings.confirmDeleteMessage,{name:e}))},deleteItem:function(i){var t={id:this.getItemId(i)};Craft.postActionRequest(this.settings.deleteAction,t,$.proxy(function(t,e){"success"===e&&this.handleDeleteItemResponse(t,i)},this))},handleDeleteItemResponse:function(t,e){var i=this.getItemId(e),s=this.getItemName(e);t.success?(this.sorter&&this.sorter.removeItems(e),e.remove(),this.totalItems--,this.updateUI(),this.onDeleteItem(i),Craft.cp.displayNotice(Craft.t("app",this.settings.deleteSuccessMessage,{name:s}))):Craft.cp.displayError(Craft.t("app",this.settings.deleteFailMessage,{name:s}))},onReorderItems:function(t){this.settings.onReorderItems(t)},onDeleteItem:function(t){this.settings.onDeleteItem(t)},getItemId:function(t){return t.attr(this.settings.idAttribute)},getItemName:function(t){return Craft.escapeHtml(t.attr(this.settings.nameAttribute))},updateUI:function(){if(0===this.totalItems?(this.$table.hide(),this.$noItems.removeClass("hidden")):(this.$table.show(),this.$noItems.addClass("hidden")),this.settings.sortable){var t=this.$table.find(".move");1===this.totalItems?t.addClass("disabled"):t.removeClass("disabled")}this.settings.minItems&&this.totalItems<=this.settings.minItems?this.$deleteBtns.addClass("disabled"):this.$deleteBtns.removeClass("disabled"),this.settings.newItemBtnSelector&&(this.settings.maxItems&&this.totalItems>=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}}),Craft.AssetEditor=Craft.BaseElementEditor.extend({reloadIndex:!1,updateForm:function(t){if(this.base(t),this.$element.data("id")){var e=this.$fieldsContainer.find("> .meta > .image-preview-container.editable");e.length&&this.addListener(e,"click","showImageEditor")}},showImageEditor:function(){new Craft.AssetImageEditor(this.$element.data("id"),{onSave:function(){this.reloadIndex=!0,this.reloadForm()}.bind(this),allowDegreeFractions:Craft.isImagick})},onHideHud:function(){this.reloadIndex&&this.settings.elementIndex&&this.settings.elementIndex.updateElements(),this.base()}}),Craft.registerElementEditorClass("craft\\elements\\Asset",Craft.AssetEditor),Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinnerCanvas:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,croppingConstraint:!1,spinnerInterval:null,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,renderImage:null,renderCropper:null,init:function(t,e){this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('<form class="modal fitted imageeditor"></form>').appendTo(Garnish.$bod),this.$body=$('<div class="body"></div>').appendTo(this.$container),this.$footer=$('<div class="footer"/>').appendTo(this.$container),this.base(this.$container,this.settings),this.$buttons=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn cancel">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$buttons),this.$replaceBtn=$('<div class="btn submit save replace">'+Craft.t("app","Save")+"</div>").appendTo(this.$buttons),this.settings.allowSavingAsNew&&(this.$saveBtn=$('<div class="btn submit save copy">'+Craft.t("app","Save as a new asset")+"</div>").appendTo(this.$buttons),this.addListener(this.$saveBtn,"activate",this.saveImage.bind(this))),this.addListener(this.$replaceBtn,"activate",this.saveImage.bind(this)),this.addListener(this.$cancelBtn,"activate",$.proxy(this,"hide")),this.removeListener(this.$shade,"click"),this.maxImageSize=this.getMaxImageSize(),Craft.postActionRequest("assets/image-editor",{assetId:t},$.proxy(this,"loadEditor"))},getMaxImageSize:function(){var t=Garnish.$doc.get(0).documentElement.clientWidth,e=Garnish.$doc.get(0).documentElement.clientHeight;return Math.max(e,t)*(1<window.devicePixelRatio?2:1)},loadEditor:function(r){r.html||alert(Craft.t("app","Could not load the image editor.")),this.$body.html(r.html),this.$tabs=$(".tabs li",this.$body),this.$viewsContainer=$(".views",this.$body),this.$views=$("> div",this.$viewsContainer),this.$imageTools=$(".image-container .image-tools",this.$body),this.$editorContainer=$(".image-container .image",this.$body),this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this._showSpinner(),this.updateSizeAndPosition(),this.canvas=new fabric.StaticCanvas("image-canvas"),this.$croppingCanvas=$("#cropping-canvas",this.$editorContainer),this.$croppingCanvas.width(this.editorWidth),this.$croppingCanvas.height(this.editorHeight),this.canvas.enableRetinaScaling=!0,this.renderImage=function(){Garnish.requestAnimationFrame(this.canvas.renderAll.bind(this.canvas))}.bind(this);var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});fabric.Image.fromURL(t,$.proxy(function(t){this.image=t,this.image.set({originX:"center",originY:"center",left:this.editorWidth/2,top:this.editorHeight/2}),this.canvas.add(this.image),this.originalHeight=this.image.getHeight(),this.originalWidth=this.image.getWidth(),this.zoomRatio=1,this.lastLoadedDimensions=this.getScaledImageDimensions(),this._setFittedImageVerticeCoordinates(),this._repositionEditorElements();var e={imageDimensions:this.getScaledImageDimensions(),offsetX:0,offsetY:0},i=!1;if(r.focalPoint){var s=r.focalPoint,n=e.imageDimensions.width*s.x,a=e.imageDimensions.height*s.y;e.offsetX=n-e.imageDimensions.width/2,e.offsetY=a-e.imageDimensions.height/2,i=!0}this.storeFocalPointState(e),i&&this._createFocalPoint(),this._createViewport(),this.storeCropperState(),this._addControlListeners(),this.addListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.addListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.addListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.addListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this._hideSpinner(),this.renderImage(),this.$tabs.first().trigger("click")},this))},_reloadImage:function(){if(!this.imageIsLoading){this.imageIsLoading=!0,this.maxImageSize=this.getMaxImageSize();var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});this.image.setSrc(t,function(t){this.originalHeight=t.getHeight(),this.originalWidth=t.getWidth(),this.lastLoadedDimensions={width:this.originalHeight,height:this.originalWidth},this.updateSizeAndPosition(),this.renderImage(),this.imageIsLoading=!1}.bind(this))}},updateSizeAndPosition:function(){if(this.$container){var t=window.innerWidth,e=window.innerHeight;this.$container.css({width:t,"min-width":t,left:0,height:e,"min-height":e,top:0}),this.$body.css({height:e-58}),t<e?this.$container.addClass("vertical"):this.$container.removeClass("vertical"),this.$spinnerCanvas&&this.$spinnerCanvas.css({left:this.$spinnerCanvas.parent().width()/2-this.$spinnerCanvas.width()/2+"px",top:this.$spinnerCanvas.parent().height()/2-this.$spinnerCanvas.height()/2+"px"}),this.$editorContainer&&this.image&&this._repositionEditorElements()}},_repositionEditorElements:function(){var t={width:this.editorWidth,height:this.editorHeight};this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this.canvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var e=this.getScaledImageDimensions();if("crop"===this.currentView){this.zoomRatio=this.getZoomToFitRatio(this.getScaledImageDimensions());var i=this._getBoundingRectangle(this.imageVerticeCoords);this._setFittedImageVerticeCoordinates(),this._repositionCropper(i)}else this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor;this._repositionImage(t),this._repositionViewport(),this._repositionFocalPoint(t),this._zoomImage(),this.renderImage(),(1.5<e.width/this.lastLoadedDimensions.width||1.5<e.height/this.lastLoadedDimensions.height)&&this._reloadImage()},_repositionImage:function(t){this.image.set({left:this.image.left-(t.width-this.editorWidth)/2,top:this.image.top-(t.height-this.editorHeight)/2})},_createViewport:function(){this.viewport=new fabric.Rect({width:this.image.width,height:this.image.height,fill:"rgba(127,0,0,1)",originX:"center",originY:"center",globalCompositeOperation:"destination-in",left:this.image.left,top:this.image.top}),this.canvas.add(this.viewport),this.renderImage()},_createFocalPoint:function(){var t=this.focalPointState,e=this.getScaledImageDimensions().width/t.imageDimensions.width,i=t.offsetX*e*this.zoomRatio*this.scaleFactor,s=t.offsetY*e*this.zoomRatio*this.scaleFactor;i+=this.image.left,s+=this.image.top;var n=0,a=0;this.viewport&&0===t.offsetX&&0===t.offsetY&&(a="crop"!==this.currentView?(n=this.viewport.left-this.image.left,this.viewport.top-this.image.top):(n=this.clipper.left-this.image.left,this.clipper.top-this.image.top),i+=n,s+=a,t.offsetX+=n/(e*this.zoomRatio*this.scaleFactor),t.offsetY+=a/(e*this.zoomRatio*this.scaleFactor)),this.focalPoint=new fabric.Group([new fabric.Circle({radius:8,fill:"rgba(0,0,0,0.5)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"}),new fabric.Circle({radius:1,fill:"rgba(255,255,255,0)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"})],{originX:"center",originY:"center",left:i,top:s}),this.storeFocalPointState(t),this.canvas.add(this.focalPoint)},toggleFocalPoint:function(){this.focalPoint?(this.canvas.remove(this.focalPoint),this.focalPoint=null):this._createFocalPoint(),this.renderImage()},_repositionViewport:function(){if(this.viewport){var t={left:this.editorWidth/2,top:this.editorHeight/2};if("crop"===this.currentView)t.width=this.editorWidth,t.height=this.editorHeight;else if(this.cropperState){var e=this.cropperState,i=this.getScaledImageDimensions().width/e.imageDimensions.width;t.width=e.width*i*this.zoomRatio,t.height=e.height*i*this.zoomRatio,this.image.set({left:this.editorWidth/2-e.offsetX*i,top:this.editorHeight/2-e.offsetY*i})}else $.extend(t,this.getScaledImageDimensions());this.viewport.set(t)}},_repositionFocalPoint:function(t){if(this.focalPoint){var e=this.focalPoint.left-this.editorWidth/2,i=this.focalPoint.top-this.editorHeight/2,s=this.image.width,n=this.getScaledImageDimensions().width*this.zoomRatio/s/this.scaleFactor;e-=(t.width-this.editorWidth)/2,i-=(t.height-this.editorHeight)/2,e*=n,i*=n,this.focalPoint.set({left:this.editorWidth/2+e,top:this.editorHeight/2+i})}},hasOrientationChanged:function(){return this.viewportRotation%180!=0},getScaledImageDimensions:function(){var t=this.originalHeight/this.originalWidth,e={};return this.editorHeight/this.editorWidth<t?(e.height=Math.min(this.editorHeight,this.originalHeight),e.width=Math.round(this.originalWidth/(this.originalHeight/e.height))):(e.width=Math.min(this.editorWidth,this.originalWidth),e.height=Math.round(this.originalHeight*(e.width/this.originalWidth))),e},_zoomImage:function(){var t=this.getScaledImageDimensions();this.image.set({width:t.width*this.zoomRatio,height:t.height*this.zoomRatio})},_addControlListeners:function(){this.addListener(this.$tabs,"click","_handleTabClick"),this.addListener($(".focal-point"),"click",function(t){this.toggleFocalPoint(t)}.bind(this)),this.addListener($(".rotate-left"),"click",function(){this.rotateImage(-90)}.bind(this)),this.addListener($(".rotate-right"),"click",function(){this.rotateImage(90)}.bind(this)),this.addListener($(".flip-vertical"),"click",function(){this.flipImage("y")}.bind(this)),this.addListener($(".flip-horizontal"),"click",function(){this.flipImage("x")}.bind(this)),this.straighteningInput=new Craft.SlideRuleInput("slide-rule",{onStart:function(){this._showGrid()}.bind(this),onChange:function(t){this.straighten(t)}.bind(this),onEnd:function(){this._hideGrid(),this._cleanupFocalPointAfterStraighten()}.bind(this)}),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!0)}.bind(this)),this.addListener(Garnish.$doc,"keyup",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!1)}.bind(this)),new Garnish.MenuBtn($(".crop .menubtn",this.$container),{onOptionSelect:function(t){$(".constraint",this.$container).html($(t).html()),this.setCroppingConstraint($(t).data("constraint")),this.enforceCroppingConstraint()}.bind(this)}).menu.$container.addClass("dark")},_handleTabClick:function(t){if(!this.animationInProgress){var e=$(t.currentTarget),i=e.data("view");this.$tabs.removeClass("selected"),e.addClass("selected"),this.showView(i)}},showView:function(t){this.currentView!==t&&(this.$views.addClass("hidden"),this.$views.filter('[data-view="'+t+'"]').removeClass("hidden"),"rotate"===t?this.enableSlider():this.disableSlider(),this.updateSizeAndPosition(),"crop"===this.currentView&&"crop"!==t?this.disableCropMode():"crop"!==this.currentView&&"crop"===t&&this.enableCropMode(),this.currentView=t)},storeCropperState:function(t){if(t)this.cropperState=t;else if(this.clipper){var e=1/this.zoomRatio;this.cropperState={offsetX:(this.clipper.left-this.image.left)*e,offsetY:(this.clipper.top-this.image.top)*e,height:this.clipper.height*e,width:this.clipper.width*e,imageDimensions:this.getScaledImageDimensions()}}else{var i=this.getScaledImageDimensions();this.cropperState={offsetX:0,offsetY:0,height:i.height,width:i.width,imageDimensions:i}}},storeFocalPointState:function(t){if(t)this.focalPointState=t;else if(this.focalPoint){var e=1/this.zoomRatio;this.focalPointState={offsetX:(this.focalPoint.left-this.image.left)*e/this.scaleFactor,offsetY:(this.focalPoint.top-this.image.top)*e/this.scaleFactor,imageDimensions:this.getScaledImageDimensions()}}},rotateImage:function(e){if(!this.animationInProgress){if(90!==e&&-90!==e)return!1;this.animationInProgress=!0,this.viewportRotation+=e,this.viewportRotation=parseInt((this.viewportRotation+360)%360,10);var t,i=this.image.angle+e,s=this.getScaledImageDimensions();t=this.hasOrientationChanged()?this.getZoomToCoverRatio({height:s.width,width:s.height}):this.getZoomToCoverRatio(s),this.zoomRatio>t&&(t=this.zoomRatio);var n={angle:90===e?"+=90":"-=90"},a={angle:i,width:s.width*t,height:s.height*t},r=1;this.scaleFactor<1?(r=1/this.scaleFactor,this.scaleFactor=1):(this.viewport.width>this.editorHeight?r=this.editorHeight/this.viewport.width:this.viewport.height>this.editorWidth&&(r=this.editorWidth/this.viewport.height),this.scaleFactor=r),r<1&&(a.width*=r,a.height*=r);var o=this.cropperState,l=o.offsetX,h=o.offsetY,d=e*(Math.PI/180),c=l*Math.cos(d)-h*Math.sin(d),u=l*Math.sin(d)+h*Math.cos(d),p=s.width/o.imageDimensions.width,g=c*p*this.zoomRatio*this.scaleFactor,f=u*p*this.zoomRatio*this.scaleFactor;a.left=this.editorWidth/2-g,a.top=this.editorHeight/2-f,o.offsetX=c,o.offsetY=u;var m=o.width;o.width=o.height,o.height=m,this.storeCropperState(o),this.focalPoint&&this.canvas.remove(this.focalPoint),this.viewport.animate(n,{duration:this.settings.animationDuration,onComplete:function(){var t=this.viewport.height*r;this.viewport.height=this.viewport.width*r,this.viewport.width=t,this.viewport.set({angle:0})}.bind(this)}),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){var t=parseFloat((this.image.angle+360)%360);this.image.set({angle:t}),this.animationInProgress=!1,this.focalPoint?(this._adjustFocalPointByAngle(e),this.straighten(this.straighteningInput),this.canvas.add(this.focalPoint)):this._resetFocalPointPosition()}.bind(this)})}},flipImage:function(t){if(!this.animationInProgress){this.animationInProgress=!0,this.hasOrientationChanged()&&(t="y"===t?"x":"y"),this.focalPoint?this.canvas.remove(this.focalPoint):this._resetFocalPointPosition();var e=this.editorWidth/2,i=this.editorHeight/2;this.straighteningInput.setValue(-this.imageStraightenAngle),this.imageStraightenAngle=-this.imageStraightenAngle;var s,n,a={angle:this.viewportRotation+this.imageStraightenAngle},r=this.cropperState,o=this.focalPointState;"y"===t&&this.hasOrientationChanged()||"y"!==t&&!this.hasOrientationChanged()?(r.offsetX=-r.offsetX,o.offsetX=-o.offsetX,n=this.image.left-e,a.left=e-n):(r.offsetY=-r.offsetY,o.offsetY=-o.offsetY,s=this.image.top-i,a.top=i-s),"y"===t?(a.scaleY=-1*this.image.scaleY,this.flipData.y=1-this.flipData.y):(a.scaleX=-1*this.image.scaleX,this.flipData.x=1-this.flipData.x),this.storeCropperState(r),this.storeFocalPointState(o),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){this.animationInProgress=!1,this.focalPoint&&(this._adjustFocalPointByAngle(0),this.canvas.add(this.focalPoint))}.bind(this)})}},straighten:function(t){if(!this.animationInProgress){this.animationInProgress=!0;var e=this.image.angle;this.imageStraightenAngle=(this.settings.allowDegreeFractions?parseFloat(t.value):Math.round(parseFloat(t.value)))%360,this.image.set({angle:this.viewportRotation+this.imageStraightenAngle}),this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,this._zoomImage(),this.cropperState&&this._adjustEditorElementsOnStraighten(e),this.renderImage(),this.animationInProgress=!1}},_adjustEditorElementsOnStraighten:function(t){var e,i,s,n,a,r=this.getScaledImageDimensions(),o=this.image.angle-t,l=this.cropperState,h=this.zoomRatio,d=1;do{var c=l.offsetX,u=l.offsetY,p=o*(Math.PI/180);s=c*Math.cos(p)-u*Math.sin(p),n=c*Math.sin(p)+u*Math.cos(p),e=s*h*(a=r.width/l.imageDimensions.width),i=n*h*a;var g=this.getImageVerticeCoords(h),f={width:this.viewport.width,height:this.viewport.height,left:this.editorWidth/2-this.viewport.width/2+e,top:this.editorHeight/2-this.viewport.height/2+i};h*=d=this._getZoomRatioToFitRectangle(f,g)}while(1!==d);this.image.set({left:this.editorWidth/2-e,top:this.editorHeight/2-i}),l.offsetX=s,l.offsetY=n,l.width=this.viewport.width/h/a,l.height=this.viewport.height/h/a,this.storeCropperState(l),this.zoomRatio=h,this.focalPoint?(this._adjustFocalPointByAngle(o),this._isCenterInside(this.focalPoint,this.viewport)?this.focalPoint.set({opacity:1}):this.focalPoint.set({opacity:0})):0!=o&&this._resetFocalPointPosition(),this._zoomImage()},_cleanupFocalPointAfterStraighten:function(){if(this.focalPoint&&!this._isCenterInside(this.focalPoint,this.viewport)){this.focalPoint.set({opacity:1});var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t),this.toggleFocalPoint()}},_resetFocalPointPosition:function(){var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t)},_isCenterInside:function(t,e){return t.left>e.left-e.width/2&&t.top>e.top-e.height/2&&t.left<e.left+e.width/2&&t.top<e.top+e.height/2},_adjustFocalPointByAngle:function(t){var e=t*(Math.PI/180),i=this.focalPointState,s=i.offsetX,n=i.offsetY,a=s*Math.cos(e)-n*Math.sin(e),r=s*Math.sin(e)+n*Math.cos(e),o=this.getScaledImageDimensions().width/i.imageDimensions.width,l=a*o*this.zoomRatio,h=r*o*this.zoomRatio;this.focalPoint.left=this.image.left+l,this.focalPoint.top=this.image.top+h,i.offsetX=a,i.offsetY=r,this.storeFocalPointState(i)},_getZoomRatioToFitRectangle:function(t,e){for(var i,s,n=this._getRectangleVertices(t),a=0;a<n.length&&(i=n[a],this.arePointsInsideRectangle([i],e));a++)i=!1;if(i){var r=this._getEdgeCrossed(e,i),o=t.left+t.width/2,l=t.top+t.height/2,h=Math.abs((r[1].y-r[0].y)*i.x-(r[1].x-r[0].x)*i.y+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2)),d=Math.abs((r[1].y-r[0].y)*o-(r[1].x-r[0].x)*l+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2));s=(h+d)/d}else s=1;return s},saveImage:function(t){var e=$(t.currentTarget);if(e.hasClass("disabled"))return!1;$(".btn",this.$buttons).addClass("disabled"),this.$buttons.append('<div class="spinner"></div>');var i={assetId:this.assetId,viewportRotation:this.viewportRotation,imageRotation:this.imageStraightenAngle,replace:e.hasClass("replace")?1:0};if(this.cropperState){var s={};s.height=this.cropperState.height,s.width=this.cropperState.width,s.offsetX=this.cropperState.offsetX,s.offsetY=this.cropperState.offsetY,i.imageDimensions=this.cropperState.imageDimensions,i.cropData=s}else i.imageDimensions=this.getScaledImageDimensions();this.focalPoint&&(i.focalPoint=this.focalPointState),i.flipData=this.flipData,i.zoom=this.zoomRatio,Craft.postActionRequest("assets/save-image",i,function(t){this.$buttons.find(".btn").removeClass("disabled").end().find(".spinner").remove(),t.error?alert(t.error):(this.onSave(),this.hide(),Craft.cp.runQueue())}.bind(this))},getZoomToCoverRatio:function(t){var e=Math.abs(this.imageStraightenAngle)*(Math.PI/180),i=Math.sin(e)*t.height+Math.cos(e)*t.width,s=Math.sin(e)*t.width+Math.cos(e)*t.height;return Math.max(i/t.width,s/t.height)},getZoomToFitRatio:function(t){var e=this._getImageBoundingBox(t),i=1;if(e.height>this.editorHeight||e.width>this.editorWidth){var s=this.editorHeight/e.height,n=this.editorWidth/e.width;i=Math.min(n,s)}return i},getCombinedZoomRatio:function(t){return this.getZoomToCoverRatio(t)/this.getZoomToFitRatio(t)},_showGrid:function(){if(!this.grid){var t,e={strokeWidth:1,stroke:"rgba(255,255,255,0.5)"},i=this.viewport.width,s=this.viewport.height,n=i/9,a=s/9,r=[new fabric.Rect({strokeWidth:2,stroke:"rgba(255,255,255,1)",originX:"center",originY:"center",width:i,height:s,left:i/2,top:s/2,fill:"rgba(255,255,255,0)"})];for(t=1;t<=8;t++)r.push(new fabric.Line([t*n,0,t*n,s],e));for(t=1;t<=8;t++)r.push(new fabric.Line([0,t*a,i,t*a],e));this.grid=new fabric.Group(r,{left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",angle:this.viewport.angle}),this.canvas.add(this.grid),this.renderImage()}},_hideGrid:function(){this.canvas.remove(this.grid),this.grid=null,this.renderImage()},onFadeOut:function(){this.removeListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.removeListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.removeListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.removeListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this.destroy()},show:function(){this.base(),$("html").addClass("noscroll")},hide:function(){this.removeAllListeners(),this.straighteningInput.removeAllListeners(),$("html").removeClass("noscroll"),this.base()},onSave:function(){this.settings.onSave(),this.trigger("save")},enableSlider:function(){this.$imageTools.removeClass("hidden")},disableSlider:function(){this.$imageTools.addClass("hidden")},enableCropMode:function(){var t=this.getScaledImageDimensions();this.zoomRatio=this.getZoomToFitRatio(t);var e={width:this.editorWidth,height:this.editorHeight},i={width:t.width*this.zoomRatio,height:t.height*this.zoomRatio,left:this.editorWidth/2,top:this.editorHeight/2},s=function(){this._setFittedImageVerticeCoordinates();var t=this.cropperState,e=this.getScaledImageDimensions(),i=e.width/t.imageDimensions.width,s={left:this.image.left+t.offsetX*i*this.zoomRatio,top:this.image.top+t.offsetY*i*this.zoomRatio,width:t.width*i*this.zoomRatio,height:t.height*i*this.zoomRatio};this._showCropper(s),this.focalPoint&&(i=e.width/this.focalPointState.imageDimensions.width,this.focalPoint.left=this.image.left+this.focalPointState.offsetX*i*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*i*this.zoomRatio,this.canvas.add(this.focalPoint))}.bind(this);this._editorModeTransition(s,i,e)},disableCropMode:function(){var t={},e={left:this.editorWidth/2,top:this.editorHeight/2};this._hideCropper();var i=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,s=i/this.zoomRatio;this.zoomRatio=i;var n=(this.clipper.left-this.image.left)*s,a=(this.clipper.top-this.image.top)*s;e.left=this.editorWidth/2-n,e.top=this.editorHeight/2-a,t.height=this.clipper.height*s,t.width=this.clipper.width*s,this.focalPoint&&(!this.focalPoint||this._isCenterInside(this.focalPoint,this.clipper))||(this.focalPoint&&this.toggleFocalPoint(),this._resetFocalPointPosition());var r=function(){if(this.focalPoint){var t=this.getScaledImageDimensions().width/this.focalPointState.imageDimensions.width;this.focalPoint.left=this.image.left+this.focalPointState.offsetX*t*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*t*this.zoomRatio,this.canvas.add(this.focalPoint)}}.bind(this);this._editorModeTransition(r,e,t)},_editorModeTransition:function(t,e,i){this.animationInProgress||(this.animationInProgress=!0,this.focalPoint&&(this.canvas.remove(this.focalPoint),this.renderImage()),this.image.animate(e,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){t(),this.animationInProgress=!1,this.renderImage()}.bind(this)}),this.viewport.animate(i,{duration:this.settings.animationDuration}))},_showSpinner:function(){this.$spinnerCanvas=$('<canvas id="spinner-canvas"></canvas>').appendTo($(".image",this.$container));var i=document.getElementById("spinner-canvas").getContext("2d"),s=new Date,n=i.canvas.width,a=i.canvas.height;this.spinnerInterval=window.setInterval(function(){var t=parseInt((new Date-s)/1e3*16)/16;i.save(),i.clearRect(0,0,n,a),i.translate(n/2,a/2),i.rotate(2*Math.PI*t);for(var e=0;e<16;e++)i.beginPath(),i.rotate(2*Math.PI/16),i.moveTo(n/10,0),i.lineTo(n/4,0),i.lineWidth=n/30,i.strokeStyle="rgba(255,255,255,"+e/16+")",i.stroke();i.restore()},1e3/30)},_hideSpinner:function(){window.clearInterval(this.spinnerInterval),this.$spinnerCanvas.remove(),this.$spinnerCanvas=null},_showCropper:function(t){this._setupCropperLayer(t),this._redrawCropperElements(),this.renderCropper()},_hideCropper:function(){this.clipper&&(this.croppingCanvas.remove(this.clipper),this.croppingCanvas.remove(this.croppingShade),this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle),this.croppingCanvas=null,this.renderCropper=null)},_setupCropperLayer:function(t){this.croppingCanvas=new fabric.StaticCanvas("cropping-canvas",{backgroundColor:"rgba(0,0,0,0)",hoverCursor:"default",selection:!1}),this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight}),this.renderCropper=function(){Garnish.requestAnimationFrame(this.croppingCanvas.renderAll.bind(this.croppingCanvas))}.bind(this),$("#cropping-canvas",this.$editorContainer).css({position:"absolute",top:0,left:0}),this.croppingShade=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:this.editorWidth,height:this.editorHeight,fill:"rgba(0,0,0,0.7)"});var e=this.getScaledImageDimensions(),i=0===this.imageStraightenAngle?1:1.2*this.getCombinedZoomRatio(e),s=e.width/i,n=e.height/i;if(this.hasOrientationChanged()){var a=n;n=s,s=a}this.clipper=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:s,height:n,stroke:"black",fill:"rgba(128,0,0,1)",strokeWidth:0}),t&&this.clipper.set(t),this.clipper.globalCompositeOperation="destination-out",this.croppingCanvas.add(this.croppingShade),this.croppingCanvas.add(this.clipper)},_redrawCropperElements:function(){this.cropperHandles&&(this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle));var t={strokeWidth:4,stroke:"rgb(255,255,255)",fill:!1},e={strokeWidth:2,stroke:"rgba(255,255,255,0.5)"},i=[new fabric.Path("M 0,10 L 0,0 L 10,0",t),new fabric.Path("M "+(this.clipper.width-8)+",0 L "+(this.clipper.width+4)+",0 L "+(this.clipper.width+4)+",10",t),new fabric.Path("M "+(this.clipper.width+4)+","+(this.clipper.height-8)+" L"+(this.clipper.width+4)+","+(this.clipper.height+4)+" L "+(this.clipper.width-8)+","+(this.clipper.height+4),t),new fabric.Path("M 10,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height-8),t)];this.cropperHandles=new fabric.Group(i,{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingRectangle=new fabric.Rect({left:this.clipper.left,top:this.clipper.top,width:this.clipper.width,height:this.clipper.height,fill:"rgba(0,0,0,0)",stroke:"rgba(255,255,255,0.8)",strokeWidth:2,originX:"center",originY:"center"}),this.cropperGrid=new fabric.Group([new fabric.Line([.33*this.clipper.width,0,.33*this.clipper.width,this.clipper.height],e),new fabric.Line([.66*this.clipper.width,0,.66*this.clipper.width,this.clipper.height],e),new fabric.Line([0,.33*this.clipper.height,this.clipper.width,.33*this.clipper.height],e),new fabric.Line([0,.66*this.clipper.height,this.clipper.width,.66*this.clipper.height],e)],{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingCanvas.add(this.cropperHandles),this.croppingCanvas.add(this.cropperGrid),this.croppingCanvas.add(this.croppingRectangle)},_repositionCropper:function(t){if(this.croppingCanvas){var e=this.clipper.left-this.croppingCanvas.width/2,i=this.clipper.top-this.croppingCanvas.height/2;this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var s=this._getBoundingRectangle(this.imageVerticeCoords).width/t.width;this.clipper.width=Math.round(this.clipper.width*s),this.clipper.height=Math.round(this.clipper.height*s),this.clipper.left=this.editorWidth/2+e*s,this.clipper.top=this.editorHeight/2+i*s,this.croppingShade.set({width:this.editorWidth,height:this.editorHeight,left:this.editorWidth/2,top:this.editorHeight/2}),this._redrawCropperElements(),this.renderCropper()}},_getBoundingRectangle:function(t){return{width:Math.max(t.a.x,t.b.x,t.c.x,t.d.x)-Math.min(t.a.x,t.b.x,t.c.x,t.d.x),height:Math.max(t.a.y,t.b.y,t.c.y,t.d.y)-Math.min(t.a.y,t.b.y,t.c.y,t.d.y)}},_handleMouseDown:function(t){var e=this.focalPoint&&this._isMouseOver(t,this.focalPoint),i=this.croppingCanvas&&this._isMouseOver(t,this.clipper),s=this.croppingCanvas&&this._cropperHandleHitTest(t);(s||i||e)&&(this.previousMouseX=t.pageX,this.previousMouseY=t.pageY,e?this.draggingFocal=!0:s?this.scalingCropper=s:i&&(this.draggingCropper=!0))},_handleMouseMove:function(t){this.focalPoint&&this.draggingFocal?(this._handleFocalDrag(t),this.storeFocalPointState(),this.renderImage()):this.draggingCropper||this.scalingCropper?(this.draggingCropper?this._handleCropperDrag(t):this._handleCropperResize(t),this._redrawCropperElements(),this.storeCropperState(),this.renderCropper()):this._setMouseCursor(t),this.previousMouseX=t.pageX,this.previousMouseY=t.pageY},_handleMouseUp:function(t){this.draggingCropper=!1,this.scalingCropper=!1,this.draggingFocal=!1},_handleCropperDrag:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0!=e||0!=i){var s={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height},n=this._getRectangleVertices(s,e,i);this.arePointsInsideRectangle(n,this.imageVerticeCoords)&&this.clipper.set({left:this.clipper.left+e,top:this.clipper.top+i})}},_handleFocalDrag:function(t){if(this.focalPoint){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0==e&&0==i)return;var s=this.focalPoint.left+e,n=this.focalPoint.top+i;if("crop"===this.currentView){if(!this.arePointsInsideRectangle([{x:s,y:n}],this.imageVerticeCoords))return}else if(!(this.viewport.left-this.viewport.width/2-s<0&&0<this.viewport.left+this.viewport.width/2-s&&this.viewport.top-this.viewport.height/2-n<0&&0<this.viewport.top+this.viewport.height/2-n))return;this.focalPoint.set({left:this.focalPoint.left+e,top:this.focalPoint.top+i})}},setCroppingConstraint:function(t){switch(this.updateSizeAndPosition(),t){case"none":t=!1;break;case"original":t=this.originalWidth/this.originalHeight;break;case"current":t=this.clipper.width/this.clipper.height;break;default:t=parseFloat(t)}this.croppingConstraint=t},enforceCroppingConstraint:function(){if(!this.animationInProgress&&this.croppingConstraint){this.animationInProgress=!0;var t={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.clipper.width>this.clipper.height*this.croppingConstraint){var e=t.height;t.height=this.clipper.width/this.croppingConstraint,t.top-=(t.height-e)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.width=this.clipper.height*this.croppingConstraint,t.height=t.width/this.croppingConstraint)}else{var i=t.width;t.width=this.clipper.height*this.croppingConstraint,t.left-=(t.width-i)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.height=this.clipper.width/this.croppingConstraint,t.width=t.height*this.croppingConstraint)}var s={height:t.height,width:t.width};this.clipper.animate(s,{onChange:function(){this._redrawCropperElements(),this.croppingCanvas.renderAll()}.bind(this),duration:this.settings.animationDuration,onComplete:function(){this._redrawCropperElements(),this.animationInProgress=!1,this.renderCropper()}.bind(this)})}},_handleCropperResize:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY,s=0,n=0;if("b"!==this.scalingCropper&&"t"!==this.scalingCropper||(e=0),"l"!==this.scalingCropper&&"r"!==this.scalingCropper||(i=0),0!==e||0!==i){var a={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.croppingConstraint){var r=0;switch(this.scalingCropper){case"t":r=-i;break;case"b":r=i;break;case"r":r=e;break;case"l":r=-e;break;case"tr":r=-i+e;break;case"tl":r=-i-e;break;case"br":r=i+e;break;case"bl":r=i-e}1<this.croppingConstraint?i=(e=r)/this.croppingConstraint:e=(i=r)*this.croppingConstraint,a.height+=i,a.width+=e,this.scalingCropper.match(/t/)&&(a.top-=i,a.left-=e/2,s=-i/2),this.scalingCropper.match(/b/)&&(a.left+=-e/2,s=i/2),this.scalingCropper.match(/r/)&&(a.top+=-i/2,n=e/2),this.scalingCropper.match(/l/)&&(a.top-=i/2,a.left-=e,n=-e/2)}else{if(this.shiftKeyHeld&&("tl"===this.scalingCropper||"tr"===this.scalingCropper||"bl"===this.scalingCropper||"br"===this.scalingCropper))Math.abs(e)>Math.abs(i)?(i=e/(this.clipper.width/this.clipper.height),i*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1):(e=i*(this.clipper.width/this.clipper.height),e*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1);this.scalingCropper.match(/t/)&&(a.top+=i,a.height-=i),this.scalingCropper.match(/b/)&&(a.height+=i),this.scalingCropper.match(/r/)&&(a.width+=e),this.scalingCropper.match(/l/)&&(a.left+=e,a.width-=e),s=i/2,n=e/2}a.height<30||a.width<30||this.arePointsInsideRectangle(this._getRectangleVertices(a),this.imageVerticeCoords)&&(this.clipper.set({top:this.clipper.top+s,left:this.clipper.left+n,width:a.width,height:a.height}),this._redrawCropperElements())}},_setMouseCursor:function(t){var e="default",i=this.croppingCanvas&&this._cropperHandleHitTest(t);this.focalPoint&&this._isMouseOver(t,this.focalPoint)?e="pointer":i?"t"===i||"b"===i?e="ns-resize":"l"===i||"r"===i?e="ew-resize":"tl"===i||"br"===i?e="nwse-resize":"bl"!==i&&"tr"!==i||(e="nesw-resize"):this.croppingCanvas&&this._isMouseOver(t,this.clipper)&&(e="move"),$(".body").css("cursor",e)},_cropperHandleHitTest:function(t){var e=this.$croppingCanvas.offset(),i=t.pageX-e.left,s=t.pageY-e.top,n=this.clipper.left-this.clipper.width/2,a=n+this.clipper.width,r=this.clipper.top-this.clipper.height/2,o=r+this.clipper.height;if(i<10+n&&n-3<i){if(s<10+r&&r-3<s)return"tl";if(s<o+3&&o-10<s)return"bl"}if(a-13<i&&i<a+3){if(s<10+r&&r-3<s)return"tr";if(s<o+2&&o-10<s)return"br"}return i<3+n&&n-3<i&&s<o-10&&10+r<s?"l":i<a+1&&a-5<i&&s<o-10&&10+r<s?"r":s<4+r&&r-2<s&&10+n<i&&i<a-10?"t":s<o+2&&o-4<s&&10+n<i&&i<a-10&&"b"},_isMouseOver:function(t,e){var i=this.$croppingCanvas.offset(),s=t.pageX-i.left,n=t.pageY-i.top,a=e.left-e.width/2,r=a+e.width,o=e.top-e.height/2,l=o+e.height;return a<=s&&s<=r&&o<=n&&n<=l},_getRectangleVertices:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var s={x:t.left+e,y:t.top+i},n={x:s.x+t.width,y:s.y},a={x:n.x,y:n.y+t.height};return[s,n,a,{x:s.x,y:a.y}]},_setFittedImageVerticeCoordinates:function(){this.imageVerticeCoords=this.getImageVerticeCoords("fit")},getImageVerticeCoords:function(t){var e,i=-1*((this.hasOrientationChanged()?90:0)+this.imageStraightenAngle)*(Math.PI/180),s=this.getScaledImageDimensions();e="number"==typeof t?t:"cover"===t?this.getZoomToCoverRatio(s):this.getZoomToFitRatio(s);var n=s.height*e,a=s.width*e,r=Math.cos(i)*n,o=Math.sin(i)*a,l=Math.cos(i)*a,h=Math.sin(i)*n,d=(this.editorHeight-(r+o))/2,c=(this.editorWidth-(h+l))/2;return{a:{x:c+l,y:d},b:{x:this.editorWidth-c,y:d+r},c:{x:c+h,y:this.editorHeight-d},d:{x:c,y:d+o}}},_debug:function(t){this.canvas.remove(this.debugger),this.debugger=t,this.canvas.add(this.debugger)},arePointsInsideRectangle:function(t,e){for(var i=this._getVector(e.a,e.b),s=this._getVector(e.b,e.c),n=this._getScalarProduct(i,i),a=this._getScalarProduct(s,s),r=0;r<t.length;r++){var o=t[r],l=this._getVector(e.a,o),h=this._getVector(e.b,o),d=this._getScalarProduct(i,l),c=this._getScalarProduct(s,h);if(!(0<=d&&d<=n)||!(0<=c&&c<=a))return!1}return!0},_getVector:function(t,e){return{x:e.x-t.x,y:e.y-t.y}},_getScalarProduct:function(t,e){return t.x*e.x+t.y*e.y},_getVectorMagnitude:function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},_getAngleBetweenVectors:function(t,e){return Math.round(180*Math.acos(Math.min(1,this._getScalarProduct(t,e)/(this._getVectorMagnitude(t)*this._getVectorMagnitude(e))))/Math.PI*100)/100},_getEdgeCrossed:function(t,e){for(var i=[[t.a,t.b],[t.b,t.c],[t.c,t.d],[t.d,t.a]],s={x:this.editorWidth/2,y:this.editorHeight/2},n=180,a=null,r=0;r<i.length;r++){var o=i[r],l=this._getVector(o[0],s),h=this._getVector(o[0],o[1]),d=this._getVector(o[0],e),c=Math.abs(this._getAngleBetweenVectors(l,d)-(this._getAngleBetweenVectors(l,h)+this._getAngleBetweenVectors(h,d)));c<n&&(n=c,a=o)}return a},_getImageBoundingBox:function(t){var e={},i=Math.abs(this.imageStraightenAngle)*(Math.PI/180),s=t.height/t.width;if(e.height=t.width*(Math.sin(i)+Math.cos(i)*s),e.width=t.width*(Math.cos(i)+Math.sin(i)*s),this.hasOrientationChanged()){var n=e.width;e.width=e.height,e.height=n}return e}},{defaults:{animationDuration:100,allowSavingAsNew:!0,onSave:$.noop,allowDegreeFractions:!0}}),Craft.AssetIndex=Craft.BaseElementIndex.extend({$includeSubfoldersContainer:null,$includeSubfoldersCheckbox:null,showingIncludeSubfoldersCheckbox:!1,$uploadButton:null,$uploadInput:null,$progressBar:null,$folders:null,uploader:null,promptHandler:null,progressBar:null,_uploadTotalFiles:0,_uploadFileProgress:{},_uploadedAssetIds:[],_currentUploaderSettings:{},_assetDrag:null,_folderDrag:null,_expandDropTargetFolderTimeout:null,_tempExpandedFolders:[],_fileConflictTemplate:{choices:[{value:"keepBoth",title:Craft.t("app","Keep both")},{value:"replace",title:Craft.t("app","Replace it")}]},_folderConflictTemplate:{choices:[{value:"replace",title:Craft.t("app","Replace the folder (all existing files will be deleted)")},{value:"merge",title:Craft.t("app","Merge the folder (any conflicting files will be replaced)")}]},init:function(t,e,i){this.base(t,e,i),"index"===this.settings.context?(this._folderDrag||this._initIndexPageMode(),this.addListener(Garnish.$win,"resize,scroll","_positionProgressBar")):(this.addListener(this.$main,"scroll","_positionProgressBar"),this.settings.modal&&this.settings.modal.on("updateSizeAndPosition",$.proxy(this,"_positionProgressBar")))},initSources:function(){return"index"!==this.settings.context||this._folderDrag||this._initIndexPageMode(),this.base()},initSource:function(t){this.base(t),this._createFolderContextMenu(t),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&t.data("folder-id")&&this._folderDrag.addItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},deinitSource:function(t){this.base(t);var e=t.data("contextmenu");e&&e.destroy(),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&this._folderDrag.removeItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},_getSourceLevel:function(t){return t.parentsUntil("nav","ul").length},_initIndexPageMode:function(){if(!this._folderDrag){this.settings.selectable=!0,this.settings.multiSelect=!0;var t=$.proxy(this,"_onDragStart"),e=$.proxy(this,"_onDropTargetChange");this._assetDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){return this.view.getSelectedElements()},this),helper:$.proxy(function(t){return this._getFileDragHelper(t)},this),dropTargets:$.proxy(function(){for(var t=[],e=0;e<this.$sources.length;e++){var i=this.$sources.eq(e);this._getFolderUidFromSourceKey(i.data("key"))&&t.push(i)}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFileDragStop")}),this._folderDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){for(var t=this.sourceSelect.getSelectedItems(),e=[],i=0;i<t.length;i++){var s=t.eq(i);!this._getFolderUidFromSourceKey(s.data("key"))||s.hasClass("sel")&&1<this._getSourceLevel(s)&&e.push(s.parent()[0])}return $(e)},this),helper:$.proxy(function(t){var e=$('<div class="sidebar" style="padding-top: 0; padding-bottom: 0;"/>'),i=$("<nav/>").appendTo(e),s=$("<ul/>").appendTo(i);return t.appendTo(s).removeClass("expanded"),t.children("a").addClass("sel"),t.css({"padding-top":this._folderDrag.$draggee.css("padding-top"),"padding-right":this._folderDrag.$draggee.css("padding-right"),"padding-bottom":this._folderDrag.$draggee.css("padding-bottom"),"padding-left":this._folderDrag.$draggee.css("padding-left")}),e},this),dropTargets:$.proxy(function(){var t=[],e=[];this._folderDrag.$draggee.find("a[data-key]").each(function(){e.push($(this).data("key"))});for(var i=0;i<this.$sources.length;i++){var s=this.$sources.eq(i),n=s.data("key");this._getFolderUidFromSourceKey(n)&&(Craft.inArray(n,e)||t.push(s))}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFolderDragStop")})}},_onFileDragStop:function(){if(this._assetDrag.$activeDropTarget&&this._assetDrag.$activeDropTarget[0]!==this.$source[0]){for(var r=this.$source,o=this._assetDrag.$activeDropTarget.data("folder-id"),l=[],t=0;t<this._assetDrag.$draggee.length;t++){var e=Craft.getElementInfo(this._assetDrag.$draggee[t]).id;l.push(e)}if(l.length){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(l.length),this.progressBar.showProgressBar();var i=[];for(t=0;t<l.length;t++)i.push({action:"assets/move-asset",params:{assetId:l[t],folderId:o}});var h=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var i=t[e];i.conflict&&this.promptHandler.addPrompt({assetId:i.assetId,suggestedFilename:i.suggestedFilename,prompt:{message:i.conflict,choices:this._fileConflictTemplate.choices}}),i.error&&alert(i.error)}this.setIndexAvailable(),this.progressBar.hideProgressBar();function s(){this.sourceSelect.selectItem(r),this._totalVisible-=this._assetDrag.$draggee.length;for(var t=0;t<l.length;t++)$("[data-id="+l[t]+"]").remove();this.view.deselectAllElements(),this._collapseExtraExpandedFolders(o),n&&this.updateElements()}var n=!1;if(this.promptHandler.getPromptCount()){var a=$.proxy(function(t){for(var e=[],i=0;i<t.length;i++)"cancel"!==t[i].choice?("keepBoth"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,filename:t[i].suggestedFilename}}),"replace"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,force:!0}})):n=!0;0===e.length?s.apply(this):(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,h))},this);this._assetDrag.fadeOutHelpers(),this.promptHandler.showBatchPrompts(a)}else s.apply(this),this._assetDrag.fadeOutHelpers()},this);return void this._performBatchRequests(i,h)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._assetDrag.returnHelpersToDraggees()},_onFolderDragStop:function(){if(this._folderDrag.$activeDropTarget&&0===this._folderDrag.$activeDropTarget.siblings("ul").children("li").filter(this._folderDrag.$draggee).length){var t=this._folderDrag.$activeDropTarget.data("folder-id");this._collapseExtraExpandedFolders(t);for(var a=[],e=0;e<this._folderDrag.$draggee.length;e++){var i=this._folderDrag.$draggee.eq(e).children("a").data("folder-id");if(i!=t){a.push(i);break}}if(a.length){a.sort(),a.reverse(),this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(a.length),this.progressBar.showProgressBar();var s=[];for(e=0;e<a.length;e++)s.push({action:"assets/move-folder",params:{folderId:a[e],parentId:t}});this.requestId++;var r=[],o="",l=function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var n=t[e];n.success&&(n.transferList&&(r=n.transferList),n.newFolderId&&(o=this._folderDrag.$activeDropTarget.data("key")+"/folder:"+n.newFolderUid)),n.conflict&&(n.prompt={message:n.conflict,choices:this._folderConflictTemplate.choices},this.promptHandler.addPrompt(n)),n.error&&alert(n.error)}if(this.promptHandler.getPromptCount()){var i=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=[],i={},s=0;s<t.length;s++)"cancel"!==t[s].choice&&("replace"===t[s].choice&&(i.force=!0),"merge"===t[s].choice&&(i.merge=!0),i.folderId=n.folderId,i.parentId=n.parentId,e.push({action:"assets/move-folder",params:i}));0===e.length?$.proxy(this,"_performActualFolderMove",r,a,o)():(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,l))},this);this.promptHandler.showBatchPrompts(i),this.setIndexAvailable(),this.progressBar.hideProgressBar()}else $.proxy(this,"_performActualFolderMove",r,a,o)()}.bind(this);return void this._performBatchRequests(s,l)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._folderDrag.returnHelpersToDraggees()},_performActualFolderMove:function(t,e,n){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(1),this.progressBar.showProgressBar();var i=function(t){for(var e=0,i=t.length,s=0;s<t.length;s++)Craft.postActionRequest("assets/delete-folder",{folderId:t[s]},function(){++e===i&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._folderDrag.returnHelpersToDraggees(),this.setInstanceState("selectedSource",n),this.refreshSources())}.bind(this))}.bind(this);if(0<t.length){for(var s=[],a=0;a<t.length;a++)s.push({action:"assets/move-asset",params:t[a]});this._performBatchRequests(s,function(){i(e)})}else i(e)},_getParentSource:function(t){if(1<this._getSourceLevel(t))return t.parent().parent().siblings("a")},_selectSourceByFolderId:function(t){for(var e=this._getSourceByKey(t),i=e.parent().parents("li"),s=0;s<i.length;s++){var n=$(i[s]);n.hasClass("expanded")||n.children(".toggle").trigger("click")}this.selectSource(e),this.updateElements()},afterInit:function(){this.$uploadButton||(this.$uploadButton=$('<div class="btn submit" data-icon="upload" style="position: relative; overflow: hidden;" role="button">'+Craft.t("app","Upload files")+"</div>"),this.addButton(this.$uploadButton),this.$uploadInput=$('<input type="file" multiple="multiple" name="assets-upload" />').hide().insertBefore(this.$uploadButton)),this.promptHandler=new Craft.PromptHandler,this.progressBar=new Craft.ProgressBar(this.$main,!0);var t={url:Craft.getActionUrl("assets/save-asset"),fileInput:this.$uploadInput,dropZone:this.$container};t.events={fileuploadstart:$.proxy(this,"_onUploadStart"),fileuploadprogressall:$.proxy(this,"_onUploadProgress"),fileuploaddone:$.proxy(this,"_onUploadComplete")},this.settings.criteria&&void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),this._currentUploaderSettings=t,this.uploader=new Craft.Uploader(this.$uploadButton,t),this.$uploadButton.on("click",$.proxy(function(){this.$uploadButton.hasClass("disabled")||this.isIndexBusy||this.$uploadButton.parent().find("input[name=assets-upload]").trigger("click")},this)),this.base()},onSelectSource:function(){this._getSourceByKey(this.sourceKey).data("folder-id")&&this.$source.attr("data-upload")?(this.uploader.setParams({folderId:this.$source.attr("data-folder-id")}),this.$uploadButton.removeClass("disabled")):this.$uploadButton.addClass("disabled"),this.base()},_getFolderUidFromSourceKey:function(t){var e=t.match(/\bfolder:([0-9a-f\-]+)$/);return e?e[1]:null},startSearching:function(){if(this.$source.siblings("ul").length){if(null===this.$includeSubfoldersContainer){var t="includeSubfolders-"+Math.floor(1e9*Math.random());this.$includeSubfoldersContainer=$('<div style="margin-bottom: -23px; opacity: 0;"/>').insertAfter(this.$search);var e=$('<div style="padding-top: 5px;"/>').appendTo(this.$includeSubfoldersContainer);this.$includeSubfoldersCheckbox=$('<input type="checkbox" id="'+t+'" class="checkbox"/>').appendTo(e),$('<label class="light smalltext" for="'+t+'"/>').text(" "+Craft.t("app","Search in subfolders")).appendTo(e),this.addListener(this.$includeSubfoldersCheckbox,"change",function(){this.setSelecetedSourceState("includeSubfolders",this.$includeSubfoldersCheckbox.prop("checked")),this.updateElements()})}else this.$includeSubfoldersContainer.velocity("stop");var i=this.getSelectedSourceState("includeSubfolders",!1);this.$includeSubfoldersCheckbox.prop("checked",i),this.$includeSubfoldersContainer.velocity({marginBottom:0,opacity:1},"fast"),this.showingIncludeSubfoldersCheckbox=!0}this.base()},stopSearching:function(){this.showingIncludeSubfoldersCheckbox&&(this.$includeSubfoldersContainer.velocity("stop"),this.$includeSubfoldersContainer.velocity({marginBottom:-23,opacity:0},"fast"),this.showingIncludeSubfoldersCheckbox=!1),this.base()},getViewParams:function(){var t=this.base();return this.showingIncludeSubfoldersCheckbox&&this.$includeSubfoldersCheckbox.prop("checked")&&(t.criteria.includeSubfolders=!0),t},_onUploadStart:function(){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar(),this.promptHandler.resetPrompts()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){var i=e.result,s=e.files[0].name,n=!0;i.success||i.conflict?(this._uploadedAssetIds.push(i.assetId),i.conflict&&(i.prompt={message:Craft.t("app",i.conflict,{file:i.filename}),choices:this._fileConflictTemplate.choices},this.promptHandler.addPrompt(i)),Craft.cp.runQueue()):(i.error?alert(Craft.t("app","Upload failed. The error message was: “{error}”",{error:i.error})):alert(Craft.t("app","Upload failed for {filename}.",{filename:s})),n=!1),this.uploader.isLastUpload()&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this.promptHandler.getPromptCount()?this.promptHandler.showBatchPrompts($.proxy(this,"_uploadFollowup")):n&&this._updateAfterUpload())},_updateAfterUpload:function(){"index"!==this.settings.context&&(this.setSortAttribute("dateModified"),this.setSortDirection("desc")),this.updateElements()},_uploadFollowup:function(t){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.promptHandler.resetPrompts();var e=function(){this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._updateAfterUpload()}.bind(this);this.progressBar.setItemCount(t.length);var r=function(i,s,n){var t={},e=null,a=function(t,e){"success"===e&&t.assetId?this._uploadedAssetIds.push(t.assetId):t.error&&alert(t.error),s++,this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),s===i.length?n():r(i,s,n)}.bind(this);"replace"===i[s].choice?(e="assets/replace-file",t.sourceAssetId=i[s].assetId,i[s].conflictingAssetId?t.assetId=i[s].conflictingAssetId:t.targetFilename=i[s].filename):"cancel"===i[s].choice&&(e="assets/delete-asset",t.assetId=i[s].assetId),e?Craft.postActionRequest(e,t,a):a({assetId:i[s].assetId},"success")}.bind(this);this.progressBar.showProgressBar(),r(t,0,e)},onUpdateElements:function(){this._onUpdateElements(!1,this.view.getAllElements()),this.view.on("appendElements",$.proxy(function(t){this._onUpdateElements(!0,t.newElements)},this)),this.base()},_onUpdateElements:function(t,e){if("index"===this.settings.context&&(t||this._assetDrag.removeAllItems(),this._assetDrag.addItems(e)),this._uploadedAssetIds.length){if(this.view.settings.selectable)for(var i=0;i<this._uploadedAssetIds.length;i++)this.view.selectElementById(this._uploadedAssetIds[i]);this._uploadedAssetIds=[]}this.base(t,e),this.removeListener(this.$elements,"keydown"),this.addListener(this.$elements,"keydown",this._onKeyDown.bind(this)),this.view.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.view.elementSelect.$focusedItem.find(".element");e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item).find(".element");Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.view.elementSelect,e)},_onDragStart:function(){this._tempExpandedFolders=[]},_getFileDragHelper:function(t){var e,i;switch(this.getSelectedSourceState("mode")){case"table":e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e);var s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.view.$table.children("tbody").children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove(),e.css("margin-"+Craft.left,19);else{var l=$(this._$firstRowCells[r]),h=l.width();l.width(h),o.width(h)}}return e;case"thumbs":return e=$('<div class="elements thumbviewhelper"/>').appendTo(Garnish.$bod),i=$('<ul class="thumbsview"/>').appendTo(e),t.appendTo(i),e}return $()},_onDropTargetChange:function(t){if(clearTimeout(this._expandDropTargetFolderTimeout),t){var e=t.data("folder-id");e?(this.dropTargetFolder=this._getSourceByKey(e),this._hasSubfolders(this.dropTargetFolder)&&!this._isExpanded(this.dropTargetFolder)&&(this._expandDropTargetFolderTimeout=setTimeout($.proxy(this,"_expandFolder"),500))):this.dropTargetFolder=null}t&&t[0]!==this.$source[0]?this.$source.removeClass("sel"):this.$source.addClass("sel")},_collapseExtraExpandedFolders:function(t){var e;clearTimeout(this._expandDropTargetFolderTimeout),t&&(e=this._getSourceByKey(t).parents("li").children("a"));for(var i=this._tempExpandedFolders.length-1;0<=i;i--){var s=this._tempExpandedFolders[i];void 0!==e&&0!==e.filter('[data-key="'+s.data("key")+'"]').length||(this._collapseFolder(s),this._tempExpandedFolders.splice(i,1))}},_getSourceByKey:function(t){return this.$sources.filter('[data-key$="'+t+'"]')},_hasSubfolders:function(t){return t.siblings("ul").find("li").length},_isExpanded:function(t){return t.parent("li").hasClass("expanded")},_expandFolder:function(){this._collapseExtraExpandedFolders(this.dropTargetFolder.data("folder-id")),this.dropTargetFolder.siblings(".toggle").trigger("click"),this._tempExpandedFolders.push(this.dropTargetFolder)},_collapseFolder:function(t){t.parent().hasClass("expanded")&&t.siblings(".toggle").trigger("click")},_createFolderContextMenu:function(t){if(this._getFolderUidFromSourceKey(t.data("key"))){var e=[{label:Craft.t("app","New subfolder"),onClick:$.proxy(this,"_createSubfolder",t)}];"index"===this.settings.context&&1<this._getSourceLevel(t)&&(e.push({label:Craft.t("app","Rename folder"),onClick:$.proxy(this,"_renameFolder",t)}),e.push({label:Craft.t("app","Delete folder"),onClick:$.proxy(this,"_deleteFolder",t)})),new Garnish.ContextMenu(t,e,{menuClass:"menu"})}},_createSubfolder:function(n){var t=prompt(Craft.t("app","Enter the name of the folder"));if(t){var e={parentId:n.data("folder-id"),folderName:t};this.setIndexBusy(),Craft.postActionRequest("assets/create-folder",e,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){this._prepareParentForChildren(n);var i=$('<li><a data-key="'+n.data("key")+"/folder:"+t.folderUid+'"'+(Garnish.hasAttr(n,"data-has-thumbs")?" data-has-thumbs":"")+' data-upload="'+n.attr("data-upload")+'" data-folder-id="'+t.folderId+'">'+t.folderName+"</a></li>"),s=i.children("a:first");this._appendSubfolder(n,i),this.initSource(s)}"success"===e&&t.error&&alert(t.error)},this))}},_deleteFolder:function(s){if(confirm(Craft.t("app","Really delete folder “{folder}”?",{folder:$.trim(s.text())}))){var t={folderId:s.data("folder-id")};this.setIndexBusy(),Craft.postActionRequest("assets/delete-folder",t,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){var i=this._getParentSource(s);this.deinitSource(s),s.parent().remove(),this._cleanUpTree(i)}"success"===e&&t.error&&alert(t.error)},this))}},_renameFolder:function(i){var t=$.trim(i.text()),e=prompt(Craft.t("app","Rename folder"),t);if(e&&e!==t){var s={folderId:i.data("folder-id"),newName:e};this.setIndexBusy(),Craft.postActionRequest("assets/rename-folder",s,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&t.success&&(i.text(t.newName),this._getFolderUidFromSourceKey(this.sourceSelect.$selectedItems.data("key"))===this._getFolderUidFromSourceKey(i.data("key"))&&this.updateElements()),"success"===e&&t.error&&alert(t.error)},this),"json")}},_prepareParentForChildren:function(t){this._hasSubfolders(t)||(t.parent().addClass("expanded").append('<div class="toggle"></div><ul></ul>'),this.initSourceToggle(t))},_appendSubfolder:function(t,e){for(var i=t.siblings("ul").children("li"),s=$.trim(e.children("a:first").text()),n=!1,a=0;a<i.length;a++){var r=$(i[a]);if($.trim(r.children("a:first").text())>s){r.before(e),n=!0;break}}n||t.siblings("ul").append(e)},_cleanUpTree:function(t){null!==t&&0===t.siblings("ul").children("li").length&&(this.deinitSourceToggle(t),t.siblings("ul").remove(),t.siblings(".toggle").remove(),t.parent().removeClass("expanded"))},_positionProgressBar:function(){this.progressBar||(this.progressBar=new Craft.ProgressBar(this.$main,!0));var t=$(),e=0,i=0,s=(e="index"===this.settings.context?(t=this.progressBar.$progressBar.closest("#content"),Garnish.$win.scrollTop()):(t=this.progressBar.$progressBar.closest(".main"),this.$main.scrollTop()))-t.offset().top,n=Garnish.$win.height();i=t.height()>n?n/2-6+s:t.height()/2-6,"index"!==this.settings.context&&(i=e+(t.height()/2-6)),this.progressBar.$progressBar.css({top:i})},_performBatchRequests:function(i,s){for(var n=[],t=function(t){Craft.postActionRequest(t.action,t.params,function(t,e){this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),"success"===e&&(n.push(t),Craft.cp.runQueue()),n.length>=i.length&&s(n)}.bind(this))}.bind(this),e=0;e<i.length;e++)t(i[e])}}),Craft.registerElementIndexClass("craft\\elements\\Asset",Craft.AssetIndex),Craft.AssetSelectInput=Craft.BaseElementSelectInput.extend({requestId:0,hud:null,uploader:null,progressBar:null,originalFilename:"",originalExtension:"",init:function(){0<arguments.length&&"object"==typeof arguments[0]&&(arguments[0].editorSettings={onShowHud:$.proxy(this.resetOriginalFilename,this),onCreateForm:$.proxy(this._renameHelper,this),validators:[$.proxy(this.validateElementForm,this)]}),this.base.apply(this,arguments),this._attachUploader(),this.addListener(this.$elementsContainer,"keydown",this._onKeyDown.bind(this)),this.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.elementSelect.$focusedItem;e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item);Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.elementSelect,e)},createElementEditor:function(t){return this.base(t,{params:{defaultFieldLayoutId:this.settings.defaultFieldLayoutId}})},_attachUploader:function(){this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl("assets/save-asset"),dropZone:this.$container,formData:{fieldId:this.settings.fieldId,elementId:this.settings.sourceElementId}};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),t.canAddMoreFiles=$.proxy(this,"canAddMoreFiles"),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),this.uploader=new Craft.Uploader(this.$container,t)},selectUploadedFile:function(t){if(this.canAddMoreElements()){var e=t.$element;e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e.appendTo(this.$elementsContainer);var i=-(e.outerWidth()+10);this.$addElementBtn.css("margin-"+Craft.left,i+"px");var s={};s["margin-"+Craft.left]=0,this.$addElementBtn.velocity(s,"fast"),this.addElements(e),delete this.modal}},_onUploadStart:function(){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{var i={elementId:e.result.assetId,siteId:this.settings.criteria.siteId,size:this.settings.viewMode};Craft.postActionRequest("elements/get-element-html",i,function(t){if(t.error)alert(t.error);else{var e=$(t.html);Craft.appendHeadHtml(t.headHtml),this.selectUploadedFile(Craft.getElementInfo(e))}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"),window.draftEditor&&window.draftEditor.checkForm())}.bind(this)),Craft.cp.runQueue()}},canAddMoreFiles:function(t){return!this.settings.limit||this.$elements.length+t<this.settings.limit},_parseFilename:function(t){var e=t.split("."),i="";return 1<e.length&&(i=e.pop()),{extension:i,baseFileName:e.join(".")}},_renameHelper:function(t){$(".renameHelper",t).on("focus",$.proxy(function(t){var e=t.currentTarget,i=this._parseFilename(e.value);""===this.originalFilename&&""===this.originalExtension&&(this.originalFilename=i.baseFileName,this.originalExtension=i.extension);var s=i.baseFileName.length;if(void 0!==e.selectionStart)e.selectionStart=0,e.selectionEnd=s;else if(document.selection&&document.selection.createRange){e.select();var n=document.selection.createRange();n.collapse(!0),n.moveEnd("character",s),n.moveStart("character",0),n.select()}},this))},resetOriginalFilename:function(){this.originalFilename="",this.originalExtension=""},validateElementForm:function(){var t=$(".renameHelper",this.elementEditor.hud.$hud.data("elementEditor").$form),e=this._parseFilename(t.val());return e.extension===this.originalExtension||(""===e.extension?this.originalFilename!==e.baseFileName?(t.val(e.baseFileName+"."+this.originalExtension),!0):confirm(Craft.t("app","Are you sure you want to remove the extension “.{ext}”?",{ext:this.originalExtension})):confirm(Craft.t("app","Are you sure you want to change the extension from “.{oldExt}” to “.{newExt}”?",{oldExt:this.originalExtension,newExt:e.extension})))}}),Craft.AssetSelectorModal=Craft.BaseElementSelectorModal.extend({$selectTransformBtn:null,_selectedTransform:null,init:function(t,e){e=$.extend({},Craft.AssetSelectorModal.defaults,e),this.base(t,e),e.transforms.length&&this.createSelectTransformButton(e.transforms)},createSelectTransformButton:function(t){if(t&&t.length){var e=$('<div class="btngroup"/>').appendTo(this.$primaryButtons);this.$selectBtn.appendTo(e),this.$selectTransformBtn=$('<div class="btn menubtn disabled">'+Craft.t("app","Select transform")+"</div>").appendTo(e);for(var i=$('<div class="menu" data-align="right"></div>').insertAfter(this.$selectTransformBtn),s=$("<ul></ul>").appendTo(i),n=0;n<t.length;n++)$('<li><a data-transform="'+t[n].handle+'">'+t[n].name+"</a></li>").appendTo(s);var a=new Garnish.MenuBtn(this.$selectTransformBtn,{onOptionSelect:$.proxy(this,"onSelectTransform")});a.disable(),this.$selectTransformBtn.data("menuButton",a)}},onSelectionChange:function(t){var e=this.elementIndex.getSelectedElements(),i=!1;if(e.length&&this.settings.transforms.length){i=!0;for(var s=0;s<e.length&&$(".element.hasthumb:first",e[s]).length;s++);}var n=null;this.$selectTransformBtn&&(n=this.$selectTransformBtn.data("menuButton")),i?(n&&n.enable(),this.$selectTransformBtn.removeClass("disabled")):this.$selectTransformBtn&&(n&&n.disable(),this.$selectTransformBtn.addClass("disabled")),this.base()},onSelectTransform:function(t){var e=$(t).data("transform");this.selectImagesWithTransform(e)},selectImagesWithTransform:function(t){void 0===Craft.AssetSelectorModal.transformUrls[t]&&(Craft.AssetSelectorModal.transformUrls[t]={});for(var e=this.elementIndex.getSelectedElements(),i=[],s=0;s<e.length;s++){var n=$(e[s]),a=Craft.getElementInfo(n).id;void 0===Craft.AssetSelectorModal.transformUrls[t][a]&&i.push(a)}i.length?(this.showFooterSpinner(),this.fetchMissingTransformUrls(i,t,$.proxy(function(){this.hideFooterSpinner(),this.selectImagesWithTransform(t)},this))):(this._selectedTransform=t,this.selectElements(),this._selectedTransform=null)},fetchMissingTransformUrls:function(i,s,n){var a=i.pop(),t={assetId:a,handle:s};Craft.postActionRequest("assets/generate-transform",t,$.proxy(function(t,e){Craft.AssetSelectorModal.transformUrls[s][a]=!1,"success"!==e||t.url&&(Craft.AssetSelectorModal.transformUrls[s][a]=t.url),i.length?this.fetchMissingTransformUrls(i,s,n):n()},this))},getElementInfo:function(t){var e=this.base(t);if(this._selectedTransform)for(var i=0;i<e.length;i++){var s=e[i].id;void 0!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&!1!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&(e[i].url=Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s])}return e},onSelect:function(t){this.settings.onSelect(t,this._selectedTransform)}},{defaults:{canSelectImageTransforms:!1,transforms:[]},transformUrls:{}}),Craft.registerElementSelectorModalClass("craft\\elements\\Asset",Craft.AssetSelectorModal),Craft.AuthManager=Garnish.Base.extend({remainingSessionTime:null,checkRemainingSessionTimer:null,showLoginModalTimer:null,decrementLogoutWarningInterval:null,showingLogoutWarningModal:!1,showingLoginModal:!1,logoutWarningModal:null,loginModal:null,$logoutWarningPara:null,$passwordInput:null,$passwordSpinner:null,$loginBtn:null,$loginErrorPara:null,submitLoginIfLoggedOut:!1,init:function(){this.updateRemainingSessionTime(Craft.remainingSessionTime)},setCheckRemainingSessionTimer:function(t){this.checkRemainingSessionTimer&&clearTimeout(this.checkRemainingSessionTimer),this.checkRemainingSessionTimer=setTimeout($.proxy(this,"checkRemainingSessionTime"),1e3*t)},checkRemainingSessionTime:function(t){$.ajax({url:Craft.getActionUrl("users/get-remaining-session-time",t?null:"dontExtendSession=1"),type:"GET",dataType:"json",complete:$.proxy(function(t,e){"success"===e?(void 0!==t.responseJSON.csrfTokenValue&&void 0!==Craft.csrfTokenValue&&(Craft.csrfTokenValue=t.responseJSON.csrfTokenValue),this.updateRemainingSessionTime(t.responseJSON.timeout),this.submitLoginIfLoggedOut=!1):this.updateRemainingSessionTime(-1)},this)})},updateRemainingSessionTime:function(t){this.remainingSessionTime=parseInt(t),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime?(this.remainingSessionTime?(this.showingLogoutWarningModal||this.showLogoutWarningModal(),this.remainingSessionTime<Craft.AuthManager.checkInterval&&(this.showLoginModalTimer&&clearTimeout(this.showLoginModalTimer),this.showLoginModalTimer=setTimeout($.proxy(this,"showLoginModal"),1e3*this.remainingSessionTime))):this.showingLoginModal?this.submitLoginIfLoggedOut&&this.submitLogin():this.showLoginModal(),this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval)):(this.hideLogoutWarningModal(),this.hideLoginModal(),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime+Craft.AuthManager.checkInterval?this.setCheckRemainingSessionTimer(this.remainingSessionTime-Craft.AuthManager.minSafeSessiotTime+1):this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval))},showLogoutWarningModal:function(){var t;if(t=!!this.showingLoginModal&&(this.hideLoginModal(!0),!0),this.showingLogoutWarningModal=!0,!this.logoutWarningModal){var e=$('<form id="logoutwarningmodal" class="modal alert fitted"/>'),i=$('<div class="body"/>').appendTo(e),s=$('<div class="buttons right"/>').appendTo(i),n=$('<div class="btn">'+Craft.t("app","Log out now")+"</div>").appendTo(s),a=$('<input type="submit" class="btn submit" value="'+Craft.t("app","Keep me logged in")+'" />').appendTo(s);this.$logoutWarningPara=$("<p/>").prependTo(i),this.logoutWarningModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark logoutwarningmodalshade",onFadeIn:function(){Garnish.isMobileBrowser(!0)||setTimeout(function(){a.trigger("focus")},100)}}),this.addListener(n,"activate","logout"),this.addListener(e,"submit","renewSession")}t?this.logoutWarningModal.quickShow():this.logoutWarningModal.show(),this.updateLogoutWarningMessage(),this.decrementLogoutWarningInterval=setInterval($.proxy(this,"decrementLogoutWarning"),1e3)},updateLogoutWarningMessage:function(){this.$logoutWarningPara.text(Craft.t("app","Your session will expire in {time}.",{time:Craft.secondsToHumanTimeDuration(this.remainingSessionTime)})),this.logoutWarningModal.updateSizeAndPosition()},decrementLogoutWarning:function(){0<this.remainingSessionTime&&(this.remainingSessionTime--,this.updateLogoutWarningMessage()),0===this.remainingSessionTime&&clearInterval(this.decrementLogoutWarningInterval)},hideLogoutWarningModal:function(t){this.showingLogoutWarningModal=!1,this.logoutWarningModal&&(t?this.logoutWarningModal.quickHide():this.logoutWarningModal.hide(),this.decrementLogoutWarningInterval&&clearInterval(this.decrementLogoutWarningInterval))},showLoginModal:function(){var t;if(t=!!this.showingLogoutWarningModal&&(this.hideLogoutWarningModal(!0),!0),this.showingLoginModal=!0,!this.loginModal){var e=$('<form id="loginmodal" class="modal alert fitted"/>'),i=$('<div class="body"><h2>'+Craft.t("app","Your session has ended.")+"</h2><p>"+Craft.t("app","Enter your password to log back in.")+"</p></div>").appendTo(e),s=$('<div class="inputcontainer">').appendTo(i),n=$('<div class="flex"/>').appendTo(s),a=$('<div class="flex-grow"/>').appendTo(n),r=$("<div/>").appendTo(n),o=$('<div class="passwordwrapper"/>').appendTo(a);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'"/>').appendTo(o),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(s),this.$loginBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Login")+'" />').appendTo(r),this.$loginErrorPara=$('<p class="error"/>').appendTo(i),this.loginModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark loginmodalshade",onFadeIn:$.proxy(function(){Garnish.isMobileBrowser(!0)||setTimeout($.proxy(function(){this.$passwordInput.trigger("focus")},this),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(e,"submit","login")}t?this.loginModal.quickShow():this.loginModal.show()},hideLoginModal:function(t){this.showingLoginModal=!1,this.loginModal&&(t?this.loginModal.quickHide():this.loginModal.hide())},logout:function(){$.get({url:Craft.getActionUrl("users/logout"),dataType:"json",success:$.proxy(function(){Craft.redirectTo("")},this)})},renewSession:function(t){t&&t.preventDefault(),this.hideLogoutWarningModal(),this.checkRemainingSessionTime(!0)},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$loginBtn.removeClass("disabled"),!0):(this.$loginBtn.addClass("disabled"),!1)},login:function(t){t&&t.preventDefault(),this.validatePassword()&&(this.$passwordSpinner.removeClass("hidden"),this.clearLoginError(),void 0!==Craft.csrfTokenValue?(this.submitLoginIfLoggedOut=!0,this.checkRemainingSessionTime()):this.submitLogin())},submitLogin:function(){var t={loginName:Craft.username,password:this.$passwordInput.val()};Craft.postActionRequest("users/login",t,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.hideLoginModal(),this.checkRemainingSessionTime()):(this.showLoginError(t.error),Garnish.shake(this.loginModal.$container),Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")):this.showLoginError()},this))},showLoginError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$loginErrorPara.text(t),this.loginModal.updateSizeAndPosition()},clearLoginError:function(){this.showLoginError("")}},{checkInterval:60,minSafeSessiotTime:120}),Craft.CategoryIndex=Craft.BaseElementIndex.extend({editableGroups:null,$newCategoryBtnGroup:null,$newCategoryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.editableGroups=[];for(var t=0;t<Craft.editableCategoryGroups.length;t++){var e=Craft.editableCategoryGroups[t];this.getSourceByKey("group:"+e.uid)&&this.editableGroups.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultGroupHandle)for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultGroupHandle)return e.data("key")}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s=this.$source.data("handle");if(this.editableGroups.length){var n,a;if(this.$newCategoryBtnGroup&&this.$newCategoryBtnGroup.remove(),s)for(t=0;t<this.editableGroups.length;t++)if(this.editableGroups[t].handle===s){n=this.editableGroups[t];break}if(this.$newCategoryBtnGroup=$('<div class="btngroup submit"/>'),n?(e=this._getGroupTriggerHref(n),i="index"===this.settings.context?Craft.t("app","New category"):Craft.t("app","New {group} category",{group:n.name}),this.$newCategoryBtn=$('<a class="btn submit add icon" '+e+">"+Craft.escapeHtml(i)+"</a>").appendTo(this.$newCategoryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newCategoryBtn,"click",function(t){this._openCreateCategoryModal(t.currentTarget.getAttribute("data-id"))}),1<this.editableGroups.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newCategoryBtnGroup))):this.$newCategoryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New category")+"</div>").appendTo(this.$newCategoryBtnGroup),a){var r='<div class="menu"><ul>';for(t=0;t<this.editableGroups.length;t++){var o=this.editableGroups[t];"index"!==this.settings.context&&o===n||(e=this._getGroupTriggerHref(o),i="index"===this.settings.context?o.name:Craft.t("app","New {group} category",{group:o.name}),r+="<li><a "+e+'">'+Craft.escapeHtml(i)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newCategoryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateCategoryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newCategoryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="categories";s&&(h+="/"+s),history.replaceState({},"",Craft.getUrl(h))}}},_getGroupTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="categories/"+t.handle+"/new";if(this.siteId&&this.siteId!=Craft.primarySiteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(e+="/"+Craft.sites[i].handle);return'href="'+Craft.getUrl(e)+'"'},_openCreateCategoryModal:function(t){if(!this.$newCategoryBtn.hasClass("loading")){for(var i,e=0;e<this.editableGroups.length;e++)if(this.editableGroups[e].id==t){i=this.editableGroups[e];break}if(i){this.$newCategoryBtn.addClass("inactive");var s=this.$newCategoryBtn.text();this.$newCategoryBtn.text(Craft.t("app","New {group} category",{group:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newCategoryBtnGroup,elementType:"craft\\elements\\Category",siteId:this.siteId,attributes:{groupId:t},onBeginLoading:$.proxy(function(){this.$newCategoryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newCategoryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newCategoryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="group:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Category",Craft.CategoryIndex),Craft.CategorySelectInput=Craft.BaseElementSelectInput.extend({setSettings:function(){this.base.apply(this,arguments),this.settings.sortable=!1},getModalSettings:function(){var t=this.base();return t.hideOnSelect=!1,t},getElements:function(){return this.$elementsContainer.find(".element")},onModalSelect:function(o){this.modal.disable(),this.modal.disableCancelBtn(),this.modal.disableSelectBtn(),this.modal.showFooterSpinner();for(var t=this.getSelectedElementIds(),e=0;e<o.length;e++)t.push(o[e].id);var i={categoryIds:t,siteId:o[0].siteId,id:this.settings.id,name:this.settings.name,branchLimit:this.settings.branchLimit,selectionLabel:this.settings.selectionLabel};Craft.postActionRequest("elements/get-categories-input-html",i,$.proxy(function(t,e){if(this.modal.enable(),this.modal.enableCancelBtn(),this.modal.enableSelectBtn(),this.modal.hideFooterSpinner(),"success"===e){var i=$(t.html).children(".elements");this.$elementsContainer.replaceWith(i),this.$elementsContainer=i,this.resetElements();for(var s=[],n=0;n<o.length;n++){var a=o[n],r=this.getElementById(a.id);r&&(this.animateElementIntoPlace(a.$element,r),s.push(a))}this.updateDisabledElementsInModal(),this.modal.hide(),this.onSelectElements(s)}},this))},removeElement:function(t){var e=t.add(t.parent().siblings("ul").find(".element"));this.removeElements(e);for(var i=0;i<e.length;i++)this._animateCategoryAway(e,i)},_animateCategoryAway:function(i,t){var e;t===i.length-1&&(e=$.proxy(function(){var t=i.first().parent().parent(),e=t.parent();e[0]===this.$elementsContainer[0]||t.siblings().length?t.remove():e.remove()},this));var s=$.proxy(function(){this.animateElementAway(i.eq(t),e)},this);0===t?s():setTimeout(s,100*t)}}),Craft.charts={},Craft.charts.DataTable=Garnish.Base.extend({columns:null,rows:null,init:function(t){columns=t.columns,rows=t.rows,rows.forEach($.proxy(function(i){$.each(i,function(t){var e;switch(columns[t].type){case"date":e=d3.timeParse("%Y-%m-%d"),i[t]=e(i[t]);break;case"datetime":e=d3.timeParse("%Y-%m-%d %H:00:00"),i[t]=e(i[t]);break;case"percent":i[t]=i[t]/100;break;case"number":i[t]=+i[t]}})},this)),this.columns=columns,this.rows=rows}}),Craft.charts.Tip=Garnish.Base.extend({$container:null,$tip:null,init:function(t){this.$container=t,this.$tip=$('<div class="tooltip"></div>').appendTo(this.$container),this.hide()},setContent:function(t){this.$tip.html(t)},setPosition:function(t){this.$tip.css("left",t.left+"px"),this.$tip.css("top",t.top+"px")},show:function(){this.$tip.css("display","block")},hide:function(){this.$tip.css("display","none")}}),Craft.charts.BaseChart=Garnish.Base.extend({$container:null,$chart:null,chartBaseClass:"cp-chart",dataTable:null,formatLocale:null,timeFormatLocale:null,orientation:null,svg:null,width:null,height:null,init:function(t,e){this.$container=t,this.setSettings(Craft.charts.BaseChart.defaults),this.setSettings(e);var i={formats:window.d3Formats,formatLocaleDefinition:window.d3FormatLocaleDefinition,timeFormatLocaleDefinition:window.d3TimeFormatLocaleDefinition};this.setSettings(i),d3.select(window).on("resize",$.proxy(function(){this.resize()},this))},setSettings:function(t,e){var i=void 0===this.settings?{}:this.settings;this.settings=$.extend(!0,{},i,e,t)},draw:function(t,e){this.setSettings(e),this.dataTable=t,this.formatLocale=d3.formatLocale(this.settings.formatLocaleDefinition),this.timeFormatLocale=d3.timeFormatLocale(this.settings.timeFormatLocaleDefinition),this.orientation=this.settings.orientation,this.$chart&&this.$chart.remove();var i=this.chartBaseClass;this.settings.chartClass&&(i+=" "+this.settings.chartClass),this.$chart=$('<div class="'+i+'" />').appendTo(this.$container)},resize:function(){this.draw(this.dataTable,this.settings)},onAfterDrawTicks:function(){$(".tick",this.$chart).each(function(t,e){var i=$("text",e);i.clone().appendTo(e),i.attr("stroke","#ffffff"),i.attr("stroke-width",3)})}},{defaults:{formatLocaleDefinition:null,timeFormatLocaleDefinition:null,formats:{numberFormat:",.2f",percentFormat:",.2%",currencyFormat:"$,.2f",shortDateFormats:{day:"%-m/%-d",month:"%-m/%y",year:"%Y"}},margin:{top:0,right:0,bottom:0,left:0},chartClass:null,colors:["#0594D1","#DE3800","#FF9A00","#009802","#9B009B"]}}),Craft.charts.Area=Craft.charts.BaseChart.extend({tip:null,drawingArea:null,init:function(t,e){this.base(t,Craft.charts.Area.defaults),this.setSettings(e)},draw:function(t,e){this.base(t,e),this.tip&&(this.tip=null);var i=this.getChartMargin();this.width=this.$chart.width()-i.left-i.right,this.height=this.$chart.height()-i.top-i.bottom;var s={width:this.width+(i.left+i.right),height:this.height+(i.top+i.bottom),translateX:"rtl"!==this.orientation?i.left:i.right,translateY:i.top};this.svg=d3.select(this.$chart.get(0)).append("svg").attr("width",s.width).attr("height",s.height),this.drawingArea=this.svg.append("g").attr("transform","translate("+s.translateX+","+s.translateY+")"),this.drawTicks(),this.drawAxes(),this.drawChart(),this.drawTipTriggers()},drawTicks:function(){var t=this.getX(!0),e=d3.axisBottom(t).tickFormat(this.getXFormatter()).ticks(3);this.drawingArea.append("g").attr("class","x ticks-axis").attr("transform","translate(0, "+this.height+")").call(e);var i,s=this.getY();"rtl"!==this.orientation?(i=d3.axisLeft(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").call(i)):(i=d3.axisRight(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").attr("transform","translate("+this.width+",0)").call(i)),this.onAfterDrawTicks()},drawAxes:function(){if(this.settings.xAxis.showAxis){var t=this.getX(),e=d3.axisBottom(t).ticks(0).tickSizeOuter(0);this.drawingArea.append("g").attr("class","x axis").attr("transform","translate(0, "+this.height+")").call(e)}if(this.settings.yAxis.showAxis){var i,s=this.getY();"rtl"===this.orientation?(i=d3.axisLeft(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate("+(this.width-0)+", 0)").call(i)):(i=d3.axisRight(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(i))}},drawChart:function(){var e=this.getX(!0),i=this.getY();if(this.settings.xAxis.gridlines){var t=d3.axisBottom(e);this.drawingArea.append("g").attr("class","x grid-line").attr("transform","translate(0,"+this.height+")").call(t.tickSize(-this.height,0,0).tickFormat(""))}if(this.settings.yAxis.gridlines){var s=d3.axisLeft(i);this.drawingArea.append("g").attr("class","y grid-line").attr("transform","translate(0 , 0)").call(s.tickSize(-this.width,0).tickFormat("").tickValues(this.getYTickValues()).ticks(2))}var n=d3.line().x(function(t){return e(t[0])}).y(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-line").append("path").datum(this.dataTable.rows).style("fill","none").style("stroke",this.settings.colors[0]).style("stroke-width","3px").attr("d",n);var a=d3.area().x(function(t){return e(t[0])}).y0(this.height).y1(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-area").append("path").datum(this.dataTable.rows).style("fill",this.settings.colors[0]).style("fill-opacity","0.3").attr("d",a),this.settings.plots&&this.drawingArea.append("g").attr("class","plots").selectAll("circle").data(this.dataTable.rows).enter().append("circle").style("fill",this.settings.colors[0]).attr("class",$.proxy(function(t,e){return"plot plot-"+e},this)).attr("r",4).attr("cx",$.proxy(function(t){return e(t[0])},this)).attr("cy",$.proxy(function(t){return i(t[1])},this))},drawTipTriggers:function(){if(this.settings.tips){this.tip||(this.tip=new Craft.charts.Tip(this.$chart));var t=this.getChartMargin(),e=(this.drawingArea.select(".x path.domain").node().getTotalLength()-t.left-t.right-12)/(this.dataTable.rows.length-1),i=Math.max(0,e),c=this.getX(!0),u=this.getY();this.drawingArea.append("g").attr("class","tip-triggers").selectAll("rect").data(this.dataTable.rows).enter().append("rect").attr("class","tip-trigger").style("fill","transparent").style("fill-opacity","1").attr("width",i).attr("height",this.height).attr("x",$.proxy(function(t){return c(t[0])-i/2},this)).on("mouseover",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",5);var i=$("<div />"),s=$('<div class="x-value" />').appendTo(i),n=$('<div class="y-value" />').appendTo(i);s.html(this.getXFormatter()(t[0])),n.html(this.getYFormatter()(t[1]));var a=i.get(0);this.tip.setContent(a);var r,o=this.getChartMargin(),l=u(t[1])+24;if("rtl"!==this.orientation){r=c(t[0])+o.left+24;var h=this.$chart.offset().left+r+this.tip.$tip.width();this.$chart.offset().left+this.$chart.width()-24<h&&(r=c(t[0])-(this.tip.$tip.width()+24))}else r=c(t[0])-(this.tip.$tip.width()+o.left+24);r<0&&(r=c(t[0])+o.left+24);var d={top:l,left:r};this.tip.setPosition(d),this.tip.show()},this)).on("mouseout",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",4),this.tip.hide()},this))}},getChartMargin:function(){var t=this.settings.margin,e=this.getYTickValues(),s=0;return $.each(e,$.proxy(function(t,e){var i=8*this.getYFormatter()(e).length;s<i&&(s=i)},this)),s+=10,t.left=s,t},getX:function(t){var e=d3.min(this.dataTable.rows,function(t){return t[0]}),i=d3.max(this.dataTable.rows,function(t){return t[0]}),s=[e,i];"rtl"===this.orientation&&(s=[i,e]);var n=0,a=0;t&&(a=n=0);var r=d3.scaleTime().range([n,this.width-a]);return r.domain(s),r},getY:function(){var t=[0,this.getYMaxValue()],e=d3.scaleLinear().range([this.height,0]);return e.domain(t),e},getXFormatter:function(){return this.settings.xAxis.formatter!==$.noop?this.settings.xAxis.formatter(this):Craft.charts.utils.getTimeFormatter(this.timeFormatLocale,this.settings)},getYFormatter:function(){return this.settings.yAxis.formatter!==$.noop?this.settings.yAxis.formatter(this):Craft.charts.utils.getNumberFormatter(this.formatLocale,this.dataTable.columns[1].type,this.settings)},getYMaxValue:function(){return d3.max(this.dataTable.rows,function(t){return t[1]})},getYTickValues:function(){var t=this.getYMaxValue();return 1<t?[t/2,t]:[0,t]}},{defaults:{chartClass:"area",margin:{top:25,right:5,bottom:25,left:0},plots:!0,tips:!0,xAxis:{gridlines:!1,showAxis:!0,formatter:$.noop},yAxis:{gridlines:!0,showAxis:!1,formatter:$.noop}}}),Craft.charts.utils={getDuration:function(t){var e=parseInt(t,10),i={hours:Math.floor(e/3600),minutes:Math.floor((e-3600*i.hours)/60),seconds:e-3600*i.hours-60*i.minutes};return i.hours<10&&(i.hours="0"+i.hours),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds),i.hours+":"+i.minutes+":"+i.seconds},getTimeFormatter:function(t,e){switch(e.dataScale){case"year":return t.format("%Y");case"month":return t.format(e.formats.shortDateFormats.month);case"hour":return t.format(e.formats.shortDateFormats.day+" %H:00:00");default:return t.format(e.formats.shortDateFormats.day)}},getNumberFormatter:function(t,e,i){switch(e){case"currency":return t.format(i.formats.currencyFormat);case"percent":return t.format(i.formats.percentFormat);case"time":return Craft.charts.utils.getDuration;case"number":return t.format(i.formats.numberFormat)}}},Craft.ColorInput=Garnish.Base.extend({$container:null,$input:null,$colorContainer:null,$colorPreview:null,$colorInput:null,init:function(t){this.$container=$(t),this.$input=this.$container.children(".color-input"),this.$colorContainer=this.$container.children(".color"),this.$colorPreview=this.$colorContainer.children(".color-preview"),this.createColorInput(),this.handleTextChange(),this.addListener(this.$input,"textchange","handleTextChange")},createColorInput:function(){var t=document.createElement("input");t.setAttribute("type","color"),"color"===t.type&&(this.$colorContainer.removeClass("static"),this.$colorInput=$(t).addClass("hidden").insertAfter(this.$input),this.addListener(this.$colorContainer,"click",function(){this.$colorInput.trigger("click")}),this.addListener(this.$colorInput,"change","updateColor"))},updateColor:function(){this.$input.val(this.$colorInput.val()),this.$input.data("garnish-textchange-value",this.$colorInput.val()),this.handleTextChange()},handleTextChange:function(){var t=this.$input.val();t.length&&"#"!==t?("#"!==t[0]&&(t="#"+t,this.$input.val(t),this.$input.data("garnish-textchange-value",t)),this.$colorPreview.css("background-color",t),this.$colorInput&&this.$colorInput.val(t)):this.$colorPreview.css("background-color","")}},{_browserSupportsColorInputs:null,doesBrowserSupportColorInputs:function(){return Craft.ColorInput._browserSupportsColorInputs,Craft.ColorInput._browserSupportsColorInputs}}),Craft.CP=Garnish.Base.extend({authManager:null,$nav:null,$mainContainer:null,$alerts:null,$crumbs:null,$notificationContainer:null,$main:null,$primaryForm:null,$header:null,$mainContent:null,$details:null,$selectedTab:null,$sidebar:null,$contentContainer:null,$edition:null,$collapsibleTables:null,fixedHeader:!1,enableQueue:!0,jobInfo:null,displayedJobInfo:null,displayedJobInfoUnchanged:1,trackJobProgressTimeout:null,jobProgressIcon:null,checkingForUpdates:!1,forcingRefreshOnUpdatesCheck:!1,checkForUpdatesCallbacks:null,init:function(){0!==Craft.remainingSessionTime&&(this.authManager=new Craft.AuthManager),this.$nav=$("#nav"),this.$mainContainer=$("#main-container"),this.$alerts=$("#alerts"),this.$crumbs=$("#crumbs"),this.$notificationContainer=$("#notifications"),this.$main=$("#main"),this.$primaryForm=$("#main-form"),this.$header=$("#header"),this.$mainContent=$("#main-content"),this.$details=$("#details"),this.$sidebar=$("#sidebar"),this.$contentContainer=$("#content-container"),this.$collapsibleTables=$("table.collapsible"),this.$edition=$("#edition"),this.updateSidebarMenuLabel(),this.addListener(Garnish.$win,"scroll","updateFixedHeader"),this.updateFixedHeader(),Garnish.$doc.ready($.proxy(function(){this.addListener(Garnish.$win,"resize","updateResponsiveTables"),this.updateResponsiveTables();var t=this.$notificationContainer.children(".error"),e=this.$notificationContainer.children(":not(.error)");t.delay(2*Craft.CP.notificationDuration).velocity("fadeOut"),e.delay(Craft.CP.notificationDuration).velocity("fadeOut"),Garnish.requestAnimationFrame($.proxy(this,"initConfirmUnloadForms"))},this)),this.$alerts.length&&this.initAlerts(),this.addListener($("#nav-toggle"),"click","toggleNav"),this.addListener($("#sidebar-toggle"),"click","toggleSidebar"),this.$primaryForm.length||(this.$primaryForm=$("form[data-saveshortcut]:first")),this.$primaryForm.length&&Garnish.hasAttr(this.$primaryForm,"data-saveshortcut")&&this.addListener(Garnish.$doc,"keydown",function(t){return Garnish.isCtrlKeyPressed(t)&&t.keyCode===Garnish.S_KEY&&(t.preventDefault(),this.submitPrimaryForm()),!0}),this.initTabs(),this.$edition.hasClass("hot")&&this.addListener(this.$edition,"click",function(){document.location.href=Craft.getUrl("plugin-store/upgrade-craft")}),$.isTouchCapable()&&(this.$mainContainer.on("focus","input, textarea, .focusable-input",$.proxy(this,"_handleInputFocus")),this.$mainContainer.on("blur","input, textarea, .focusable-input",$.proxy(this,"_handleInputBlur"))),$("a").each(function(){this.hostname.length&&this.hostname!==location.hostname&&void 0===$(this).attr("target")&&$(this).attr("rel","noopener").attr("target","_blank")})},initConfirmUnloadForms:function(){if(this.$confirmUnloadForms=$("form[data-confirm-unload]"),this.$confirmUnloadForms.length){for(var t,e,i=0;i<this.$confirmUnloadForms.length;i++)(t=this.$confirmUnloadForms.eq(i)).data("initialSerializedValue")||(e="function"==typeof t.data("serializer")?t.data("serializer")():t.serialize(),t.data("initialSerializedValue",e)),this.addListener(t,"submit",function(){this.removeListener(Garnish.$win,"beforeunload")});this.addListener(Garnish.$win,"beforeunload",function(t){var e,i,s=!1;if(void 0!==Craft.livePreview&&Craft.livePreview.inPreviewMode)s=!0;else for(var n=0;n<this.$confirmUnloadForms.length;n++)if(i="function"==typeof(e=this.$confirmUnloadForms.eq(n)).data("serializer")?e.data("serializer")():e.serialize(),e.data("initialSerializedValue")!==i){s=!0;break}if(s){var a=Craft.t("app","Any changes will be lost if you leave this page.");return t?t.originalEvent.returnValue=a:window.event.returnValue=a,a}})}},_handleInputFocus:function(){this.updateFixedHeader()},_handleInputBlur:function(){this.updateFixedHeader()},submitPrimaryForm:function(){this.trigger("beforeSaveShortcut"),this.$primaryForm.data("saveshortcut-redirect")&&$('<input type="hidden" name="redirect" value="'+this.$primaryForm.data("saveshortcut-redirect")+'"/>').appendTo(this.$primaryForm),this.$primaryForm.trigger({type:"submit",saveShortcut:!0})},updateSidebarMenuLabel:function(){var t=this.$sidebar.find("a.sel:first"),e=t.children(".label");$("#selected-sidebar-item-label").text(e.length?e.text():t.text()),Garnish.$bod.removeClass("showing-sidebar")},toggleNav:function(){Garnish.$bod.toggleClass("showing-nav")},toggleSidebar:function(){Garnish.$bod.toggleClass("showing-sidebar")},initTabs:function(){this.$selectedTab=null;var t,e,i,s=$("#tabs").find("> ul > li"),n=[],a=[],r=0;for(t=0;t<s.length;t++)n[t]=$(s[t]),a[t]=n[t].width(),r+=a[t],(i=(e=n[t].children("a")).attr("href"))&&"#"===i.charAt(0)&&(this.addListener(e,"click",function(t){t.preventDefault(),this.selectTab(t.currentTarget)}),encodeURIComponent(i.substr(1))===document.location.hash.substr(1)&&this.selectTab(e)),!this.$selectedTab&&e.hasClass("sel")&&(this.$selectedTab=e);for(t=0;t<s.length;t++)n[t].css("max-width",100*a[t]/r+"%")},selectTab:function(t){var e=$(t);if(this.$selectedTab){if(this.$selectedTab.get(0)===e.get(0))return;this.deselectTab()}e.addClass("sel");var i=e.attr("href");$(i).removeClass("hidden"),"undefined"!=typeof history&&history.replaceState(void 0,void 0,i),Garnish.$win.trigger("resize"),Garnish.$doc.trigger("scroll"),this.$selectedTab=e},deselectTab:function(){this.$selectedTab&&(this.$selectedTab.removeClass("sel"),"#"===this.$selectedTab.attr("href").charAt(0)&&$(this.$selectedTab.attr("href")).addClass("hidden"),this.$selectedTab=null)},updateResponsiveTables:function(){for(this.updateResponsiveTables._i=0;this.updateResponsiveTables._i<this.$collapsibleTables.length;this.updateResponsiveTables._i++)this.updateResponsiveTables._$table=this.$collapsibleTables.eq(this.updateResponsiveTables._i),this.updateResponsiveTables._containerWidth=this.updateResponsiveTables._$table.parent().width(),this.updateResponsiveTables._check=!1,0<this.updateResponsiveTables._containerWidth&&(void 0===this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._check=!0:(this.updateResponsiveTables._isCollapsed=this.updateResponsiveTables._$table.hasClass("collapsed"),this.updateResponsiveTables._containerWidth>this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._isCollapsed&&(this.updateResponsiveTables._$table.removeClass("collapsed"),this.updateResponsiveTables._check=!0):this.updateResponsiveTables._isCollapsed||(this.updateResponsiveTables._check=!0)),!this.updateResponsiveTables._check||this.updateResponsiveTables._$table.width()>this.updateResponsiveTables._containerWidth&&this.updateResponsiveTables._$table.addClass("collapsed"),this.updateResponsiveTables._$table.data("lastContainerWidth",this.updateResponsiveTables._containerWidth))},updateFixedHeader:function(){if(this.$main.length&&this.$main[0].getBoundingClientRect().top<0){if(!this.fixedHeader){var t=this.$header.outerHeight(),e={top:t+"px","max-height":"calc(100vh - "+t+"px)"};this.$sidebar.css(e),this.$details.css(e),this.$mainContent.css("margin-top",this.$header.outerHeight()),Garnish.$bod.addClass("fixed-header"),this.fixedheader=!0}}else this.fixedheader&&(Garnish.$bod.removeClass("fixed-header"),this.$details.css({top:null,"max-height":null}),this.$header.css("top",0),this.$mainContent.css("margin-top",0),this.fixedheader=!1)},displayNotification:function(t,e){var i=Craft.CP.notificationDuration;"error"===t&&(i*=2);var s=$('<div class="notification '+t+'">'+e+"</div>").appendTo(this.$notificationContainer),n=-s.outerWidth()/2+"px";s.hide().css({opacity:0,"margin-left":n,"margin-right":n}).velocity({opacity:1,"margin-left":"2px","margin-right":"2px"},{display:"inline-block",duration:"fast"}).delay(i).velocity({opacity:0,"margin-left":n,"margin-right":n},{complete:function(){s.remove()}}),this.trigger("displayNotification",{notificationType:t,message:e})},displayNotice:function(t){this.displayNotification("notice",t)},displayError:function(t){t||(t=Craft.t("app","An unknown error occurred.")),this.displayNotification("error",t)},fetchAlerts:function(){var t={path:Craft.path};Craft.queueActionRequest("app/get-cp-alerts",t,$.proxy(this,"displayAlerts"))},displayAlerts:function(t){if(this.$alerts.remove(),Garnish.isArray(t)&&t.length){this.$alerts=$('<ul id="alerts"/>').prependTo(this.$mainContainer);for(var e=0;e<t.length;e++)$("<li>"+t[e]+"</li>").appendTo(this.$alerts);var i=this.$alerts.outerHeight();this.$alerts.css("margin-top",-i).velocity({"margin-top":0},"fast"),this.initAlerts()}},initAlerts:function(){for(var t=this.$alerts.find('a[class^="shun:"]'),e=0;e<t.length;e++)this.addListener(t[e],"click",$.proxy(function(t){t.preventDefault();var i=$(t.currentTarget),e={message:i.prop("className").substr(5)};Craft.queueActionRequest("app/shun-cp-alert",e,$.proxy(function(t,e){"success"===e&&(t.success?i.parent().remove():this.displayError(t.error))},this))},this))},checkForUpdates:function(t,e){if(this.checkingForUpdates&&!0===t&&!this.forcingRefreshOnUpdatesCheck){var i=e;e=function(){Craft.cp.checkForUpdates(!0,i)}}if("function"==typeof e&&(Garnish.isArray(this.checkForUpdatesCallbacks)||(this.checkForUpdatesCallbacks=[]),this.checkForUpdatesCallbacks.push(e)),!this.checkingForUpdates){this.checkingForUpdates=!0,this.forcingRefreshOnUpdatesCheck=!0===t;var s={forceRefresh:!0===t};Craft.queueActionRequest("app/check-for-updates",s,$.proxy(function(t){if(this.updateUtilitiesBadge(),this.checkingForUpdates=!1,Garnish.isArray(this.checkForUpdatesCallbacks)){var e=this.checkForUpdatesCallbacks;this.checkForUpdatesCallbacks=null;for(var i=0;i<e.length;i++)e[i](t)}this.trigger("checkForUpdates",{updateInfo:t})},this))}},updateUtilitiesBadge:function(){var i=$("#nav-utilities").find("> a:not(.sel)");i.length&&Craft.queueActionRequest("app/get-utilities-badge-count",$.proxy(function(t){var e=i.children(".badge");t.badgeCount?(e.length||(e=$('<span class="badge"/>').appendTo(i)),e.text(t.badgeCount)):e.length&&e.remove()},this))},runQueue:function(){this.enableQueue&&(Craft.runQueueAutomatically?Craft.queueActionRequest("queue/run",$.proxy(function(t,e){"success"===e&&this.trackJobProgress(!1,!0)},this)):this.trackJobProgress(!1,!0))},trackJobProgress:function(t,e){if(e&&this.trackJobProgressTimeout&&(clearTimeout(this.trackJobProgressTimeout),this.trackJobProgressTimeout=null),!this.trackJobProgressTimeout&&this.enableQueue)if(!0===t){var i=Math.min(6e4,500*this.displayedJobInfoUnchanged);this.trackJobProgressTimeout=setTimeout($.proxy(this,"_trackJobProgressInternal"),i)}else this._trackJobProgressInternal()},_trackJobProgressInternal:function(){Craft.queueActionRequest("queue/get-job-info?dontExtendSession=1",$.proxy(function(t,e){"success"===e&&(this.trackJobProgressTimeout=null,this.setJobInfo(t,!0),this.jobInfo.length&&this.trackJobProgress(!0))},this))},setJobInfo:function(t,e){if(this.enableQueue){this.jobInfo=t;var i=this.displayedJobInfo;this.displayedJobInfo=this.getDisplayedJobInfo(),i&&this.displayedJobInfo&&i.id===this.displayedJobInfo.id&&i.progress===this.displayedJobInfo.progress&&i.progressLabel===this.displayedJobInfo.progressLabel&&i.status===this.displayedJobInfo.status?this.displayedJobInfoUnchanged++:this.displayedJobInfoUnchanged=1,this.updateJobIcon(e),this.trigger("setJobInfo")}},getDisplayedJobInfo:function(){if(!this.enableQueue)return null;for(var t=[Craft.CP.JOB_STATUS_RESERVED,Craft.CP.JOB_STATUS_FAILED,Craft.CP.JOB_STATUS_WAITING],e=0;e<t.length;e++)for(var i=0;i<this.jobInfo.length;i++)if(this.jobInfo[i].status===t[e])return this.jobInfo[i]},updateJobIcon:function(t){this.enableQueue&&this.$nav.length&&(this.displayedJobInfo?(this.jobProgressIcon||(this.jobProgressIcon=new e),this.displayedJobInfo.status===Craft.CP.JOB_STATUS_RESERVED||this.displayedJobInfo.status===Craft.CP.JOB_STATUS_WAITING?(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.setDescription(this.displayedJobInfo.description),this.jobProgressIcon.setProgress(this.displayedJobInfo.progress,t)):this.displayedJobInfo.status===Craft.CP.JOB_STATUS_FAILED&&this.jobProgressIcon.showFailMode(Craft.t("app","Failed"))):this.jobProgressIcon&&(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.complete(),delete this.jobProgressIcon))}},{notificationDuration:2e3,JOB_STATUS_WAITING:1,JOB_STATUS_RESERVED:2,JOB_STATUS_DONE:3,JOB_STATUS_FAILED:4}),Garnish.$scrollContainer=$("#content"),Craft.cp=new Craft.CP;var e=Garnish.Base.extend({$li:null,$a:null,$label:null,hud:null,failMode:!1,_canvasSupported:null,_$bgCanvas:null,_$staticCanvas:null,_$hoverCanvas:null,_$failCanvas:null,_staticCtx:null,_hoverCtx:null,_canvasSize:null,_arcPos:null,_arcRadius:null,_lineWidth:null,_arcStartPos:0,_arcEndPos:0,_arcStartStepSize:null,_arcEndStepSize:null,_arcStep:null,_arcStepTimeout:null,_arcAnimateCallback:null,_progressBar:null,init:function(){if(this.$li=$("<li/>").appendTo(Craft.cp.$nav.children("ul")),this.$a=$('<a id="job-icon"/>').appendTo(this.$li),this.$canvasContainer=$('<span class="icon"/>').appendTo(this.$a),this.$label=$('<span class="label"></span>').appendTo(this.$a),this._canvasSupported=!!document.createElement("canvas").getContext,this._canvasSupported){var t=1<window.devicePixelRatio?2:1;this._canvasSize=18*t,this._arcPos=this._canvasSize/2,this._arcRadius=7*t,this._lineWidth=3*t,this._$bgCanvas=this._createCanvas("bg","#61666b"),this._$staticCanvas=this._createCanvas("static","#d7d9db"),this._$hoverCanvas=this._createCanvas("hover","#fff"),this._$failCanvas=this._createCanvas("fail","#da5a47").hide(),this._staticCtx=this._$staticCanvas[0].getContext("2d"),this._hoverCtx=this._$hoverCanvas[0].getContext("2d"),this._drawArc(this._$bgCanvas[0].getContext("2d"),0,1),this._drawArc(this._$failCanvas[0].getContext("2d"),0,1)}else this._progressBar=new Craft.ProgressBar(this.$canvasContainer),this._progressBar.showProgressBar();this.addListener(this.$a,"click","toggleHud")},setDescription:function(t){this.$a.attr("title",t),this.$label.text(t)},setProgress:function(t,e){this._canvasSupported?e?this._animateArc(0,t/100):this._setArc(0,t/100):this._progressBar.setProgressPercentage(t)},complete:function(){this._canvasSupported?this._animateArc(0,1,$.proxy(function(){this._$bgCanvas.velocity("fadeOut"),this._animateArc(1,1,$.proxy(function(){this.$a.remove(),this.destroy()},this))},this)):(this._progressBar.setProgressPercentage(100),this.$a.velocity("fadeOut"))},showFailMode:function(t){this.failMode||(this.failMode=!0,this._canvasSupported?(this._$bgCanvas.hide(),this._$staticCanvas.hide(),this._$hoverCanvas.hide(),this._$failCanvas.show()):(this._progressBar.$progressBar.css("border-color","#da5a47"),this._progressBar.$innerProgressBar.css("background-color","#da5a47"),this._progressBar.setProgressPercentage(50)),this.setDescription(t))},hideFailMode:function(){this.failMode&&(this.failMode=!1,this._canvasSupported?(this._$bgCanvas.show(),this._$staticCanvas.show(),this._$hoverCanvas.show(),this._$failCanvas.hide()):(this._progressBar.$progressBar.css("border-color",""),this._progressBar.$innerProgressBar.css("background-color",""),this._progressBar.setProgressPercentage(50)))},toggleHud:function(){this.hud?this.hud.toggle():this.hud=new o},_createCanvas:function(t,e){var i=$('<canvas id="job-icon-'+t+'" width="'+this._canvasSize+'" height="'+this._canvasSize+'"/>').appendTo(this.$canvasContainer),s=i[0].getContext("2d");return s.strokeStyle=e,s.lineWidth=this._lineWidth,s.lineCap="round",i},_setArc:function(t,e){this._arcStartPos=t,this._arcEndPos=e,this._drawArc(this._staticCtx,t,e),this._drawArc(this._hoverCtx,t,e)},_drawArc:function(t,e,i){t.clearRect(0,0,this._canvasSize,this._canvasSize),t.beginPath(),t.arc(this._arcPos,this._arcPos,this._arcRadius,(1.5+2*e)*Math.PI,(1.5+2*i)*Math.PI),t.stroke(),t.closePath()},_animateArc:function(t,e,i){this._arcStepTimeout&&clearTimeout(this._arcStepTimeout),this._arcStep=0,this._arcStartStepSize=(t-this._arcStartPos)/10,this._arcEndStepSize=(e-this._arcEndPos)/10,this._arcAnimateCallback=i,this._takeNextArcStep()},_takeNextArcStep:function(){this._setArc(this._arcStartPos+this._arcStartStepSize,this._arcEndPos+this._arcEndStepSize),this._arcStep++,this._arcStep<10?this._arcStepTimeout=setTimeout($.proxy(this,"_takeNextArcStep"),50):this._arcAnimateCallback&&this._arcAnimateCallback()}}),o=Garnish.HUD.extend({jobsById:null,completedJobs:null,updateViewProxy:null,init:function(){this.jobsById={},this.completedJobs=[],this.updateViewProxy=$.proxy(this,"updateView"),this.base(Craft.cp.jobProgressIcon.$a),this.$main.attr("id","queue-hud")},onShow:function(){Craft.cp.on("setJobInfo",this.updateViewProxy),this.updateView(),this.base()},onHide:function(){if(Craft.cp.off("setJobInfo",this.updateViewProxy),this.completedJobs.length){for(var t=0;t<this.completedJobs.length;t++)this.completedJobs[t].destroy();this.completedJobs=[]}this.base()},updateView:function(){var t,e=[];if(Craft.cp.jobInfo)for(t=0;t<Craft.cp.jobInfo.length;t++)e.push(parseInt(Craft.cp.jobInfo[t].id));for(var i in this.jobsById)this.jobsById.hasOwnProperty(i)&&(Craft.inArray(parseInt(i),e)||(this.jobsById[i].complete(),this.completedJobs.push(this.jobsById[i]),delete this.jobsById[i]));if(Craft.cp.jobInfo&&Craft.cp.jobInfo.length)for(t=0;t<Craft.cp.jobInfo.length;t++){var s=Craft.cp.jobInfo[t];if(this.jobsById[s.id])this.jobsById[s.id].updateStatus(s);else{this.jobsById[s.id]=new o.Job(this,s);for(var n=!1,a=t+1;a<Craft.cp.jobInfo.length;a++)if(this.jobsById[Craft.cp.jobInfo[a].id]){this.jobsById[s.id].$container.insertBefore(this.jobsById[Craft.cp.jobInfo[a].id].$container),n=!0;break}if(!n){var r=this.$main.children("object");r.length?this.jobsById[s.id].$container.insertBefore(r):this.jobsById[s.id].$container.appendTo(this.$main)}}}else this.hide()}});o.Job=Garnish.Base.extend({hud:null,id:null,description:null,status:null,progress:null,$container:null,$statusContainer:null,$descriptionContainer:null,$progressLabel:null,_progressBar:null,init:function(t,e){this.hud=t,this.id=e.id,this.description=e.description,this.$container=$("<div/>",{class:"job"});var i=$("<div/>",{class:"flex"}).appendTo(this.$container);$("<div/>",{class:"flex-grow"}).text(e.description).appendTo(i),this.$statusContainer=$('<div class="job-status"/>').appendTo(i),this.$container.data("job",this),this.updateStatus(e)},updateStatus:function(t){if(this.status!==(this.status=t.status))switch(this.$statusContainer.empty(),this.status){case Craft.CP.JOB_STATUS_WAITING:this.$statusContainer.text(Craft.t("app","Pending"));break;case Craft.CP.JOB_STATUS_RESERVED:this._progressBar=new Craft.ProgressBar(this.$statusContainer),this._progressBar.showProgressBar();break;case Craft.CP.JOB_STATUS_FAILED:$("<span/>",{class:"error",text:Craft.t("app","Failed"),title:t.error}).appendTo(this.$statusContainer);var e=$('<a class="menubtn error" title="'+Craft.t("app","Options")+'"/>').appendTo(this.$statusContainer);$('<div class="menu"><ul><li><a data-action="retry">'+Craft.t("app","Try again")+'</a></li><li><a data-action="release">'+Craft.t("app","Cancel")+"</a></li></ul></div>").appendTo(this.$statusContainer),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"performErrorAction")})}this.status===Craft.CP.JOB_STATUS_RESERVED?(this._progressBar.setProgressPercentage(t.progress),t.progressLabel&&(this.$progressLabel||(this.$progressLabel=$('<div class="light smalltext"/>').appendTo(this.$container)),this.$progressLabel.text(t.progressLabel))):this.$progressLabel&&(this.$progressLabel.remove(),this.$progressLabel=null)},performErrorAction:function(t){switch($(t).data("action")){case"retry":Craft.cp.displayedJobInfo.status=Craft.CP.JOB_STATUS_WAITING,Craft.cp.displayedJobInfo.progress=0,Craft.cp.updateJobIcon(!1),Craft.postActionRequest("queue/retry",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this));break;case"release":Craft.postActionRequest("queue/release",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this))}},complete:function(){this.$statusContainer.empty(),$('<div data-icon="check"/>').appendTo(this.$statusContainer)},destroy:function(){this.hud.jobsById[this.id]&&delete this.hud.jobsById[this.id],this.$container.remove(),this.base()}}),Craft.CustomizeSourcesModal=Garnish.Modal.extend({elementIndex:null,$elementIndexSourcesContainer:null,$sidebar:null,$sourcesContainer:null,$sourceSettingsContainer:null,$newHeadingBtn:null,$footer:null,$footerBtnContainer:null,$saveBtn:null,$cancelBtn:null,$saveSpinner:null,$loadingSpinner:null,sourceSort:null,sources:null,selectedSource:null,updateSourcesOnSave:!1,availableTableAttributes:null,init:function(t,e){this.base(),this.setSettings(e,{resizable:!0}),this.elementIndex=t,this.$elementIndexSourcesContainer=this.elementIndex.$sidebar.children("nav").children("ul");var i=$('<form class="modal customize-sources-modal"/>').appendTo(Garnish.$bod);this.$sidebar=$('<div class="cs-sidebar block-types"/>').appendTo(i),this.$sourcesContainer=$('<div class="sources">').appendTo(this.$sidebar),this.$sourceSettingsContainer=$('<div class="source-settings">').appendTo(i),this.$footer=$('<div class="footer"/>').appendTo(i),this.$footerBtnContainer=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn" role="button"/>').text(Craft.t("app","Cancel")).appendTo(this.$footerBtnContainer),this.$saveBtn=$('<div class="btn submit disabled" role="button"/>').text(Craft.t("app","Save")).appendTo(this.$footerBtnContainer),this.$saveSpinner=$('<div class="spinner hidden"/>').appendTo(this.$footerBtnContainer),this.$newHeadingBtn=$('<div class="btn submit add icon"/>').text(Craft.t("app","New heading")).appendTo($('<div class="buttons left secondary-buttons"/>').appendTo(this.$footer)),this.$loadingSpinner=$('<div class="spinner"/>').appendTo(i),this.setContainer(i),this.show();var s={elementType:this.elementIndex.elementType};Craft.postActionRequest("element-index-settings/get-customize-sources-modal-data",s,$.proxy(function(t,e){this.$loadingSpinner.remove(),"success"===e&&(this.$saveBtn.removeClass("disabled"),this.buildModal(t))},this)),this.addListener(this.$newHeadingBtn,"click","handleNewHeadingBtnClick"),this.addListener(this.$cancelBtn,"click","hide"),this.addListener(this.$saveBtn,"click","save"),this.addListener(this.$container,"submit","save")},buildModal:function(t){this.availableTableAttributes=t.availableTableAttributes,this.sourceSort=new Garnish.DragSort({handle:".move",axis:"y",onSortChange:$.proxy(function(){this.updateSourcesOnSave=!0},this)}),this.sources=[];for(var e=0;e<t.sources.length;e++){var i=this.addSource(t.sources[e]);this.sources.push(i)}this.selectedSource||void 0===this.sources[0]||this.sources[0].select()},addSource:function(t){var e,i=$('<div class="customize-sources-item"/>').appendTo(this.$sourcesContainer),s=$('<div class="label"/>').appendTo(i),n=$('<input type="hidden"/>').appendTo(i);return $('<a class="move icon" title="'+Craft.t("app","Reorder")+'" role="button"></a>').appendTo(i),void 0!==t.heading?(i.addClass("heading"),n.attr("name","sourceOrder[][heading]"),(e=new Craft.CustomizeSourcesModal.Heading(this,i,s,n,t)).updateItemLabel(t.heading)):(n.attr("name","sourceOrder[][key]").val(t.key),(e=new Craft.CustomizeSourcesModal.Source(this,i,s,n,t)).updateItemLabel(t.label),(this.elementIndex.sourceKey+"/").substr(0,t.key.length+1)===t.key+"/"&&e.select()),this.sourceSort.addItems(i),e},handleNewHeadingBtnClick:function(){var t=this.addSource({heading:""});Garnish.scrollContainerToElement(this.$sidebar,t.$item),t.select(),this.updateSourcesOnSave=!0},save:function(t){if(t&&t.preventDefault(),!this.$saveBtn.hasClass("disabled")&&this.$saveSpinner.hasClass("hidden")){this.$saveSpinner.removeClass("hidden");var e=this.$container.serialize()+"&elementType="+this.elementIndex.elementType;Craft.postActionRequest("element-index-settings/save-customize-sources-modal-settings",e,$.proxy(function(t,e){if(this.$saveSpinner.addClass("hidden"),"success"===e&&t.success){if(this.updateSourcesOnSave&&this.$elementIndexSourcesContainer.length){for(var i,s=null,n=0;n<this.sourceSort.$items.length;n++){var a=this.sourceSort.$items.eq(n).data("source"),r=a.getIndexSource();r&&(a.isHeading()?i=r:(i&&(this.appendSource(i,s),s=i,i=null),this.appendSource(r,s),s=r))}if(s){var o=s.nextAll();this.elementIndex.sourceSelect.removeItems(o),o.remove()}}this.selectedSource&&this.selectedSource.sourceData.key&&(this.elementIndex.selectSourceByKey(this.selectedSource.sourceData.key),this.elementIndex.updateElements()),Craft.cp.displayNotice(Craft.t("app","Source settings saved")),this.hide()}else{var l="success"===e&&t.error?t.error:Craft.t("app","An unknown error occurred.");Craft.cp.displayError(l)}},this))}},appendSource:function(t,e){e?t.insertAfter(e):t.prependTo(this.$elementIndexSourcesContainer)},destroy:function(){for(var t=0;t<this.sources.length;t++)this.sources[t].destroy();delete this.sources,this.base()}}),Craft.CustomizeSourcesModal.BaseSource=Garnish.Base.extend({modal:null,$item:null,$itemLabel:null,$itemInput:null,$settingsContainer:null,sourceData:null,init:function(t,e,i,s,n){this.modal=t,this.$item=e,this.$itemLabel=i,this.$itemInput=s,this.sourceData=n,this.$item.data("source",this),this.addListener(this.$item,"click","select")},isHeading:function(){return!1},isSelected:function(){return this.modal.selectedSource===this},select:function(){this.isSelected()||(this.modal.selectedSource&&this.modal.selectedSource.deselect(),this.$item.addClass("sel"),(this.modal.selectedSource=this).$settingsContainer?this.$settingsContainer.removeClass("hidden"):this.$settingsContainer=$("<div/>").append(this.createSettings()).appendTo(this.modal.$sourceSettingsContainer),this.modal.$sourceSettingsContainer.scrollTop(0))},createSettings:function(){},getIndexSource:function(){},deselect:function(){this.$item.removeClass("sel"),this.modal.selectedSource=null,this.$settingsContainer.addClass("hidden")},updateItemLabel:function(t){this.$itemLabel.text(t)},destroy:function(){this.$item.data("source",null),this.base()}}),Craft.CustomizeSourcesModal.Source=Craft.CustomizeSourcesModal.BaseSource.extend({createSettings:function(){if(this.sourceData.tableAttributes.length){var t,e,i,s,n=this.sourceData.tableAttributes[0],a=n[0],r=n[1],o=this.createTableColumnOption(a,r,!0,!0),l=$("<div/>"),h=[a];for($('<input type="hidden" name="sources['+this.sourceData.key+'][tableAttributes][]" value=""/>').appendTo(l),t=1;t<this.sourceData.tableAttributes.length;t++)i=(e=this.sourceData.tableAttributes[t])[0],s=e[1],l.append(this.createTableColumnOption(i,s,!1,!0)),h.push(i);for(t=0;t<this.modal.availableTableAttributes.length;t++)i=(e=this.modal.availableTableAttributes[t])[0],s=e[1],Craft.inArray(i,h)||l.append(this.createTableColumnOption(i,s,!1,!1));return new Garnish.DragSort(l.children(),{handle:".move",axis:"y"}),Craft.ui.createField($([o[0],l[0]]),{label:Craft.t("app","Table Columns"),instructions:Craft.t("app","Choose which table columns should be visible for this source, and in which order.")})}},createTableColumnOption:function(t,e,i,s){var n=$('<div class="customize-sources-table-column"/>').append('<div class="icon move"/>').append(Craft.ui.createCheckbox({label:e,name:"sources["+this.sourceData.key+"][tableAttributes][]",value:t,checked:s,disabled:i}));return i&&n.children(".move").addClass("disabled"),n},getIndexSource:function(){var t=this.modal.elementIndex.getSourceByKey(this.sourceData.key);if(t)return t.closest("li")}}),Craft.CustomizeSourcesModal.Heading=Craft.CustomizeSourcesModal.BaseSource.extend({$labelField:null,$labelInput:null,$deleteBtn:null,isHeading:function(){return!0},select:function(){this.base(),this.$labelInput.trigger("focus")},createSettings:function(){return this.$labelField=Craft.ui.createTextField({label:Craft.t("app","Heading"),instructions:Craft.t("app","This can be left blank if you just want an unlabeled separator."),value:this.sourceData.heading}),this.$labelInput=this.$labelField.find(".text"),this.$deleteBtn=$('<a class="error delete"/>').text(Craft.t("app","Delete heading")),this.addListener(this.$labelInput,"textchange","handleLabelInputChange"),this.addListener(this.$deleteBtn,"click","deleteHeading"),$([this.$labelField[0],$("<hr/>")[0],this.$deleteBtn[0]])},handleLabelInputChange:function(){this.updateItemLabel(this.$labelInput.val()),this.modal.updateSourcesOnSave=!0},updateItemLabel:function(t){this.$itemLabel.html((t?Craft.escapeHtml(t):'<em class="light">'+Craft.t("app","(blank)")+"</em>")+"&nbsp;"),this.$itemInput.val(t)},deleteHeading:function(){this.modal.sourceSort.removeItems(this.$item),this.modal.sources.splice($.inArray(this,this.modal.sources),1),this.modal.updateSourcesOnSave=!0,this.isSelected()&&(this.deselect(),this.modal.sources.length&&this.modal.sources[0].select()),this.$item.remove(),this.$settingsContainer.remove(),this.destroy()},getIndexSource:function(){var t=this.$labelInput?this.$labelInput.val():this.sourceData.heading;return $('<li class="heading"/>').append($("<span/>").text(t))}}),Craft.DataTableSorter=Garnish.DragSort.extend({$table:null,init:function(t,e){this.$table=$(t);var i=this.$table.children("tbody").children(":not(.filler)");(e=$.extend({},Craft.DataTableSorter.defaults,e)).container=this.$table.children("tbody"),e.helper=$.proxy(this,"getHelper"),e.caboose="<tr/>",e.axis=Garnish.Y_AXIS,e.magnetStrength=4,e.helperLagBase=1.5,this.base(i,e)},getHelper:function(t){var e=$('<div class="'+this.settings.helperClass+'"/>').appendTo(Garnish.$bod),i=$("<table/>").appendTo(e),s=$("<tbody/>").appendTo(i);t.appendTo(s),i.width(this.$table.width()),i.prop("className",this.$table.prop("className"));for(var n=this.$table.find("tr:first").children(),a=t.children(),r=0;r<a.length;r++)$(a[r]).width($(n[r]).width());return e}},{defaults:{handle:".move",helperClass:"datatablesorthelper"}}),Craft.DeleteUserModal=Garnish.Modal.extend({id:null,userId:null,$deleteActionRadios:null,$deleteSpinner:null,userSelect:null,_deleting:!1,init:function(t,e){this.id=Math.floor(1e9*Math.random()),this.userId=t,e=$.extend(Craft.DeleteUserModal.defaults,e);var i,s=$('<form class="modal fitted deleteusermodal" method="post" accept-charset="UTF-8">'+Craft.getCsrfInput()+'<input type="hidden" name="action" value="users/delete-user"/>'+(Garnish.isArray(this.userId)?"":'<input type="hidden" name="userId" value="'+this.userId+'"/>')+(e.redirect?'<input type="hidden" name="redirect" value="'+e.redirect+'"/>':"")+"</form>").appendTo(Garnish.$bod),n=$('<div class="body"><div class="content-summary"><p>'+Craft.t("app","What do you want to do with their content?")+'</p><ul class="bullets"></ul></div><div class="options"><label><input type="radio" name="contentAction" value="transfer"/> '+Craft.t("app","Transfer it to:")+'</label><div id="transferselect'+this.id+'" class="elementselect"><div class="elements"></div><div class="btn add icon dashed">'+Craft.t("app","Choose a user")+'</div></div></div><div><label class="error"><input type="radio" name="contentAction" value="delete"/> '+Craft.t("app","Delete it")+"</label></div></div>").appendTo(s),a=$('<div class="buttons right"/>').appendTo(n),r=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(a);if(e.contentSummary.length)for(var o=0;o<e.contentSummary.length;o++)n.find("ul").append($("<li/>",{text:e.contentSummary[o]}));else n.find("ul").remove();if(this.$deleteActionRadios=n.find("input[type=radio]"),this.$deleteSubmitBtn=$('<input type="submit" class="btn submit disabled" value="'+(Garnish.isArray(this.userId)?Craft.t("app","Delete users"):Craft.t("app","Delete user"))+'" />').appendTo(a),this.$deleteSpinner=$('<div class="spinner hidden"/>').appendTo(a),Garnish.isArray(this.userId)){i=["and"];for(o=0;o<this.userId.length;o++)i.push("not "+this.userId[o])}else i="not "+this.userId;this.userSelect=new Craft.BaseElementSelectInput({id:"transferselect"+this.id,name:"transferContentTo",elementType:"craft\\elements\\User",criteria:{id:i},limit:1,modalSettings:{closeOtherModals:!1},onSelectElements:$.proxy(function(){this.updateSizeAndPosition(),this.$deleteActionRadios.first().prop("checked")?this.validateDeleteInputs():this.$deleteActionRadios.first().trigger("click")},this),onRemoveElements:$.proxy(this,"validateDeleteInputs"),selectable:!1,editable:!1}),this.addListener(r,"click","hide"),this.addListener(this.$deleteActionRadios,"change","validateDeleteInputs"),this.addListener(s,"submit","handleSubmit"),this.base(s,e)},validateDeleteInputs:function(){var t=!1;return this.$deleteActionRadios.eq(0).prop("checked")?t=!!this.userSelect.totalSelected:this.$deleteActionRadios.eq(1).prop("checked")&&(t=!0),t?this.$deleteSubmitBtn.removeClass("disabled"):this.$deleteSubmitBtn.addClass("disabled"),t},handleSubmit:function(t){!this._deleting&&this.validateDeleteInputs()?(this.$deleteSubmitBtn.addClass("active"),this.$deleteSpinner.removeClass("hidden"),this.disable(),this.userSelect.disable(),!(this._deleting=!0)===this.settings.onSubmit()&&t.preventDefault()):t.preventDefault()},onFadeIn:function(){Garnish.isMobileBrowser(!0)||this.$deleteActionRadios.first().trigger("focus"),this.base()}},{defaults:{contentSummary:[],onSubmit:$.noop,redirect:null}}),Craft.DraftEditor=Garnish.Base.extend({$revisionBtn:null,$revisionLabel:null,$spinner:null,$statusIcon:null,$editMetaBtn:null,metaHud:null,$nameTextInput:null,$notesTextInput:null,$saveMetaBtn:null,lastSerializedValue:null,timeout:null,saving:!1,saveXhr:null,checkFormAfterUpdate:!1,submittingForm:!1,duplicatedElements:null,errors:null,preview:null,previewToken:null,init:function(t){if(this.setSettings(t,Craft.DraftEditor.defaults),this.duplicatedElements={},this.$revisionBtn=$("#revision-btn"),this.$revisionLabel=$("#revision-label"),this.$spinner=$("#revision-spinner"),this.$statusIcon=$("#revision-status"),this.settings.previewTargets.length){this.settings.enablePreview&&this.addListener($("#preview-btn"),"click","openPreview");var e=$("#share-btn");1===this.settings.previewTargets.length?this.addListener(e,"click",function(){this.openShareLink(this.settings.previewTargets[0].url)}):this.createShareMenu(e)}this.settings.revisionId||(this.lastSerializedValue=this.serializeForm(!0),Craft.cp.$primaryForm.data("initialSerializedValue",this.lastSerializedValue),Craft.cp.$primaryForm.data("serializer",function(){return this.serializeForm(!0)}.bind(this)),this.settings.draftId?this.initForDraft():(this.addListener($("#save-draft-btn"),"click",function(t){t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut")}.bind(this)),this.settings.canUpdateSource||this.addListener(Craft.cp.$primaryForm,"submit.saveShortcut",function(t){t.saveShortcut&&(t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut"))}.bind(this))))},initForDraft:function(){this.createEditMetaBtn(),this.addListener(Garnish.$bod,"keypress keyup change focus blur click mousedown mouseup",function(t){$(t.target).is(this.statusIcons())||(clearTimeout(this.timeout),Craft.inArray(t.type,["keypress","keyup","change"])?this.timeout=setTimeout(this.checkForm.bind(this),500):this.checkForm())}),this.addListener(Craft.cp.$primaryForm,"submit","handleFormSubmit"),this.addListener(this.$statusIcon,"click",function(){this.showStatusHud(this.$statusIcon)}.bind(this))},showStatusHud:function(t){if(null===this.errors)e="<p>"+Craft.t("app","The draft has been saved.")+"</p>";else{var e='<p class="error">'+Craft.t("app","The draft could not be saved.")+"</p>";if(this.errors.length){for(e+='<ul class="errors">',i=0;i<this.errors.length;i++)e+="<li>"+Craft.escapeHtml(this.errors[i])+"</li>";e+="</ul>"}}var s=new Garnish.HUD(t,e,{onHide:function(){s.destroy(),delete s}})},spinners:function(){return this.preview?this.$spinner.add(this.preview.$spinner):this.$spinner},statusIcons:function(){return this.preview?this.$statusIcon.add(this.preview.$statusIcon):this.$statusIcon},createEditMetaBtn:function(){this.$editMetaBtn=$("<a/>",{class:"btn edit icon",title:Craft.t("app","Edit draft settings")}).appendTo($("#revision-btngroup")),this.addListener(this.$editMetaBtn,"click","showMetaHud")},createShareMenu:function(t){t.addClass("menubtn");for(var e,i,s=$("<div/>",{class:"menu"}).insertAfter(t),n=$("<ul/>").appendTo(s),a=0;a<this.settings.previewTargets.length;a++)e=$("<li/>").appendTo(n),i=$("<a/>",{text:this.settings.previewTargets[a].label}).appendTo(e),this.addListener(i,"click",{target:a},function(t){this.openShareLink(this.settings.previewTargets[t.data.target].url)}.bind(this))},getPreviewToken:function(){return new Promise(function(i,s){this.previewToken?i(this.previewToken):Craft.postActionRequest("preview/create-token",{elementType:this.settings.elementType,sourceId:this.settings.sourceId,siteId:this.settings.siteId,draftId:this.settings.draftId,revisionId:this.settings.revisionId},function(t,e){"success"===e?(this.previewToken=t.token,i(this.previewToken)):s()}.bind(this))}.bind(this))},getTokenizedPreviewUrl:function(s,n){return new Promise(function(e,t){var i={};!n&&this.settings.isLive||(i[n||"x-craft-preview"]=Craft.randomString(10)),this.settings.isLive?e(Craft.getUrl(s,i)):this.getPreviewToken().then(function(t){i[Craft.tokenParam]=t,e(Craft.getUrl(s,i))}).catch(t)}.bind(this))},openShareLink:function(t){this.getTokenizedPreviewUrl(t).then(function(t){window.open(t)})},getPreview:function(){return this.preview||(this.preview=new Craft.Preview(this)),this.preview},openPreview:function(){return new Promise(function(t,e){this.ensureIsDraftOrRevision().then(function(){this.getPreview().open(),t()}.bind(this)).catch(e)}.bind(this))},ensureIsDraftOrRevision:function(){return new Promise(function(t,e){this.settings.draftId||this.settings.revisionid?t():this.createDraft().then(t).catch(e)}.bind(this))},serializeForm:function(t){var e=Craft.cp.$primaryForm.serialize();return this.isPreviewActive()&&(e=e.replace("__PREVIEW_FIELDS__=1",this.preview.$editor.serialize())),t&&!this.settings.isUnsavedDraft&&(e=(e=e.replace(/&action=[^&]*/,"")).replace(/&redirect=[^&]*/,"")),e},checkForm:function(t){if(this.settings.draftId){clearTimeout(this.timeout),this.timeout=null;var e=this.serializeForm(!0);!t&&e===this.lastSerializedValue||this.saveDraft(e)}},isPreviewActive:function(){return this.preview&&this.preview.isActive},createDraft:function(){return new Promise(function(t,e){this.saveDraft(this.serializeForm(!0)).then(t).catch(e)}.bind(this))},saveDraft:function(b){return new Promise(function(f,m){if(this.submittingForm)m();else if(this.lastSerializedValue=b,this.saving)this.checkFormAfterUpdate=!0;else{this.saving=!0;var v=this.spinners().removeClass("hidden"),C=this.statusIcons().removeClass("invisible checkmark-icon alert-icon").addClass("hidden");this.$saveMetaBtn&&this.$saveMetaBtn.addClass("active"),this.errors=null;var t=Craft.getActionUrl(this.settings.saveDraftAction);this.saveXhr=Craft.postActionRequest(t,this.prepareData(b),function(t,e){if(v.addClass("hidden"),this.$saveMetaBtn&&this.$saveMetaBtn.removeClass("active"),this.saving=!1,"abort"!==e){if("success"!==e||t.errors)return this.errors=(t?t.errors:null)||[],C.removeClass("hidden checkmark-icon").addClass("alert-icon").attr("title",Craft.t("app","The draft could not be saved.")),void m();t.title&&$("#header h1").text(t.title),t.docTitle&&(document.title=t.docTitle),this.$revisionLabel.text(t.draftName),this.settings.draftName=t.draftName,this.settings.draftNotes=t.draftNotes;var i=this.$revisionBtn.data("menubtn")?this.$revisionBtn.data("menubtn").menu:null,s=!this.settings.draftId;if(s){var n,a=document.location.href.search("#");n=-1!==a?document.location.href.substr(0,a):document.location.href,n+=(n.match(/\?/)?"&":"?")+"draftId="+t.draftId,-1!==a&&(n+=document.location.href.substr(a)),history.replaceState({},"",n);var r=$("#save-btn-container");r.length&&r.replaceWith($("<input/>",{type:"submit",class:"btn submit",value:Craft.t("app","Update {type}",{type:this.settings.elementTypeDisplayName})}));var o=$("#save-draft-btn-container");if(o.add(o.prev(".spacer")).remove(),this.settings.draftId=t.draftId,this.settings.isLive=!1,this.settings.canDeleteDraft=!0,this.previewToken=null,this.initForDraft(),i){i.$options.filter(":not(.site-option)").removeClass("sel");var l=i.$container.find(".revision-group-drafts");if(!l.length){var h=$("<h6/>",{text:Craft.t("app","Drafts")}).insertAfter(i.$container.find(".revision-group-current"));l=$("<ul/>",{class:"padded revision-group-drafts"}).insertAfter(h)}var d=$("<li/>").appendTo(l),c=$("<a/>",{class:"sel",html:'<span class="draft-name"></span> <span class="draft-creator light"></span>'}).appendTo(d);i.addOptions(c),i.selectOption(c);for(var u=i.$options.filter(".site-option[href]"),p=0;p<u.length;p++){var g=u.eq(p);g.attr("href",Craft.getUrl(g.attr("href"),{draftId:t.draftId}))}}}i&&(i.$options.filter(".sel").find(".draft-name").text(t.draftName),i.$options.filter(".sel").find(".draft-creator").text(Craft.t("app","by {creator}",{creator:t.creator}))),t.previewTargets&&JSON.stringify(t.previewTargets)!==JSON.stringify(this.settings.previewTargets)&&this.updatePreviewTargets(t.previewTargets),this.afterUpdate(b),s&&this.trigger("createDraft"),this.$nameTextInput&&this.checkMetaValues(),$.extend(this.duplicatedElements,t.duplicatedElements),f()}}.bind(this))}}.bind(this))},prepareData:function(t){for(var e in this.duplicatedElements)this.duplicatedElements.hasOwnProperty(e)&&(t=t.replace(new RegExp(Craft.escapeRegex(encodeURIComponent("]["+e+"]")),"g"),"]["+this.duplicatedElements[e]+"]"));return this.settings.draftId&&(t+="&draftId="+this.settings.draftId+"&draftName="+encodeURIComponent(this.settings.draftName)+"&draftNotes="+encodeURIComponent(this.settings.draftNotes||"")),t},updatePreviewTargets:function(t){for(var e={},i=0;i<this.settings.previewTargets.length;i++)e[this.settings.previewTargets[i].label]=this.settings.previewTargets[i];for(i=0;i<t.length;i++)e[t[i].label]&&(e[t[i].label].url=t[i].url)},afterUpdate:function(t){Craft.cp.$primaryForm.data("initialSerializedValue",t),this.statusIcons().removeClass("hidden").addClass("checkmark-icon").attr("title",Craft.t("app","The draft has been saved.")),this.trigger("update"),this.checkFormAfterUpdate&&(this.checkFormAfterUpdate=!1,this.timeout||this.checkForm())},showMetaHud:function(){this.metaHud?this.metaHud.show():(this.createMetaHud(),this.onMetaHudShow()),Garnish.isMobileBrowser(!0)||this.$nameTextInput.trigger("focus")},createMetaHud:function(){var t,e,i=$("<div/>");t=$('<div class="field"><div class="heading"><label for="draft-name">'+Craft.t("app","Draft Name")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$nameTextInput=$('<input type="text" class="text fullwidth" id="draft-name"/>').appendTo(e).val(this.settings.draftName),t=$('<div class="field"><div class="heading"><label for="draft-notes">'+Craft.t("app","Notes")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$notesTextInput=$('<textarea class="text fullwidth" id="draft-notes" rows="2"/>').appendTo(e).val(this.settings.draftNotes);var s=$('<div class="hud-footer flex flex-center"/>').appendTo(i);if(this.settings.canDeleteDraft)var n=$('<a class="error" role="button">'+Craft.t("app","Delete")+"</a>").appendTo(s);$('<div class="flex-grow"></div>').appendTo(s),this.$saveMetaBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Save")+'"/>').appendTo(s),this.metaHud=new Garnish.HUD(this.$editMetaBtn,i,{onSubmit:this.saveMeta.bind(this)}),new Garnish.NiceText(this.$notesTextInput),this.addListener(this.$notesTextInput,"keydown","onNotesKeydown"),this.addListener(this.$nameTextInput,"textchange","checkMetaValues"),this.addListener(this.$notesTextInput,"textchange","checkMetaValues"),this.metaHud.on("show",this.onMetaHudShow.bind(this)),this.metaHud.on("hide",this.onMetaHudHide.bind(this)),this.metaHud.on("escape",this.onMetaHudEscape.bind(this)),n&&this.addListener(n,"click","deleteDraft")},onMetaHudShow:function(){this.$editMetaBtn.addClass("active")},onMetaHudHide:function(){this.$editMetaBtn.removeClass("active")},onMetaHudEscape:function(){this.$nameTextInput.val(this.settings.draftName),this.$notesTextInput.val(this.settings.draftNotes)},onNotesKeydown:function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.metaHud.submit())},checkMetaValues:function(){return!this.$nameTextInput.val()||this.$nameTextInput.val()===this.settings.draftName&&this.$notesTextInput.val()===this.settings.draftNotes?(this.$saveMetaBtn.addClass("disabled"),!1):(this.$saveMetaBtn.removeClass("disabled"),!0)},shakeMetaHud:function(){Garnish.shake(this.metaHud.$hud)},saveMeta:function(){this.checkMetaValues()?(this.settings.draftName=this.$nameTextInput.val(),this.settings.draftNotes=this.$notesTextInput.val(),this.metaHud.hide(),this.checkForm(!0)):this.shakeMetaHud()},deleteDraft:function(){confirm(Craft.t("app","Are you sure you want to delete this draft?"))&&Craft.postActionRequest(this.settings.deleteDraftAction,{draftId:this.settings.draftId},function(t,e){"success"===e&&(window.location.href=this.settings.cpEditUrl)}.bind(this))},handleFormSubmit:function(t){if(t.preventDefault(),!this.submittingForm&&(t.customTrigger||this.settings.isUnsavedDraft||!this.settings.draftId||this.settings.canUpdateSource)){Craft.cp.$confirmUnloadForms=Craft.cp.$confirmUnloadForms.not(Craft.cp.$primaryForm),this.saving&&this.saveXhr.abort();for(var e,i=$("<form/>",{attr:{"accept-charset":Craft.cp.$primaryForm.attr("accept-charset"),action:Craft.cp.$primaryForm.attr("action"),enctype:Craft.cp.$primaryForm.attr("enctype"),method:Craft.cp.$primaryForm.attr("method"),target:Craft.cp.$primaryForm.attr("target")}}),s=this.prepareData(this.serializeForm(!1)).split("&"),n=0;n<s.length;n++)e=s[n].split("=",2),$("<input/>",{type:"hidden",name:decodeURIComponent(e[0]),value:decodeURIComponent(e[1]||"")}).appendTo(i);t.customTrigger&&t.customTrigger.data("action")||$("<input/>",{type:"hidden",name:"action",value:this.settings.applyDraftAction}).appendTo(i),t.saveShortcut&&Craft.cp.$primaryForm.data("saveshortcut-redirect")||t.customTrigger&&t.customTrigger.data("redirect")||$("<input/>",{type:"hidden",name:"redirect",value:this.settings.hashedRedirectUrl}).appendTo(i),i.appendTo(Garnish.$bod),i.submit(),this.submittingForm=!0}}},{defaults:{elementType:null,sourceId:null,siteId:null,isLive:!1,cpEditUrl:null,draftId:null,revisionId:null,draftName:null,draftNotes:null,canDeleteDraft:!1,canUpdateSource:!1,saveDraftAction:null,deleteDraftAction:null,applyDraftAction:null,enablePreview:!1,previewTargets:[]}}),Craft.DynamicGenerator=Craft.BaseInputGenerator.extend({callback:$.noop,init:function(t,e,i){this.callback=i,this.base(t,e)},generateTargetValue:function(t){return this.callback(t)}}),Craft.EditableTable=Garnish.Base.extend({initialized:!1,id:null,baseName:null,columns:null,sorter:null,biggestId:-1,$table:null,$tbody:null,$addRowBtn:null,rowCount:0,hasMaxRows:!1,hasMinRows:!1,radioCheckboxes:null,init:function(t,e,i,s){if(this.id=t,this.baseName=e,this.columns=i,this.setSettings(s,Craft.EditableTable.defaults),this.radioCheckboxes={},this.$table=$("#"+t),this.$tbody=this.$table.children("tbody"),this.rowCount=this.$tbody.find("tr").length,this.$table.data("editable-table")&&(Garnish.log("Double-instantiating an editable table on an element"),this.$table.data("editable-table").destroy()),this.$table.data("editable-table",this),this.sorter=new Craft.DataTableSorter(this.$table,{helperClass:"editabletablesorthelper",copyDraggeeInputValuesToHelper:!0}),this.isVisible()?this.initialize():setTimeout($.proxy(this,"initializeIfVisible"),500),this.settings.minRows&&this.rowCount<this.settings.minRows)for(var n=this.rowCount;n<this.settings.minRows;n++)this.addRow()},isVisible:function(){return 0<this.$table.height()},initialize:function(){if(this.initialized)return!1;this.initialized=!0,this.removeListener(Garnish.$win,"resize");for(var t=this.$tbody.children(),e=0;e<t.length;e++)this.createRowObj(t[e]);return this.$addRowBtn=this.$table.next(".add"),this.updateAddRowButton(),this.addListener(this.$addRowBtn,"activate","addRow"),!0},initializeIfVisible:function(){this.removeListener(Garnish.$win,"resize"),this.isVisible()?this.initialize():this.addListener(Garnish.$win,"resize","initializeIfVisible")},updateAddRowButton:function(){this.canAddRow()?(this.$addRowBtn.css("opacity","1"),this.$addRowBtn.css("pointer-events","auto")):(this.$addRowBtn.css("opacity","0.2"),this.$addRowBtn.css("pointer-events","none"))},canDeleteRow:function(){return this.rowCount>this.settings.minRows},deleteRow:function(t){this.canDeleteRow()&&(this.sorter.removeItems(t.$tr),t.$tr.remove(),this.rowCount--,this.updateAddRowButton(),this.settings.onDeleteRow(t.$tr),t.destroy())},canAddRow:function(){return!this.settings.staticRows&&(!this.settings.maxRows||this.rowCount<this.settings.maxRows)},addRow:function(t,e){if(this.canAddRow()){var i=this.settings.rowIdPrefix+(this.biggestId+1),s=this.createRow(i,this.columns,this.baseName,$.extend({},this.settings.defaultValues));e?s.prependTo(this.$tbody):s.appendTo(this.$tbody);var n=this.createRowObj(s);return this.sorter.addItems(s),!1!==t&&s.find("input:visible,textarea:visible,select:visible").first().trigger("focus"),this.rowCount++,this.updateAddRowButton(),this.settings.onAddRow(s),n}},createRow:function(t,e,i,s){return Craft.EditableTable.createRow(t,e,i,s)},createRowObj:function(t){return new Craft.EditableTable.Row(this,t)},focusOnPrevRow:function(t,e,i){var s,n=t.prev("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1,!0))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnPrevRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}},focusOnNextRow:function(t,e,i){var s,n=t.next("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnNextRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}}},{textualColTypes:["color","date","email","multiline","number","singleline","template","time","url"],defaults:{rowIdPrefix:"",defaultValues:{},staticRows:!1,minRows:null,maxRows:null,onAddRow:$.noop,onDeleteRow:$.noop},createRow:function(t,e,i,s){var n=$("<tr/>",{"data-id":t});for(var a in e)if(e.hasOwnProperty(a)){var r,o=e[a],l=void 0!==s[a]?s[a]:"";if("heading"===o.type)r=$("<th/>",{scope:"row",class:o.class,html:l});else{var h=i+"["+t+"]["+a+"]",d=Craft.inArray(o.type,Craft.EditableTable.textualColTypes);switch(r=$("<td/>",{class:o.class,width:o.width}),d&&r.addClass("textual"),o.code&&r.addClass("code"),o.type){case"checkbox":Craft.ui.createCheckbox({name:h,value:o.value||"1",checked:!!l}).appendTo(r);break;case"color":Craft.ui.createColorInput({name:h,value:l,small:!0}).appendTo(r);break;case"date":Craft.ui.createDateInput({name:h,value:l}).appendTo(r);break;case"lightswitch":Craft.ui.createLightswitch({name:h,value:o.value||"1",on:!!l,small:!0}).appendTo(r);break;case"select":Craft.ui.createSelect({name:h,options:o.options,value:l||function(){for(var t in o.options)if(o.options.hasOwnProperty(t)&&o.options[t].default)return void 0!==o.options[t].value?o.options[t].value:t;return null}(),class:"small"}).appendTo(r);break;case"time":Craft.ui.createTimeInput({name:h,value:l}).appendTo(r);break;case"email":case"url":Craft.ui.createTextInput({name:h,value:l,type:o.type,placeholder:o.placeholder||null}).appendTo(r);break;default:$("<textarea/>",{name:h,rows:1,val:l,placeholder:o.placeholder}).appendTo(r)}}r.appendTo(n)}return $("<td/>",{class:"thin action"}).append($("<a/>",{class:"move icon",title:Craft.t("app","Reorder")})).appendTo(n),$("<td/>",{class:"thin action"}).append($("<a/>",{class:"delete icon",title:Craft.t("app","Delete")})).appendTo(n),n}}),Craft.EditableTable.Row=Garnish.Base.extend({table:null,id:null,niceTexts:null,$tr:null,$tds:null,tds:null,$textareas:null,$deleteBtn:null,init:function(t,e){this.table=t,this.$tr=$(e),this.$tds=this.$tr.children(),this.tds=[],this.id=this.$tr.attr("data-id"),this.$tr.data("editable-table-row",this);var i=parseInt(this.id.substr(this.table.settings.rowIdPrefix.length));i>this.table.biggestId&&(this.table.biggestId=i),this.$textareas=$(),this.niceTexts=[];var s,n,a,r,o,l={},h=0;for(s in this.table.columns)this.table.columns.hasOwnProperty(s)&&(n=this.table.columns[s],a=this.tds[s]=this.$tds[h],Craft.inArray(n.type,Craft.EditableTable.textualColTypes)?(r=$("textarea, input.text",a),this.$textareas=this.$textareas.add(r),this.addListener(r,"focus","onTextareaFocus"),this.addListener(r,"mousedown","ignoreNextTextareaFocus"),this.niceTexts.push(new Garnish.NiceText(r,{onHeightChange:$.proxy(this,"onTextareaHeightChange")})),this.addListener(r,"keypress",{tdIndex:h,type:n.type},"handleKeypress"),this.addListener(r,"textchange",{type:n.type},"validateValue"),r.trigger("textchange"),l[s]=r):"checkbox"===n.type&&(o=$('input[type="checkbox"]',a),n.radioMode&&(void 0===this.table.radioCheckboxes[s]&&(this.table.radioCheckboxes[s]=[]),this.table.radioCheckboxes[s].push(o[0]),this.addListener(o,"change",{colId:s},"onRadioCheckboxChange")),n.toggle&&this.addListener(o,"change",{colId:s},function(t){this.applyToggleCheckbox(t.data.colId)})),h++);for(s in this.onTextareaHeightChange(),this.table.columns)!this.table.columns.hasOwnProperty(s)||"checkbox"===(n=this.table.columns[s]).type&&n.toggle&&this.applyToggleCheckbox(s);for(s in this.table.columns)!this.table.columns.hasOwnProperty(s)||(n=this.table.columns[s]).autopopulate&&void 0!==l[n.autopopulate]&&!l[s].val()&&new Craft.HandleGenerator(l[s],l[n.autopopulate],{allowNonAlphaStart:!0});var d=this.$tr.children().last().find(".delete");this.addListener(d,"click","deleteRow")},onTextareaFocus:function(t){this.onTextareaHeightChange();var e=$(t.currentTarget);e.data("ignoreNextFocus")?e.data("ignoreNextFocus",!1):setTimeout(function(){Craft.selectFullValue(e)},0)},onRadioCheckboxChange:function(t){if(t.currentTarget.checked)for(var e=0;e<this.table.radioCheckboxes[t.data.colId].length;e++){var i=this.table.radioCheckboxes[t.data.colId][e];i.checked=i===t.currentTarget}},applyToggleCheckbox:function(t){for(var e,i,s=this.table.columns[t],n=$('input[type="checkbox"]',this.tds[t]).prop("checked"),a=0;a<s.toggle.length;a++)e=s.toggle[a],this.table.colum,(i="!"===e[0])&&(e=e.substr(1)),n&&!i||!n&&i?$(this.tds[e]).removeClass("disabled").find("textarea, input").prop("disabled",!1):$(this.tds[e]).addClass("disabled").find("textarea, input").prop("disabled",!0)},ignoreNextTextareaFocus:function(t){$.data(t.currentTarget,"ignoreNextFocus",!0)},handleKeypress:function(t){var e=t.keyCode?t.keyCode:t.charCode,i=Garnish.isCtrlKeyPressed(t);if(e===Garnish.RETURN_KEY&&("multiline"!==t.data.type||i))return t.preventDefault(),void(t.shiftKey?this.table.focusOnPrevRow(this.$tr,t.data.tdIndex,t.currentTarget):this.table.focusOnNextRow(this.$tr,t.data.tdIndex,t.currentTarget));"number"!==t.data.type||i||Craft.inArray(e,Craft.EditableTable.Row.numericKeyCodes)||t.preventDefault()},validateValue:function(t){if("multiline"!==t.data.type){var e;if("number"===t.data.type){var i=t.currentTarget.value.match(/^\s*(-?[\d\\.]*)/);e=null!==i?i[1]:""}else e=t.currentTarget.value.replace(/[\r\n]/g,"");e!==t.currentTarget.value&&(t.currentTarget.value=e)}},onTextareaHeightChange:function(){for(var t=-1,e=0;e<this.niceTexts.length;e++)this.niceTexts[e].height>t&&(t=this.niceTexts[e].height);this.$textareas.css("min-height",t);var i=this.$textareas.filter(":visible").first().parent().height();t<i&&this.$textareas.css("min-height",i)},deleteRow:function(){this.table.deleteRow(this)}},{numericKeyCodes:[9,8,37,38,39,40,45,91,46,190,48,49,50,51,52,53,54,55,56,57]}),Craft.ElementActionTrigger=Garnish.Base.extend({maxLevels:null,newChildUrl:null,$trigger:null,$selectedItems:null,triggerEnabled:!0,init:function(t){this.setSettings(t,Craft.ElementActionTrigger.defaults),this.$trigger=$("#"+t.type.replace(/[\[\]\\]+/g,"-")+"-actiontrigger"),this.settings.activate&&(this.$trigger.data("custom-handler",!0),"FORM"===this.$trigger.prop("nodeName")?this.addListener(this.$trigger,"submit","handleTriggerActivation"):this.addListener(this.$trigger,"click","handleTriggerActivation")),this.updateTrigger(),Craft.elementIndex.on("selectionChange",$.proxy(this,"updateTrigger"))},updateTrigger:function(){0!==Craft.elementIndex.getSelectedElements().length&&(this.validateSelection()?this.enableTrigger():this.disableTrigger())},validateSelection:function(){var t=!0;return this.$selectedItems=Craft.elementIndex.getSelectedElements(),!this.settings.batch&&1<this.$selectedItems.length?t=!1:"function"==typeof this.settings.validateSelection&&(t=this.settings.validateSelection(this.$selectedItems)),t},enableTrigger:function(){this.triggerEnabled||(this.$trigger.removeClass("disabled"),this.triggerEnabled=!0)},disableTrigger:function(){this.triggerEnabled&&(this.$trigger.addClass("disabled"),this.triggerEnabled=!1)},handleTriggerActivation:function(t){t.preventDefault(),t.stopPropagation(),this.triggerEnabled&&this.settings.activate(this.$selectedItems)}},{defaults:{type:null,batch:!0,validateSelection:null,activate:null}}),Craft.ElementThumbLoader=Garnish.Base.extend({queue:null,workers:[],init:function(){this.queue=[];for(var t=0;t<3;t++)this.workers.push(new Craft.ElementThumbLoader.Worker(this))},load:function(t){if(this.queue=this.queue.concat(t.find(".elementthumb").toArray()),this.queue.length)for(var e=0;e<this.workers.length;e++)this.workers[e].active||this.workers[e].loadNext()},destroy:function(){for(var t=0;t<this.workers.length;t++)this.workers[t].destroy();this.base()}}),Craft.ElementThumbLoader.Worker=Garnish.Base.extend({loader:null,active:!1,init:function(t){this.loader=t},loadNext:function(){var t=this.loader.queue.shift();if(void 0!==t){this.active=!0;var e=$(t);if(e.find("img").length)this.loadNext();else{var i=$("<img/>",{sizes:e.attr("data-sizes"),srcset:e.attr("data-srcset"),alt:""});this.addListener(i,"load","loadNext"),i.appendTo(e),picturefill({elements:[i[0]]})}}else this.active=!1}}),Craft.ElevatedSessionForm=Garnish.Base.extend({$form:null,inputs:null,init:function(t,e){if(this.$form=$(t),void 0!==e){this.inputs=[],e=$.makeArray(e);for(var i=0;i<e.length;i++)for(var s=$(e[i]),n=0;n<s.length;n++){var a=s.eq(n);this.inputs.push({input:a,val:Garnish.getInputPostVal(a)})}}this.addListener(this.$form,"submit","handleFormSubmit")},handleFormSubmit:function(t){if(Craft.elevatedSessionManager.fetchingTimeout)t.preventDefault();else{if(this.inputs){for(var e,i=!1,s=0;s<this.inputs.length;s++)if((e=this.inputs[s].input).data("passwordInput")&&(e=e.data("passwordInput").$currentInput),Garnish.getInputPostVal(e)!==this.inputs[s].val){i=!0;break}if(!i)return}t.preventDefault(),Craft.elevatedSessionManager.requireElevatedSession($.proxy(this,"submitForm"))}},submitForm:function(){this.disable(),this.$form.trigger("submit"),this.enable()}}),Craft.ElevatedSessionManager=Garnish.Base.extend({fetchingTimeout:!1,passwordModal:null,$passwordInput:null,$passwordSpinner:null,$submitBtn:null,$errorPara:null,callback:null,requireElevatedSession:function(t){this.callback=t,this.fetchingTimeout=!0,Craft.postActionRequest("users/get-elevated-session-timeout",$.proxy(function(t,e){this.fetchingTimeout=!1,"success"===e&&(!1===t.timeout||t.timeout>=Craft.ElevatedSessionManager.minSafeElevatedSessionTimeout?this.callback():this.showPasswordModal())},this))},showPasswordModal:function(){if(this.passwordModal)this.passwordModal.show();else{var t=$('<form id="elevatedsessionmodal" class="modal secure fitted"/>'),e=$('<div class="body"><p>'+Craft.t("app","Enter your password to continue.")+"</p></div>").appendTo(t),i=$('<div class="inputcontainer">').appendTo(e),s=$('<div class="flex"/>').appendTo(i),n=$('<div class="flex-grow"/>').appendTo(s),a=$("<td/>").appendTo(s),r=$('<div class="passwordwrapper"/>').appendTo(n);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'" autocomplete="current-password"/>').appendTo(r),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(i),this.$submitBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Submit")+'" />').appendTo(a),this.$errorPara=$('<p class="error"/>').appendTo(e),this.passwordModal=new Garnish.Modal(t,{closeOtherModals:!1,onFadeIn:$.proxy(function(){setTimeout($.proxy(this,"focusPasswordInput"),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(t,"submit","submitPassword")}},focusPasswordInput:function(){Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$submitBtn.removeClass("disabled"),!0):(this.$submitBtn.addClass("disabled"),!1)},submitPassword:function(t){if(t&&t.preventDefault(),this.validatePassword()){this.$passwordSpinner.removeClass("hidden"),this.clearLoginError();var e={currentPassword:this.$passwordInput.val()};Craft.postActionRequest("users/start-elevated-session",e,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.passwordModal.hide(),this.callback()):(this.showPasswordError(t.message||Craft.t("app","Incorrect password.")),Garnish.shake(this.passwordModal.$container),this.focusPasswordInput()):this.showPasswordError()},this))}},showPasswordError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$errorPara.text(t),this.passwordModal.updateSizeAndPosition()},clearLoginError:function(){this.showPasswordError("")}},{minSafeElevatedSessionTimeout:5}),Craft.elevatedSessionManager=new Craft.ElevatedSessionManager,Craft.EntryIndex=Craft.BaseElementIndex.extend({publishableSections:null,$newEntryBtnGroup:null,$newEntryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.publishableSections=[];for(var t=0;t<Craft.publishableSections.length;t++){var e=Craft.publishableSections[t];this.getSourceByKey("section:"+e.uid)&&this.publishableSections.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultSectionHandle){if("singles"===defaultSectionHandle)return"singles";for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultSectionHandle)return e.data("key")}}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s;if(t="singles"===this.$source.data("key")?"singles":this.$source.data("handle"),this.publishableSections.length){var n,a;if(this.$newEntryBtnGroup&&this.$newEntryBtnGroup.remove(),t)for(e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].handle===t){n=this.publishableSections[e];break}if(this.$newEntryBtnGroup=$('<div class="btngroup submit"/>'),n?(i=this._getSectionTriggerHref(n),s="index"===this.settings.context?Craft.t("app","New entry"):Craft.t("app","New {section} entry",{section:n.name}),this.$newEntryBtn=$('<a class="btn submit add icon" '+i+">"+Craft.escapeHtml(s)+"</a>").appendTo(this.$newEntryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newEntryBtn,"click",function(t){this._openCreateEntryModal(t.currentTarget.getAttribute("data-id"))}),1<this.publishableSections.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newEntryBtnGroup))):this.$newEntryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New entry")+"</div>").appendTo(this.$newEntryBtnGroup),a){var r='<div class="menu"><ul>';for(e=0;e<this.publishableSections.length;e++){var o=this.publishableSections[e];("index"===this.settings.context&&-1!==$.inArray(this.siteId,o.sites)||"index"!==this.settings.context&&o!==n)&&(i=this._getSectionTriggerHref(o),s="index"===this.settings.context?o.name:Craft.t("app","New {section} entry",{section:o.name}),r+="<li><a "+i+'">'+Craft.escapeHtml(s)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newEntryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateEntryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newEntryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="entries";t&&(h+="/"+t),history.replaceState({},"",Craft.getUrl(h))}}},_getSectionTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="entries/"+t.handle+"/new";if(params={},this.siteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(params.site=Craft.sites[i].handle);return'href="'+Craft.getUrl(e,params)+'"'},_openCreateEntryModal:function(t){if(!this.$newEntryBtn.hasClass("loading")){for(var i,e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].id==t){i=this.publishableSections[e];break}if(i){this.$newEntryBtn.addClass("inactive");var s=this.$newEntryBtn.text();this.$newEntryBtn.text(Craft.t("app","New {section} entry",{section:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newEntryBtnGroup,elementType:"craft\\elements\\Entry",siteId:this.siteId,attributes:{sectionId:t,typeId:i.entryTypes[0].id},onBeginLoading:$.proxy(function(){this.$newEntryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newEntryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newEntryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="section:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Entry",Craft.EntryIndex),Craft.FieldLayoutDesigner=Garnish.Base.extend({$container:null,$tabContainer:null,$unusedFieldContainer:null,$newTabBtn:null,$allFields:null,tabGrid:null,unusedFieldGrid:null,tabDrag:null,fieldDrag:null,init:function(t,e){this.$container=$(t),this.setSettings(e,Craft.FieldLayoutDesigner.defaults),this.$tabContainer=this.$container.children(".fld-tabs"),this.$unusedFieldContainer=this.$container.children(".unusedfields"),this.$newTabBtn=this.$container.find("> .newtabbtn-container > .btn"),this.$allFields=this.$unusedFieldContainer.find(".fld-field"),this.tabGrid=new Craft.Grid(this.$tabContainer,Craft.FieldLayoutDesigner.gridSettings),this.unusedFieldGrid=new Craft.Grid(this.$unusedFieldContainer,Craft.FieldLayoutDesigner.gridSettings);for(var i=this.$tabContainer.children(),s=0;s<i.length;s++)this.initTab($(i[s]));this.fieldDrag=new Craft.FieldLayoutDesigner.FieldDrag(this),this.settings.customizableTabs&&(this.tabDrag=new Craft.FieldLayoutDesigner.TabDrag(this),this.addListener(this.$newTabBtn,"activate","addTab"))},initTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);$('<li><a data-action="rename">'+Craft.t("app","Rename")+"</a></li>").appendTo(s),$('<li><a data-action="delete">'+Craft.t("app","Delete")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onTabOptionSelect")})}for(var n=t.children(".fld-tabcontent").children(),a=0;a<n.length;a++)this.initField($(n[a]))},initField:function(t){var e=t.find(".settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);t.hasClass("fld-required")?$('<li><a data-action="toggle-required">'+Craft.t("app","Make not required")+"</a></li>").appendTo(s):$('<li><a data-action="toggle-required">'+Craft.t("app","Make required")+"</a></li>").appendTo(s),$('<li><a data-action="remove">'+Craft.t("app","Remove")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onFieldOptionSelect")})},onTabOptionSelect:function(t){if(this.settings.customizableTabs){var e=$(t),i=e.data("menu").$anchor.parent().parent().parent();switch(e.data("action")){case"rename":this.renameTab(i);break;case"delete":this.deleteTab(i)}}},onFieldOptionSelect:function(t){var e=$(t),i=e.data("menu").$anchor.parent();switch(e.data("action")){case"toggle-required":this.toggleRequiredField(i,e);break;case"remove":this.removeField(i)}},renameTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .tab span"),i=e.text(),s=prompt(Craft.t("app","Give your tab a name."),i);s&&s!==i&&(e.text(s),t.find(".id-input").attr("name",this.getFieldInputName(s)))}},deleteTab:function(t){if(this.settings.customizableTabs){for(var e=t.find(".fld-field"),i=0;i<e.length;i++){var s=$(e[i]).attr("data-id");this.removeFieldById(s)}this.tabGrid.removeItems(t),this.tabDrag.removeItems(t),t.remove()}},toggleRequiredField:function(t,e){t.hasClass("fld-required")?(t.removeClass("fld-required"),t.find(".required-input").remove(),setTimeout(function(){e.text(Craft.t("app","Make required"))},500)):(t.addClass("fld-required"),$('<input class="required-input" type="hidden" name="'+this.settings.requiredFieldInputName+'" value="'+t.data("id")+'">').appendTo(t),setTimeout(function(){e.text(Craft.t("app","Make not required"))},500))},removeField:function(t){var e=t.attr("data-id");t.remove(),this.removeFieldById(e),this.tabGrid.refreshCols(!0)},removeFieldById:function(t){var e=this.$allFields.filter("[data-id="+t+"]:first"),i=e.closest(".fld-tab");e.removeClass("hidden"),i.hasClass("hidden")?(i.removeClass("hidden"),this.unusedFieldGrid.addItems(i),this.settings.customizableTabs&&this.tabDrag.addItems(i)):this.unusedFieldGrid.refreshCols(!0)},addTab:function(){if(this.settings.customizableTabs){var t=$('<div class="fld-tab"><div class="tabs"><div class="tab sel draggable"><span>Tab '+(this.tabGrid.$items.length+1)+'</span><a class="settings icon" title="'+Craft.t("app","Rename")+'"></a></div></div><div class="fld-tabcontent"></div></div>').appendTo(this.$tabContainer);this.tabGrid.addItems(t),this.tabDrag.addItems(t),this.initTab(t)}},getFieldInputName:function(t){return this.settings.fieldInputName.replace(/__TAB_NAME__/g,Craft.encodeUriComponent(t))}},{gridSettings:{itemSelector:".fld-tab:not(.hidden)",minColWidth:240,fillMode:"grid",snapToGrid:30},defaults:{customizableTabs:!0,fieldInputName:"fieldLayout[__TAB_NAME__][]",requiredFieldInputName:"requiredFields[]"}}),Craft.FieldLayoutDesigner.BaseDrag=Garnish.Drag.extend({designer:null,$insertion:null,showingInsertion:!1,$caboose:null,draggingUnusedItem:!1,addToTabGrid:!1,init:function(t,e){this.designer=t;var i=this.designer.$tabContainer.find(this.itemSelector).add(this.designer.$unusedFieldContainer.find(this.itemSelector));this.base(i,e)},onDragStart:function(){this.base(),this.draggingUnusedItem=this.$draggee.hasClass("unused"),this.$insertion=this.getInsertion(),this.addCaboose(),this.$items=$().add(this.$items.add(this.$caboose)),this.addToTabGrid&&this.designer.tabGrid.addItems(this.$caboose),this.draggingUnusedItem?this.showingInsertion=!1:(this.$insertion.insertBefore(this.$draggee),this.$draggee.detach(),this.$items=$().add(this.$items.not(this.$draggee).add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$draggee),this.designer.tabGrid.addItems(this.$insertion))),this.setMidpoints()},addCaboose:$.noop,getItemContainer:$.noop,isItemInTabContainer:function(t){return this.getItemContainer(t)[0]===this.designer.$tabContainer[0]},setMidpoints:function(){for(var t=0;t<this.$items.length;t++){var e=$(this.$items[t]);if(this.isItemInTabContainer(e)){var i=e.offset();e.data("midpoint",{left:i.left+e.outerWidth()/2,top:i.top+e.outerHeight()/2})}}},onDrag:function(){this.draggingUnusedItem&&!Garnish.hitTest(this.mouseX,this.mouseY,this.designer.$tabContainer)?this.showingInsertion&&(this.$insertion.remove(),this.$items=$().add(this.$items.not(this.$insertion)),this.showingInsertion=!1,this.addToTabGrid?this.designer.tabGrid.removeItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints()):(this.onDrag._closestItem=this.getClosestItem(),this.onDrag._closestItem!==this.$insertion[0]&&(this.showingInsertion&&$.inArray(this.$insertion[0],this.$items)<$.inArray(this.onDrag._closestItem,this.$items)&&-1===$.inArray(this.onDrag._closestItem,this.$caboose)?this.$insertion.insertAfter(this.onDrag._closestItem):this.$insertion.insertBefore(this.onDrag._closestItem),this.$items=$().add(this.$items.add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid?this.designer.tabGrid.addItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints())),this.base()},getClosestItem:function(){for(this.getClosestItem._closestItem=null,this.getClosestItem._closestItemMouseDiff=null,this.getClosestItem._i=0;this.getClosestItem._i<this.$items.length;this.getClosestItem._i++)this.getClosestItem._$item=$(this.$items[this.getClosestItem._i]),this.isItemInTabContainer(this.getClosestItem._$item)&&(this.getClosestItem._midpoint=this.getClosestItem._$item.data("midpoint"),this.getClosestItem._mouseDiff=Garnish.getDist(this.getClosestItem._midpoint.left,this.getClosestItem._midpoint.top,this.mouseX,this.mouseY),(null===this.getClosestItem._closestItem||this.getClosestItem._mouseDiff<this.getClosestItem._closestItemMouseDiff)&&(this.getClosestItem._closestItem=this.getClosestItem._$item[0],this.getClosestItem._closestItemMouseDiff=this.getClosestItem._mouseDiff));return this.getClosestItem._closestItem},onDragStop:function(){this.showingInsertion&&(this.$insertion.replaceWith(this.$draggee),this.$items=$().add(this.$items.not(this.$insertion).add(this.$draggee)),this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$insertion),this.designer.tabGrid.addItems(this.$draggee))),this.$items=this.$items.not(this.$caboose),this.$caboose.remove(),this.addToTabGrid&&this.designer.tabGrid.removeItems(this.$caboose),this.$draggee.css({display:this.draggeeDisplay,visibility:"hidden"}),this.designer.tabGrid.refreshCols(!0),this.designer.unusedFieldGrid.refreshCols(!0),this.returnHelpersToDraggees(),this.base()}}),Craft.FieldLayoutDesigner.TabDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab",addToTabGrid:!0,init:function(t){this.base(t,{handle:".tab"})},addCaboose:function(){this.$caboose=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(this.designer.$tabContainer)},getInsertion:function(){var t=this.$draggee.find(".tab");return $('<div class="fld-tab fld-insertion" style="height: '+this.$draggee.height()+'px;"><div class="tabs"><div class="tab sel draggable" style="width: '+t.width()+"px; height: "+t.height()+'px;"></div></div><div class="fld-tabcontent" style="height: '+this.$draggee.find(".fld-tabcontent").height()+'px;"></div></div>')},getItemContainer:function(t){return t.parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused"),e=t.find(".tab span").text();t.find(".fld-field").removeClass("unused"),t.find(".tabs .tab").append('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');var i=t.find(".fld-field"),s=i.filter(".hidden").remove();(i=i.not(s)).prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');for(var n=0;n<i.length;n++){var a=$(i[n]),r=this.designer.getFieldInputName(e);a.append('<input class="id-input" type="hidden" name="'+r+'" value="'+a.data("id")+'">')}this.designer.fieldDrag.addItems(i),this.designer.initTab(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),this.$draggee.find(".fld-field").addClass("hidden"),this.$draggee=t,this.addItems(t),this.designer.tabGrid.addItems(t),this.designer.unusedFieldGrid.removeItems(this.$draggee)}this.base()}}),Craft.FieldLayoutDesigner.FieldDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab .fld-field",addCaboose:function(){this.$caboose=$();for(var t=this.designer.$tabContainer.children().children(".fld-tabcontent"),e=0;e<t.length;e++){var i=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(t[e]);this.$caboose=this.$caboose.add(i)}},getInsertion:function(){return $('<div class="fld-field fld-insertion" style="height: '+this.$draggee.height()+'px;"/>')},getItemContainer:function(t){return t.parent().parent().parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused");if(t.prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>'),this.designer.initField(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),0===this.$draggee.siblings(":not(.hidden)").length){var e=this.$draggee.parent().parent();e.addClass("hidden"),this.designer.unusedFieldGrid.removeItems(e)}this.$draggee=t,this.addItems(t)}if(this.showingInsertion){var i=this.$insertion.parent().parent().find(".tab span").text(),s=this.designer.getFieldInputName(i);this.draggingUnusedItem?this.$draggee.append('<input class="id-input" type="hidden" name="'+s+'" value="'+this.$draggee.data("id")+'">'):this.$draggee.find(".id-input").attr("name",s)}this.base()}}),Craft.FieldToggle=Garnish.Base.extend({$toggle:null,targetPrefix:null,targetSelector:null,reverseTargetSelector:null,_$target:null,_$reverseTarget:null,type:null,init:function(t){this.$toggle=$(t),this.$toggle.data("fieldtoggle")&&(Garnish.log("Double-instantiating a field toggle on an element"),this.$toggle.data("fieldtoggle").destroy()),this.$toggle.data("fieldtoggle",this),this.type=this.getType(),"select"===this.type?this.targetPrefix=this.$toggle.attr("data-target-prefix")||"":(this.targetSelector=this.normalizeTargetSelector(this.$toggle.data("target")),this.reverseTargetSelector=this.normalizeTargetSelector(this.$toggle.data("reverse-target"))),this.findTargets(),"link"===this.type?this.addListener(this.$toggle,"click","onToggleChange"):this.addListener(this.$toggle,"change","onToggleChange")},normalizeTargetSelector:function(t){return t&&!t.match(/^[#\.]/)&&(t="#"+t),t},getType:function(){return"INPUT"===this.$toggle.prop("nodeName")&&"checkbox"===this.$toggle.attr("type").toLowerCase()?"checkbox":"SELECT"===this.$toggle.prop("nodeName")?"select":"A"===this.$toggle.prop("nodeName")?"link":"DIV"===this.$toggle.prop("nodeName")&&this.$toggle.hasClass("lightswitch")?"lightswitch":void 0},findTargets:function(){"select"===this.type?this._$target=$(this.normalizeTargetSelector(this.targetPrefix+this.getToggleVal())):(this.targetSelector&&(this._$target=$(this.targetSelector)),this.reverseTargetSelector&&(this._$reverseTarget=$(this.reverseTargetSelector)))},getToggleVal:function(){if("lightswitch"===this.type)return this.$toggle.children("input").val();var t=Garnish.getInputPostVal(this.$toggle);return null===t?null:t.replace(/[\[\]\\]+/g,"-")},onToggleChange:function(){"select"===this.type?(this.hideTarget(this._$target),this.findTargets(),this.showTarget(this._$target)):("link"===this.type?this.onToggleChange._show=this.$toggle.hasClass("collapsed")||!this.$toggle.hasClass("expanded"):this.onToggleChange._show=!!this.getToggleVal(),this.onToggleChange._show?(this.showTarget(this._$target),this.hideTarget(this._$reverseTarget)):(this.hideTarget(this._$target),this.showTarget(this._$reverseTarget)),delete this.onToggleChange._show)},showTarget:function(t){t&&t.length&&(this.showTarget._currentHeight=t.height(),t.removeClass("hidden"),"select"!==this.type&&("link"===this.type&&(this.$toggle.removeClass("collapsed"),this.$toggle.addClass("expanded")),t.height("auto"),this.showTarget._targetHeight=t.height(),t.css({height:this.showTarget._currentHeight,overflow:"hidden"}),t.velocity("stop"),t.velocity({height:this.showTarget._targetHeight},"fast",function(){t.css({height:"",overflow:""})}),delete this.showTarget._targetHeight),delete this.showTarget._currentHeight,Garnish.$win.trigger("resize"))},hideTarget:function(t){t&&t.length&&("select"===this.type?t.addClass("hidden"):("link"===this.type&&(this.$toggle.removeClass("expanded"),this.$toggle.addClass("collapsed")),t.css("overflow","hidden"),t.velocity("stop"),t.velocity({height:0},"fast",function(){t.addClass("hidden")})))}}),Craft.Grid=Garnish.Base.extend({$container:null,$items:null,items:null,totalCols:null,colGutterDrop:null,colPctWidth:null,possibleItemColspans:null,possibleItemPositionsByColspan:null,itemPositions:null,itemColspansByPosition:null,layouts:null,layout:null,itemHeights:null,leftPadding:null,_refreshingCols:!1,_refreshColsAfterRefresh:!1,_forceRefreshColsAfterRefresh:!1,init:function(t,e){this.$container=$(t),this.$container.data("grid")&&(Garnish.log("Double-instantiating a grid on an element"),this.$container.data("grid").destroy()),this.$container.data("grid",this),this.setSettings(e,Craft.Grid.defaults),this.handleContainerHeightProxy=$.proxy(function(){this.refreshCols(!1,!0)},this),this.$items=this.$container.children(this.settings.itemSelector),this.setItems(),this.refreshCols(!0,!1),Garnish.$doc.ready($.proxy(function(){this.refreshCols(!1,!1)},this))},addItems:function(t){this.$items=$().add(this.$items.add(t)),this.setItems(),this.refreshCols(!0,!0)},removeItems:function(t){this.$items=$().add(this.$items.not(t)),this.setItems(),this.refreshCols(!0,!0)},resetItemOrder:function(){this.$items=$().add(this.$items),this.setItems(),this.refreshCols(!0,!0)},setItems:function(){for(this.setItems._={},this.items=[],this.setItems._.i=0;this.setItems._.i<this.$items.length;this.setItems._.i++)this.items.push($(this.$items[this.setItems._.i]));delete this.setItems._},refreshCols:function(t){if(this._refreshingCols)return this._refreshColsAfterRefresh=!0,void(t&&(this._forceRefreshColsAfterRefresh=!0));if(this._refreshingCols=!0,this.items.length)if(this.refreshCols._={},this.refreshCols._.oldHeight=this.$container[0].style.height,this.$container[0].style.height=1,this.refreshCols._.scrollHeight=this.$container[0].scrollHeight,this.$container[0].style.height=this.refreshCols._.oldHeight,0!==this.refreshCols._.scrollHeight)if(this.settings.cols?this.refreshCols._.totalCols=this.settings.cols:(this.refreshCols._.totalCols=Math.floor(this.$container.width()/this.settings.minColWidth),null!==this.totalCols&&this.refreshCols._.totalCols>this.totalCols&&(this.refreshCols._.totalCols=Math.floor((this.$container.width()-20)/this.settings.minColWidth)),this.settings.maxCols&&this.refreshCols._.totalCols>this.settings.maxCols&&(this.refreshCols._.totalCols=this.settings.maxCols)),0===this.refreshCols._.totalCols&&(this.refreshCols._.totalCols=1),!0===t||this.totalCols!==this.refreshCols._.totalCols){if(this.totalCols=this.refreshCols._.totalCols,this.colGutterDrop=this.settings.gutter*(this.totalCols-1)/this.totalCols,this.removeListener(this.$container,"resize"),"grid"===this.settings.fillMode)for(this.refreshCols._.itemIndex=0;this.refreshCols._.itemIndex<this.items.length;){for(this.refreshCols._.tallestItemHeight=-1,this.refreshCols._.colIndex=0,this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.itemHeight=this.items[this.refreshCols._.i].height("auto").height(),this.refreshCols._.itemHeight>this.refreshCols._.tallestItemHeight&&(this.refreshCols._.tallestItemHeight=this.refreshCols._.itemHeight),this.refreshCols._.colIndex++;for(this.settings.snapToGrid&&(this.refreshCols._.remainder=this.refreshCols._.tallestItemHeight%this.settings.snapToGrid,this.refreshCols._.remainder&&(this.refreshCols._.tallestItemHeight+=this.settings.snapToGrid-this.refreshCols._.remainder)),this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.items[this.refreshCols._.i].height(this.refreshCols._.tallestItemHeight);this.refreshCols._.itemIndex+=this.totalCols}else if(this.removeListener(this.$items,"resize"),1===this.totalCols)this.$container.height("auto"),this.$items.show().css({position:"relative",width:"auto",top:0}).css(Craft.left,0);else{for(this.$items.css("position","absolute"),this.colPctWidth=100/this.totalCols,this.layouts=[],this.itemPositions=[],this.itemColspansByPosition=[],this.possibleItemColspans=[],this.possibleItemPositionsByColspan=[],this.itemHeightsByColspan=[],this.refreshCols._.item=0;this.refreshCols._.item<this.items.length;this.refreshCols._.item++)for(this.possibleItemColspans[this.refreshCols._.item]=[],this.possibleItemPositionsByColspan[this.refreshCols._.item]={},this.itemHeightsByColspan[this.refreshCols._.item]={},this.refreshCols._.$item=this.items[this.refreshCols._.item].show(),this.refreshCols._.positionRight="right"===this.refreshCols._.$item.data("position"),this.refreshCols._.positionLeft="left"===this.refreshCols._.$item.data("position"),this.refreshCols._.minColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("min-colspan")?this.refreshCols._.$item.data("min-colspan"):1,this.refreshCols._.maxColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("max-colspan")?this.refreshCols._.$item.data("max-colspan"):this.totalCols,this.refreshCols._.minColspan>this.totalCols&&(this.refreshCols._.minColspan=this.totalCols),this.refreshCols._.maxColspan>this.totalCols&&(this.refreshCols._.maxColspan=this.totalCols),this.refreshCols._.colspan=this.refreshCols._.minColspan;this.refreshCols._.colspan<=this.refreshCols._.maxColspan;this.refreshCols._.colspan++)for(this.refreshCols._.$item.css("width",this.getItemWidthCss(this.refreshCols._.colspan)),this.itemHeightsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=this.refreshCols._.$item.outerHeight(),this.possibleItemColspans[this.refreshCols._.item].push(this.refreshCols._.colspan),this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=[],this.refreshCols._.positionLeft?(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=0):this.refreshCols._.positionRight?(this.refreshCols._.minPosition=this.totalCols-this.refreshCols._.colspan,this.refreshCols._.maxPosition=this.refreshCols._.minPosition):(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=this.totalCols-this.refreshCols._.colspan),this.refreshCols._.position=this.refreshCols._.minPosition;this.refreshCols._.position<=this.refreshCols._.maxPosition;this.refreshCols._.position++)this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan].push(this.refreshCols._.position);for(this.refreshCols._.colHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.totalCols;this.refreshCols._.i++)this.refreshCols._.colHeights.push(0);for(this.createLayouts(0,[],[],this.refreshCols._.colHeights,0),this.refreshCols._.layoutTotalCols=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)for(this.refreshCols._.layoutTotalCols[this.refreshCols._.i]=0,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j]&&this.refreshCols._.layoutTotalCols[this.refreshCols._.i]++;for(this.refreshCols._.highestTotalCols=Math.max.apply(null,this.refreshCols._.layoutTotalCols),this.refreshCols._.i=this.layouts.length-1;0<=this.refreshCols._.i;this.refreshCols._.i--)this.refreshCols._.layoutTotalCols[this.refreshCols._.i]!==this.refreshCols._.highestTotalCols&&this.layouts.splice(this.refreshCols._.i,1);for(this.refreshCols._.layoutHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)this.refreshCols._.layoutHeights.push(Math.max.apply(null,this.layouts[this.refreshCols._.i].colHeights));for(this.refreshCols._.shortestHeight=Math.min.apply(null,this.refreshCols._.layoutHeights),this.refreshCols._.shortestLayouts=[],this.refreshCols._.emptySpaces=[],this.refreshCols._.i=0;this.refreshCols._.i<this.refreshCols._.layoutHeights.length;this.refreshCols._.i++)if(this.refreshCols._.layoutHeights[this.refreshCols._.i]===this.refreshCols._.shortestHeight){for(this.refreshCols._.shortestLayouts.push(this.layouts[this.refreshCols._.i]),this.refreshCols._.emptySpace=this.layouts[this.refreshCols._.i].emptySpace,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.refreshCols._.emptySpace+=this.refreshCols._.shortestHeight-this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j];this.refreshCols._.emptySpaces.push(this.refreshCols._.emptySpace)}for(this.layout=this.refreshCols._.shortestLayouts[$.inArray(Math.min.apply(null,this.refreshCols._.emptySpaces),this.refreshCols._.emptySpaces)],this.refreshCols._.i=0;this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.css={width:this.getItemWidthCss(this.layout.colspans[this.refreshCols._.i])},this.refreshCols._.css[Craft.left]=this.getItemLeftPosCss(this.layout.positions[this.refreshCols._.i]),this.items[this.refreshCols._.i].css(this.refreshCols._.css);this.isSimpleLayout()?(this.$container.height("auto"),this.$items.css({position:"relative",top:0,"margin-bottom":this.settings.gutter+"px"})):(this.$items.css("position","absolute"),this.positionItems(),this.addListener(this.$items,"resize","onItemResize"))}this.completeRefreshCols(),this.addListener(this.$container,"resize",this.handleContainerHeightProxy),this.onRefreshCols()}else this.completeRefreshCols();else this.completeRefreshCols();else this.completeRefreshCols()},completeRefreshCols:function(){if(void 0!==this.refreshCols._&&delete this.refreshCols._,this._refreshingCols=!1,this._refreshColsAfterRefresh){var t=this._forceRefreshColsAfterRefresh;this._refreshColsAfterRefresh=!1,this._forceRefreshColsAfterRefresh=!1,Garnish.requestAnimationFrame($.proxy(function(){this.refreshCols(t)},this))}},getItemWidth:function(t){return this.colPctWidth*t},getItemWidthCss:function(t){return"calc("+this.getItemWidth(t)+"% - "+this.colGutterDrop+"px)"},getItemWidthInPx:function(t){return this.getItemWidth(t)/100*this.$container.width()-this.colGutterDrop},getItemLeftPosCss:function(t){return"calc(("+this.getItemWidth(1)+"% + "+(this.settings.gutter-this.colGutterDrop)+"px) * "+t+")"},getItemLeftPosInPx:function(t){return(this.getItemWidth(1)/100*this.$container.width()+(this.settings.gutter-this.colGutterDrop))*t},createLayouts:function(t,e,i,s,n){new Craft.Grid.LayoutGenerator(this).createLayouts(t,e,i,s,n)},isSimpleLayout:function(){for(this.isSimpleLayout._={},this.isSimpleLayout._.i=0;this.isSimpleLayout._.i<this.layout.positions.length;this.isSimpleLayout._.i++)if(0!==this.layout.positions[this.isSimpleLayout._.i])return delete this.isSimpleLayout._,!1;return delete this.isSimpleLayout._,!0},positionItems:function(){for(this.positionItems._={},this.positionItems._.colHeights=[],this.positionItems._.i=0;this.positionItems._.i<this.totalCols;this.positionItems._.i++)this.positionItems._.colHeights.push(0);for(this.positionItems._.i=0;this.positionItems._.i<this.items.length;this.positionItems._.i++){for(this.positionItems._.endingCol=this.layout.positions[this.positionItems._.i]+this.layout.colspans[this.positionItems._.i]-1,this.positionItems._.affectedColHeights=[],this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.affectedColHeights.push(this.positionItems._.colHeights[this.positionItems._.col]);for(this.positionItems._.top=Math.max.apply(null,this.positionItems._.affectedColHeights),0<this.positionItems._.top&&(this.positionItems._.top+=this.settings.gutter),this.items[this.positionItems._.i].css("top",this.positionItems._.top),this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.colHeights[this.positionItems._.col]=this.positionItems._.top+this.itemHeightsByColspan[this.positionItems._.i][this.layout.colspans[this.positionItems._.i]]}this.$container.height(Math.max.apply(null,this.positionItems._.colHeights)),delete this.positionItems._},onItemResize:function(t){this.onItemResize._={},t.stopPropagation(),this.onItemResize._.item=$.inArray(t.currentTarget,this.$items),-1!==this.onItemResize._.item&&(this.onItemResize._.newHeight=this.items[this.onItemResize._.item].outerHeight(),this.onItemResize._.newHeight!==this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]&&(this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]=this.onItemResize._.newHeight,this.positionItems(!1))),delete this.onItemResize._},onRefreshCols:function(){this.trigger("refreshCols"),this.settings.onRefreshCols()}},{defaults:{itemSelector:".item",cols:null,maxCols:null,minColWidth:320,gutter:14,fillMode:"top",colClass:"col",snapToGrid:null,onRefreshCols:$.noop}}),Craft.Grid.LayoutGenerator=Garnish.Base.extend({grid:null,_:null,init:function(t){this.grid=t},createLayouts:function(t,e,i,s,n){for(this._={},this._.c=0;this._.c<this.grid.possibleItemColspans[t].length;this._.c++){for(this._.colspan=this.grid.possibleItemColspans[t][this._.c],this._.tallestColHeightsByPosition=[],this._.p=0;this._.p<this.grid.possibleItemPositionsByColspan[t][this._.colspan].length;this._.p++){for(this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.colHeightsForPosition=[],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.colHeightsForPosition.push(s[this._.col]);this._.tallestColHeightsByPosition[this._.p]=Math.max.apply(null,this._.colHeightsForPosition)}for(this._.p=$.inArray(Math.min.apply(null,this._.tallestColHeightsByPosition),this._.tallestColHeightsByPosition),this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.positions=e.slice(0),this._.colspans=i.slice(0),this._.colHeights=s.slice(0),this._.emptySpace=n,this._.positions.push(this._.position),this._.colspans.push(this._.colspan),this._.tallestColHeight=this._.tallestColHeightsByPosition[this._.p],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.emptySpace+=this._.tallestColHeight-this._.colHeights[this._.col],this._.colHeights[this._.col]=this._.tallestColHeight+this.grid.itemHeightsByColspan[t][this._.colspan];t===this.grid.items.length-1?this.grid.layouts.push({positions:this._.positions,colspans:this._.colspans,colHeights:this._.colHeights,emptySpace:this._.emptySpace}):this.grid.createLayouts(t+1,this._.positions,this._.colspans,this._.colHeights,this._.emptySpace)}delete this._}}),Craft.HandleGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){var e=t.replace("/<(.*?)>/g","");e=(e=e.replace(/['"‘’“”\[\]\(\)\{\}:]/g,"")).toLowerCase(),e=Craft.asciiString(e),this.settings.allowNonAlphaStart||(e=e.replace(/^[^a-z]+/,""));var i=Craft.filterArray(e.split(/[^a-z0-9]+/));e="";for(var s=0;s<i.length;s++)e+=0===s?i[s]:i[s].charAt(0).toUpperCase()+i[s].substr(1);return e}}),Craft.ImageUpload=Garnish.Base.extend({$container:null,progressBar:null,uploader:null,init:function(t){this.setSettings(t,Craft.ImageUpload.defaults),this.initImageUpload()},initImageUpload:function(){this.$container=$(this.settings.containerSelector),this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl(this.settings.uploadAction),formData:this.settings.postParameters,fileInput:this.$container.find(this.settings.fileInputSelector),paramName:this.settings.uploadParamName};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),t.events.fileuploadfail=$.proxy(this,"_onUploadError"),this.uploader=new Craft.Uploader(this.$container,t),this.initButtons()},initButtons:function(){this.$container.find(this.settings.uploadButtonSelector).on("click",$.proxy(function(t){this.$container.find(this.settings.fileInputSelector).trigger("click")},this)),this.$container.find(this.settings.deleteButtonSelector).on("click",$.proxy(function(t){confirm(Craft.t("app","Are you sure you want to delete this image?"))&&($(t.currentTarget).parent().append('<div class="blocking-modal"></div>'),Craft.postActionRequest(this.settings.deleteAction,this.settings.postParameters,$.proxy(function(t,e){"success"===e&&this.refreshImage(t)},this)))},this))},refreshImage:function(t){$(this.settings.containerSelector).replaceWith(t.html),this.settings.onAfterRefreshImage(t),this.initImageUpload()},_onUploadStart:function(t){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{$(e.result.html);this.refreshImage(e.result)}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"))},_onUploadError:function(t,e){e.jqXHR.responseJSON.error&&(alert(e.jqXHR.responseJSON.error),this.$container.removeClass("uploading"),this.progressBar.hideProgressBar(),this.progressBar.resetProgressBar())}},{defaults:{postParameters:{},uploadAction:"",deleteAction:"",fileInputSelector:"",onAfterRefreshImage:$.noop,containerSelector:null,uploadButtonSelector:null,deleteButtonSelector:null,uploadParamName:"files"}}),Craft.InfoIcon=Garnish.Base.extend({$icon:null,hud:null,init:function(t){this.$icon=$(t),this.addListener(this.$icon,"click","showHud")},showHud:function(){this.hud?this.hud.show():this.hud=new Garnish.HUD(this.$icon,this.$icon.html(),{hudClass:"hud info-hud",closeOtherHUDs:!1})}}),Craft.LightSwitch=Garnish.Base.extend({settings:null,$outerContainer:null,$innerContainer:null,$input:null,small:!1,on:null,dragger:null,dragStartMargin:null,init:function(t,e){this.$outerContainer=$(t),this.$outerContainer.data("lightswitch")&&(Garnish.log("Double-instantiating a lightswitch on an element"),this.$outerContainer.data("lightswitch").destroy()),this.$outerContainer.data("lightswitch",this),this.small=this.$outerContainer.hasClass("small"),this.setSettings(e,Craft.LightSwitch.defaults),this.$innerContainer=this.$outerContainer.find(".lightswitch-container:first"),this.$input=this.$outerContainer.find("input:first"),this.$input.prop("disabled")||(this.on=this.$outerContainer.hasClass("on"),this.$outerContainer.attr({role:"checkbox","aria-checked":this.on?"true":"false"}),this.addListener(this.$outerContainer,"mousedown","_onMouseDown"),this.addListener(this.$outerContainer,"keydown","_onKeyDown"),this.dragger=new Garnish.BaseDrag(this.$outerContainer,{axis:Garnish.X_AXIS,ignoreHandleSelector:null,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}))},turnOn:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=0,this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(this.settings.value),this.$outerContainer.addClass("on"),this.$outerContainer.attr("aria-checked","true"),this.on!==(this.on=!0)&&this.onChange()},turnOff:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=this._getOffMargin(),this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(""),this.$outerContainer.removeClass("on"),this.$outerContainer.attr("aria-checked","false"),this.on!==(this.on=!1)&&this.onChange()},toggle:function(t){this.on?this.turnOff():this.turnOn()},onChange:function(){this.trigger("change"),this.settings.onChange(),this.$outerContainer.trigger("change")},_onMouseDown:function(){this.addListener(Garnish.$doc,"mouseup","_onMouseUp")},_onMouseUp:function(){this.removeListener(Garnish.$doc,"mouseup"),this.dragger.dragging||this.toggle()},_onKeyDown:function(t){switch(t.keyCode){case Garnish.SPACE_KEY:this.toggle(),t.preventDefault();break;case Garnish.RIGHT_KEY:"ltr"===Craft.orientation?this.turnOn():this.turnOff(),t.preventDefault();break;case Garnish.LEFT_KEY:"ltr"===Craft.orientation?this.turnOff():this.turnOn(),t.preventDefault()}},_getMargin:function(){return parseInt(this.$innerContainer.css("margin-"+Craft.left))},_onDragStart:function(){this.$outerContainer.addClass("dragging"),this.dragStartMargin=this._getMargin()},_onDrag:function(){var t;(t="ltr"===Craft.orientation?this.dragStartMargin+this.dragger.mouseDistX:this.dragStartMargin-this.dragger.mouseDistX)<this._getOffMargin()?t=this._getOffMargin():0<t&&(t=0),this.$innerContainer.css("margin-"+Craft.left,t)},_onDragStop:function(){this._getMargin()>this._getOffMargin()/2?this.turnOn():this.turnOff()},_onSettle:function(){this.$outerContainer.removeClass("dragging")},destroy:function(){this.base(),this.dragger.destroy()},_getOffMargin:function(){return this.small?-9:-11}},{animationDuration:100,defaults:{value:"1",onChange:$.noop}}),Craft.LivePreview=Garnish.Base.extend({$extraFields:null,$trigger:null,$shade:null,$editorContainer:null,$editor:null,$dragHandle:null,$iframeContainer:null,$iframe:null,$fieldPlaceholder:null,previewUrl:null,token:null,basePostData:null,inPreviewMode:!1,fields:null,lastPostData:null,updateIframeInterval:null,loading:!1,checkAgain:!1,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_handleSuccessProxy:null,_handleErrorProxy:null,_forceUpdateIframeProxy:null,_scrollX:null,_scrollY:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.setSettings(t,Craft.LivePreview.defaults),this.settings.previewUrl?this.previewUrl=this.settings.previewUrl:this.previewUrl=Craft.baseSiteUrl.replace(/\/+$/,"")+"/","https:"===document.location.protocol&&(this.previewUrl=this.previewUrl.replace(/^http:/,"https:")),this.basePostData=$.extend({},this.settings.previewParams),this._handleSuccessProxy=$.proxy(this,"handleSuccess"),this._handleErrorProxy=$.proxy(this,"handleError"),this._forceUpdateIframeProxy=$.proxy(this,"forceUpdateIframe"),this.$extraFields=$(this.settings.extraFields),this.$trigger=$(this.settings.trigger),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.LivePreview.defaultEditorWidth),this.addListener(this.$trigger,"activate","toggle"),Craft.cp.on("beforeSaveShortcut",$.proxy(function(){this.inPreviewMode&&this.moveFieldsBack()},this))},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.LivePreview.minEditorWidthInPx&&(t=(e=Craft.LivePreview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},toggle:function(){this.inPreviewMode?this.exit():this.enter()},enter:function(){if(!this.inPreviewMode)if(this.token){if(this.trigger("beforeEnter"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$iframeContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);$("<div/>",{class:"flex-grow"}).appendTo(t);var i=$('<div class="btn submit">'+Craft.t("app","Save")+"</div>").appendTo(t);this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","exit"),this.addListener(i,"click","save")}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)+"px"),this.$iframeContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];for(var s=$(this.settings.fields),n=0;n<s.length;n++){var a=$(s[n]),r=this._getClone(a);this.$fieldPlaceholder.insertAfter(a),a.detach(),this.$fieldPlaceholder.replaceWith(r),a.appendTo(this.$editor),this.fields.push({$field:a,$clone:r})}this.updateIframe()?this._slideInOnIframeLoad=!0:this.slideIn(),Garnish.on(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._forceUpdateIframeProxy),this.inPreviewMode=!0,this.trigger("enter")}else this.createToken()},createToken:function(){Craft.postActionRequest("live-preview/create-token",{previewAction:this.settings.previewAction},$.proxy(function(t,e){"success"===e&&(this.token=t.token,this.enter())},this))},save:function(){Craft.cp.submitPrimaryForm()},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$iframeContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.updateIframeInterval=setInterval($.proxy(this,"updateIframe"),1e3),this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.exit()})},this))},exit:function(){this.inPreviewMode&&(this.trigger("beforeExit"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.updateIframeInterval&&clearInterval(this.updateIframeInterval),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$iframeContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$iframeContainer.hide()},this)),Garnish.off(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),this.inPreviewMode=!1,this.trigger("exit"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$iframeContainer.width(this.getIframeWidth())},updateIframe:function(t){if(t&&(this.lastPostData=null),!this.inPreviewMode)return!1;if(this.loading)return!(this.checkAgain=!0);var e=$.extend(Garnish.getPostData(this.$editor),Garnish.getPostData(this.$extraFields));if(this.lastPostData&&Craft.compare(e,this.lastPostData,!1))return!1;this.lastPostData=e,this.loading=!0;var i=this.$iframe?$(this.$iframe[0].contentWindow.document):null;return this._scrollX=i?i.scrollLeft():0,this._scrollY=i?i.scrollTop():0,$.ajax({url:this.previewUrl+(-1!==this.previewUrl.indexOf("?")?"&":"?")+Craft.tokenParam+"="+this.token,method:"POST",data:$.extend({},e,this.basePostData),headers:{"X-Craft-Token":this.token},xhrFields:{withCredentials:!0},crossDomain:!0,success:this._handleSuccessProxy,error:this._handleErrorProxy}),!0},forceUpdateIframe:function(){return this.updateIframe(!0)},handleSuccess:function(t){var e=t+'<script type="text/javascript">window.scrollTo('+this._scrollX+", "+this._scrollY+");<\/script>",i=$('<iframe class="lp-preview" frameborder="0"/>');this.$iframe?i.insertBefore(this.$iframe):i.appendTo(this.$iframeContainer),this.addListener(i,"load",function(){this.$iframe&&this.$iframe.remove(),this.$iframe=i,this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1),this.removeListener(i,"load")}),Garnish.requestAnimationFrame($.proxy(function(){i[0].contentWindow.document.open(),i[0].contentWindow.document.write(e),i[0].contentWindow.document.close(),this.onResponse()},this))},handleError:function(){this.onResponse()},onResponse:function(){this.loading=!1,this.checkAgain&&(this.checkAgain=!1,this.updateIframe())},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$iframeContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$iframeContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:4,defaults:{trigger:".livepreviewbtn",fields:null,extraFields:null,previewUrl:null,previewAction:null,previewParams:{}}}),Craft.LivePreview.init=function(t){Craft.livePreview=new Craft.LivePreview(t)},Craft.PasswordInput=Garnish.Base.extend({$passwordInput:null,$textInput:null,$currentInput:null,$showPasswordToggle:null,showingPassword:null,init:function(t,e){this.$passwordInput=$(t),this.settings=$.extend({},Craft.PasswordInput.defaults,e),this.$passwordInput.data("passwordInput")&&(Garnish.log("Double-instantiating a password input on an element"),this.$passwordInput.data("passwordInput").destroy()),this.$passwordInput.data("passwordInput",this),this.$showPasswordToggle=$("<a/>").hide(),this.$showPasswordToggle.addClass("password-toggle"),this.$showPasswordToggle.insertAfter(this.$passwordInput),this.addListener(this.$showPasswordToggle,"mousedown","onToggleMouseDown"),this.hidePassword()},setCurrentInput:function(t){this.$currentInput&&(t.addClass("focus"),t.insertAfter(this.$currentInput),this.$currentInput.detach(),t.trigger("focus"),t.removeClass("focus"),t.val(this.$currentInput.val())),this.$currentInput=t,this.addListener(this.$currentInput,"keypress,keyup,change,blur","onInputChange")},updateToggleLabel:function(t){this.$showPasswordToggle.text(t)},showPassword:function(){this.showingPassword||(this.$textInput||(this.$textInput=this.$passwordInput.clone(!0),this.$textInput.attr("type","text")),this.setCurrentInput(this.$textInput),this.updateToggleLabel(Craft.t("app","Hide")),this.showingPassword=!0)},hidePassword:function(){!1!==this.showingPassword&&(this.setCurrentInput(this.$passwordInput),this.updateToggleLabel(Craft.t("app","Show")),this.showingPassword=!1,this.addListener(this.$passwordInput,"keydown","onKeyDown"))},togglePassword:function(){this.showingPassword?this.hidePassword():this.showPassword(),this.settings.onToggleInput(this.$currentInput)},onKeyDown:function(t){t.keyCode===Garnish.ALT_KEY&&this.$currentInput.val()&&(this.showPassword(),this.$showPasswordToggle.hide(),this.addListener(this.$textInput,"keyup","onKeyUp"))},onKeyUp:function(t){t.preventDefault(),t.keyCode===Garnish.ALT_KEY&&(this.hidePassword(),this.$showPasswordToggle.show())},onInputChange:function(){this.$currentInput.val()?this.$showPasswordToggle.show():this.$showPasswordToggle.hide()},onToggleMouseDown:function(t){if(t.preventDefault(),this.$currentInput[0].setSelectionRange){var e=this.$currentInput[0].selectionStart,i=this.$currentInput[0].selectionEnd;this.togglePassword(),this.$currentInput[0].setSelectionRange(e,i)}else this.togglePassword()}},{defaults:{onToggleInput:$.noop}}),Craft.Preview=Garnish.Base.extend({draftEditor:null,$shade:null,$editorContainer:null,$editor:null,$spinner:null,$statusIcon:null,$dragHandle:null,$previewContainer:null,$targetBtn:null,$targetMenu:null,$iframe:null,$tempInput:null,$fieldPlaceholder:null,isActive:!1,activeTarget:0,url:null,fields:null,scrollLeft:0,scrollTop:0,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_updateIframeProxy:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.draftEditor=t,this._updateIframeProxy=$.proxy(this,"updateIframe"),this.$tempInput=$("<input/>",{type:"hidden",name:"__PREVIEW_FIELDS__",value:"1"}),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.Preview.defaultEditorWidth)},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.Preview.minEditorWidthInPx&&(t=(e=Craft.Preview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},open:function(){if(!this.isActive){if(this.isActive=!0,this.trigger("beforeOpen"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$previewContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);if($("<div/>",{class:"flex-grow"}).appendTo(t),this.$spinner=$("<div/>",{class:"spinner hidden",title:Craft.t("app","Saving")}).appendTo(t),this.$statusIcon=$("<div/>",{class:"invisible"}).appendTo(t),1<this.draftEditor.settings.previewTargets.length){var i=$("<header/>",{class:"flex"}).appendTo(this.$previewContainer);this.$targetBtn=$("<div/>",{class:"btn menubtn",text:this.draftEditor.settings.previewTargets[0].label,role:"btn"}).appendTo(i),this.$targetMenu=$("<div/>",{class:"menu lp-target-menu"}).insertAfter(this.$targetBtn);for(var s,n=$("<ul/>",{class:"padded"}).appendTo(this.$targetMenu),a=0;a<this.draftEditor.settings.previewTargets.length;a++)s=$("<li/>").appendTo(n),$("<a/>",{data:{target:a},text:this.draftEditor.settings.previewTargets[a].label,class:0===a?"sel":null}).appendTo(s);new Garnish.MenuBtn(this.$targetBtn,{onOptionSelect:$.proxy(function(t){this.switchTarget($(t).data("target"))},this)})}this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","close"),this.addListener(this.$statusIcon,"click",function(){this.draftEditor.showStatusHud(this.$statusIcon)}.bind(this))}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)+"px"),this.$previewContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];var r=$("#content .field").not($("#content .field .field"));if(r.length){this.$tempInput.insertBefore(r.get(0));for(a=0;a<r.length;a++){var o=$(r[a]),l=this._getClone(o);this.$fieldPlaceholder.insertAfter(o),o.detach(),this.$fieldPlaceholder.replaceWith(l),o.appendTo(this.$editor),this.fields.push({$field:o,$clone:l})}}this._slideInOnIframeLoad=!0,this.updateIframe(),this.draftEditor.on("update",this._updateIframeProxy),Garnish.on(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.trigger("open")}},switchTarget:function(t){this.activeTarget=t,this.$targetBtn.text(this.draftEditor.settings.previewTargets[t].label),this.$targetMenu.find("a.sel").removeClass("sel"),this.$targetMenu.find("a").eq(t).addClass("sel"),this.updateIframe(!0)},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$previewContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.close()})},this))},close:function(){this.isActive&&(this.trigger("beforeClose"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.$tempInput.detach(),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.Preview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$previewContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$previewContainer.hide()},this)),this.draftEditor.off("update",this._updateIframeProxy),Garnish.off(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.off(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.isActive=!1,this.trigger("close"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$previewContainer.width(this.getIframeWidth())},updateIframe:function(n){if(!this.isActive)return!1;n=!0===n;var t=this.draftEditor.settings.previewTargets[this.activeTarget].url;this.draftEditor.getTokenizedPreviewUrl(t,"x-craft-live-preview").then(function(t){var e;if(n)this.scrollLeft=0,this.scrolllTop=0;else if((e=Craft.isSameHost(t))&&this.$iframe&&this.$iframe[0].contentWindow){var i=$(this.$iframe[0].contentWindow.document);this.scrollLeft=i.scrollLeft(),this.scrollTop=i.scrollTop()}var s=$("<iframe/>",{class:"lp-preview",frameborder:0,src:t});!n&&e&&s.on("load",function(){var t=$(s[0].contentWindow.document);t.scrollLeft(this.scrollLeft),t.scrollTop(this.scrollTop)}.bind(this)),this.$iframe?this.$iframe.replaceWith(s):s.appendTo(this.$previewContainer),this.url=t,this.$iframe=s,this.afterUpdateIframe()}.bind(this))},afterUpdateIframe:function(){this.trigger("afterUpdateIframe"),this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1)},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e.find("[name]").prop("disabled",!0),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$previewContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$previewContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:2}),Craft.PreviewFileModal=Garnish.Modal.extend({assetId:null,$spinner:null,elementSelect:null,type:null,loaded:null,requestId:0,init:function(t,e,i){if((i=$.extend(this.defaultSettings,i)).onHide=this._onHide.bind(this),Craft.PreviewFileModal.openInstance){var s=Craft.PreviewFileModal.openInstance;return s.assetId!==t&&(s.loadAsset(t,i.startingWidth,i.startingHeight),s.elementSelect=e),this.destroy()}(Craft.PreviewFileModal.openInstance=this).elementSelect=e,this.$container=$('<div id="previewmodal" class="modal loading"/>').appendTo(Garnish.$bod),this.base(this.$container,$.extend({resizable:!0},i)),this.$container&&(this.$container.velocity("stop"),this.$container.show().css("opacity",1),this.$shade.velocity("stop"),this.$shade.show().css("opacity",1)),this.loadAsset(t,i.startingWidth,i.startingHeight)},_onHide:function(){return Craft.PreviewFileModal.openInstance=null,this.elementSelect.focusItem(this.elementSelect.$focusedItem),this.$shade.remove(),this.destroy()},selfDestruct:function(){var t=Craft.PreviewFileModal.openInstance;return t.hide(),t.$shade.remove(),t.destroy(),!(Craft.PreviewFileModal.openInstance=null)},loadAsset:function(t,e,i){this.assetId=t,this.$container.empty(),this.loaded=!1,this.desiredHeight=null,this.desiredWidth=null;var n=.66*Garnish.$win.height(),a=Math.min(n/3*4,Garnish.$win.width()-2*this.settings.minGutter);if(n=a/4*3,e&&i){var s=e/i;a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=Math.min(a/s,Garnish.$win.height()-2*this.settings.minGutter),(a=n*s)>Math.min(e,Garnish.$win.width()-2*this.settings.minGutter)&&(a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=a/s)}this._resizeContainer(a,n),this.$spinner=$('<div class="spinner centeralign"></div>').appendTo(this.$container);var r=this.$container.height()/2-this.$spinner.height()/2+"px",o=this.$container.width()/2-this.$spinner.width()/2+"px";this.$spinner.css({left:o,top:r,position:"absolute"}),this.requestId++,Craft.postActionRequest("assets/preview-file",{assetId:t,requestId:this.requestId},function(t,e){if("success"===e)if(t.success){if(t.requestId!=this.requestId)return;this.$container.removeClass("loading"),this.$spinner.remove(),this.loaded=!0,this.$container.append(t.modalHtml);var i=this.$container.find(".highlight");if(i.length&&i.hasClass("json")){var s=i.find("code");s.html(JSON.stringify(JSON.parse(s.html()),void 0,4))}i.length?Prism.highlightElement(i.find("code").get(0)):this.$container.find("img").css({width:a,height:n}),this.updateSizeAndPosition()}else alert(t.error),this.hide()}.bind(this))},updateSizeAndPosition:function(){if(this.loaded){var t=this.$container.find("img");if(this.loaded&&t.length){var e=t.data("maxwidth"),i=t.data("maxheight"),s=e/i,n=this.desiredWidth?this.desiredWidth:this.$container.width(),a=(this.desiredHeight?this.desiredHeight:this.$container.height(),Math.min(n,e)),r=Math.round(Math.min(i,a/s));a=Math.round(r*s),t.css({width:a,height:r}),this._resizeContainer(a,r),this.desiredWidth=a,this.desiredHeight=r}if(this.base(),this.loaded&&t.length){var o=Math.round(Math.min(Math.max(t.height()*s),Garnish.$win.width()-2*this.settings.minGutter)),l=Math.round(Math.min(Math.max(o/s),Garnish.$win.height()-2*this.settings.minGutter));(o=Math.round(l*s))>Math.min(o,Garnish.$win.width()-2*this.settings.minGutter)&&(l=(o=Math.min(o,Garnish.$win.width()-2*this.settings.minGutter))/s),this._resizeContainer(o,l),t.css({width:o,height:l})}else this.loaded&&this.$container.find(".highlight").height(this.$container.height()).width(this.$container.width()).css({overflow:"auto"})}},_resizeContainer:function(t,e){this.$container.css({width:t,"min-width":t,"max-width":t,height:e,"min-height":e,"max-height":e,top:(Garnish.$win.height()-e)/2,left:(Garnish.$win.width()-t)/2})}},{defaultSettings:{startingWidth:null,startingHeight:null}}),Craft.ProgressBar=Garnish.Base.extend({$progressBar:null,$innerProgressBar:null,$progressBarStatus:null,_itemCount:0,_processedItemCount:0,_displaySteps:!1,init:function(t,e){e&&(this._displaySteps=!0),this.$progressBar=$('<div class="progressbar pending hidden"/>').appendTo(t),this.$innerProgressBar=$('<div class="progressbar-inner"/>').appendTo(this.$progressBar),this.$progressBarStatus=$('<div class="progressbar-status hidden" />').insertAfter(this.$progressBar),this.resetProgressBar()},resetProgressBar:function(){this.setProgressPercentage(100),this.$progressBar.addClass("pending"),this.setItemCount(1),this.setProcessedItemCount(0),this.$progressBarStatus.html(""),this._displaySteps&&this.$progressBar.addClass("has-status")},hideProgressBar:function(){this.$progressBar.fadeTo("fast",.01,$.proxy(function(){this.$progressBar.addClass("hidden").fadeTo(1,1,$.noop)},this))},showProgressBar:function(){this.$progressBar.removeClass("hidden"),this.$progressBarStatus.removeClass("hidden")},setItemCount:function(t){this._itemCount=t},incrementItemCount:function(t){this._itemCount+=t},setProcessedItemCount:function(t){this._processedItemCount=t},incrementProcessedItemCount:function(t){this._processedItemCount+=t},updateProgressBar:function(){this._itemCount=Math.max(this._itemCount,1);var t=Math.min(100,Math.round(100*this._processedItemCount/this._itemCount));this.setProgressPercentage(t),this._displaySteps&&this.$progressBarStatus.html(this._processedItemCount+" / "+this._itemCount)},setProgressPercentage:function(t,e){0===t?this.$progressBar.addClass("pending"):(this.$progressBar.removeClass("pending"),e?this.$innerProgressBar.velocity("stop").velocity({width:t+"%"},"fast"):this.$innerProgressBar.velocity("stop").width(t+"%"))}}),Craft.PromptHandler=Garnish.Base.extend({modal:null,$modalContainerDiv:null,$prompt:null,$promptApplyToRemainingContainer:null,$promptApplyToRemainingCheckbox:null,$promptApplyToRemainingLabel:null,$pomptChoices:null,_prompts:[],_promptBatchCallback:$.noop,_promptBatchReturnData:[],_promptBatchNum:0,resetPrompts:function(){this._prompts=[],this._promptBatchCallback=$.noop,this._promptBatchReturnData=[],this._promptBatchNum=0},addPrompt:function(t){this._prompts.push(t)},getPromptCount:function(){return this._prompts.length},showBatchPrompts:function(t){this._promptBatchCallback=t,this._promptBatchReturnData=[],this._promptBatchNum=0,this._showNextPromptInBatch()},_showNextPromptInBatch:function(){var t=this._prompts[this._promptBatchNum].prompt,e=this._prompts.length-(this._promptBatchNum+1);this._showPrompt(t.message,t.choices,$.proxy(this,"_handleBatchPromptSelection"),e)},_handleBatchPromptSelection:function(t,e){var i=this._prompts[this._promptBatchNum],s=this._prompts.length-(this._promptBatchNum+1),n=$.extend(i,{choice:t});this._promptBatchReturnData.push(n),s?(this._promptBatchNum++,e?this._handleBatchPromptSelection(t,!0):this._showNextPromptInBatch()):"function"==typeof this._promptBatchCallback&&this._promptBatchCallback(this._promptBatchReturnData)},_showPrompt:function(t,e,i,s){this._promptCallback=i,null===this.modal&&(this.modal=new Garnish.Modal({closeOtherModals:!1})),null===this.$modalContainerDiv&&(this.$modalContainerDiv=$('<div class="modal fitted prompt-modal"></div>').addClass().appendTo(Garnish.$bod)),this.$prompt=$('<div class="body"></div>').appendTo(this.$modalContainerDiv.empty()),this.$promptMessage=$('<p class="prompt-msg"/>').appendTo(this.$prompt),this.$promptChoices=$('<div class="options"></div>').appendTo(this.$prompt),this.$promptApplyToRemainingContainer=$('<label class="assets-applytoremaining"/>').appendTo(this.$prompt).hide(),this.$promptApplyToRemainingCheckbox=$('<input type="checkbox"/>').appendTo(this.$promptApplyToRemainingContainer),this.$promptApplyToRemainingLabel=$("<span/>").appendTo(this.$promptApplyToRemainingContainer),this.$promptButtons=$('<div class="buttons right"/>').appendTo(this.$prompt),this.modal.setContainer(this.$modalContainerDiv),this.$promptMessage.html(t);for(var n=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$promptButtons),a=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","OK")+'" />').appendTo(this.$promptButtons),r=0;r<e.length;r++){var o=$('<div><label><input type="radio" name="promptAction" value="'+e[r].value+'"/> '+e[r].title+"</label></div>").appendTo(this.$promptChoices).find("input");this.addListener(o,"click",function(){a.removeClass("disabled")})}this.addListener(a,"activate",function(t){var e=$(t.currentTarget).parents(".modal").find("input[name=promptAction]:checked").val(),i=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice(e,i)}),this.addListener(n,"activate",function(){var t=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice("cancel",t)}),s&&(this.$promptApplyToRemainingContainer.show(),this.$promptApplyToRemainingLabel.html(" "+Craft.t("app","Apply this to the {number} remaining conflicts?",{number:s}))),this.modal.show(),this.modal.removeListener(Garnish.Modal.$shade,"click"),this.addListener(Garnish.Modal.$shade,"click","_cancelPrompt")},_selectPromptChoice:function(t,e){this.$prompt.fadeOut("fast",$.proxy(function(){this.modal.hide(),this._promptCallback(t,e)},this))},_cancelPrompt:function(){this._selectPromptChoice("cancel",!0)}}),Craft.SlideRuleInput=Garnish.Base.extend({$container:null,$options:null,$selectedOption:null,$input:null,value:null,startPositionX:null,init:function(t,e){this.setSettings(e,Craft.SlideRuleInput.defaultSettings),this.value=0,this.graduationsMin=-70,this.graduationsMax=70,this.slideMin=-45,this.slideMax=45,this.$container=$("#"+t),this.$overlay=$('<div class="overlay"></div>').appendTo(this.$container),this.$cursor=$('<div class="cursor"></div>').appendTo(this.$container),this.$graduations=$('<div class="graduations"></div>').appendTo(this.$container),this.$graduationsUl=$("<ul></ul>").appendTo(this.$graduations);for(var i=this.graduationsMin;i<=this.graduationsMax;i++){var s=$('<li class="graduation" data-graduation="'+i+'"><div class="label">'+i+"</div></li>").appendTo(this.$graduationsUl);i%5==0&&s.addClass("main-graduation"),0===i&&s.addClass("selected")}this.$options=this.$container.find(".graduation"),this.addListener(this.$container,"resize",$.proxy(this,"_handleResize")),this.addListener(this.$container,"tapstart",$.proxy(this,"_handleTapStart")),this.addListener(Garnish.$bod,"tapmove",$.proxy(this,"_handleTapMove")),this.addListener(Garnish.$bod,"tapend",$.proxy(this,"_handleTapEnd")),setTimeout($.proxy(function(){this.graduationsCalculatedWidth=10*(this.$options.length-1),this.$graduationsUl.css("left",-this.graduationsCalculatedWidth/2+this.$container.width()/2)},this),50)},_handleResize:function(){var t=this.valueToPosition(this.value);this.$graduationsUl.css("left",t)},_handleTapStart:function(t,e){t.preventDefault(),this.startPositionX=e.position.x,this.startLeft=this.$graduationsUl.position().left,this.dragging=!0,this.onStart()},_handleTapMove:function(t,e){if(this.dragging){t.preventDefault();var i=this.startPositionX-e.position.x,s=this.startLeft-i,n=this.positionToValue(s);this.setValue(n),this.onChange()}},setValue:function(i){var t=this.valueToPosition(i);i<this.slideMin?(i=this.slideMin,t=this.valueToPosition(i)):i>this.slideMax&&(i=this.slideMax,t=this.valueToPosition(i)),this.$graduationsUl.css("left",t),i>=this.slideMin&&i<=this.slideMax&&(this.$options.removeClass("selected"),$.each(this.$options,function(t,e){0<$(e).data("graduation")&&$(e).data("graduation")<=i&&$(e).addClass("selected"),$(e).data("graduation")<0&&$(e).data("graduation")>=i&&$(e).addClass("selected"),0==$(e).data("graduation")&&$(e).addClass("selected")})),this.value=i},_handleTapEnd:function(t){this.dragging&&(t.preventDefault(),this.dragging=!1,this.onEnd())},positionToValue:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return(this.$graduations.width()/2+-1*t)/this.graduationsCalculatedWidth*i-e},valueToPosition:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return-((t+e)*this.graduationsCalculatedWidth/i-this.$graduations.width()/2)},onStart:function(){"function"==typeof this.settings.onChange&&this.settings.onStart(this)},onChange:function(){"function"==typeof this.settings.onChange&&this.settings.onChange(this)},onEnd:function(){"function"==typeof this.settings.onChange&&this.settings.onEnd(this)},defaultSettings:{onStart:$.noop,onChange:$.noop,onEnd:$.noop}}),Craft.SlugGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace(/<(.*?)>/g,"")).replace(/['"‘’“”\[\]\(\)\{\}:]/g,""),Craft.allowUppercaseInSlug||(t=t.toLowerCase()),Craft.limitAutoSlugsToAscii&&(t=Craft.asciiString(t,this.settings.charMap));var e=Craft.filterArray(XRegExp.matchChain(t,[XRegExp("[\\p{L}\\p{N}\\p{M}]+")]));return e.length?e.join(Craft.slugWordSeparator):""}}),Craft.Structure=Garnish.Base.extend({id:null,$container:null,state:null,structureDrag:null,init:function(t,e,i){this.id=t,this.$container=$(e),this.setSettings(i,Craft.Structure.defaults),this.$container.data("structure")&&(Garnish.log("Double-instantiating a structure on an element"),this.$container.data("structure").destroy()),this.$container.data("structure",this),this.state={},this.settings.storageKey&&$.extend(this.state,Craft.getLocalStorage(this.settings.storageKey,{})),void 0===this.state.collapsedElementIds&&(this.state.collapsedElementIds=[]);for(var s=this.$container.find("ul").prev(".row"),n=0;n<s.length;n++){var a=$(s[n]),r=a.parent(),o=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(a);-1!==$.inArray(a.children(".element").data("id"),this.state.collapsedElementIds)&&r.addClass("collapsed"),this.initToggle(o)}this.settings.sortable&&(this.structureDrag=new Craft.StructureDrag(this,this.settings.maxLevels)),this.settings.newChildUrl&&this.initNewChildMenus(this.$container.find(".add"))},initToggle:function(t){t.on("click",$.proxy(function(t){var e=$(t.currentTarget).closest("li"),i=e.children(".row").find(".element:first").data("id"),s=$.inArray(i,this.state.collapsedElementIds);e.hasClass("collapsed")?(e.removeClass("collapsed"),-1!==s&&this.state.collapsedElementIds.splice(s,1)):(e.addClass("collapsed"),-1===s&&this.state.collapsedElementIds.push(i)),this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.state)},this))},initNewChildMenus:function(t){this.addListener(t,"click","onNewChildMenuClick")},onNewChildMenuClick:function(t){var e=$(t.currentTarget);if(!e.data("menubtn")){var i=e.parent().children(".element").data("id"),s=Craft.getUrl(this.settings.newChildUrl,"parentId="+i);$('<div class="menu"><ul><li><a href="'+s+'">'+Craft.t("app","New child")+"</a></li></ul></div>").insertAfter(e),new Garnish.MenuBtn(e).showMenu()}},getIndent:function(t){return Craft.Structure.baseIndent+(t-1)*Craft.Structure.nestedIndent},addElement:function(t){var e=$('<li data-level="1"/>').appendTo(this.$container),i=$('<div class="row" style="margin-'+Craft.left+": -"+Craft.Structure.baseIndent+"px; padding-"+Craft.left+": "+Craft.Structure.baseIndent+'px;">').appendTo(e);if(i.append(t),this.settings.sortable&&(i.append('<a class="move icon" title="'+Craft.t("app","Move")+'"></a>'),this.structureDrag.addItems(e)),this.settings.newChildUrl){var s=$('<a class="add icon" title="'+Craft.t("app","New child")+'"></a>').appendTo(i);this.initNewChildMenus(s)}i.css("margin-bottom",-30),i.velocity({"margin-bottom":0},"fast")},removeElement:function(t){var e,i=t.parent().parent();this.settings.sortable&&this.structureDrag.removeItems(i),i.siblings().length||(e=i.parent()),i.css("visibility","hidden").velocity({marginBottom:-i.height()},"fast",$.proxy(function(){i.remove(),void 0!==e&&this._removeUl(e)},this))},_removeUl:function(t){t.siblings(".row").children(".toggle").remove(),t.remove()}},{baseIndent:8,nestedIndent:35,defaults:{storageKey:null,sortable:!1,newChildUrl:null,maxLevels:null}}),Craft.StructureDrag=Garnish.Drag.extend({structure:null,maxLevels:null,draggeeLevel:null,$helperLi:null,$targets:null,draggeeHeight:null,init:function(t,e){this.structure=t,this.maxLevels=e,this.$insertion=$('<li class="draginsertion"/>');var i=this.structure.$container.find("li");this.base(i,{handle:".element:first, .move:first",helper:$.proxy(this,"getHelper")})},getHelper:function(t){this.$helperLi=t;var e=$('<ul class="structure draghelper"/>').append(t);return t.css("padding-"+Craft.left,this.$draggee.css("padding-"+Craft.left)),t.find(".move").removeAttr("title"),e},onDragStart:function(){this.$targets=$(),this.findTargets(this.structure.$container),this.draggeeLevel=0;for(var t=this.$draggee;this.draggeeLevel++,(t=t.find("> ul > li")).length;);this.draggeeHeight=this.$draggee.height(),this.$draggee.velocity({height:0},"fast",$.proxy(function(){this.$draggee.addClass("hidden")},this)),this.base(),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.ESC_KEY&&this.cancelDrag()})},findTargets:function(t){for(var e=t.children().not(this.$draggee),i=0;i<e.length;i++){var s=$(e[i]);this.$targets=this.$targets.add(s.children(".row")),s.hasClass("collapsed")||this.findTargets(s.children("ul"))}},onDrag:function(){for(this._.$closestTarget&&(this._.$closestTarget.removeClass("draghover"),this.$insertion.remove()),this._.$closestTarget=null,this._.closestTargetPos=null,this._.closestTargetYDiff=null,this._.closestTargetOffset=null,this._.closestTargetHeight=null,this._.i=0;this._.i<this.$targets.length&&(this._.$target=$(this.$targets[this._.i]),this._.targetOffset=this._.$target.offset(),this._.targetHeight=this._.$target.outerHeight(),this._.targetYMidpoint=this._.targetOffset.top+this._.targetHeight/2,this._.targetYDiff=Math.abs(this.mouseY-this._.targetYMidpoint),0===this._.i||this.mouseY>=this._.targetOffset.top+5&&this._.targetYDiff<this._.closestTargetYDiff);this._.i++)this._.$closestTarget=this._.$target,this._.closestTargetPos=this._.i,this._.closestTargetYDiff=this._.targetYDiff,this._.closestTargetOffset=this._.targetOffset,this._.closestTargetHeight=this._.targetHeight;if(this._.$closestTarget)if(0===this._.closestTargetPos&&this.mouseY<this._.closestTargetOffset.top+5)this.$insertion.prependTo(this.structure.$container);else if(this._.$closestTargetLi=this._.$closestTarget.parent(),this._.closestTargetLevel=this._.$closestTargetLi.data("level"),this._.closestTargetPos<this.$targets.length-1?(this._.$nextTargetLi=$(this.$targets[this._.closestTargetPos+1]).parent(),this._.nextTargetLevel=this._.$nextTargetLi.data("level")):(this._.$nextTargetLi=null,this._.nextTargetLevel=null),this._.hoveringBetweenRows=this.mouseY>=this._.closestTargetOffset.top+this._.closestTargetHeight-5,this._.$nextTargetLi&&this._.nextTargetLevel==this._.closestTargetLevel)this._.hoveringBetweenRows?(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel-1)&&this.$insertion.insertAfter(this._.$closestTargetLi):(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover");else if(this._.$nextTargetLi&&this._.nextTargetLevel>this._.closestTargetLevel)(!this.maxLevels||this.maxLevels>=this._.nextTargetLevel+this.draggeeLevel-1)&&(this._.hoveringBetweenRows?this.$insertion.insertBefore(this._.$nextTargetLi):(this._.$closestTarget.addClass("draghover"),this.$insertion.appendTo(this._.$closestTargetLi.children("ul"))));else if(this._.hoveringBetweenRows){for(this._.draggeeX=this.mouseX-this.targetItemMouseDiffX,"rtl"===Craft.orientation&&(this._.draggeeX+=this.$helperLi.width()),this._.$parentLis=this._.$closestTarget.parentsUntil(this.structure.$container,"li"),this._.$closestParentLi=null,this._.closestParentLiXDiff=null,this._.closestParentLevel=null,this._.i=0;this._.i<this._.$parentLis.length;this._.i++)this._.$parentLi=$(this._.$parentLis[this._.i]),this._.parentLiX=this._.$parentLi.offset().left,"rtl"===Craft.orientation&&(this._.parentLiX+=this._.$parentLi.width()),this._.parentLiXDiff=Math.abs(this._.parentLiX-this._.draggeeX),this._.parentLevel=this._.$parentLi.data("level"),(!this.maxLevels||this.maxLevels>=this._.parentLevel+this.draggeeLevel-1)&&(!this._.$closestParentLi||this._.parentLiXDiff<this._.closestParentLiXDiff&&(!this._.$nextTargetLi||this._.parentLevel>=this._.nextTargetLevel))&&(this._.$closestParentLi=this._.$parentLi,this._.closestParentLiXDiff=this._.parentLiXDiff,this._.closestParentLevel=this._.parentLevel);this._.$closestParentLi&&this.$insertion.insertAfter(this._.$closestParentLi)}else(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover")},cancelDrag:function(){this.$insertion.remove(),this._.$closestTarget&&this._.$closestTarget.removeClass("draghover"),this.onMouseUp()},onDragStop:function(){if(this._.$closestTarget&&(this.$insertion.parent().length||this._.$closestTarget.hasClass("draghover"))){var t,e;if(this.$draggee.siblings().length||(t=this.$draggee.parent()),this.$insertion.parent().length){var i=this.$insertion.next().add(this.$insertion.prev());e=-1===$.inArray(this.$draggee[0],i)?(this.$insertion.replaceWith(this.$draggee),!0):(this.$insertion.remove(),!1)}else{var s=this._.$closestTargetLi.children("ul");if(t&&s.length&&s[0]===t[0])e=!1;else{if(s.length)this._.$closestTargetLi.hasClass("collapsed")&&this._.$closestTarget.children(".toggle").trigger("click");else{var n=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(this._.$closestTarget);this.structure.initToggle(n),s=$("<ul>").appendTo(this._.$closestTargetLi)}this.$draggee.appendTo(s),e=!0}}if(this._.$closestTarget.removeClass("draghover"),e){t&&this.structure._removeUl(t);var a,r=this.$draggee.parentsUntil(this.structure.$container,"li").length+1;r!=this.$draggee.data("level")&&(1==this.$draggee.data("level")?((a={})["padding-"+Craft.left]=38,this.$helperLi.velocity(a,"fast")):1==r&&((a={})["padding-"+Craft.left]=Craft.Structure.baseIndent,this.$helperLi.velocity(a,"fast")),this.setLevel(this.$draggee,r));var o=this.$draggee.children(".row").children(".element"),l={structureId:this.structure.id,elementId:o.data("id"),siteId:o.data("site-id"),prevId:this.$draggee.prev().children(".row").children(".element").data("id"),parentId:this.$draggee.parent("ul").parent("li").children(".row").children(".element").data("id")};Craft.postActionRequest("structures/move-element",l,function(t,e){"success"===e&&Craft.cp.displayNotice(Craft.t("app","New order saved."))})}}this.$draggee.velocity("stop").removeClass("hidden").velocity({height:this.draggeeHeight},"fast",$.proxy(function(){this.$draggee.css("height","auto")},this)),this.returnHelpersToDraggees(),this.base()},setLevel:function(t,e){t.data("level",e);var i=this.structure.getIndent(e),s={};s["margin-"+Craft.left]="-"+i+"px",s["padding-"+Craft.left]=i+"px",this.$draggee.children(".row").css(s);for(var n=t.children("ul").children(),a=0;a<n.length;a++)this.setLevel($(n[a]),e+1)}}),Craft.StructureTableSorter=Garnish.DragSort.extend({tableView:null,structureId:null,maxLevels:null,_helperMargin:null,_$firstRowCells:null,_$titleHelperCell:null,_titleHelperCellOuterWidth:null,_ancestors:null,_updateAncestorsFrame:null,_updateAncestorsProxy:null,_draggeeLevel:null,_draggeeLevelDelta:null,draggingLastElements:null,_loadingDraggeeLevelDelta:!1,_targetLevel:null,_targetLevelBounds:null,_positionChanged:null,init:function(t,e,i){this.tableView=t,this.structureId=this.tableView.$table.data("structure-id"),this.maxLevels=parseInt(this.tableView.$table.attr("data-max-levels")),i=$.extend({},Craft.StructureTableSorter.defaults,i,{handle:".move",collapseDraggees:!0,singleHelper:!0,helperSpacingY:2,magnetStrength:4,helper:$.proxy(this,"getHelper"),helperLagBase:1.5,axis:Garnish.Y_AXIS}),this.base(e,i)},startDragging:function(){this._helperMargin=Craft.StructureTableSorter.HELPER_MARGIN+(this.tableView.elementIndex.actions?24:0),this.base()},findDraggee:function(){this._draggeeLevel=this._targetLevel=this.$targetItem.data("level"),this._draggeeLevelDelta=0;for(var t=$(this.$targetItem),e=this.$targetItem.next();e.length;){var i=e.data("level");if(i<=this._draggeeLevel)break;var s=i-this._draggeeLevel;s>this._draggeeLevelDelta&&(this._draggeeLevelDelta=s),t=t.add(e),e=e.next()}if(this.draggingLastElements=!e.length,this.maxLevels&&this.draggingLastElements&&this.tableView.getMorePending()){this._loadingDraggeeLevelDelta=!0;var n=this._getAjaxBaseData(this.$targetItem);Craft.postActionRequest("structures/get-element-level-delta",n,$.proxy(function(t,e){"success"===e&&(this._loadingDraggeeLevelDelta=!1,this.dragging&&(this._draggeeLevelDelta=t.delta,this.drag(!1)))},this))}return t},getHelper:function(t){var e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e),s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.tableView.$elementContainer.children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove();else{var l=$(this._$firstRowCells[r]),h=l.width();if(l.width(h),o.width(h),Garnish.hasAttr(l,"data-titlecell")){this._$titleHelperCell=o;var d=parseInt(l.css("padding-"+Craft.left));this._titleHelperCellOuterWidth=h+d-(this.tableView.elementIndex.actions?12:0),o.css("padding-"+Craft.left,Craft.StructureTableSorter.BASE_PADDING)}}}return e},canInsertBefore:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t.prev(),t)},canInsertAfter:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t,t.next())},onDragStart:function(){this._ancestors=this._getAncestors(this.$targetItem,this.$targetItem.data("level")),this._setTargetLevelBounds(),this.tableView.maybeLoadMore(),this.base()},onDrag:function(){this.base(),this._updateIndent()},onInsertionPointChange:function(){this._setTargetLevelBounds(),this._updateAncestorsBeforeRepaint(),this.base()},onDragStop:function(){if(this._positionChanged=!1,this.base(),this._targetLevel!=this._draggeeLevel){for(var t=this._targetLevel-this._draggeeLevel,e=0;e<this.$draggee.length;e++){var i=$(this.$draggee[e]),s=i.data("level")+t,n=Craft.StructureTableSorter.BASE_PADDING+(this.tableView.elementIndex.actions?7:0)+this._getLevelIndent(s);i.data("level",s),i.find(".element").data("level",s),i.children("[data-titlecell]:first").css("padding-"+Craft.left,n)}this._positionChanged=!0}if(this._positionChanged){for(var a=this._getAjaxBaseData(this.$draggee),r=this.$draggee.first().prev();r.length;){var o=r.data("level");if(o==this._targetLevel){a.prevId=r.data("id");break}if(o<this._targetLevel){a.parentId=r.data("id");var l=r.find("> td > .toggle");if(!l.hasClass("expanded")){l.addClass("expanded");var h=this.tableView._createSpinnerRowAfter(r);this.tableView.elementSelect&&this.tableView.elementSelect.removeItems(this.$targetItem),this.removeItems(this.$targetItem),this.$targetItem.remove(),this.tableView._totalVisible--}break}r=r.prev()}Craft.postActionRequest("structures/move-element",a,$.proxy(function(t,e){if("success"===e){if(!t.success)return Craft.cp.displayError(Craft.t("app","An unknown error occurred.")),void this.tableView.elementIndex.updateElements();Craft.cp.displayNotice(Craft.t("app","New position saved.")),this.onPositionChange(),h&&h.parent().length&&(h.remove(),this.tableView._expandElement(l,!0)),Craft.cp.runQueue()}},this))}},onSortChange:function(){this.tableView.elementSelect&&this.tableView.elementSelect.resetItemOrder(),this._positionChanged=!0,this.base()},onPositionChange:function(){Garnish.requestAnimationFrame($.proxy(function(){this.trigger("positionChange"),this.settings.onPositionChange()},this))},onReturnHelpersToDraggees:function(){if(this._$firstRowCells.css("width",""),this.draggingLastElements&&this.tableView.getMorePending()){this.tableView._totalVisible+=this.newDraggeeIndexes[0]-this.oldDraggeeIndexes[0];var t=this.$draggee.last().nextAll();t.length&&(this.removeItems(t),t.remove(),this.tableView.maybeLoadMore())}this.base()},_getLevelBounds:function(t,e){if(e&&e.length?this._getLevelBounds._minLevel=e.data("level"):this._getLevelBounds._minLevel=1,t&&t.length?this._getLevelBounds._maxLevel=t.data("level")+1:this._getLevelBounds._maxLevel=1,this.maxLevels){if(1!=this._getLevelBounds._minLevel&&this._getLevelBounds._minLevel+this._draggeeLevelDelta>this.maxLevels)return!1;this._getLevelBounds._maxLevel+this._draggeeLevelDelta>this.maxLevels&&(this._getLevelBounds._maxLevel=this.maxLevels-this._draggeeLevelDelta,this._getLevelBounds._maxLevel<this._getLevelBounds._minLevel&&(this._getLevelBounds._maxLevel=this._getLevelBounds._minLevel))}return{min:this._getLevelBounds._minLevel,max:this._getLevelBounds._maxLevel}},_setTargetLevelBounds:function(){this._targetLevelBounds=this._getLevelBounds(this.$draggee.first().prev(),this.$draggee.last().next())},_updateIndent:function(t){this._updateIndent._mouseDist=this.realMouseX-this.mousedownX,"rtl"===Craft.orientation&&(this._updateIndent._mouseDist*=-1),this._updateIndent._indentationDist=Math.round(this._updateIndent._mouseDist/Craft.StructureTableSorter.LEVEL_INDENT),this._updateIndent._targetLevel=this._draggeeLevel+this._updateIndent._indentationDist,this._updateIndent._targetLevel<this._targetLevelBounds.min?(this._updateIndent._indentationDist+=this._targetLevelBounds.min-this._updateIndent._targetLevel,this._updateIndent._targetLevel=this._targetLevelBounds.min):this._updateIndent._targetLevel>this._targetLevelBounds.max&&(this._updateIndent._indentationDist-=this._updateIndent._targetLevel-this._targetLevelBounds.max,this._updateIndent._targetLevel=this._targetLevelBounds.max),this._targetLevel!==(this._targetLevel=this._updateIndent._targetLevel)&&this._updateAncestorsBeforeRepaint(),this._updateIndent._targetLevelMouseDiff=this._updateIndent._mouseDist-this._updateIndent._indentationDist*Craft.StructureTableSorter.LEVEL_INDENT,this._updateIndent._magnetImpact=Math.round(this._updateIndent._targetLevelMouseDiff/15),Math.abs(this._updateIndent._magnetImpact)>Craft.StructureTableSorter.MAX_GIVE&&(this._updateIndent._magnetImpact=(0<this._updateIndent._magnetImpact?1:-1)*Craft.StructureTableSorter.MAX_GIVE),this._updateIndent._closestLevelMagnetIndent=this._getLevelIndent(this._targetLevel)+this._updateIndent._magnetImpact,this.helpers[0].css("margin-"+Craft.left,this._updateIndent._closestLevelMagnetIndent+this._helperMargin),this._$titleHelperCell.width(this._titleHelperCellOuterWidth-(this._updateIndent._closestLevelMagnetIndent+Craft.StructureTableSorter.BASE_PADDING))},_getLevelIndent:function(t){return(t-1)*Craft.StructureTableSorter.LEVEL_INDENT},_getAjaxBaseData:function(t){return{structureId:this.structureId,elementId:t.data("id"),siteId:t.find(".element:first").data("site-id")}},_getAncestors:function(t,e){if(this._getAncestors._ancestors=[],0!=e)for(this._getAncestors._level=e,this._getAncestors._$prevRow=t.prev();this._getAncestors._$prevRow.length&&!(this._getAncestors._$prevRow.data("level")<this._getAncestors._level&&(this._getAncestors._ancestors.unshift(this._getAncestors._$prevRow),this._getAncestors._level=this._getAncestors._$prevRow.data("level"),0==this._getAncestors._level));)this._getAncestors._$prevRow=this._getAncestors._$prevRow.prev();return this._getAncestors._ancestors},_updateAncestorsBeforeRepaint:function(){this._updateAncestorsFrame&&Garnish.cancelAnimationFrame(this._updateAncestorsFrame),this._updateAncestorsProxy||(this._updateAncestorsProxy=$.proxy(this,"_updateAncestors")),this._updateAncestorsFrame=Garnish.requestAnimationFrame(this._updateAncestorsProxy)},_updateAncestors:function(){for(this._updateAncestorsFrame=null,this._updateAncestors._i=0;this._updateAncestors._i<this._ancestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._ancestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")-1),0==this._updateAncestors._$ancestor.data("descendants")&&this._updateAncestors._$ancestor.find("> td > .toggle:first").remove();for(this._updateAncestors._newAncestors=this._getAncestors(this.$targetItem,this._targetLevel),this._updateAncestors._i=0;this._updateAncestors._i<this._updateAncestors._newAncestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._updateAncestors._newAncestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")+1),1==this._updateAncestors._$ancestor.data("descendants")&&$('<span class="toggle expanded" title="'+Craft.t("app","Show/hide children")+'"></span>').insertAfter(this._updateAncestors._$ancestor.find("> td .move:first"));this._ancestors=this._updateAncestors._newAncestors,delete this._updateAncestors._i,delete this._updateAncestors._$ancestor,delete this._updateAncestors._newAncestors}},{BASE_PADDING:36,HELPER_MARGIN:-7,LEVEL_INDENT:44,MAX_GIVE:22,defaults:{onPositionChange:$.noop}}),Craft.TableElementIndexView=Craft.BaseElementIndexView.extend({$table:null,$selectedSortHeader:null,structureTableSort:null,_totalVisiblePostStructureTableDraggee:null,_morePendingPostStructureTableDraggee:!1,getElementContainer:function(){return this.$table=this.$container.find("table:first"),this.$table.children("tbody:first")},afterInit:function(){Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.add(this.$table),Craft.cp.updateResponsiveTables(),this.initTableHeaders(),"index"===this.elementIndex.settings.context&&"structure"===this.elementIndex.getSelectedSortAttribute()&&Garnish.hasAttr(this.$table,"data-structure-id")?this.structureTableSort=new Craft.StructureTableSorter(this,this.getAllElements(),{onSortChange:$.proxy(this,"_onStructureTableSortChange")}):this.structureTableSort=null,"structure"===this.elementIndex.getSelectedSortAttribute()&&this.addListener(this.$elementContainer,"click",function(t){var e=$(t.target);!e.hasClass("toggle")||!1===this._collapseElement(e)&&this._expandElement(e)})},initTableHeaders:function(){for(var t=this.elementIndex.getSelectedSortAttribute(),e=this.$table.children("thead").children().children("[data-attribute]"),i=0;i<e.length;i++){var s=e.eq(i),n=s.attr("data-attribute");if(n===t){this.$selectedSortHeader=s;var a=this.elementIndex.getSelectedSortDirection();s.addClass("ordered "+a).on("click",$.proxy(this,"_handleSelectedSortHeaderClick"))}else{this.elementIndex.getSortAttributeOption(n).length&&s.addClass("orderable").on("click",$.proxy(this,"_handleUnselectedSortHeaderClick"))}}},isVerticalList:function(){return!0},getTotalVisible:function(){return this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee:this._totalVisible},setTotalVisible:function(t){this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee=t:this._totalVisible=t},getMorePending:function(){return this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee:this._morePending},setMorePending:function(t){this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee=t:this._morePending=this._morePendingPostStructureTableDraggee=t},getLoadMoreParams:function(){var t=this.base();return this._isStructureTableDraggingLastElements()&&(t.criteria.positionedAfter=this.structureTableSort.$targetItem.data("id")),t},appendElements:function(t){this.base(t),this.structureTableSort&&this.structureTableSort.addItems(t),Craft.cp.updateResponsiveTables()},destroy:function(){this.$table&&(Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.not(this.$table)),this.base()},createElementEditor:function(e){Craft.createElementEditor(e.data("type"),e,{params:{includeTableAttributesForSource:this.elementIndex.sourceKey},onSaveElement:$.proxy(function(t){t.tableAttributes&&this._updateTableAttributes(e,t.tableAttributes)},this),elementIndex:this.elementIndex})},_collapseElement:function(t,e){if(!e&&!t.hasClass("expanded"))return!1;t.removeClass("expanded");for(var i=t.parent().parent(),s=i.data("id"),n=i.data("level"),a=i.next();a.length;){if(!Garnish.hasAttr(a,"data-spinnerrow")){if(a.data("level")<=n)break;this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),this._totalVisible--}var r=a.next();a.remove(),a=r}this.elementIndex.instanceState.collapsedElementIds||(this.elementIndex.instanceState.collapsedElementIds=[]),this.elementIndex.instanceState.collapsedElementIds.push(s),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds),this.maybeLoadMore()},_expandElement:function(t,e){if(!e&&t.hasClass("expanded"))return!1;if(t.addClass("expanded"),this.elementIndex.instanceState.collapsedElementIds){var i=t.parent().parent(),s=i.data("id"),n=$.inArray(s,this.elementIndex.instanceState.collapsedElementIds);if(-1!==n){this.elementIndex.instanceState.collapsedElementIds.splice(n,1),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds);var r=this._createSpinnerRowAfter(i),a=$.extend(!0,{},this.settings.params);a.criteria.descendantOf=s,Craft.postActionRequest("element-indexes/get-more-elements",a,$.proxy(function(t,e){if(r.parent().length&&"success"===e){var i=$(t.html),s=this._totalVisible+i.length,n=this.settings.batchSize&&i.length===this.settings.batchSize;if(n){var a=r.nextAll();this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),a.remove(),s-=a.length}else n=this._morePending;r.replaceWith(i),this.thumbLoader.load(i),(this.elementIndex.actions||this.settings.selectable)&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.structureTableSort&&this.structureTableSort.addItems(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.cp.updateResponsiveTables(),this.setTotalVisible(s),this.setMorePending(n),this.maybeLoadMore()}},this))}}},_createSpinnerRowAfter:function(t){return $('<tr data-spinnerrow><td class="centeralign" colspan="'+t.children().length+'"><div class="spinner"/></td></tr>').insertAfter(t)},_isStructureTableDraggingLastElements:function(){return this.structureTableSort&&this.structureTableSort.dragging&&this.structureTableSort.draggingLastElements},_handleSelectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i="asc"===this.elementIndex.getSelectedSortDirection()?"desc":"asc";this.elementIndex.setSortDirection(i),this._handleSortHeaderClick(t,e)}},_handleUnselectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i=e.attr("data-attribute");this.elementIndex.setSortAttribute(i),this._handleSortHeaderClick(t,e)}},_handleSortHeaderClick:function(t,e){this.$selectedSortHeader&&this.$selectedSortHeader.removeClass("ordered asc desc"),e.removeClass("orderable").addClass("ordered loading"),this.elementIndex.storeSortAttributeAndDirection(),this.elementIndex.updateElements(),this.elementIndex.setIndexAvailable()},_updateTableAttributes:function(t,e){var i=t.closest("tr");for(var s in e)e.hasOwnProperty(s)&&i.children('td[data-attr="'+s+'"]:first').html(e[s])}}),Craft.TagSelectInput=Craft.BaseElementSelectInput.extend({searchTimeout:null,searchMenu:null,$container:null,$elementsContainer:null,$elements:null,$addTagInput:null,$spinner:null,_ignoreBlur:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","tagGroupId","sourceElementId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.base($.extend({},Craft.TagSelectInput.defaults,t)),this.$addTagInput=this.$container.children(".add").children(".text"),this.$spinner=this.$addTagInput.next(),this.addListener(this.$addTagInput,"textchange",$.proxy(function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"searchForTags"),500)},this)),this.addListener(this.$addTagInput,"keypress",function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchMenu&&this.selectTag(this.searchMenu.$options[0]))}),this.addListener(this.$addTagInput,"focus",function(){this.searchMenu&&this.searchMenu.show()}),this.addListener(this.$addTagInput,"blur",function(){this._ignoreBlur?this._ignoreBlur=!1:setTimeout($.proxy(function(){this.searchMenu&&this.searchMenu.hide()},this),1)})},getAddElementsBtn:$.noop,getElementSortAxis:function(){return null},searchForTags:function(){if(this.searchMenu&&this.killSearchMenu(),this.$addTagInput.val()){this.$spinner.removeClass("hidden");for(var t=[],e=0;e<this.$elements.length;e++){var i=$(this.$elements[e]).data("id");i&&t.push(i)}this.settings.sourceElementId&&t.push(this.settings.sourceElementId);var r={search:this.$addTagInput.val(),tagGroupId:this.settings.tagGroupId,excludeIds:t};Craft.postActionRequest("tags/search-for-tags",r,$.proxy(function(t,e){if(this.searchMenu&&this.killSearchMenu(),this.$spinner.addClass("hidden"),"success"===e){for(var i,s=$('<div class="menu tagmenu"/>').appendTo(Garnish.$bod),n=$("<ul/>").appendTo(s),a=0;a<t.tags.length;a++)i=$("<li/>").appendTo(n),$('<a data-icon="tag"/>').appendTo(i).text(t.tags[a].title).data("id",t.tags[a].id).addClass(t.tags[a].exclude?"disabled":"");t.exactMatch||(i=$("<li/>").appendTo(n),$('<a data-icon="plus"/>').appendTo(i).text(r.search)),n.find("a:not(.disabled):first").addClass("hover"),this.searchMenu=new Garnish.Menu(s,{attachToElement:this.$addTagInput,onOptionSelect:$.proxy(this,"selectTag")}),this.addListener(s,"mousedown",$.proxy(function(){this._ignoreBlur=!0},this)),this.searchMenu.show()}},this))}else this.$spinner.addClass("hidden")},selectTag:function(t){var e=$(t);if(!e.hasClass("disabled")){var i=e.data("id"),s=e.text(),n=$("<div/>",{class:"element small removable","data-id":i,"data-site-id":this.settings.targetSiteId,"data-label":s,"data-editable":"1"}).appendTo(this.$elementsContainer),a=$("<input/>",{type:"hidden",name:this.settings.name+"[]",value:i}).appendTo(n);$("<a/>",{class:"delete icon",title:Craft.t("app","Remove")}).appendTo(n);var r=$("<div/>",{class:"label"}).appendTo(n);$("<span/>",{class:"title",text:s}).appendTo(r);var o=-(n.outerWidth()+10);this.$addTagInput.css("margin-"+Craft.left,o+"px");var l={};if(l["margin-"+Craft.left]=0,this.$addTagInput.velocity(l,"fast"),this.$elements=this.$elements.add(n),this.addElements(n),this.killSearchMenu(),this.$addTagInput.val(""),this.$addTagInput.trigger("focus"),!i){n.addClass("loading disabled");var h={groupId:this.settings.tagGroupId,title:s};Craft.postActionRequest("tags/create-tag",h,$.proxy(function(t,e){"success"===e&&t.success?(n.attr("data-id",t.id),a.val(t.id),n.removeClass("loading disabled")):(this.removeElement(n),"success"===e&&Craft.cp.displayError(Craft.t("app","An unknown error occurred.")))},this))}}},killSearchMenu:function(){this.searchMenu.hide(),this.searchMenu.destroy(),this.searchMenu=null}},{defaults:{tagGroupId:null}}),Craft.ThumbsElementIndexView=Craft.BaseElementIndexView.extend({getElementContainer:function(){return this.$container.children("ul")}}),Craft.ui={createTextInput:function(t){var e=$("<input/>",{attr:{class:"text",type:t.type||"text",id:t.id,size:t.size,name:t.name,value:t.value,maxlength:t.maxlength,autofocus:this.getAutofocusValue(t.autofocus),autocomplete:void 0!==t.autocomplete&&t.autocomplete?null:"off",disabled:this.getDisabledValue(t.disabled),readonly:t.readonly,title:t.title,placeholder:t.placeholder,step:t.step,min:t.min,max:t.max}});return t.class&&e.addClass(t.class),t.placeholder&&e.addClass("nicetext"),"password"===t.type&&e.addClass("password"),t.disabled&&e.addClass("disabled"),t.size||e.addClass("fullwidth"),t.showCharsLeft&&t.maxlength&&e.attr("data-show-chars-left").css("padding-"+("ltr"===Craft.orientation?"right":"left"),7.2*t.maxlength.toString().length+14+"px"),(t.placeholder||t.showCharsLeft)&&new Garnish.NiceText(e),"password"===t.type?$('<div class="passwordwrapper"/>').append(e):e},createTextField:function(t){return this.createField(this.createTextInput(t),t)},createTextarea:function(t){var e=$("<textarea/>",{class:"text",rows:t.rows||2,cols:t.cols||50,id:t.id,name:t.name,maxlength:t.maxlength,autofocus:t.autofocus&&!Garnish.isMobileBrowser(!0),disabled:!!t.disabled,placeholder:t.placeholder,html:t.value});return t.showCharsLeft&&e.attr("data-show-chars-left",""),t.class&&e.addClass(t.class),t.size||e.addClass("fullwidth"),e},createTextareaField:function(t){return this.createField(this.createTextarea(t),t)},createSelect:function(t){var e=$("<div/>",{class:"select"});t.class&&e.addClass(t.class);var i=$("<select/>",{id:t.id,name:t.name,autofocus:t.autofocus&&Garnish.isMobileBrowser(!0),disabled:t.disabled,"data-target-prefix":t.targetPrefix}).appendTo(e),s=null;for(var n in t.options)if(t.options.hasOwnProperty(n)){var a=t.options[n];if(void 0!==a.optgroup)s=$("<optgroup/>",{label:a.label}).appendTo(i);else{var r=void 0!==a.label?a.label:a,o=void 0!==a.value?a.value:n,l=void 0!==a.disabled&&a.disabled;$("<option/>",{value:o,selected:o==t.value,disabled:l,html:r}).appendTo(s||i)}}return t.toggle&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),e},createSelectField:function(t){return this.createField(this.createSelect(t),t)},createCheckbox:function(t){var e=t.id||"checkbox"+Math.floor(1e9*Math.random()),i=$("<input/>",{type:"checkbox",value:void 0!==t.value?t.value:"1",id:e,class:"checkbox",name:t.name,checked:t.checked?"checked":null,autofocus:this.getAutofocusValue(t.autofocus),disabled:this.getDisabledValue(t.disabled),"data-target":t.toggle,"data-reverse-target":t.reverseToggle});t.class&&i.addClass(t.class),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i));var s=$("<label/>",{for:e,text:t.label});return t.name&&(t.name.length<3||"[]"!==t.name.substr(-2))?$([$("<input/>",{type:"hidden",name:t.name,value:""})[0],i[0],s[0]]):$([i[0],s[0]])},createCheckboxField:function(t){var e=$('<div class="field checkboxfield"/>',{id:t.id?t.id+"-field":null});return t.first&&e.addClass("first"),t.instructions&&e.addClass("has-instructions"),this.createCheckbox(t).appendTo(e),t.instructions&&$('<div class="instructions"/>').text(t.instructions).appendTo(e),e},createCheckboxSelect:function(t){var e,i,s=$('<div class="checkbox-select"/>');t.class&&s.addClass(t.class),t.showAllOption?(e=t.allValue||"*",i=t.values==e,$("<div/>").appendTo(s).append(this.createCheckbox({id:t.id,class:"all",label:"<b>"+(t.allLabel||Craft.t("app","All"))+"</b>",name:t.name,value:e,checked:i,autofocus:t.autofocus}))):i=!1;for(var n=0;n<t.options.length;n++){var a=t.options[n];a.value!=e&&$("<div/>").appendTo(s).append(this.createCheckbox({label:a.label,name:t.name?t.name+"[]":null,value:a.value,checked:i||Craft.inArray(a.value,t.values),disabled:i}))}return new Garnish.CheckboxSelect(s),s},createCheckboxSelectField:function(t){return this.createField(this.createCheckboxSelect(t),t)},createLightswitch:function(t){var e=t.value||"1",i=$("<div/>",{class:"lightswitch",tabindex:"0","data-value":e,id:t.id,"aria-labelledby":t.labelId,"data-target":t.toggle,"data-reverse-target":t.reverseToggle});return t.on&&i.addClass("on"),t.small&&i.addClass("small"),t.disabled&&i.addClass("disabled"),$('<div class="lightswitch-container"><div class="label on"></div><div class="handle"></div><div class="label off"></div></div>').appendTo(i),t.name&&$("<input/>",{type:"hidden",name:t.name,value:t.on?e:"",disabled:t.disabled}).appendTo(i),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),i.lightswitch()},createLightswitchField:function(t){return this.createField(this.createLightswitch(t),t)},createColorInput:function(t){var e=t.id||"color"+Math.floor(1e9*Math.random()),i=t.containerId||e+"-container",s=t.name||null,n=t.value||null,a=t.small||!1,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{id:i,class:"flex color-container"}),h=$("<div/>",{class:"color static"+(a?" small":"")}).appendTo(l);$("<div/>",{class:"color-preview",style:t.value?{backgroundColor:t.value}:null}).appendTo(h),this.createTextInput({id:e,name:s,value:n,size:10,class:"color-input",autofocus:r,disabled:o}).appendTo(l);return new Craft.ColorInput(l),l},createColorField:function(t){return this.createField(this.createColorInput(t),t)},createDateInput:function(t){var e=(t.id||"date"+Math.floor(1e9*Math.random()))+"-date",i=t.name||null,s=i?i+"[date]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=n?Craft.formatDate(n):null,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{class:"datewrapper"}),h=this.createTextInput({id:e,name:s,value:a,placeholder:" ",autocomplete:!1,autofocus:r,disabled:o}).appendTo(l);return $('<div data-icon="date"></div>').appendTo(l),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(l),h.datepicker($.extend({defaultDate:n||new Date},Craft.datepickerOptions)),l},createDateField:function(t){return this.createField(this.createDateInput(t),t)},createTimeInput:function(t){var e=(t.id||"time"+Math.floor(1e9*Math.random()))+"-time",i=t.name||null,s=i?i+"[time]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=t.autofocus&&Garnish.isMobileBrowser(!0),r=t.disabled||!1,o=$("<div/>",{class:"timewrapper"}),l=this.createTextInput({id:e,name:s,placeholder:" ",autocomplete:!1,autofocus:a,disabled:r}).appendTo(o);return $('<div data-icon="time"></div>').appendTo(o),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(o),l.timepicker(Craft.timepickerOptions),n&&l.timepicker("setTime",3600*n.getHours()+60*n.getMinutes()+n.getSeconds()),o},createTimeField:function(t){return this.createField(this.createTimeInput(t),t)},createField:function(t,e){var i=e.label&&"__blank__"!==e.label?e.label:null,s=Craft.isMultiSite&&e.siteId?e.siteId:null,n=$("<div/>",{class:"field",id:e.fieldId||(e.id?e.id+"-field":null)});if(e.first&&n.addClass("first"),i||e.instructions){var a=$('<div class="heading"/>').appendTo(n);if(i){var r=$("<label/>",{id:e.labelId||(e.id?e.id+"-label":null),class:e.required?"required":null,for:e.id,text:i}).appendTo(a);if(s)for(var o=0;o<Craft.sites.length;o++)if(Craft.sites[o].id==s){$('<span class="site"/>').text(Craft.sites[o].name).appendTo(r);break}}e.instructions&&$('<div class="instructions"/>').text(e.instructions).appendTo(a)}return $('<div class="input"/>').append(t).appendTo(n),e.warning&&$('<p class="warning"/>').text(e.warning).appendTo(n),e.errors&&this.addErrorsToField(n,e.errors),n},createErrorList:function(t){var e=$('<ul class="errors"/>');return t&&this.addErrorsToList(e,t),e},addErrorsToList:function(t,e){for(var i=0;i<e.length;i++)$("<li/>").text(e[i]).appendTo(t)},addErrorsToField:function(t,e){if(e){t.addClass("has-errors"),t.children(".input").addClass("errors");var i=t.children("ul.errors");i.length||(i=this.createErrorList().appendTo(t)),this.addErrorsToList(i,e)}},clearErrorsFromField:function(t){t.removeClass("has-errors"),t.children(".input").removeClass("errors"),t.children("ul.errors").remove()},getAutofocusValue:function(t){return t&&!Garnish.isMobileBrowser(!0)?"autofocus":null},getDisabledValue:function(t){return t?"disabled":null}},Craft.Uploader=Garnish.Base.extend({uploader:null,allowedKinds:null,$element:null,settings:null,_rejectedFiles:{},_extensionList:null,_totalFileCounter:0,_validFileCounter:0,init:function(t,e){this._rejectedFiles={size:[],type:[],limit:[]},this.$element=t,this.allowedKinds=null,this._extensionList=null,this._totalFileCounter=0,this._validFileCounter=0;var i=(e=$.extend({},Craft.Uploader.defaults,e)).events;for(var s in delete e.events,e.allowedKinds&&e.allowedKinds.length&&("string"==typeof e.allowedKinds&&(e.allowedKinds=[e.allowedKinds]),this.allowedKinds=e.allowedKinds,delete e.allowedKinds),e.autoUpload=!1,this.uploader=this.$element.fileupload(e),i)i.hasOwnProperty(s)&&this.uploader.on(s,i[s]);this.settings=e,this.uploader.on("fileuploadadd",$.proxy(this,"onFileAdd"))},setParams:function(t){void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t[Craft.csrfTokenName]=Craft.csrfTokenValue),this.uploader.fileupload("option",{formData:t})},getInProgress:function(){return this.uploader.fileupload("active")},isLastUpload:function(){return this.getInProgress()<2},onFileAdd:function(t,s){t.stopPropagation();var n=!1;return this.allowedKinds&&(this._extensionList||this._createExtensionList(),n=!0),s.process().done($.proxy(function(){var t=s.files[0],e=!0;if(n){var i=t.name.match(/\.([a-z0-4_]+)$/i)[1];-1===$.inArray(i.toLowerCase(),this._extensionList)&&(e=!1,this._rejectedFiles.type.push("“"+t.name+"”"))}t.size>this.settings.maxFileSize&&(this._rejectedFiles.size.push("“"+t.name+"”"),e=!1),e&&"function"==typeof this.settings.canAddMoreFiles&&!this.settings.canAddMoreFiles(this._validFileCounter)&&(this._rejectedFiles.limit.push("“"+t.name+"”"),e=!1),e&&(this._validFileCounter++,s.submit()),++this._totalFileCounter===s.originalFiles.length&&(this._totalFileCounter=0,this._validFileCounter=0,this.processErrorMessages())},this)),!0},processErrorMessages:function(){var t;this._rejectedFiles.type.length&&(t=1===this._rejectedFiles.type.length?"The file {files} could not be uploaded. The allowed file kinds are: {kinds}.":"The files {files} could not be uploaded. The allowed file kinds are: {kinds}.",t=Craft.t("app",t,{files:this._rejectedFiles.type.join(", "),kinds:this.allowedKinds.join(", ")}),this._rejectedFiles.type=[],alert(t)),this._rejectedFiles.size.length&&(t=1===this._rejectedFiles.size.length?"The file {files} could not be uploaded, because it exceeds the maximum upload size of {size}.":"The files {files} could not be uploaded, because they exceeded the maximum upload size of {size}.",t=Craft.t("app",t,{files:this._rejectedFiles.size.join(", "),size:this.humanFileSize(Craft.maxUploadSize)}),this._rejectedFiles.size=[],alert(t)),this._rejectedFiles.limit.length&&(t=1===this._rejectedFiles.limit.length?"The file {files} could not be uploaded, because the field limit has been reached.":"The files {files} could not be uploaded, because the field limit has been reached.",t=Craft.t("app",t,{files:this._rejectedFiles.limit.join(", ")}),this._rejectedFiles.limit=[],alert(t))},humanFileSize:function(t){if(t<1024)return t+" B";for(var e=-1;++e,1024<=(t/=1024););return t.toFixed(1)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][e]},_createExtensionList:function(){this._extensionList=[];for(var t=0;t<this.allowedKinds.length;t++){var e=this.allowedKinds[t];if(void 0!==Craft.fileKinds[e])for(var i=0;i<Craft.fileKinds[e].extensions.length;i++){var s=Craft.fileKinds[e].extensions[i];this._extensionList.push(s)}}},destroy:function(){this.$element.fileupload("destroy"),this.base()}},{defaults:{dropZone:null,pasteZone:null,fileInput:null,sequentialUploads:!0,maxFileSize:Craft.maxUploadSize,allowedKinds:null,events:{},canAddMoreFiles:null,headers:{Accept:"application/json;q=0.9,*/*;q=0.8"},paramName:"assets-upload"}}),Craft.UriFormatGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace("/<(.*?)>/g","")).toLowerCase(),t=(t=(t=Craft.asciiString(t)).replace(/^[^a-z]+/,"")).replace(/[^a-z0-9]+$/,"");var e=Craft.filterArray(t.split(/[^a-z0-9]+/)).join("-");return e&&this.settings.suffix&&(e+=this.settings.suffix),e}})}(jQuery);
 //# sourceMappingURL=Craft.min.js.map
\ No newline at end of file
diff --git a/src/web/assets/cp/dist/js/Craft.min.js.map b/src/web/assets/cp/dist/js/Craft.min.js.map
index 1ab9d02581..eb2dc6393b 100644
--- a/src/web/assets/cp/dist/js/Craft.min.js.map
+++ b/src/web/assets/cp/dist/js/Craft.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["Craft.js"],"names":["$","extend","Craft","navHeight","t","category","message","params","translations","key","hasOwnProperty","replace","formatDate","date","Date","datepicker","datepickerOptions","dateFormat","formatNumber","number","format","d3","formatLocale","d3FormatLocaleDefinition","formatter","escapeHtml","str","text","html","escapeRegex","getText","encodeUriComponent","encodeURIComponent","differences","!","*","'","(",")","chr","re","RegExp","selectFullValue","input","$input","val","setSelectionRange","length","formatInputId","inputName","this","rtrim","getUrl","path","baseUrl","anchor","isPlainObject","aParams","name","value","push","Garnish","isArray","join","trim","url","qpos","indexOf","substr","search","pathMatch","match","pathParam","omitScriptNameInUrls","usePathInfo","scriptName","basePath","endPath","substring","getCpUrl","baseCpUrl","getSiteUrl","baseSiteUrl","getActionUrl","actionUrl","redirectTo","document","location","href","getCsrfInput","csrfTokenName","csrfTokenValue","postActionRequest","action","data","callback","options","headers","X-Registered-Asset-Bundles","Object","keys","registeredAssetBundles","X-Registered-Js-Files","registeredJsFiles","jqXHR","ajax","type","dataType","success","error","textStatus","errorThrown","readyState","cp","displayError","alert","send","_waitingOnAjax","_ajaxQueue","queueActionRequest","undefined","_postNextActionRequestInQueue","args","shift","stringToArray","arr","split","i","expandPostArray","expanded","m","unshift","parentElem","parseInt","compare","obj1","obj2","sortObjectKeys","Array","getObjectKeys","sort","obj","escapeChars","chars","escaped","ltrim","startsWith","filterArray","filtered","inArray","elem","removeFromArray","index","splice","getLast","uppercaseFirst","charAt","toUpperCase","slice","lowercaseFirst","toLowerCase","parseUrl","scheme","host","hostname","port","query","hash","isSameHost","requestUrlInfo","urlInfo","secondsToHumanTimeDuration","seconds","showSeconds","weeks","Math","floor","days","minutes","hours","round","timeComponents","asciiString","charMap","char","asciiStr","asciiCharMap","randomString","result","random","preventOutlineOnMouseFocus","$elem","namespace","on","addClass","trigger","event","keyCode","SHIFT_KEY","CTRL_KEY","CMD_KEY","removeClass","createErrorList","errors","$ul","createElement","$li","appendTo","appendHeadHtml","$existingCss","existingCss","eq","attr","regexp","append","appendFootHtml","$existingJs","src","existingJs","$bod","initUiElements","$container","grid","infoicon","checkboxselect","fieldtoggle","lightswitch","nicetext","pill","formsubmit","menubtn","_elementIndexClasses","_elementSelectorModalClasses","_elementEditorClasses","registerElementIndexClass","elementType","func","registerElementSelectorModalClass","registerElementEditorClass","createElementIndex","settings","BaseElementIndex","createElementSelectorModal","BaseElementSelectorModal","createElementEditor","element","BaseElementEditor","getLocalStorage","defaultValue","systemUid","localStorage","JSON","parse","setLocalStorage","stringify","e","getElementInfo","$element","hasClass","find","id","siteId","label","status","hasThumb","setElementSize","size","otherSize","$oldImg","$newImg","sizes","srcset","replaceWith","picturefill","elements","fn","animateLeft","pos","duration","easing","complete","orientation","velocity","left","right","animateRight","disable","each","removeAttr","enable","itemSelector","cols","maxCols","minColWidth","mode","fillMode","colClass","snapToGrid","Grid","InfoIcon","CheckboxSelect","FieldToggle","settingName","settingValue","setSettings","thisSettings","hasAttr","LightSwitch","NiceText","Pill","ev","$btn","currentTarget","confirm","$anchor","$form","closest","customTrigger","next","menuAnchor","MenuBtn","$doc","ready","Base","elementId","$fieldsContainer","$cancelBtn","$saveBtn","$spinner","$siteSelect","$siteSpinner","hud","init","defaults","loadHud","setElementAttribute","attributes","getBaseData","prevalidate","onBeginLoading","includeSites","isMultiSite","showSiteSwitcher","proxy","showHud","response","onEndLoading","$hudContents","sites","$header","$siteSelectContainer","siteInfo","addListener","add","updateForm","onCreateForm","$footer","$buttonsContainer","updateBody","updateSizeAndPosition","hudTrigger","HUD","bodyClass","closeOtherHUDs","onShow","onHide","onSubmit","$hud","hide","switchSite","newSiteId","reloadForm","$instructions","class","children","requestAnimationFrame","headHtml","footHtml","saveElement","validators","isFunction","call","param","$body","serialize","$title","$a","cpEditUrl","newTitle","closeHud","onSaveElement","shake","onShowHud","onHideHud","runQueue","elementIndex","noop","initialized","instanceState","sourceStates","sourceStatesStorageKey","searchTimeout","sourceSelect","$main","$mainSpinner","isIndexBusy","$sidebar","showingSidebar","sourceKey","sourceViewModes","$source","sourcesByKey","$visibleSources","$customizeSourcesBtn","customizeSourcesModal","$toolbar","$toolbarFlexContainer","toolbarOffset","$search","searching","searchText","trashed","drafts","$clearSearchBtn","$statusMenuBtn","$statusMenuContainer","statusMenu","$siteMenuBtn","siteMenu","$sortMenuBtn","sortMenu","$sortAttributesList","$sortDirectionsList","$scoreSortAttribute","$structureSortAttribute","$elements","$viewModeBtnContainer","viewModeBtns","viewMode","view","_autoSelectElements","$countContainer","page","$exportBtn","actions","actionsHeadHtml","actionsFootHtml","$selectAllContainer","$selectAllCheckbox","showingActionTriggers","_$detachedToolbarItems","_$triggers","getDefaultInstanceState","storageKey","context","parent","hideSidebar","toolbarFixed","isMobileBrowser","$win","$scrollContainer","initSources","menu","$option","$options","filter","first","_setSite","criteria","storedSiteId","$storedSiteOption","startSearching","stopSearching","clearTimeout","setTimeout","RETURN_KEY","preventDefault","updateElementsIfSearchTextChanged","afterInit","selectDefaultSource","setPage","pageNum","updateElements","onAfterInit","getSourceContainer","$sources","$items","_getSourcesInList","Select","multi","allowEmpty","vertical","onSelectionChange","_initSources","getDefaultSourceKey","getSourceByKey","selectSource","refreshSources","removeAllItems","setIndexBusy","refreshSourcesAction","setIndexAvailable","updateFixedToolbar","_scrollTop","scrollTop","width","_makingFixed","css","outerHeight","top","offset","initSource","addItems","initSourceToggle","expandedSources","_expandSource","deinitSourceToggle","$toggle","_getSourceToggle","deinitSource","removeItems","removeListener","removeData","selectedSource","getDefaultExpandedSources","addOptions","prependTo","_updateStructureSortOption","setSortAttribute","detach","setInstanceState","storeInstanceState","getSourceState","source","getSelectedSourceState","setSelecetedSourceState","viewState","storeSortAttributeAndDirection","getSelectedSortAttribute","order","getSelectedSortDirection","max","pageTrigger","history","replaceState","getViewParams","batchSize","limit","disabledElementIds","paginated","_isViewPaginated","collapsedElementIds","preservePagination","destroy","updateElementsAction","totalPages","ceil","count","_updateView","showActionTriggers","height","not","insertAfter","_createTriggers","submitAction","actionClass","actionParams","selectedElementIds","getSelectedElementIds","viewParams","elementAction","elementIds","submitActionsAction","displayNotice","afterAction","onAfterAction","hideActionTriggers","insertBefore","updateActionTriggers","totalSelected","getSelectedElements","getEnabledElements","$selectAllBtn","getSortAttributeOption","attribute","setSortDirection","getSortDirectionOption","dir","getSelectedViewMode","selectItem","updateSidebarMenuLabel","setStoredSortOptionsForSource","remove","getViewModesForSource","sourceViewMode","$viewModeBtn","className","title","icon","selectViewMode","doesSourceHaveViewMode","onSelectSource","selectSourceByKey","sortAttr","sortDir","getDefaultSort","viewModes","force","createView","getViewClass","TableElementIndexView","ThumbsElementIndexView","rememberDisabledElementId","forgetDisabledElementId","enableElements","parents","onEnableElements","disableElements","onDisableElements","getElementById","enableElementsById","ids","makeArray","disableElementsById","selectElementAfterUpdate","addButton","$button","getButtonContainer","isShowingSidebar","buttonContainer","createCustomizeSourcesModal","modal","CustomizeSourcesModal","base","onSelectSite","onUpdateElements","_handleSourceSelectionChange","$selectedItems","_handleActionTriggerSubmit","getPostData","_handleMenuActionTriggerSubmit","option","_handleStatusChange","selectedOption","_handleSiteChange","$firstVisibleSource","selectNewSource","toString","get","$heading","$headings","nextUntil","_handleSortChange","is","_handleSelectionChange","_handleSourceDblClick","_toggleSource","stopPropagation","_handleSourceToggleClick","prev","$firstOption","$list","_getChildSources","siblings","_deinitSources","_collapseSource","$childSources","countLabel","$paginationContainer","$prevBtn","data-icon","$nextBtn","role","tabindex","aria-checked","selectAllElements","deselectAllElements","SPACE_KEY","selectable","multiSelect","checkboxMode","selectElementById","triggers","safeMenuActions","destructiveMenuActions","destructive","$menuTrigger","$menu","$safeList","_createMenuTriggerList","$destructiveList","$div","_showExportHud","$limitField","ui","createTextField","placeholder","min","submitting","isNaN","tokenParam","token","data-action","BaseElementIndexView","$loadingMoreSpinner","$elementContainer","$scroller","thumbLoader","elementSelect","loadingMore","_totalVisible","_morePending","_handleEnableElements","_handleDisableElements","container","getElementContainer","setTotalVisible","setMorePending","ElementThumbLoader","load","isVerticalList","handle","_handleElementEditing","$target","target","prop","isTouchCapable","maybeLoadMore","getAllElements","$selectedElements","selectElement","selectAll","deselectAll","getTotalVisible","totalVisible","getMorePending","morePending","canLoadMore","loadMore","winHeight","innerHeight","winScrollTop","getLoadMoreParams","loadMoreElementsAction","$newElements","appendElements","onAppendElements","newElements","off","BaseElementSelectInput","elementSort","elementEditor","$elementsContainer","$addElementBtn","_initialized","normalizedSettings","arguments","modalStorageKey","sortable","getContainer","getElementsContainer","getAddElementsBtn","initElementSelect","initElementSort","resetElements","getElements","DragSort","$targetItem","getSelectedItems","ignoreHandleSelector","axis","getElementSortAxis","collapseDraggees","magnetStrength","helperLagBase","onSortChange","resetItemOrder","canAddMoreElements","updateAddElementsBtn","enableAddElementsBtn","disableAddElementsBtn","ADD_FX_DURATION","REMOVE_FX_DURATION","show","removeElements","addElements","editable","_handleShowElementEditor","removeElement","onRemoveElements","animateElementAway","animateCss","opacity","outerWidth","showModal","createModal","getModalSettings","closeOtherModals","sources","showSiteMenu","getDisabledElementIds","onSelect","modalSettings","sourceElementId","onModalSelect","slotsLeft","selectElements","updateDisabledElementsInModal","elementInfo","createNewElement","appendElement","animateElementIntoPlace","onSelectElements","clone","prepend","$modalElement","$inputElement","origOffset","destOffset","$helper","position","zIndex","window","draftEditor","checkForm","fieldId","editorSettings","Modal","$selectBtn","$sourceToggles","$tbody","$primaryButtons","$secondaryButtons","$footerSpinner","onFadeIn","_createElementIndex","updateSelectBtnState","enableSelectBtn","disableSelectBtn","enableCancelBtn","disableCancelBtn","showFooterSpinner","hideFooterSpinner","cancel","clearMouseUpTimeout","disableElementsOnSelect","hideOnSelect","info","has","touchData","firstTap","secondTap","resizable","onCancel","hideIndexSidebar","BaseInputGenerator","listening","timeout","startListening","setNewSource","stopListening","removeAllListeners","onSourceTextChange","onTargetTextChange","activeElement","onFormSubmit","updateTarget","sourceVal","targetVal","generateTargetValue","AdminTable","totalItems","sorter","$noItems","$table","$deleteBtns","allowDeleteAll","minItems","noItemsSelector","tableSelector","DataTableSorter","updateUI","addRow","row","maxItems","$row","$deleteBtn","reorderItems","idAttribute","reorderAction","onReorderItems","reorderSuccessMessage","reorderFailMessage","handleDeleteBtnClick","confirmDeleteItem","deleteItem","getItemName","confirmDeleteMessage","getItemId","deleteAction","handleDeleteItemResponse","onDeleteItem","deleteSuccessMessage","deleteFailMessage","nameAttribute","$moveButtons","newItemBtnSelector","AssetEditor","reloadIndex","$imageEditorTrigger","showImageEditor","AssetImageEditor","onSave","bind","allowDegreeFractions","isImagick","$imageTools","$buttons","$replaceBtn","$editorContainer","$straighten","$croppingCanvas","$spinnerCanvas","canvas","image","viewport","focalPoint","croppingCanvas","clipper","croppingRectangle","cropperHandles","cropperGrid","croppingShade","imageStraightenAngle","viewportRotation","originalWidth","originalHeight","imageVerticeCoords","zoomRatio","animationInProgress","currentView","assetId","cacheBust","draggingCropper","scalingCropper","draggingFocal","previousMouseX","previousMouseY","shiftKeyHeld","editorHeight","editorWidth","cropperState","scaleFactor","flipData","focalPointState","croppingConstraint","spinnerInterval","maxImageSize","lastLoadedDimensions","imageIsLoading","renderImage","renderCropper","now","x","y","allowSavingAsNew","saveImage","$shade","getMaxImageSize","browserViewportWidth","documentElement","clientWidth","browserViewportHeight","clientHeight","devicePixelRatio","loadEditor","$tabs","$viewsContainer","$views","innerWidth","_showSpinner","fabric","StaticCanvas","enableRetinaScaling","renderAll","imageUrl","Image","fromURL","imageObject","set","originX","originY","getHeight","getWidth","getScaledImageDimensions","_setFittedImageVerticeCoordinates","_repositionEditorElements","focalState","imageDimensions","offsetX","offsetY","focal","focalData","adjustedX","adjustedY","storeFocalPointState","_createFocalPoint","_createViewport","storeCropperState","_addControlListeners","_handleMouseMove","_handleMouseDown","_handleMouseUp","_hideSpinner","_reloadImage","setSrc","min-width","min-height","previousEditorDimensions","setDimensions","currentScaledDimensions","getZoomToFitRatio","previouslyOccupiedArea","_getBoundingRectangle","_repositionCropper","getZoomToCoverRatio","_repositionImage","_repositionViewport","_repositionFocalPoint","_zoomImage","Rect","fill","globalCompositeOperation","sizeFactor","focalX","focalY","deltaX","deltaY","Group","Circle","radius","strokeWidth","stroke","toggleFocalPoint","dimensions","state","currentWidth","ratio","hasOrientationChanged","imageRatio","rotateImage","flipImage","straighteningInput","SlideRuleInput","onStart","_showGrid","onChange","slider","straighten","onEnd","_hideGrid","_cleanupFocalPointAfterStraighten","onOptionSelect","setCroppingConstraint","enforceCroppingConstraint","_handleTabClick","$tab","showView","enableSlider","disableSlider","disableCropMode","enableCropMode","zoomFactor","degrees","imageZoomRatio","newAngle","angle","scaledImageDimensions","viewportProperties","imageProperties","angleInRadians","PI","newDeltaX","cos","sin","newDeltaY","modifiedDeltaX","modifiedDeltaY","temp","animate","animationDuration","onComplete","cleanAngle","parseFloat","_adjustFocalPointByAngle","_resetFocalPointPosition","editorCenter","setValue","properties","scaleY","scaleX","previousAngle","_adjustEditorElementsOnStraighten","newCenterX","newCenterY","angleDelta","currentZoomRatio","adjustmentRatio","cropperCenterX","cropperCenterY","imageVertices","getImageVerticeCoords","rectangle","_getZoomRatioToFitRectangle","_isCenterInside","object","containingObject","newFocalX","newFocalY","adjustedFocalX","adjustedFocalY","containingVertices","vertex","rectangleVertices","_getRectangleVertices","verticeIndex","arePointsInsideRectangle","edge","_getEdgeCrossed","rectangleCenter","distanceFromVertexToEdge","abs","sqrt","pow","distanceFromCenterToEdge","postData","imageRotation","cropData","zoom","end","scaledWidth","scaledHeight","boundingBox","_getImageBoundingBox","scale","vertScale","horiScale","getCombinedZoomRatio","strokeOptions","gridWidth","gridHeight","xStep","yStep","Line","onFadeOut","cropperData","_showCropper","_editorModeTransition","_hideCropper","targetZoom","inverseZoomFactor","imageOffsetX","imageOffsetY","getContext","start","cW","cH","setInterval","rotation","save","clearRect","translate","rotate","beginPath","moveTo","lineTo","lineWidth","strokeStyle","restore","clearInterval","clipperData","_setupCropperLayer","_redrawCropperElements","backgroundColor","hoverCursor","selection","rectangleRatio","rectWidth","rectHeight","lineOptions","gridOptions","pathGroup","Path","previousImageArea","currentOffset","areaFactor","coordinateSet","a","b","c","d","_isMouseOver","move","_cropperHandleHitTest","pageX","pageY","_handleFocalDrag","_handleCropperDrag","_handleCropperResize","_setMouseCursor","vertices","newX","newY","constraint","previousHeight","previousWidth","topDelta","leftDelta","change","cursor","parentOffset","mouseX","mouseY","lb","rb","tb","bb","topLeft","topRight","bottomRight","zoomMode","topVerticalSegment","bottomVerticalSegment","rightHorizontalSegment","leftHorizontalSegment","verticalOffset","horizontalOffset","_debug","fabricObj","debugger","points","ab","_getVector","bc","scalarAbAb","_getScalarProduct","scalarBcBc","point","ap","bp","scalarAbAp","scalarBcBp","_getVectorMagnitude","vector","_getAngleBetweenVectors","acos","edgePoints","centerPoint","smallestDiff","edgeCrossed","edgeIndex","toCenter","edgeVector","toVertex","diff","box","proportion","AssetIndex","$includeSubfoldersContainer","$includeSubfoldersCheckbox","showingIncludeSubfoldersCheckbox","$uploadButton","$uploadInput","$progressBar","$folders","uploader","promptHandler","progressBar","_uploadTotalFiles","_uploadFileProgress","_uploadedAssetIds","_currentUploaderSettings","_assetDrag","_folderDrag","_expandDropTargetFolderTimeout","_tempExpandedFolders","_fileConflictTemplate","choices","_folderConflictTemplate","_initIndexPageMode","_createFolderContextMenu","_getSourceLevel","updateDropTargets","contextMenu","parentsUntil","onDragStartProxy","onDropTargetChangeProxy","DragDrop","activeDropTargetClass","helperOpacity","helper","$file","_getFileDragHelper","dropTargets","targets","_getFolderUidFromSourceKey","onDragStart","onDropTargetChange","onDragStop","$selected","draggees","$draggeeHelper","$helperSidebar","$helperNav","$helperUl","padding-top","$draggee","padding-right","padding-bottom","padding-left","draggedSourceIds","_onFileDragStop","$activeDropTarget","originatingSource","targetFolderId","originalAssetIds","originalAssetId","_positionProgressBar","resetProgressBar","setItemCount","showProgressBar","parameterArray","folderId","onMoveFinish","responseArray","resetPrompts","conflict","addPrompt","suggestedFilename","prompt","hideProgressBar","performAfterMoveActions","_collapseExtraExpandedFolders","getPromptCount","promptCallback","returnData","newParameterArray","choice","filename","apply","_performBatchRequests","fadeOutHelpers","showBatchPrompts","returnHelpersToDraggees","_onFolderDragStop","folderIds","reverse","parentId","requestId","fileMoveList","newSourceKey","transferList","newFolderId","newFolderUid","merge","_performActualFolderMove","folderDeleteList","moveCallback","counter","_getParentSource","_selectSourceByFolderId","$targetSource","_getSourceByKey","$parentSources","$parentSource","PromptHandler","ProgressBar","fileInput","dropZone","events","fileuploadstart","fileuploadprogressall","fileuploaddone","kind","allowedKinds","Uploader","setParams","$subContainer","checked","marginBottom","includeSubfolders","_onUploadStart","_onUploadProgress","progress","loaded","total","setProgressPercentage","_onUploadComplete","files","doReload","file","isLastUpload","_updateAfterUpload","_uploadFollowup","finalCallback","doFollowup","parameterIndex","followupCallback","incrementProcessedItemCount","updateProgressBar","sourceAssetId","conflictingAssetId","targetFilename","_onUpdateElements","_onKeyDown","_onElementFocus","shiftKey","PreviewFileModal","openInstance","selfDestruct","$focusedItem","_loadPreview","item","startingWidth","startingHeight","_onDragStart","$outerContainer","$innerContainer","_$firstRowCells","$helperCells","$helperCell","$firstRowCell","_onDropTargetChange","$dropTarget","dropTargetFolder","_hasSubfolders","_isExpanded","dropTargetFolderId","$excludedSources","_collapseFolder","_expandFolder","menuOptions","onClick","ContextMenu","menuClass","_createSubfolder","$parentFolder","subfolderName","folderName","_prepareParentForChildren","$subfolder","folderUid","_appendSubfolder","_deleteFolder","$targetFolder","folder","_cleanUpTree","_renameFolder","oldName","newName","$existingChildren","subfolderLabel","folderInserted","$existingChild","before","windowHeight","doRequest","parameters","AssetSelectInput","originalFilename","originalExtension","resetOriginalFilename","_renameHelper","validateElementForm","_attachUploader","defaultFieldLayoutId","formData","canAddMoreFiles","selectUploadedFile","$newElement","margin","slotsTaken","_parseFilename","parts","extension","pop","baseFileName","endPos","selectionStart","selectionEnd","createRange","select","range","collapse","moveEnd","moveStart","$filenameField","ext","oldExt","newExt","AssetSelectorModal","$selectTransformBtn","_selectedTransform","transforms","createSelectTransformButton","$btnGroup","$menuList","MenuButton","allowTransforms","onSelectTransform","transform","selectImagesWithTransform","transformUrls","imageIdsWithMissingUrls","$item","fetchMissingTransformUrls","canSelectImageTransforms","AuthManager","remainingSessionTime","checkRemainingSessionTimer","showLoginModalTimer","decrementLogoutWarningInterval","showingLogoutWarningModal","showingLoginModal","logoutWarningModal","loginModal","$logoutWarningPara","$passwordInput","$passwordSpinner","$loginBtn","$loginErrorPara","submitLoginIfLoggedOut","updateRemainingSessionTime","setCheckRemainingSessionTimer","checkRemainingSessionTime","extendSession","responseJSON","minSafeSessiotTime","showLogoutWarningModal","checkInterval","submitLogin","showLoginModal","hideLogoutWarningModal","hideLoginModal","quickShow","$logoutBtn","$renewSessionBtn","autoShow","hideOnEsc","hideOnShadeClick","shadeClass","updateLogoutWarningMessage","time","decrementLogoutWarning","quick","quickHide","$inputContainer","$inputsFlexContainer","$passwordContainer","$buttonContainer","$passwordWrapper","PasswordInput","onToggleInput","$newPasswordInput","logout","renewSession","validatePassword","login","clearLoginError","loginName","username","password","showLoginError","CategoryIndex","editableGroups","$newCategoryBtnGroup","$newCategoryBtn","editableCategoryGroups","group","uid","defaultGroupHandle","updateButton","selectedSourceHandle","selectedGroup","$menuBtn","_getGroupTriggerHref","_openCreateCategoryModal","getAttribute","menuHtml","menuBtn","uri","primarySiteId","groupId","newCategoryBtnText","groupSourceKey","CategorySelectInput","selectedCategoryIds","categoryIds","branchLimit","selectionLabel","$newElementsContainer","filteredElements","$allCategories","_animateCategoryAway","charts","DataTable","columns","rows","forEach","cellIndex","parseTime","timeParse","Tip","$tip","setContent","setPosition","BaseChart","$chart","chartBaseClass","dataTable","timeFormatLocale","svg","globalSettings","formats","d3Formats","formatLocaleDefinition","timeFormatLocaleDefinition","d3TimeFormatLocaleDefinition","resize","baseSettings","draw","chartClass","onAfterDrawTicks","tickKey","tick","$tickText","numberFormat","percentFormat","currencyFormat","shortDateFormats","day","month","year","bottom","colors","Area","tip","drawingArea","getChartMargin","translateX","translateY","drawTicks","drawAxes","drawChart","drawTipTriggers","getX","xAxis","axisBottom","tickFormat","getXFormatter","ticks","yAxis","getY","axisLeft","getYFormatter","tickValues","getYTickValues","axisRight","showAxis","tickSizeOuter","gridlines","xLineAxis","tickSize","yLineAxis","line","datum","style","area","y0","y1","plots","enter","tips","chartMargin","xAxisTickInterval","node","getTotalLength","tipTriggerWidth","$content","$xValue","$yValue","content","calcLeft","values","yTicksMaxWidth","computedTickWidth","padded","xDomainMin","xDomainMax","xDomain","scaleTime","domain","yDomain","getYMaxValue","scaleLinear","utils","getTimeFormatter","getNumberFormatter","maxValue","getDuration","secondsNum","chartSettings","dataScale","ColorInput","$colorContainer","$colorPreview","$colorInput","createColorInput","handleTextChange","setAttribute","updateColor","_browserSupportsColorInputs","doesBrowserSupportColorInputs","CP","authManager","$nav","$mainContainer","$alerts","$crumbs","$notificationContainer","$primaryForm","$mainContent","$details","$selectedTab","$contentContainer","$edition","$collapsibleTables","fixedHeader","enableQueue","jobInfo","displayedJobInfo","displayedJobInfoUnchanged","trackJobProgressTimeout","jobProgressIcon","checkingForUpdates","forcingRefreshOnUpdatesCheck","checkForUpdatesCallbacks","updateFixedHeader","updateResponsiveTables","$errorNotifications","$otherNotifications","delay","notificationDuration","initAlerts","isCtrlKeyPressed","S_KEY","submitPrimaryForm","initTabs","initConfirmUnloadForms","$confirmUnloadForms","serialized","confirmUnload","livePreview","inPreviewMode","originalEvent","returnValue","_handleInputFocus","_handleInputBlur","saveShortcut","$label","toggleNav","toggleClass","toggleSidebar","tabs","tabWidths","totalWidth","selectTab","tab","deselectTab","_i","_$table","_containerWidth","_check","_isCollapsed","getBoundingClientRect","headerHeight","max-height","fixedheader","displayNotification","$notification","fadedMargin","margin-left","margin-right","display","notificationType","fetchAlerts","displayAlerts","alerts","margin-top","$shunnableAlerts","$link","checkForUpdates","forceRefresh","realCallback","updateUtilitiesBadge","callbacks","updateInfo","$utilitiesLink","$badge","badgeCount","runQueueAutomatically","trackJobProgress","_trackJobProgressInternal","setJobInfo","animateIcon","oldInfo","getDisplayedJobInfo","progressLabel","updateJobIcon","statuses","JOB_STATUS_RESERVED","JOB_STATUS_FAILED","JOB_STATUS_WAITING","j","JobProgressIcon","hideFailMode","setDescription","description","setProgress","showFailMode","JOB_STATUS_DONE","failMode","_canvasSupported","_$bgCanvas","_$staticCanvas","_$hoverCanvas","_$failCanvas","_staticCtx","_hoverCtx","_canvasSize","_arcPos","_arcRadius","_lineWidth","_arcStartPos","_arcEndPos","_arcStartStepSize","_arcEndStepSize","_arcStep","_arcStepTimeout","_arcAnimateCallback","_progressBar","$canvasContainer","_createCanvas","_drawArc","_animateArc","_setArc","$innerProgressBar","toggleHud","toggle","QueueHUD","color","$canvas","ctx","lineCap","startPos","arc","closePath","targetStartPos","targetEndPos","_takeNextArcStep","jobsById","completedJobs","updateViewProxy","updateView","newJobIds","updateStatus","Job","placed","$object","$statusContainer","$descriptionContainer","$progressLabel","$flex","empty","$actionBtn","performErrorAction","$elementIndexSourcesContainer","$sourcesContainer","$sourceSettingsContainer","$newHeadingBtn","$footerBtnContainer","$saveSpinner","$loadingSpinner","sourceSort","updateSourcesOnSave","availableTableAttributes","setContainer","buildModal","addSource","sourceData","$itemLabel","$itemInput","heading","Heading","updateItemLabel","Source","handleNewHeadingBtnClick","scrollContainerToElement","$pendingHeading","$lastSource","$indexSource","getIndexSource","isHeading","appendSource","$extraSources","nextAll","BaseSource","$settingsContainer","isSelected","deselect","createSettings","tableAttributes","firstAttribute","firstKey","firstLabel","$titleColumnCheckbox","createTableColumnOption","$columnCheckboxes","selectedAttributes","createField","instructions","createCheckbox","disabled","$labelField","$labelInput","handleLabelInputChange","deleteHeading","table","$rows","caboose","Y_AXIS","getHelper","$helperRow","helperClass","$cells","DeleteUserModal","userId","$deleteActionRadios","$deleteSpinner","userSelect","_deleting","idParam","redirect","contentSummary","$deleteSubmitBtn","validateDeleteInputs","validates","handleSubmit","DraftEditor","$revisionBtn","$revisionLabel","$statusIcon","$editMetaBtn","metaHud","$nameTextInput","$notesTextInput","$saveMetaBtn","lastSerializedValue","saving","saveXhr","checkFormAfterUpdate","submittingForm","duplicatedElements","preview","previewToken","previewTargets","enablePreview","$shareBtn","openShareLink","createShareMenu","revisionId","serializeForm","draftId","initForDraft","createDraft","canUpdateSource","createEditMetaBtn","statusIcons","showStatusHud","bodyHtml","spinners","getPreviewToken","Promise","resolve","reject","sourceId","getTokenizedPreviewUrl","randoParam","isLive","then","catch","open","getPreview","Preview","openPreview","ensureIsDraftOrRevision","revisionid","removeActionParams","isPreviewActive","$editor","isUnsavedDraft","saveDraft","isActive","$spinners","$statusIcons","saveDraftAction","prepareData","docTitle","draftName","draftNotes","revisionMenu","draftCreated","newHref","anchorPos","$saveBtnContainer","elementTypeDisplayName","$saveDraftBtn","canDeleteDraft","$draftsUl","$draftHeading","$draftLi","$draftA","selectOption","$siteOptions","$siteOption","creator","updatePreviewTargets","afterUpdate","checkMetaValues","oldId","currentTargets","showMetaHud","createMetaHud","onMetaHudShow","$field","$hudBody","$deleteLink","saveMeta","onMetaHudHide","onMetaHudEscape","onNotesKeydown","submit","shakeMetaHud","deleteDraft","deleteDraftAction","handleFormSubmit","abort","chunks","accept-charset","enctype","method","decodeURIComponent","applyDraftAction","hashedRedirectUrl","DynamicGenerator","EditableTable","baseName","biggestId","$addRowBtn","rowCount","hasMaxRows","hasMinRows","radioCheckboxes","log","copyDraggeeInputValuesToHelper","isVisible","initialize","minRows","createRowObj","updateAddRowButton","initializeIfVisible","canAddRow","canDeleteRow","deleteRow","$tr","onDeleteRow","staticRows","maxRows","focus","rowId","rowIdPrefix","createRow","defaultValues","onAddRow","Row","focusOnPrevRow","tdIndex","blurTd","prevRow","$prevTr","$tds","focusOnNextRow","nextRow","$nextTr","textualColTypes","data-id","colId","$cell","col","scope","textual","code","small","createDateInput","createLightswitch","createSelect","default","createTimeInput","createTextInput","niceTexts","tds","$textareas","tr","td","$textarea","$checkbox","textareasByColId","onHeightChange","radioMode","applyToggleCheckbox","onTextareaHeightChange","autopopulate","HandleGenerator","allowNonAlphaStart","last","onTextareaFocus","onRadioCheckboxChange","checkbox","checkboxColId","neg","checkboxCol","colum","ignoreNextTextareaFocus","handleKeypress","charCode","ctrl","numericKeyCodes","validateValue","safeValue","tallestTextareaHeight","tdHeight","ElementActionTrigger","maxLevels","newChildUrl","$trigger","triggerEnabled","activate","updateTrigger","validateSelection","enableTrigger","disableTrigger","valid","batch","handleTriggerActivation","queue","workers","Worker","concat","toArray","active","loadNext","loader","$img","alt","ElevatedSessionForm","inputs","form","$inputs","getInputPostVal","elevatedSessionManager","fetchingTimeout","inputsChanged","$currentInput","requireElevatedSession","submitForm","ElevatedSessionManager","passwordModal","$submitBtn","$errorPara","minSafeElevatedSessionTimeout","showPasswordModal","$passwordModal","focusPasswordInput","submitPassword","currentPassword","showPasswordError","EntryIndex","publishableSections","$newEntryBtnGroup","$newEntryBtn","section","defaultSectionHandle","selectedSection","_getSectionTriggerHref","_openCreateEntryModal","site","sectionId","newEntryBtnText","typeId","entryTypes","sectionSourceKey","FieldLayoutDesigner","$tabContainer","$unusedFieldContainer","$newTabBtn","$allFields","tabGrid","unusedFieldGrid","tabDrag","fieldDrag","gridSettings","initTab","FieldDrag","customizableTabs","TabDrag","$editBtn","$fields","initField","onTabOptionSelect","renameTab","deleteTab","onFieldOptionSelect","toggleRequiredField","removeField","$labelSpan","getFieldInputName","removeFieldById","requiredFieldInputName","refreshCols","$group","addTab","tabName","fieldInputName","BaseDrag","Drag","designer","$insertion","showingInsertion","$caboose","draggingUnusedItem","addToTabGrid","getInsertion","addCaboose","setMidpoints","getItemContainer","isItemInTabContainer","onDrag","hitTest","_closestItem","getClosestItem","_closestItemMouseDiff","_$item","_midpoint","_mouseDiff","getDist","draggeeDisplay","visibility","$hiddenFields","$fieldContainers","targetPrefix","targetSelector","reverseTargetSelector","_$target","_$reverseTarget","getType","normalizeTargetSelector","findTargets","selector","getToggleVal","postVal","onToggleChange","hideTarget","showTarget","_show","_currentHeight","_targetHeight","overflow","items","totalCols","colGutterDrop","colPctWidth","possibleItemColspans","possibleItemPositionsByColspan","itemPositions","itemColspansByPosition","layouts","layout","itemHeights","leftPadding","_refreshingCols","_refreshColsAfterRefresh","_forceRefreshColsAfterRefresh","handleContainerHeightProxy","setItems","_","oldHeight","scrollHeight","gutter","itemIndex","tallestItemHeight","colIndex","itemHeight","remainder","itemHeightsByColspan","positionRight","positionLeft","minColspan","maxColspan","colspan","getItemWidthCss","minPosition","maxPosition","colHeights","createLayouts","layoutTotalCols","highestTotalCols","layoutHeights","shortestHeight","shortestLayouts","emptySpaces","emptySpace","colspans","getItemLeftPosCss","positions","isSimpleLayout","margin-bottom","positionItems","completeRefreshCols","onRefreshCols","getItemWidth","getItemWidthInPx","getItemLeftPosInPx","prevPositions","prevColspans","prevColHeights","prevEmptySpace","LayoutGenerator","endingCol","affectedColHeights","onItemResize","newHeight","tallestColHeightsByPosition","p","colHeightsForPosition","tallestColHeight","words","ImageUpload","initImageUpload","containerSelector","uploadAction","postParameters","fileInputSelector","paramName","uploadParamName","fileuploadfail","initButtons","uploadButtonSelector","deleteButtonSelector","refreshImage","onAfterRefreshImage","_onUploadError","$icon","hudClass","dragger","dragStartMargin","outerContainer","X_AXIS","turnOn","turnOff","_getOffMargin","_onMouseDown","_onMouseUp","dragging","RIGHT_KEY","LEFT_KEY","_getMargin","_onDrag","mouseDistX","_onDragStop","_onSettle","LivePreview","$extraFields","$dragHandle","$iframeContainer","$iframe","$fieldPlaceholder","previewUrl","basePostData","fields","lastPostData","updateIframeInterval","loading","checkAgain","dragStartEditorWidth","_slideInOnIframeLoad","_handleSuccessProxy","_handleErrorProxy","_forceUpdateIframeProxy","_scrollX","_scrollY","_editorWidth","_editorWidthInPx","protocol","previewParams","extraFields","defaultEditorWidth","moveFieldsBack","editorWidthInPx","inPx","minEditorWidthInPx","exit","$editorHeader","$closeBtn","handleWindowResize","dragHandleWidth","getIframeWidth","$clone","_getClone","updateIframe","slideIn","createToken","previewAction","updateWidths","ESC_KEY","$newClone","field","contentWindow","scrollLeft","X-Craft-Token","xhrFields","withCredentials","crossDomain","forceUpdateIframe","handleSuccess","write","close","onResponse","handleError","copyInputValues","$textInput","$showPasswordToggle","showingPassword","passwordInput","hidePassword","setCurrentInput","updateToggleLabel","showPassword","togglePassword","onKeyDown","ALT_KEY","onKeyUp","onInputChange","onToggleMouseDown","$previewContainer","$targetBtn","$targetMenu","$tempInput","activeTarget","_updateIframeProxy","$previewHeader","switchTarget","resetScroll","sameHost","scrolllTop","frameborder","afterUpdateIframe","defaultSettings","_onHide","instance","loadAsset","focusItem","desiredHeight","desiredWidth","containerHeight","containerWidth","minGutter","_resizeContainer","modalHtml","$highlight","Prism","highlightElement","maxWidth","maxHeight","max-width","$progressBarStatus","_itemCount","_processedItemCount","_displaySteps","displaySteps","setProcessedItemCount","fadeTo","incrementItemCount","percentage","$modalContainerDiv","$prompt","$promptApplyToRemainingContainer","$promptApplyToRemainingCheckbox","$promptApplyToRemainingLabel","$pomptChoices","_prompts","_promptBatchCallback","_promptBatchReturnData","_promptBatchNum","_showNextPromptInBatch","remainingInBatch","_showPrompt","_handleBatchPromptSelection","applyToRemaining","choiceData","itemsToGo","_promptCallback","$promptMessage","$promptChoices","$promptButtons","$cancelButton","$radioButton","_selectPromptChoice","fadeOut","_cancelPrompt","$selectedOption","startPositionX","graduationsMin","graduationsMax","slideMin","slideMax","$overlay","$cursor","$graduations","$graduationsUl","graduationsCalculatedWidth","_handleResize","valueToPosition","_handleTapStart","touch","startLeft","_handleTapMove","curX","positionToValue","_handleTapEnd","scaleMin","scaleMax","SlugGenerator","allowUppercaseInSlug","limitAutoSlugsToAscii","XRegExp","matchChain","slugWordSeparator","Structure","structureDrag","$parents","initToggle","StructureDrag","initNewChildMenus","viewStateKey","$addBtns","onNewChildMenuClick","showMenu","getIndent","level","baseIndent","nestedIndent","addElement","$addBtn","$parentUl","_removeUl","structure","draggeeLevel","$helperLi","$targets","draggeeHeight","$level","cancelDrag","$lis","$closestTarget","closestTargetPos","closestTargetYDiff","closestTargetOffset","closestTargetHeight","targetOffset","targetHeight","targetYMidpoint","targetYDiff","$closestTargetLi","closestTargetLevel","$nextTargetLi","nextTargetLevel","hoveringBetweenRows","draggeeX","targetItemMouseDiffX","$parentLis","$closestParentLi","closestParentLiXDiff","closestParentLevel","$parentLi","parentLiX","parentLiXDiff","parentLevel","onMouseUp","$draggeeParent","moved","$closestSiblings","newLevel","setLevel","structureId","prevId","indent","$childLis","StructureTableSorter","tableView","_helperMargin","_$titleHelperCell","_titleHelperCellOuterWidth","_ancestors","_updateAncestorsFrame","_updateAncestorsProxy","_draggeeLevel","_draggeeLevelDelta","draggingLastElements","_loadingDraggeeLevelDelta","_targetLevel","_targetLevelBounds","_positionChanged","singleHelper","helperSpacingY","startDragging","HELPER_MARGIN","findDraggee","$nextRow","nextRowLevel","nextRowLevelDelta","_getAjaxBaseData","delta","drag","padding","BASE_PADDING","canInsertBefore","_getLevelBounds","canInsertAfter","_getAncestors","_setTargetLevelBounds","_updateIndent","onInsertionPointChange","_updateAncestorsBeforeRepaint","levelDiff","_getLevelIndent","$prevRow","prevRowLevel","$spinnerRow","_createSpinnerRowAfter","onPositionChange","_expandElement","onReturnHelpersToDraggees","newDraggeeIndexes","oldDraggeeIndexes","$postDraggeeItems","_minLevel","_maxLevel","forcePositionChange","_mouseDist","realMouseX","mousedownX","_indentationDist","LEVEL_INDENT","_targetLevelMouseDiff","_magnetImpact","MAX_GIVE","_closestLevelMagnetIndent","helpers","targetLevel","_level","_$prevRow","cancelAnimationFrame","_updateAncestors","_$ancestor","_newAncestors","$selectedSortHeader","structureTableSort","_totalVisiblePostStructureTableDraggee","_morePendingPostStructureTableDraggee","initTableHeaders","_collapseElement","selectedSortAttr","$tableHeaders","selectedSortDir","_isStructureTableDraggingLastElements","positionedAfter","includeTableAttributesForSource","_updateTableAttributes","$nextNextRow","descendantOf","$nextRows","_handleSelectedSortHeaderClick","newSortDir","_handleSortHeaderClick","_handleUnselectedSortHeaderClick","TagSelectInput","searchMenu","$addTagInput","_ignoreBlur","selectTag","searchForTags","killSearchMenu","excludeIds","tagGroupId","tags","exclude","exactMatch","Menu","attachToElement","data-site-id","targetSiteId","data-label","data-editable","$titleContainer","config","maxlength","autofocus","getAutofocusValue","autocomplete","getDisabledValue","readonly","step","showCharsLeft","createTextarea","createTextareaField","$select","data-target-prefix","$optgroup","optgroup","optionLabel","optionValue","optionDisabled","selected","createSelectField","data-target","data-reverse-target","reverseToggle","for","createCheckboxField","createCheckboxSelect","allValue","allChecked","showAllOption","allLabel","createCheckboxSelectField","data-value","aria-labelledby","labelId","createLightswitchField","containerId","$colorPreviewContainer","createColorField","getMonth","formattedValue","timezone","defaultDate","createDateField","timepicker","timepickerOptions","getHours","getMinutes","getSeconds","createTimeField","required","warning","addErrorsToField","addErrorsToList","$errors","clearErrorsFromField","_rejectedFiles","_extensionList","_totalFileCounter","_validFileCounter","autoUpload","fileupload","paramObject","getInProgress","onFileAdd","validateExtension","_createExtensionList","process","done","pass","fileExtension","maxFileSize","originalFiles","processErrorMessages","kinds","humanFileSize","maxUploadSize","bytes","u","toFixed","allowedKind","fileKinds","extensions","pasteZone","sequentialUploads","Accept","UriFormatGenerator","uriFormat","suffix","jQuery"],"mappings":"CACA,SAAUA,GAKVA,EAAEC,OAAOC,MACL,CACIC,UAAW,GAUXC,EAAG,SAASC,EAAUC,EAASC,GAQ3B,QAN4C,IAAjCL,MAAMM,aAAaH,SACuB,IAA1CH,MAAMM,aAAaH,GAAUC,KAEpCA,EAAUJ,MAAMM,aAAaH,GAAUC,IAGvCC,EACA,IAAK,IAAIE,KAAOF,EACPA,EAAOG,eAAeD,KAI3BH,EAAUA,EAAQK,QAAQ,IAAMF,EAAM,IAAKF,EAAOE,KAI1D,OAAOH,GAGXM,WAA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,OAAW,oCACrB9b,UAAW,mBASvBxzE,MAAMuvF,mBAAqBvvF,MAAMq1B,mBAAmBt1B,OAChD,CACIo2B,oBAAqB,SAASF,GAK1BA,GAHAA,EAAYA,EAAUx1B,QAAQ,aAAc,KAGtBqJ,cAOtBmsB,GADAA,GAHAA,EAAYj2B,MAAMoL,YAAY6qB,IAGRx1B,QAAQ,WAAY,KACpBA,QAAQ,cAAe,IAG7C,IAEI+uF,EAFQxvF,MAAMiJ,YAAYgtB,EAAUruB,MAAM,eAExB/D,KAAK,KAM3B,OAJI2rF,GAAaxsF,KAAK8L,SAAS2gF,SAC3BD,GAAaxsF,KAAK8L,SAAS2gF,QAGxBD,KAhnpBnB,CAonpBGE","file":"Craft.min.js"}
\ No newline at end of file
+{"version":3,"sources":["Craft.js"],"names":["$","extend","Craft","navHeight","t","category","message","params","translations","key","hasOwnProperty","replace","formatDate","date","Date","datepicker","datepickerOptions","dateFormat","formatNumber","number","format","d3","formatLocale","d3FormatLocaleDefinition","formatter","escapeHtml","str","text","html","escapeRegex","getText","encodeUriComponent","encodeURIComponent","differences","!","*","'","(",")","chr","re","RegExp","selectFullValue","input","$input","val","setSelectionRange","length","formatInputId","inputName","this","rtrim","getUrl","path","baseUrl","anchor","isPlainObject","aParams","name","value","push","Garnish","isArray","join","trim","url","qpos","indexOf","substr","search","pathMatch","match","pathParam","omitScriptNameInUrls","usePathInfo","scriptName","basePath","endPath","substring","getCpUrl","baseCpUrl","getSiteUrl","baseSiteUrl","getActionUrl","actionUrl","redirectTo","document","location","href","getCsrfInput","csrfTokenName","csrfTokenValue","postActionRequest","action","data","callback","options","headers","X-Registered-Asset-Bundles","Object","keys","registeredAssetBundles","X-Registered-Js-Files","registeredJsFiles","jqXHR","ajax","type","dataType","success","error","textStatus","errorThrown","readyState","cp","displayError","alert","send","_waitingOnAjax","_ajaxQueue","queueActionRequest","undefined","_postNextActionRequestInQueue","args","shift","stringToArray","arr","split","i","expandPostArray","expanded","m","unshift","parentElem","parseInt","compare","obj1","obj2","sortObjectKeys","Array","getObjectKeys","sort","obj","escapeChars","chars","escaped","ltrim","startsWith","filterArray","filtered","inArray","elem","removeFromArray","index","splice","getLast","uppercaseFirst","charAt","toUpperCase","slice","lowercaseFirst","toLowerCase","parseUrl","scheme","host","hostname","port","query","hash","isSameHost","requestUrlInfo","urlInfo","secondsToHumanTimeDuration","seconds","showSeconds","weeks","Math","floor","days","minutes","hours","round","timeComponents","asciiString","charMap","char","asciiStr","asciiCharMap","randomString","result","random","preventOutlineOnMouseFocus","$elem","namespace","on","addClass","trigger","event","keyCode","SHIFT_KEY","CTRL_KEY","CMD_KEY","removeClass","createErrorList","errors","$ul","createElement","$li","appendTo","appendHeadHtml","$existingCss","existingCss","eq","attr","regexp","append","appendFootHtml","$existingJs","src","existingJs","$bod","initUiElements","$container","grid","infoicon","checkboxselect","fieldtoggle","lightswitch","nicetext","pill","formsubmit","menubtn","_elementIndexClasses","_elementSelectorModalClasses","_elementEditorClasses","registerElementIndexClass","elementType","func","registerElementSelectorModalClass","registerElementEditorClass","createElementIndex","settings","BaseElementIndex","createElementSelectorModal","BaseElementSelectorModal","createElementEditor","element","BaseElementEditor","getLocalStorage","defaultValue","systemUid","localStorage","JSON","parse","setLocalStorage","stringify","e","getElementInfo","$element","hasClass","find","id","siteId","label","status","hasThumb","setElementSize","size","otherSize","$oldImg","$newImg","sizes","srcset","replaceWith","picturefill","elements","fn","animateLeft","pos","duration","easing","complete","orientation","velocity","left","right","animateRight","disable","each","removeAttr","enable","itemSelector","cols","maxCols","minColWidth","mode","fillMode","colClass","snapToGrid","Grid","InfoIcon","CheckboxSelect","FieldToggle","settingName","settingValue","setSettings","thisSettings","hasAttr","LightSwitch","NiceText","Pill","ev","$btn","currentTarget","confirm","$anchor","$form","closest","customTrigger","next","menuAnchor","MenuBtn","$doc","ready","Base","elementId","$fieldsContainer","$cancelBtn","$saveBtn","$spinner","$siteSelect","$siteSpinner","hud","init","defaults","loadHud","setElementAttribute","attributes","getBaseData","prevalidate","onBeginLoading","includeSites","isMultiSite","showSiteSwitcher","proxy","showHud","response","onEndLoading","$hudContents","sites","$header","$siteSelectContainer","siteInfo","addListener","add","updateForm","onCreateForm","$footer","$buttonsContainer","updateBody","updateSizeAndPosition","hudTrigger","HUD","bodyClass","closeOtherHUDs","onShow","onHide","onSubmit","$hud","hide","switchSite","newSiteId","reloadForm","$instructions","class","children","requestAnimationFrame","headHtml","footHtml","saveElement","validators","isFunction","call","param","$body","serialize","$title","$a","cpEditUrl","newTitle","closeHud","onSaveElement","shake","onShowHud","onHideHud","runQueue","elementIndex","noop","initialized","instanceState","sourceStates","sourceStatesStorageKey","searchTimeout","sourceSelect","$main","$mainSpinner","isIndexBusy","$sidebar","showingSidebar","sourceKey","sourceViewModes","$source","sourcesByKey","$visibleSources","$customizeSourcesBtn","customizeSourcesModal","$toolbar","$toolbarFlexContainer","toolbarOffset","$search","searching","searchText","trashed","drafts","$clearSearchBtn","$statusMenuBtn","$statusMenuContainer","statusMenu","$siteMenuBtn","siteMenu","$sortMenuBtn","sortMenu","$sortAttributesList","$sortDirectionsList","$scoreSortAttribute","$structureSortAttribute","$elements","$viewModeBtnContainer","viewModeBtns","viewMode","view","_autoSelectElements","$countContainer","page","$exportBtn","actions","actionsHeadHtml","actionsFootHtml","$selectAllContainer","$selectAllCheckbox","showingActionTriggers","_$detachedToolbarItems","_$triggers","getDefaultInstanceState","storageKey","context","parent","hideSidebar","toolbarFixed","isMobileBrowser","$win","$scrollContainer","initSources","menu","$option","$options","filter","first","_setSite","criteria","storedSiteId","$storedSiteOption","startSearching","stopSearching","clearTimeout","setTimeout","RETURN_KEY","preventDefault","updateElementsIfSearchTextChanged","afterInit","selectDefaultSource","setPage","pageNum","updateElements","onAfterInit","getSourceContainer","$sources","$items","_getSourcesInList","Select","multi","allowEmpty","vertical","onSelectionChange","_initSources","getDefaultSourceKey","getSourceByKey","selectSource","refreshSources","removeAllItems","setIndexBusy","refreshSourcesAction","setIndexAvailable","updateFixedToolbar","_scrollTop","scrollTop","width","_makingFixed","css","outerHeight","top","offset","initSource","addItems","initSourceToggle","expandedSources","_expandSource","deinitSourceToggle","$toggle","_getSourceToggle","deinitSource","removeItems","removeListener","removeData","selectedSource","getDefaultExpandedSources","addOptions","prependTo","_updateStructureSortOption","setSortAttribute","detach","setInstanceState","storeInstanceState","getSourceState","source","getSelectedSourceState","setSelecetedSourceState","viewState","storeSortAttributeAndDirection","getSelectedSortAttribute","order","getSelectedSortDirection","max","pageTrigger","history","replaceState","getViewParams","batchSize","limit","disabledElementIds","paginated","_isViewPaginated","collapsedElementIds","preservePagination","destroy","updateElementsAction","totalPages","ceil","count","_updateView","showActionTriggers","height","not","insertAfter","_createTriggers","submitAction","actionClass","actionParams","selectedElementIds","getSelectedElementIds","viewParams","elementAction","elementIds","submitActionsAction","displayNotice","afterAction","onAfterAction","hideActionTriggers","insertBefore","updateActionTriggers","totalSelected","getSelectedElements","getEnabledElements","$selectAllBtn","getSortAttributeOption","attribute","setSortDirection","getSortDirectionOption","dir","getSelectedViewMode","selectItem","updateSidebarMenuLabel","setStoredSortOptionsForSource","remove","getViewModesForSource","sourceViewMode","$viewModeBtn","className","title","icon","selectViewMode","doesSourceHaveViewMode","onSelectSource","selectSourceByKey","sortAttr","sortDir","getDefaultSort","viewModes","force","createView","getViewClass","TableElementIndexView","ThumbsElementIndexView","rememberDisabledElementId","forgetDisabledElementId","enableElements","parents","onEnableElements","disableElements","onDisableElements","getElementById","enableElementsById","ids","makeArray","disableElementsById","selectElementAfterUpdate","addButton","$button","getButtonContainer","isShowingSidebar","buttonContainer","createCustomizeSourcesModal","modal","CustomizeSourcesModal","base","onSelectSite","onUpdateElements","_handleSourceSelectionChange","$selectedItems","_handleActionTriggerSubmit","getPostData","_handleMenuActionTriggerSubmit","option","_handleStatusChange","selectedOption","_handleSiteChange","$firstVisibleSource","selectNewSource","toString","get","$heading","$headings","nextUntil","_handleSortChange","is","_handleSelectionChange","_handleSourceDblClick","_toggleSource","stopPropagation","_handleSourceToggleClick","prev","$firstOption","$list","_getChildSources","siblings","_deinitSources","_collapseSource","$childSources","countLabel","$paginationContainer","$prevBtn","data-icon","$nextBtn","role","tabindex","aria-checked","selectAllElements","deselectAllElements","SPACE_KEY","selectable","multiSelect","checkboxMode","selectElementById","triggers","safeMenuActions","destructiveMenuActions","destructive","$menuTrigger","$menu","$safeList","_createMenuTriggerList","$destructiveList","$div","_showExportHud","$limitField","ui","createTextField","placeholder","min","submitting","isNaN","tokenParam","token","data-action","BaseElementIndexView","$loadingMoreSpinner","$elementContainer","$scroller","thumbLoader","elementSelect","loadingMore","_totalVisible","_morePending","_handleEnableElements","_handleDisableElements","container","getElementContainer","setTotalVisible","setMorePending","ElementThumbLoader","load","isVerticalList","handle","_handleElementEditing","$target","target","prop","isTouchCapable","maybeLoadMore","getAllElements","$selectedElements","selectElement","selectAll","deselectAll","getTotalVisible","totalVisible","getMorePending","morePending","canLoadMore","loadMore","winHeight","innerHeight","winScrollTop","getLoadMoreParams","loadMoreElementsAction","$newElements","appendElements","onAppendElements","newElements","off","BaseElementSelectInput","elementSort","elementEditor","$elementsContainer","$addElementBtn","_initialized","normalizedSettings","arguments","modalStorageKey","sortable","getContainer","getElementsContainer","getAddElementsBtn","initElementSelect","initElementSort","resetElements","getElements","DragSort","$targetItem","getSelectedItems","ignoreHandleSelector","axis","getElementSortAxis","collapseDraggees","magnetStrength","helperLagBase","onSortChange","resetItemOrder","canAddMoreElements","updateAddElementsBtn","enableAddElementsBtn","disableAddElementsBtn","ADD_FX_DURATION","REMOVE_FX_DURATION","show","removeElements","addElements","editable","_handleShowElementEditor","removeElement","onRemoveElements","animateElementAway","animateCss","opacity","outerWidth","showModal","createModal","getModalSettings","closeOtherModals","sources","showSiteMenu","getDisabledElementIds","onSelect","modalSettings","sourceElementId","onModalSelect","slotsLeft","selectElements","updateDisabledElementsInModal","elementInfo","createNewElement","appendElement","animateElementIntoPlace","onSelectElements","clone","prepend","$modalElement","$inputElement","origOffset","destOffset","$helper","position","zIndex","window","draftEditor","checkForm","fieldId","editorSettings","Modal","$selectBtn","$sourceToggles","$tbody","$primaryButtons","$secondaryButtons","$footerSpinner","onFadeIn","_createElementIndex","updateSelectBtnState","enableSelectBtn","disableSelectBtn","enableCancelBtn","disableCancelBtn","showFooterSpinner","hideFooterSpinner","cancel","clearMouseUpTimeout","disableElementsOnSelect","hideOnSelect","info","has","touchData","firstTap","secondTap","resizable","onCancel","hideIndexSidebar","BaseInputGenerator","listening","timeout","startListening","setNewSource","stopListening","removeAllListeners","onSourceTextChange","onTargetTextChange","activeElement","onFormSubmit","updateTarget","sourceVal","targetVal","generateTargetValue","AdminTable","totalItems","sorter","$noItems","$table","$deleteBtns","allowDeleteAll","minItems","noItemsSelector","tableSelector","DataTableSorter","updateUI","addRow","row","maxItems","$row","$deleteBtn","reorderItems","idAttribute","reorderAction","onReorderItems","reorderSuccessMessage","reorderFailMessage","handleDeleteBtnClick","confirmDeleteItem","deleteItem","getItemName","confirmDeleteMessage","getItemId","deleteAction","handleDeleteItemResponse","onDeleteItem","deleteSuccessMessage","deleteFailMessage","nameAttribute","$moveButtons","newItemBtnSelector","AssetEditor","reloadIndex","$imageEditorTrigger","showImageEditor","AssetImageEditor","onSave","bind","allowDegreeFractions","isImagick","$imageTools","$buttons","$replaceBtn","$editorContainer","$straighten","$croppingCanvas","$spinnerCanvas","canvas","image","viewport","focalPoint","croppingCanvas","clipper","croppingRectangle","cropperHandles","cropperGrid","croppingShade","imageStraightenAngle","viewportRotation","originalWidth","originalHeight","imageVerticeCoords","zoomRatio","animationInProgress","currentView","assetId","cacheBust","draggingCropper","scalingCropper","draggingFocal","previousMouseX","previousMouseY","shiftKeyHeld","editorHeight","editorWidth","cropperState","scaleFactor","flipData","focalPointState","croppingConstraint","spinnerInterval","maxImageSize","lastLoadedDimensions","imageIsLoading","renderImage","renderCropper","now","x","y","allowSavingAsNew","saveImage","$shade","getMaxImageSize","browserViewportWidth","documentElement","clientWidth","browserViewportHeight","clientHeight","devicePixelRatio","loadEditor","$tabs","$viewsContainer","$views","innerWidth","_showSpinner","fabric","StaticCanvas","enableRetinaScaling","renderAll","imageUrl","Image","fromURL","imageObject","set","originX","originY","getHeight","getWidth","getScaledImageDimensions","_setFittedImageVerticeCoordinates","_repositionEditorElements","focalState","imageDimensions","offsetX","offsetY","focal","focalData","adjustedX","adjustedY","storeFocalPointState","_createFocalPoint","_createViewport","storeCropperState","_addControlListeners","_handleMouseMove","_handleMouseDown","_handleMouseUp","_hideSpinner","_reloadImage","setSrc","min-width","min-height","previousEditorDimensions","setDimensions","currentScaledDimensions","getZoomToFitRatio","previouslyOccupiedArea","_getBoundingRectangle","_repositionCropper","getZoomToCoverRatio","_repositionImage","_repositionViewport","_repositionFocalPoint","_zoomImage","Rect","fill","globalCompositeOperation","sizeFactor","focalX","focalY","deltaX","deltaY","Group","Circle","radius","strokeWidth","stroke","toggleFocalPoint","dimensions","state","currentWidth","ratio","hasOrientationChanged","imageRatio","rotateImage","flipImage","straighteningInput","SlideRuleInput","onStart","_showGrid","onChange","slider","straighten","onEnd","_hideGrid","_cleanupFocalPointAfterStraighten","onOptionSelect","setCroppingConstraint","enforceCroppingConstraint","_handleTabClick","$tab","showView","enableSlider","disableSlider","disableCropMode","enableCropMode","zoomFactor","degrees","imageZoomRatio","newAngle","angle","scaledImageDimensions","viewportProperties","imageProperties","angleInRadians","PI","newDeltaX","cos","sin","newDeltaY","modifiedDeltaX","modifiedDeltaY","temp","animate","animationDuration","onComplete","cleanAngle","parseFloat","_adjustFocalPointByAngle","_resetFocalPointPosition","editorCenter","setValue","properties","scaleY","scaleX","previousAngle","_adjustEditorElementsOnStraighten","newCenterX","newCenterY","angleDelta","currentZoomRatio","adjustmentRatio","cropperCenterX","cropperCenterY","imageVertices","getImageVerticeCoords","rectangle","_getZoomRatioToFitRectangle","_isCenterInside","object","containingObject","newFocalX","newFocalY","adjustedFocalX","adjustedFocalY","containingVertices","vertex","rectangleVertices","_getRectangleVertices","verticeIndex","arePointsInsideRectangle","edge","_getEdgeCrossed","rectangleCenter","distanceFromVertexToEdge","abs","sqrt","pow","distanceFromCenterToEdge","postData","imageRotation","cropData","zoom","end","scaledWidth","scaledHeight","boundingBox","_getImageBoundingBox","scale","vertScale","horiScale","getCombinedZoomRatio","strokeOptions","gridWidth","gridHeight","xStep","yStep","Line","onFadeOut","cropperData","_showCropper","_editorModeTransition","_hideCropper","targetZoom","inverseZoomFactor","imageOffsetX","imageOffsetY","getContext","start","cW","cH","setInterval","rotation","save","clearRect","translate","rotate","beginPath","moveTo","lineTo","lineWidth","strokeStyle","restore","clearInterval","clipperData","_setupCropperLayer","_redrawCropperElements","backgroundColor","hoverCursor","selection","rectangleRatio","rectWidth","rectHeight","lineOptions","gridOptions","pathGroup","Path","previousImageArea","currentOffset","areaFactor","coordinateSet","a","b","c","d","_isMouseOver","move","_cropperHandleHitTest","pageX","pageY","_handleFocalDrag","_handleCropperDrag","_handleCropperResize","_setMouseCursor","vertices","newX","newY","constraint","previousHeight","previousWidth","topDelta","leftDelta","change","cursor","parentOffset","mouseX","mouseY","lb","rb","tb","bb","topLeft","topRight","bottomRight","zoomMode","topVerticalSegment","bottomVerticalSegment","rightHorizontalSegment","leftHorizontalSegment","verticalOffset","horizontalOffset","_debug","fabricObj","debugger","points","ab","_getVector","bc","scalarAbAb","_getScalarProduct","scalarBcBc","point","ap","bp","scalarAbAp","scalarBcBp","_getVectorMagnitude","vector","_getAngleBetweenVectors","acos","edgePoints","centerPoint","smallestDiff","edgeCrossed","edgeIndex","toCenter","edgeVector","toVertex","diff","box","proportion","AssetIndex","$includeSubfoldersContainer","$includeSubfoldersCheckbox","showingIncludeSubfoldersCheckbox","$uploadButton","$uploadInput","$progressBar","$folders","uploader","promptHandler","progressBar","_uploadTotalFiles","_uploadFileProgress","_uploadedAssetIds","_currentUploaderSettings","_assetDrag","_folderDrag","_expandDropTargetFolderTimeout","_tempExpandedFolders","_fileConflictTemplate","choices","_folderConflictTemplate","_initIndexPageMode","_createFolderContextMenu","_getSourceLevel","updateDropTargets","contextMenu","parentsUntil","onDragStartProxy","onDropTargetChangeProxy","DragDrop","activeDropTargetClass","helperOpacity","helper","$file","_getFileDragHelper","dropTargets","targets","_getFolderUidFromSourceKey","onDragStart","onDropTargetChange","onDragStop","$selected","draggees","$draggeeHelper","$helperSidebar","$helperNav","$helperUl","padding-top","$draggee","padding-right","padding-bottom","padding-left","draggedSourceIds","_onFileDragStop","$activeDropTarget","originatingSource","targetFolderId","originalAssetIds","originalAssetId","_positionProgressBar","resetProgressBar","setItemCount","showProgressBar","parameterArray","folderId","onMoveFinish","responseArray","resetPrompts","conflict","addPrompt","suggestedFilename","prompt","hideProgressBar","performAfterMoveActions","_collapseExtraExpandedFolders","getPromptCount","promptCallback","returnData","newParameterArray","choice","filename","apply","_performBatchRequests","fadeOutHelpers","showBatchPrompts","returnHelpersToDraggees","_onFolderDragStop","folderIds","reverse","parentId","requestId","fileMoveList","newSourceKey","transferList","newFolderId","newFolderUid","merge","_performActualFolderMove","folderDeleteList","moveCallback","counter","_getParentSource","_selectSourceByFolderId","$targetSource","_getSourceByKey","$parentSources","$parentSource","PromptHandler","ProgressBar","fileInput","dropZone","events","fileuploadstart","fileuploadprogressall","fileuploaddone","kind","allowedKinds","Uploader","setParams","$subContainer","checked","marginBottom","includeSubfolders","_onUploadStart","_onUploadProgress","progress","loaded","total","setProgressPercentage","_onUploadComplete","files","doReload","file","isLastUpload","_updateAfterUpload","_uploadFollowup","finalCallback","doFollowup","parameterIndex","followupCallback","incrementProcessedItemCount","updateProgressBar","sourceAssetId","conflictingAssetId","targetFilename","_onUpdateElements","_onKeyDown","_onElementFocus","shiftKey","PreviewFileModal","openInstance","selfDestruct","$focusedItem","_loadPreview","item","startingWidth","startingHeight","_onDragStart","$outerContainer","$innerContainer","_$firstRowCells","$helperCells","$helperCell","$firstRowCell","_onDropTargetChange","$dropTarget","dropTargetFolder","_hasSubfolders","_isExpanded","dropTargetFolderId","$excludedSources","_collapseFolder","_expandFolder","menuOptions","onClick","ContextMenu","menuClass","_createSubfolder","$parentFolder","subfolderName","folderName","_prepareParentForChildren","$subfolder","folderUid","_appendSubfolder","_deleteFolder","$targetFolder","folder","_cleanUpTree","_renameFolder","oldName","newName","$existingChildren","subfolderLabel","folderInserted","$existingChild","before","windowHeight","doRequest","parameters","AssetSelectInput","originalFilename","originalExtension","resetOriginalFilename","_renameHelper","validateElementForm","_attachUploader","defaultFieldLayoutId","formData","canAddMoreFiles","selectUploadedFile","$newElement","margin","slotsTaken","_parseFilename","parts","extension","pop","baseFileName","endPos","selectionStart","selectionEnd","createRange","select","range","collapse","moveEnd","moveStart","$filenameField","ext","oldExt","newExt","AssetSelectorModal","$selectTransformBtn","_selectedTransform","transforms","createSelectTransformButton","$btnGroup","$menuList","MenuButton","allowTransforms","onSelectTransform","transform","selectImagesWithTransform","transformUrls","imageIdsWithMissingUrls","$item","fetchMissingTransformUrls","canSelectImageTransforms","AuthManager","remainingSessionTime","checkRemainingSessionTimer","showLoginModalTimer","decrementLogoutWarningInterval","showingLogoutWarningModal","showingLoginModal","logoutWarningModal","loginModal","$logoutWarningPara","$passwordInput","$passwordSpinner","$loginBtn","$loginErrorPara","submitLoginIfLoggedOut","updateRemainingSessionTime","setCheckRemainingSessionTimer","checkRemainingSessionTime","extendSession","responseJSON","minSafeSessiotTime","showLogoutWarningModal","checkInterval","submitLogin","showLoginModal","hideLogoutWarningModal","hideLoginModal","quickShow","$logoutBtn","$renewSessionBtn","autoShow","hideOnEsc","hideOnShadeClick","shadeClass","updateLogoutWarningMessage","time","decrementLogoutWarning","quick","quickHide","$inputContainer","$inputsFlexContainer","$passwordContainer","$buttonContainer","$passwordWrapper","PasswordInput","onToggleInput","$newPasswordInput","logout","renewSession","validatePassword","login","clearLoginError","loginName","username","password","showLoginError","CategoryIndex","editableGroups","$newCategoryBtnGroup","$newCategoryBtn","editableCategoryGroups","group","uid","defaultGroupHandle","updateButton","selectedSourceHandle","selectedGroup","$menuBtn","_getGroupTriggerHref","_openCreateCategoryModal","getAttribute","menuHtml","menuBtn","uri","primarySiteId","groupId","newCategoryBtnText","groupSourceKey","CategorySelectInput","selectedCategoryIds","categoryIds","branchLimit","selectionLabel","$newElementsContainer","filteredElements","$allCategories","_animateCategoryAway","charts","DataTable","columns","rows","forEach","cellIndex","parseTime","timeParse","Tip","$tip","setContent","setPosition","BaseChart","$chart","chartBaseClass","dataTable","timeFormatLocale","svg","globalSettings","formats","d3Formats","formatLocaleDefinition","timeFormatLocaleDefinition","d3TimeFormatLocaleDefinition","resize","baseSettings","draw","chartClass","onAfterDrawTicks","tickKey","tick","$tickText","numberFormat","percentFormat","currencyFormat","shortDateFormats","day","month","year","bottom","colors","Area","tip","drawingArea","getChartMargin","translateX","translateY","drawTicks","drawAxes","drawChart","drawTipTriggers","getX","xAxis","axisBottom","tickFormat","getXFormatter","ticks","yAxis","getY","axisLeft","getYFormatter","tickValues","getYTickValues","axisRight","showAxis","tickSizeOuter","gridlines","xLineAxis","tickSize","yLineAxis","line","datum","style","area","y0","y1","plots","enter","tips","chartMargin","xAxisTickInterval","node","getTotalLength","tipTriggerWidth","$content","$xValue","$yValue","content","calcLeft","values","yTicksMaxWidth","computedTickWidth","padded","xDomainMin","xDomainMax","xDomain","scaleTime","domain","yDomain","getYMaxValue","scaleLinear","utils","getTimeFormatter","getNumberFormatter","maxValue","getDuration","secondsNum","chartSettings","dataScale","ColorInput","$colorContainer","$colorPreview","$colorInput","createColorInput","handleTextChange","setAttribute","updateColor","_browserSupportsColorInputs","doesBrowserSupportColorInputs","CP","authManager","$nav","$mainContainer","$alerts","$crumbs","$notificationContainer","$primaryForm","$mainContent","$details","$selectedTab","$contentContainer","$edition","$collapsibleTables","fixedHeader","enableQueue","jobInfo","displayedJobInfo","displayedJobInfoUnchanged","trackJobProgressTimeout","jobProgressIcon","checkingForUpdates","forcingRefreshOnUpdatesCheck","checkForUpdatesCallbacks","updateFixedHeader","updateResponsiveTables","$errorNotifications","$otherNotifications","delay","notificationDuration","initAlerts","isCtrlKeyPressed","S_KEY","submitPrimaryForm","initTabs","initConfirmUnloadForms","$confirmUnloadForms","serialized","confirmUnload","livePreview","inPreviewMode","originalEvent","returnValue","_handleInputFocus","_handleInputBlur","saveShortcut","$label","toggleNav","toggleClass","toggleSidebar","tabs","tabWidths","totalWidth","selectTab","tab","deselectTab","_i","_$table","_containerWidth","_check","_isCollapsed","getBoundingClientRect","headerHeight","max-height","fixedheader","displayNotification","$notification","fadedMargin","margin-left","margin-right","display","notificationType","fetchAlerts","displayAlerts","alerts","margin-top","$shunnableAlerts","$link","checkForUpdates","forceRefresh","realCallback","updateUtilitiesBadge","callbacks","updateInfo","$utilitiesLink","$badge","badgeCount","runQueueAutomatically","trackJobProgress","_trackJobProgressInternal","setJobInfo","animateIcon","oldInfo","getDisplayedJobInfo","progressLabel","updateJobIcon","statuses","JOB_STATUS_RESERVED","JOB_STATUS_FAILED","JOB_STATUS_WAITING","j","JobProgressIcon","hideFailMode","setDescription","description","setProgress","showFailMode","JOB_STATUS_DONE","failMode","_canvasSupported","_$bgCanvas","_$staticCanvas","_$hoverCanvas","_$failCanvas","_staticCtx","_hoverCtx","_canvasSize","_arcPos","_arcRadius","_lineWidth","_arcStartPos","_arcEndPos","_arcStartStepSize","_arcEndStepSize","_arcStep","_arcStepTimeout","_arcAnimateCallback","_progressBar","$canvasContainer","_createCanvas","_drawArc","_animateArc","_setArc","$innerProgressBar","toggleHud","toggle","QueueHUD","color","$canvas","ctx","lineCap","startPos","arc","closePath","targetStartPos","targetEndPos","_takeNextArcStep","jobsById","completedJobs","updateViewProxy","updateView","newJobIds","updateStatus","Job","placed","$object","$statusContainer","$descriptionContainer","$progressLabel","$flex","empty","$actionBtn","performErrorAction","$elementIndexSourcesContainer","$sourcesContainer","$sourceSettingsContainer","$newHeadingBtn","$footerBtnContainer","$saveSpinner","$loadingSpinner","sourceSort","updateSourcesOnSave","availableTableAttributes","setContainer","buildModal","addSource","sourceData","$itemLabel","$itemInput","heading","Heading","updateItemLabel","Source","handleNewHeadingBtnClick","scrollContainerToElement","$pendingHeading","$lastSource","$indexSource","getIndexSource","isHeading","appendSource","$extraSources","nextAll","BaseSource","$settingsContainer","isSelected","deselect","createSettings","tableAttributes","firstAttribute","firstKey","firstLabel","$titleColumnCheckbox","createTableColumnOption","$columnCheckboxes","selectedAttributes","createField","instructions","createCheckbox","disabled","$labelField","$labelInput","handleLabelInputChange","deleteHeading","table","$rows","caboose","Y_AXIS","getHelper","$helperRow","helperClass","$cells","DeleteUserModal","userId","$deleteActionRadios","$deleteSpinner","userSelect","_deleting","idParam","redirect","contentSummary","$deleteSubmitBtn","validateDeleteInputs","validates","handleSubmit","DraftEditor","$revisionBtn","$revisionLabel","$statusIcon","$editMetaBtn","metaHud","$nameTextInput","$notesTextInput","$saveMetaBtn","lastSerializedValue","saving","saveXhr","checkFormAfterUpdate","submittingForm","duplicatedElements","preview","previewToken","previewTargets","enablePreview","$shareBtn","openShareLink","createShareMenu","revisionId","serializeForm","draftId","initForDraft","createDraft","canUpdateSource","createEditMetaBtn","statusIcons","showStatusHud","bodyHtml","spinners","getPreviewToken","Promise","resolve","reject","sourceId","getTokenizedPreviewUrl","randoParam","isLive","then","catch","open","getPreview","Preview","openPreview","ensureIsDraftOrRevision","revisionid","removeActionParams","isPreviewActive","$editor","isUnsavedDraft","saveDraft","isActive","$spinners","$statusIcons","saveDraftAction","prepareData","docTitle","draftName","draftNotes","revisionMenu","draftCreated","newHref","anchorPos","$saveBtnContainer","elementTypeDisplayName","$saveDraftBtn","canDeleteDraft","$draftsUl","$draftHeading","$draftLi","$draftA","selectOption","$siteOptions","$siteOption","creator","updatePreviewTargets","afterUpdate","checkMetaValues","oldId","currentTargets","showMetaHud","createMetaHud","onMetaHudShow","$field","$hudBody","$deleteLink","saveMeta","onMetaHudHide","onMetaHudEscape","onNotesKeydown","submit","shakeMetaHud","deleteDraft","deleteDraftAction","handleFormSubmit","abort","chunks","accept-charset","enctype","method","decodeURIComponent","applyDraftAction","hashedRedirectUrl","DynamicGenerator","EditableTable","baseName","biggestId","$addRowBtn","rowCount","hasMaxRows","hasMinRows","radioCheckboxes","log","copyDraggeeInputValuesToHelper","isVisible","initialize","minRows","createRowObj","updateAddRowButton","initializeIfVisible","canAddRow","canDeleteRow","deleteRow","$tr","onDeleteRow","staticRows","maxRows","focus","rowId","rowIdPrefix","createRow","defaultValues","onAddRow","Row","focusOnPrevRow","tdIndex","blurTd","prevRow","$prevTr","$tds","focusOnNextRow","nextRow","$nextTr","textualColTypes","data-id","colId","$cell","col","scope","textual","code","small","createDateInput","createLightswitch","createSelect","default","createTimeInput","createTextInput","niceTexts","tds","$textareas","tr","td","$textarea","$checkbox","textareasByColId","onHeightChange","radioMode","applyToggleCheckbox","onTextareaHeightChange","autopopulate","HandleGenerator","allowNonAlphaStart","last","onTextareaFocus","onRadioCheckboxChange","checkbox","checkboxColId","neg","checkboxCol","colum","ignoreNextTextareaFocus","handleKeypress","charCode","ctrl","numericKeyCodes","validateValue","safeValue","tallestTextareaHeight","tdHeight","ElementActionTrigger","maxLevels","newChildUrl","$trigger","triggerEnabled","activate","updateTrigger","validateSelection","enableTrigger","disableTrigger","valid","batch","handleTriggerActivation","queue","workers","Worker","concat","toArray","active","loadNext","loader","$img","alt","ElevatedSessionForm","inputs","form","$inputs","getInputPostVal","elevatedSessionManager","fetchingTimeout","inputsChanged","$currentInput","requireElevatedSession","submitForm","ElevatedSessionManager","passwordModal","$submitBtn","$errorPara","minSafeElevatedSessionTimeout","showPasswordModal","$passwordModal","focusPasswordInput","submitPassword","currentPassword","showPasswordError","EntryIndex","publishableSections","$newEntryBtnGroup","$newEntryBtn","section","defaultSectionHandle","selectedSection","_getSectionTriggerHref","_openCreateEntryModal","site","sectionId","newEntryBtnText","typeId","entryTypes","sectionSourceKey","FieldLayoutDesigner","$tabContainer","$unusedFieldContainer","$newTabBtn","$allFields","tabGrid","unusedFieldGrid","tabDrag","fieldDrag","gridSettings","initTab","FieldDrag","customizableTabs","TabDrag","$editBtn","$fields","initField","onTabOptionSelect","renameTab","deleteTab","onFieldOptionSelect","toggleRequiredField","removeField","$labelSpan","getFieldInputName","removeFieldById","requiredFieldInputName","refreshCols","$group","addTab","tabName","fieldInputName","BaseDrag","Drag","designer","$insertion","showingInsertion","$caboose","draggingUnusedItem","addToTabGrid","getInsertion","addCaboose","setMidpoints","getItemContainer","isItemInTabContainer","onDrag","hitTest","_closestItem","getClosestItem","_closestItemMouseDiff","_$item","_midpoint","_mouseDiff","getDist","draggeeDisplay","visibility","$hiddenFields","$fieldContainers","targetPrefix","targetSelector","reverseTargetSelector","_$target","_$reverseTarget","getType","normalizeTargetSelector","findTargets","selector","getToggleVal","postVal","onToggleChange","hideTarget","showTarget","_show","_currentHeight","_targetHeight","overflow","items","totalCols","colGutterDrop","colPctWidth","possibleItemColspans","possibleItemPositionsByColspan","itemPositions","itemColspansByPosition","layouts","layout","itemHeights","leftPadding","_refreshingCols","_refreshColsAfterRefresh","_forceRefreshColsAfterRefresh","handleContainerHeightProxy","setItems","_","oldHeight","scrollHeight","gutter","itemIndex","tallestItemHeight","colIndex","itemHeight","remainder","itemHeightsByColspan","positionRight","positionLeft","minColspan","maxColspan","colspan","getItemWidthCss","minPosition","maxPosition","colHeights","createLayouts","layoutTotalCols","highestTotalCols","layoutHeights","shortestHeight","shortestLayouts","emptySpaces","emptySpace","colspans","getItemLeftPosCss","positions","isSimpleLayout","margin-bottom","positionItems","completeRefreshCols","onRefreshCols","getItemWidth","getItemWidthInPx","getItemLeftPosInPx","prevPositions","prevColspans","prevColHeights","prevEmptySpace","LayoutGenerator","endingCol","affectedColHeights","onItemResize","newHeight","tallestColHeightsByPosition","p","colHeightsForPosition","tallestColHeight","words","ImageUpload","initImageUpload","containerSelector","uploadAction","postParameters","fileInputSelector","paramName","uploadParamName","fileuploadfail","initButtons","uploadButtonSelector","deleteButtonSelector","refreshImage","onAfterRefreshImage","_onUploadError","$icon","hudClass","dragger","dragStartMargin","outerContainer","X_AXIS","turnOn","turnOff","_getOffMargin","_onMouseDown","_onMouseUp","dragging","RIGHT_KEY","LEFT_KEY","_getMargin","_onDrag","mouseDistX","_onDragStop","_onSettle","LivePreview","$extraFields","$dragHandle","$iframeContainer","$iframe","$fieldPlaceholder","previewUrl","basePostData","fields","lastPostData","updateIframeInterval","loading","checkAgain","dragStartEditorWidth","_slideInOnIframeLoad","_handleSuccessProxy","_handleErrorProxy","_forceUpdateIframeProxy","_scrollX","_scrollY","_editorWidth","_editorWidthInPx","protocol","previewParams","extraFields","defaultEditorWidth","moveFieldsBack","editorWidthInPx","inPx","minEditorWidthInPx","exit","$editorHeader","$closeBtn","handleWindowResize","dragHandleWidth","getIframeWidth","$clone","_getClone","updateIframe","slideIn","createToken","previewAction","updateWidths","ESC_KEY","$newClone","field","contentWindow","scrollLeft","X-Craft-Token","xhrFields","withCredentials","crossDomain","forceUpdateIframe","handleSuccess","write","close","onResponse","handleError","copyInputValues","$textInput","$showPasswordToggle","showingPassword","passwordInput","hidePassword","setCurrentInput","updateToggleLabel","showPassword","togglePassword","onKeyDown","ALT_KEY","onKeyUp","onInputChange","onToggleMouseDown","$previewContainer","$targetBtn","$targetMenu","$tempInput","activeTarget","_updateIframeProxy","$previewHeader","switchTarget","resetScroll","sameHost","scrolllTop","frameborder","afterUpdateIframe","defaultSettings","_onHide","instance","loadAsset","focusItem","desiredHeight","desiredWidth","containerHeight","containerWidth","minGutter","_resizeContainer","modalHtml","$highlight","Prism","highlightElement","maxWidth","maxHeight","max-width","$progressBarStatus","_itemCount","_processedItemCount","_displaySteps","displaySteps","setProcessedItemCount","fadeTo","incrementItemCount","percentage","$modalContainerDiv","$prompt","$promptApplyToRemainingContainer","$promptApplyToRemainingCheckbox","$promptApplyToRemainingLabel","$pomptChoices","_prompts","_promptBatchCallback","_promptBatchReturnData","_promptBatchNum","_showNextPromptInBatch","remainingInBatch","_showPrompt","_handleBatchPromptSelection","applyToRemaining","choiceData","itemsToGo","_promptCallback","$promptMessage","$promptChoices","$promptButtons","$cancelButton","$radioButton","_selectPromptChoice","fadeOut","_cancelPrompt","$selectedOption","startPositionX","graduationsMin","graduationsMax","slideMin","slideMax","$overlay","$cursor","$graduations","$graduationsUl","graduationsCalculatedWidth","_handleResize","valueToPosition","_handleTapStart","touch","startLeft","_handleTapMove","curX","positionToValue","_handleTapEnd","scaleMin","scaleMax","SlugGenerator","allowUppercaseInSlug","limitAutoSlugsToAscii","XRegExp","matchChain","slugWordSeparator","Structure","structureDrag","$parents","initToggle","StructureDrag","initNewChildMenus","viewStateKey","$addBtns","onNewChildMenuClick","showMenu","getIndent","level","baseIndent","nestedIndent","addElement","$addBtn","$parentUl","_removeUl","structure","draggeeLevel","$helperLi","$targets","draggeeHeight","$level","cancelDrag","$lis","$closestTarget","closestTargetPos","closestTargetYDiff","closestTargetOffset","closestTargetHeight","targetOffset","targetHeight","targetYMidpoint","targetYDiff","$closestTargetLi","closestTargetLevel","$nextTargetLi","nextTargetLevel","hoveringBetweenRows","draggeeX","targetItemMouseDiffX","$parentLis","$closestParentLi","closestParentLiXDiff","closestParentLevel","$parentLi","parentLiX","parentLiXDiff","parentLevel","onMouseUp","$draggeeParent","moved","$closestSiblings","newLevel","setLevel","structureId","prevId","indent","$childLis","StructureTableSorter","tableView","_helperMargin","_$titleHelperCell","_titleHelperCellOuterWidth","_ancestors","_updateAncestorsFrame","_updateAncestorsProxy","_draggeeLevel","_draggeeLevelDelta","draggingLastElements","_loadingDraggeeLevelDelta","_targetLevel","_targetLevelBounds","_positionChanged","singleHelper","helperSpacingY","startDragging","HELPER_MARGIN","findDraggee","$nextRow","nextRowLevel","nextRowLevelDelta","_getAjaxBaseData","delta","drag","padding","BASE_PADDING","canInsertBefore","_getLevelBounds","canInsertAfter","_getAncestors","_setTargetLevelBounds","_updateIndent","onInsertionPointChange","_updateAncestorsBeforeRepaint","levelDiff","_getLevelIndent","$prevRow","prevRowLevel","$spinnerRow","_createSpinnerRowAfter","onPositionChange","_expandElement","onReturnHelpersToDraggees","newDraggeeIndexes","oldDraggeeIndexes","$postDraggeeItems","_minLevel","_maxLevel","forcePositionChange","_mouseDist","realMouseX","mousedownX","_indentationDist","LEVEL_INDENT","_targetLevelMouseDiff","_magnetImpact","MAX_GIVE","_closestLevelMagnetIndent","helpers","targetLevel","_level","_$prevRow","cancelAnimationFrame","_updateAncestors","_$ancestor","_newAncestors","$selectedSortHeader","structureTableSort","_totalVisiblePostStructureTableDraggee","_morePendingPostStructureTableDraggee","initTableHeaders","_collapseElement","selectedSortAttr","$tableHeaders","selectedSortDir","_isStructureTableDraggingLastElements","positionedAfter","includeTableAttributesForSource","_updateTableAttributes","$nextNextRow","descendantOf","$nextRows","_handleSelectedSortHeaderClick","newSortDir","_handleSortHeaderClick","_handleUnselectedSortHeaderClick","TagSelectInput","searchMenu","$addTagInput","_ignoreBlur","selectTag","searchForTags","killSearchMenu","excludeIds","tagGroupId","tags","exclude","exactMatch","Menu","attachToElement","data-site-id","targetSiteId","data-label","data-editable","$titleContainer","config","maxlength","autofocus","getAutofocusValue","autocomplete","getDisabledValue","readonly","step","showCharsLeft","createTextarea","createTextareaField","$select","data-target-prefix","$optgroup","optgroup","optionLabel","optionValue","optionDisabled","selected","createSelectField","data-target","data-reverse-target","reverseToggle","for","createCheckboxField","createCheckboxSelect","allValue","allChecked","showAllOption","allLabel","createCheckboxSelectField","data-value","aria-labelledby","labelId","createLightswitchField","containerId","$colorPreviewContainer","createColorField","getMonth","formattedValue","timezone","defaultDate","createDateField","timepicker","timepickerOptions","getHours","getMinutes","getSeconds","createTimeField","required","warning","addErrorsToField","addErrorsToList","$errors","clearErrorsFromField","_rejectedFiles","_extensionList","_totalFileCounter","_validFileCounter","autoUpload","fileupload","paramObject","getInProgress","onFileAdd","validateExtension","_createExtensionList","process","done","pass","fileExtension","maxFileSize","originalFiles","processErrorMessages","kinds","humanFileSize","maxUploadSize","bytes","u","toFixed","allowedKind","fileKinds","extensions","pasteZone","sequentialUploads","Accept","UriFormatGenerator","uriForm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D,IAAK,CACrE,IAAItU,EAAMv9C,MAAMkvF,UAAUD,GAAaE,WAAWt9B,GAClD7uD,KAAK0qF,eAAehqF,KAAK65C,MAMzCh7B,QAAS,WACLvf,KAAK+M,SAAS+9E,WAAW,WACzB9qF,KAAKukB,SAOb,CACI5S,SAAU,CACNqhC,SAAU,KACVo5C,UAAW,KACXr5C,UAAW,KACXs5C,mBAAmB,EACnBb,YAAaxuF,MAAM6uF,cACnBv4C,aAAc,KACdL,OAAQ,GACRkG,gBAAiB,KACjBp2C,QAAS,CAACupF,OAAW,oCACrB9b,UAAW,mBASvBxzE,MAAMuvF,mBAAqBvvF,MAAMq1B,mBAAmBt1B,OAChD,CACIo2B,oBAAqB,SAASF,GAK1BA,GAHAA,EAAYA,EAAUx1B,QAAQ,aAAc,KAGtBqJ,cAOtBmsB,GADAA,GAHAA,EAAYj2B,MAAMoL,YAAY6qB,IAGRx1B,QAAQ,WAAY,KACpBA,QAAQ,cAAe,IAG7C,IAEI+uF,EAFQxvF,MAAMiJ,YAAYgtB,EAAUruB,MAAM,eAExB/D,KAAK,KAM3B,OAJI2rF,GAAaxsF,KAAK8L,SAAS2gF,SAC3BD,GAAaxsF,KAAK8L,SAAS2gF,QAGxBD,KAhnpBnB,CAonpBGE","file":"Craft.min.js"}
\ No newline at end of file
diff --git a/src/web/assets/cp/src/js/AdminTable.js b/src/web/assets/cp/src/js/AdminTable.js
index 75661d52a0..5e5449020e 100644
--- a/src/web/assets/cp/src/js/AdminTable.js
+++ b/src/web/assets/cp/src/js/AdminTable.js
@@ -133,14 +133,14 @@ Craft.AdminTable = Garnish.Base.extend(
                 $row.remove();
                 this.totalItems--;
                 this.updateUI();
                 this.onDeleteItem(id);
 
-                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: Craft.escapeHtml(name)}));
+                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: name}));
             }
             else {
-                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: Craft.escapeHtml(name)}));
+                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: name}));
             }
         },
 
         onReorderItems: function(ids) {
             this.settings.onReorderItems(ids);
@@ -153,11 +153,11 @@ Craft.AdminTable = Garnish.Base.extend(
         getItemId: function($row) {
             return $row.attr(this.settings.idAttribute);
         },
 
         getItemName: function($row) {
-            return $row.attr(this.settings.nameAttribute);
+            return Craft.escapeHtml($row.attr(this.settings.nameAttribute));
         },
 
         updateUI: function() {
             // Show the "No Whatever Exists" message if there aren't any
             if (this.totalItems === 0) {

Vulnerable code: /*!   - 2019-09-25 */
                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: Craft.escapeHtml(name)}));
                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: Craft.escapeHtml(name)}));
            return $row.attr(this.settings.nameAttribute);
!function($){$.extend(Craft,{navHeight:48,t:function(t,e,i){if(void 0!==Craft.translations[t]&&void 0!==Craft.translations[t][e]&&(e=Craft.translations[t][e]),i)for(var s in i)i.hasOwnProperty(s)&&(e=e.replace("{"+s+"}",i[s]));return e},formatDate:function(t){return"object"!=typeof t&&(t=new Date(t)),$.datepicker.formatDate(Craft.datepickerOptions.dateFormat,t)},formatNumber:function(t,e){return void 0===e&&(e=",.0f"),d3.formatLocale(d3FormatLocaleDefinition).format(e)(t)},escapeHtml:function(t){return $("<div/>").text(t).html()},escapeRegex:function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getText:function(t){return $("<div/>").html(t).text()},encodeUriComponent:function(t){t=encodeURIComponent(t);var e={"!":"%21","*":"%2A","'":"%27","(":"%28",")":"%29"};for(var i in e){var s=new RegExp("\\"+i,"g");t=t.replace(s,e[i])}return t},selectFullValue:function(t){var e=$(t),i=e.val();if(void 0!==e[0].setSelectionRange){var s=2*i.length;e[0].setSelectionRange(0,s)}else e.val(i)},formatInputId:function(t){return this.rtrim(t.replace(/[\[\]\\]+/g,"-"),"-")},getUrl:function(t,e,i){"string"!=typeof t&&(t="");var s="";if($.isPlainObject(e)){var n=[];for(var a in e)if(e.hasOwnProperty(a)){var r=e[a];"#"===a?s=r:null!==r&&""!==r&&n.push(a+"="+r)}e=n}e=Garnish.isArray(e)?e.join("&"):Craft.trim(e,"&?");var o,l=t.indexOf("?");if(-1!==l&&(e=t.substr(l+1)+(e?"&"+e:""),t=t.substr(0,l)),-1!==t.search("://")||"/"===t[0])return t+(e?"?"+e:"");if(t=Craft.trim(t,"/"),i){if(o=i,t){var h=o.match(new RegExp("[&?]"+Craft.escapeRegex(Craft.pathParam)+"=[^&]+"));h&&(o=o.replace(h[0],Craft.rtrim(h[0],"/")+"/"+t),t="")}}else o=Craft.baseUrl;if(-1!==(l=o.indexOf("?"))&&(e=o.substr(l+1)+(e?"&"+e:""),o=o.substr(0,l)),!Craft.omitScriptNameInUrls&&t)if(Craft.usePathInfo)-1===o.search(Craft.scriptName)&&(o=Craft.rtrim(o,"/")+"/"+Craft.scriptName);else{if(e&&e.substr(0,Craft.pathParam.length+1)===Craft.pathParam+"="){var d,c=e.indexOf("&");e=-1!==c?(d=e.substring(2,c),e.substr(c+1)):(d=e.substr(2),null),t=(d=Craft.rtrim(d))+(t?"/"+t:"")}e=Craft.pathParam+"="+t+(e?"&"+e:""),t=null}return t&&(o=Craft.rtrim(o,"/")+"/"+t),e&&(o+="?"+e),s&&(o+="#"+s),o},getCpUrl:function(t,e){return this.getUrl(t,e,Craft.baseCpUrl)},getSiteUrl:function(t,e){return this.getUrl(t,e,Craft.baseSiteUrl)},getActionUrl:function(t,e){return Craft.getUrl(t,e,Craft.actionUrl)},redirectTo:function(t){document.location.href=this.getUrl(t)},getCsrfInput:function(){return Craft.csrfTokenName?'<input type="hidden" name="'+Craft.csrfTokenName+'" value="'+Craft.csrfTokenValue+'"/>':""},postActionRequest:function(t,e,s,i){"function"==typeof e&&(i=s,s=e,e={});var n={"X-Registered-Asset-Bundles":Object.keys(Craft.registeredAssetBundles).join(","),"X-Registered-Js-Files":Object.keys(Craft.registeredJsFiles).join(",")};Craft.csrfTokenValue&&Craft.csrfTokenName&&(n["X-CSRF-Token"]=Craft.csrfTokenValue);var a=$.ajax($.extend({url:Craft.getActionUrl(t),type:"POST",dataType:"json",headers:n,data:e,success:s,error:function(t,e,i){4===t.readyState&&(void 0!==Craft.cp?Craft.cp.displayError():alert(Craft.t("app","An unknown error occurred.")),s&&s(null,e,t))}},i));return i&&"function"==typeof i.send&&i.send(a),a},_waitingOnAjax:!1,_ajaxQueue:[],queueActionRequest:function(t,e,i,s){"function"==typeof e&&(s=i,i=e,e=void 0),Craft._ajaxQueue.push([t,e,i,s]),Craft._waitingOnAjax||Craft._postNextActionRequestInQueue()},_postNextActionRequestInQueue:function(){Craft._waitingOnAjax=!0;var s=Craft._ajaxQueue.shift();Craft.postActionRequest(s[0],s[1],function(t,e,i){s[2]&&"function"==typeof s[2]&&s[2](t,e,i),Craft._ajaxQueue.length?Craft._postNextActionRequestInQueue():Craft._waitingOnAjax=!1},s[3])},stringToArray:function(t){if("string"!=typeof t)return t;for(var e=t.split(","),i=0;i<e.length;i++)e[i]=$.trim(e[i]);return e},expandPostArray:function(t){var e,i={};for(var s in t)if(t.hasOwnProperty(s)){var n,a=t[s],r=s.match(/^(\w+)(\[.*)?/);if(r[2])for(n=r[2].match(/\[[^\[\]]*\]/g),e=0;e<n.length;e++)n[e]=n[e].substring(1,n[e].length-1);else n=[];n.unshift(r[1]);var o=i;for(e=0;e<n.length;e++)e<n.length-1?("object"!=typeof o[n[e]]&&(n[e+1]&&parseInt(n[e+1])!=n[e+1]?o[n[e]]={}:o[n[e]]=[]),o=o[n[e]]):(n[e]||(n[e]=o.length),o[n[e]]=a)}return i},compare:function(t,e,i){if(typeof t!=typeof e)return!1;if("object"!=typeof t)return t===e;if(t.length!==e.length)return!1;if(t instanceof Array!=e instanceof Array)return!1;if(!(t instanceof Array))if(void 0===i||!0===i){if(!Craft.compare(Craft.getObjectKeys(t).sort(),Craft.getObjectKeys(e).sort()))return!1}else if(!Craft.compare(Craft.getObjectKeys(t),Craft.getObjectKeys(e)))return!1;for(var s in t)if(t.hasOwnProperty(s)&&!Craft.compare(t[s],e[s]))return!1;return!0},getObjectKeys:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e},escapeChars:function(t){Garnish.isArray(t)||(t=t.split());for(var e="",i=0;i<t.length;i++)e+="\\"+t[i];return e},ltrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("^["+Craft.escapeChars(e)+"]+");return t.replace(i,"")},rtrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("["+Craft.escapeChars(e)+"]+$");return t.replace(i,"")},trim:function(t,e){return t=Craft.ltrim(t,e),t=Craft.rtrim(t,e)},startsWith:function(t,e){return t.substr(0,e.length)===e},filterArray:function(t,e){for(var i=[],s=0;s<t.length;s++){("function"==typeof e?e(t[s],s):t[s])&&i.push(t[s])}return i},inArray:function(t,e){return-1!==$.inArray(t,e)},removeFromArray:function(t,e){var i=$.inArray(t,e);return-1!==i&&(e.splice(i,1),!0)},getLast:function(t){return t.length?t[t.length-1]:null},uppercaseFirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},lowercaseFirst:function(t){return t.charAt(0).toLowerCase()+t.slice(1)},parseUrl:function(t){var e=t.match(/^(?:(https?):\/\/|\/\/)([^\/\:]*)(?:\:(\d+))?(\/[^\?]*)?(?:\?([^#]*))?(#.*)?/);return e?{scheme:e[1],host:e[2]+(e[3]?":"+e[3]:""),hostname:e[2],port:e[3]||null,path:e[4]||"/",query:e[5]||null,hash:e[6]||null}:{}},isSameHost:function(t){var e=this.parseUrl(document.location.href);if(!e)return!1;var i=this.parseUrl(t);return!!i&&e.host===i.host},secondsToHumanTimeDuration:function(t,e){void 0===e&&(e=!0);var i=Math.floor(t/604800);t%=604800;var s=Math.floor(t/86400);t%=86400;var n,a=Math.floor(t/3600);t%=3600,e?(n=Math.floor(t/60),t%=60):(n=Math.round(t/60),t=0);var r=[];return i&&r.push(i+" "+(1===i?Craft.t("app","week"):Craft.t("app","weeks"))),s&&r.push(s+" "+(1===s?Craft.t("app","day"):Craft.t("app","days"))),a&&r.push(a+" "+(1===a?Craft.t("app","hour"):Craft.t("app","hours"))),!n&&(e||i||s||a)||r.push(n+" "+(1===n?Craft.t("app","minute"):Craft.t("app","minutes"))),!t&&(!e||i||s||a||n)||r.push(t+" "+(1===t?Craft.t("app","second"):Craft.t("app","seconds"))),r.join(", ")},asciiString:function(t,e){for(var i,s="",n=0;n<t.length;n++)i=t.charAt(n),s+=(e||Craft.asciiCharMap)[i]||i;return s},randomString:function(t){for(var e="",i=0;i<t;i++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e},preventOutlineOnMouseFocus:function(t){var e=$(t),i=".preventOutlineOnMouseFocus";e.on("mousedown"+i,function(){e.addClass("no-outline"),e.trigger("focus")}).on("keydown"+i+" blur"+i,function(t){t.keyCode!==Garnish.SHIFT_KEY&&t.keyCode!==Garnish.CTRL_KEY&&t.keyCode!==Garnish.CMD_KEY&&e.removeClass("no-outline")})},createErrorList:function(t){for(var e=$(document.createElement("ul")).addClass("errors"),i=0;i<t.length;i++){var s=$(document.createElement("li"));s.appendTo(e),s.html(t[i])}return e},appendHeadHtml:function(t){if(t){var e=$("link[href]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("href").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<link\\s[^>]*href="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}$("head").append(t)}},appendFootHtml:function(t){if(t){var e=$("script[src]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("src").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<script\\s[^>]*src="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}Garnish.$bod.append(t)}},initUiElements:function(t){$(".grid",t).grid(),$(".info",t).infoicon(),$(".checkbox-select",t).checkboxselect(),$(".fieldtoggle",t).fieldtoggle(),$(".lightswitch",t).lightswitch(),$(".nicetext",t).nicetext(),$(".pill",t).pill(),$(".formsubmit",t).formsubmit(),$(".menubtn",t).menubtn()},_elementIndexClasses:{},_elementSelectorModalClasses:{},_elementEditorClasses:{},registerElementIndexClass:function(t,e){if(void 0!==this._elementIndexClasses[t])throw"An element index class has already been registered for the element type “"+t+"”.";this._elementIndexClasses[t]=e},registerElementSelectorModalClass:function(t,e){if(void 0!==this._elementSelectorModalClasses[t])throw"An element selector modal class has already been registered for the element type “"+t+"”.";this._elementSelectorModalClasses[t]=e},registerElementEditorClass:function(t,e){if(void 0!==this._elementEditorClasses[t])throw"An element editor class has already been registered for the element type “"+t+"”.";this._elementEditorClasses[t]=e},createElementIndex:function(t,e,i){return new(void 0!==this._elementIndexClasses[t]?this._elementIndexClasses[t]:Craft.BaseElementIndex)(t,e,i)},createElementSelectorModal:function(t,e){return new(void 0!==this._elementSelectorModalClasses[t]?this._elementSelectorModalClasses[t]:Craft.BaseElementSelectorModal)(t,e)},createElementEditor:function(t,e,i){return new(void 0!==this._elementEditorClasses[t]?this._elementEditorClasses[t]:Craft.BaseElementEditor)(e,i)},getLocalStorage:function(t,e){return t="Craft-"+Craft.systemUid+"."+t,"undefined"!=typeof localStorage&&void 0!==localStorage[t]?JSON.parse(localStorage[t]):e},setLocalStorage:function(t,e){if("undefined"!=typeof localStorage){t="Craft-"+Craft.systemUid+"."+t;try{localStorage[t]=JSON.stringify(e)}catch(t){}}},getElementInfo:function(t){var e=$(t);return e.hasClass("element")||(e=e.find(".element:first")),{id:e.data("id"),siteId:e.data("site-id"),label:e.data("label"),status:e.data("status"),url:e.data("url"),hasThumb:e.hasClass("hasthumb"),$element:e}},setElementSize:function(t,e){var i=$(t);if("small"!==e&&"large"!==e&&(e="small"),!i.hasClass(e)){var s="small"===e?"large":"small";if(i.addClass(e).removeClass(s),i.hasClass("hasthumb")){var n=i.find("> .elementthumb > img"),a=$("<img/>",{sizes:("small"===e?"30":"100")+"px",srcset:n.attr("srcset")||n.attr("data-pfsrcset")});n.replaceWith(a),picturefill({elements:[a[0]]})}}}}),$.extend($.fn,{animateLeft:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({left:t},e,i,s):this.velocity({right:t},e,i,s)},animateRight:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({right:t},e,i,s):this.velocity({left:t},e,i,s)},disable:function(){return this.each(function(){var t=$(this);t.addClass("disabled"),t.data("activatable")&&t.removeAttr("tabindex")})},enable:function(){return this.each(function(){var t=$(this);t.removeClass("disabled"),t.data("activatable")&&t.attr("tabindex","0")})},grid:function(){return this.each(function(){var t=$(this),e={};t.data("item-selector")&&(e.itemSelector=t.data("item-selector")),t.data("cols")&&(e.cols=parseInt(t.data("cols"))),t.data("max-cols")&&(e.maxCols=parseInt(t.data("max-cols"))),t.data("min-col-width")&&(e.minColWidth=parseInt(t.data("min-col-width"))),t.data("mode")&&(e.mode=t.data("mode")),t.data("fill-mode")&&(e.fillMode=t.data("fill-mode")),t.data("col-class")&&(e.colClass=t.data("col-class")),t.data("snap-to-grid")&&(e.snapToGrid=!!t.data("snap-to-grid")),new Craft.Grid(this,e)})},infoicon:function(){return this.each(function(){new Craft.InfoIcon(this)})},checkboxselect:function(){return this.each(function(){$.data(this,"checkboxselect")||new Garnish.CheckboxSelect(this)})},fieldtoggle:function(){return this.each(function(){$.data(this,"fieldtoggle")||new Craft.FieldToggle(this)})},lightswitch:function(e,t,i){return"settings"===e?("string"==typeof t?(e={})[t]=i:e=t,this.each(function(){var t=$.data(this,"lightswitch");t&&t.setSettings(e)})):($.isPlainObject(e)||(e={}),this.each(function(){var t=$.extend({},e);Garnish.hasAttr(this,"data-value")&&(t.value=$(this).attr("data-value")),$.data(this,"lightswitch")||new Craft.LightSwitch(this,t)}))},nicetext:function(){return this.each(function(){$.data(this,"nicetext")||new Garnish.NiceText(this)})},pill:function(){return this.each(function(){$.data(this,"pill")||new Garnish.Pill(this)})},formsubmit:function(){this.on("click",function(t){var e=$(t.currentTarget);if(!e.attr("data-confirm")||confirm(e.attr("data-confirm"))){var i=e.data("menu")?e.data("menu").$anchor:e,s=i.attr("data-form")?$("#"+i.attr("data-form")):i.closest("form");e.data("action")&&$('<input type="hidden" name="action"/>').val(e.data("action")).appendTo(s),e.data("redirect")&&$('<input type="hidden" name="redirect"/>').val(e.data("redirect")).appendTo(s),e.data("param")&&$('<input type="hidden"/>').attr({name:e.data("param"),value:e.data("value")}).appendTo(s),s.trigger({type:"submit",customTrigger:e})}})},menubtn:function(){return this.each(function(){var t=$(this);if(!t.data("menubtn")&&t.next().hasClass("menu")){var e={};t.data("menu-anchor")&&(e.menuAnchor=t.data("menu-anchor")),new Garnish.MenuBtn(t,e)}})}}),Garnish.$doc.ready(function(){Craft.initUiElements()}),Craft.BaseElementEditor=Garnish.Base.extend({$element:null,elementId:null,siteId:null,$form:null,$fieldsContainer:null,$cancelBtn:null,$saveBtn:null,$spinner:null,$siteSelect:null,$siteSpinner:null,hud:null,init:function(t,e){void 0===e&&$.isPlainObject(t)&&(e=t,t=null),this.$element=$(t),this.setSettings(e,Craft.BaseElementEditor.defaults),this.loadHud()},setElementAttribute:function(t,e){this.settings.attributes||(this.settings.attributes={}),null===e?delete this.settings.attributes[t]:this.settings.attributes[t]=e},getBaseData:function(){var t=$.extend({},this.settings.params);return this.settings.siteId?t.siteId=this.settings.siteId:this.$element&&this.$element.data("site-id")&&(t.siteId=this.$element.data("site-id")),this.settings.elementId?t.elementId=this.settings.elementId:this.$element&&this.$element.data("id")&&(t.elementId=this.$element.data("id")),this.settings.elementType&&(t.elementType=this.settings.elementType),this.settings.attributes&&(t.attributes=this.settings.attributes),this.settings.prevalidate&&(t.prevalidate=1),t},loadHud:function(){this.onBeginLoading();var t=this.getBaseData();t.includeSites=Craft.isMultiSite&&this.settings.showSiteSwitcher,Craft.postActionRequest("elements/get-editor-html",t,$.proxy(this,"showHud"))},showHud:function(t,e){if(this.onEndLoading(),"success"===e){var i=$();if(t.sites){var s=$('<div class="hud-header"/>');if(1===t.sites.length)$("<h5/>",{text:t.sites[0].name}).appendTo(s);else{var n=$('<div class="select"/>').appendTo(s);this.$siteSelect=$("<select/>").appendTo(n),this.$siteSpinner=$('<div class="spinner hidden"/>').appendTo(s);for(var a=0;a<t.sites.length;a++){var r=t.sites[a];$('<option value="'+r.id+'"'+(r.id==t.siteId?' selected="selected"':"")+">"+r.name+"</option>").appendTo(this.$siteSelect)}this.addListener(this.$siteSelect,"change","switchSite")}i=i.add(s)}this.$form=$("<div/>"),this.$fieldsContainer=$('<div class="fields"/>').appendTo(this.$form),this.updateForm(t),this.onCreateForm(this.$form);var o=$('<div class="hud-footer"/>').appendTo(this.$form),l=$('<div class="buttons right"/>').appendTo(o);if(this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(l),this.$saveBtn=$('<input class="btn submit" type="submit" value="'+Craft.t("app","Save")+'"/>').appendTo(l),this.$spinner=$('<div class="spinner hidden"/>').appendTo(l),i=i.add(this.$form),this.hud)this.hud.updateBody(i),this.hud.updateSizeAndPosition();else{var h=this.settings.hudTrigger||this.$element;this.hud=new Garnish.HUD(h,i,{bodyClass:"body elementeditor",closeOtherHUDs:!1,onShow:$.proxy(this,"onShowHud"),onHide:$.proxy(this,"onHideHud"),onSubmit:$.proxy(this,"saveElement")}),this.hud.$hud.data("elementEditor",this),this.hud.on("hide",$.proxy(function(){delete this.hud},this))}i.find(".text:first").trigger("focus"),this.addListener(this.$cancelBtn,"click",function(){this.hud.hide()})}},switchSite:function(){var t=this.$siteSelect.val();t!=this.siteId&&(this.$siteSpinner.removeClass("hidden"),this.reloadForm({siteId:t},$.proxy(function(t){this.$siteSpinner.addClass("hidden"),"success"!==t&&this.$siteSelect.val(this.siteId)},this)))},reloadForm:function(t,i){t=$.extend(this.getBaseData(),t),Craft.postActionRequest("elements/get-editor-html",t,$.proxy(function(t,e){"success"===e&&this.updateForm(t),i&&i(e)},this))},updateForm:function(t){this.siteId=t.siteId,this.$fieldsContainer.html(t.html);for(var e=this.$fieldsContainer.find("> .meta > .field > .heading > .instructions"),i=0;i<e.length;i++)e.eq(i).replaceWith($("<span/>",{class:"info",html:e.eq(i).children().html()})).infoicon();Garnish.requestAnimationFrame($.proxy(function(){Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.initUiElements(this.$fieldsContainer)},this))},saveElement:function(){var t=this.settings.validators;if($.isArray(t))for(var e=0;e<t.length;e++)if($.isFunction(t[e])&&!t[e].call())return!1;this.$spinner.removeClass("hidden");var i=$.param(this.getBaseData())+"&"+this.hud.$body.serialize();Craft.postActionRequest("elements/save-element",i,$.proxy(function(t,e){if(this.$spinner.addClass("hidden"),"success"===e)if(t.success){if(this.$element&&this.siteId==this.$element.data("site-id")){var i=this.$element.find(".title"),s=i.find("a");s.length&&t.cpEditUrl?(s.attr("href",t.cpEditUrl),s.text(t.newTitle)):i.text(t.newTitle)}this.closeHud(),this.onSaveElement(t)}else this.updateForm(t),Garnish.shake(this.hud.$hud)},this))},closeHud:function(){this.hud.hide(),delete this.hud},onShowHud:function(){this.settings.onShowHud(),this.trigger("showHud")},onHideHud:function(){this.settings.onHideHud(),this.trigger("hideHud")},onBeginLoading:function(){this.$element&&this.$element.addClass("loading"),this.settings.onBeginLoading(),this.trigger("beginLoading")},onEndLoading:function(){this.$element&&this.$element.removeClass("loading"),this.settings.onEndLoading(),this.trigger("endLoading")},onSaveElement:function(t){this.settings.onSaveElement(t),this.trigger("saveElement",{response:t}),Craft.cp.runQueue()},onCreateForm:function(t){this.settings.onCreateForm(t)}},{defaults:{hudTrigger:null,showSiteSwitcher:!0,elementId:null,elementType:null,siteId:null,attributes:null,params:null,prevalidate:!1,elementIndex:null,onShowHud:$.noop,onHideHud:$.noop,onBeginLoading:$.noop,onEndLoading:$.noop,onCreateForm:$.noop,onSaveElement:$.noop,validators:[]}}),Craft.BaseElementIndex=Garnish.Base.extend({initialized:!1,elementType:null,instanceState:null,sourceStates:null,sourceStatesStorageKey:null,searchTimeout:null,sourceSelect:null,$container:null,$main:null,$mainSpinner:null,isIndexBusy:!1,$sidebar:null,showingSidebar:null,sourceKey:null,sourceViewModes:null,$source:null,sourcesByKey:null,$visibleSources:null,$customizeSourcesBtn:null,customizeSourcesModal:null,$toolbar:null,$toolbarFlexContainer:null,toolbarOffset:null,$search:null,searching:!1,searchText:null,trashed:!1,drafts:!1,$clearSearchBtn:null,$statusMenuBtn:null,$statusMenuContainer:null,statusMenu:null,status:null,$siteMenuBtn:null,siteMenu:null,siteId:null,$sortMenuBtn:null,sortMenu:null,$sortAttributesList:null,$sortDirectionsList:null,$scoreSortAttribute:null,$structureSortAttribute:null,$elements:null,$viewModeBtnContainer:null,viewModeBtns:null,viewMode:null,view:null,_autoSelectElements:null,$countContainer:null,page:1,$exportBtn:null,actions:null,actionsHeadHtml:null,actionsFootHtml:null,$selectAllContainer:null,$selectAllCheckbox:null,showingActionTriggers:!1,_$detachedToolbarItems:null,_$triggers:null,init:function(t,e,i){if(this.elementType=t,this.$container=e,this.setSettings(i,Craft.BaseElementIndex.defaults),this.instanceState=this.getDefaultInstanceState(),this.sourceStates={},this.settings.storageKey&&$.extend(this.instanceState,Craft.getLocalStorage(this.settings.storageKey),{}),this.sourceStatesStorageKey="BaseElementIndex."+this.elementType+"."+this.settings.context,$.extend(this.sourceStates,Craft.getLocalStorage(this.sourceStatesStorageKey,{})),this.$main=this.$container.find(".main"),this.$toolbar=this.$container.find(".toolbar:first"),this.$toolbarFlexContainer=this.$toolbar.children(".flex"),this.$statusMenuBtn=this.$toolbarFlexContainer.find(".statusmenubtn:first"),this.$statusMenuContainer=this.$statusMenuBtn.parent(),this.$siteMenuBtn=this.$container.find(".sitemenubtn:first"),this.$sortMenuBtn=this.$toolbarFlexContainer.find(".sortmenubtn:first"),this.$search=this.$toolbarFlexContainer.find(".search:first input:first"),this.$clearSearchBtn=this.$toolbarFlexContainer.find(".search:first > .clear"),this.$mainSpinner=this.$toolbarFlexContainer.find(".spinner:first"),this.$sidebar=this.$container.find(".sidebar:first"),this.$customizeSourcesBtn=this.$sidebar.find(".customize-sources"),this.$elements=this.$container.find(".elements:first"),this.$countContainer=this.$container.find("#count-container"),this.$exportBtn=this.$container.find("#export-btn"),this.settings.hideSidebar&&(this.$sidebar.hide(),$(".body, .content",this.$container).removeClass("has-sidebar")),(this.settings.toolbarFixed||null===this.settings.toolbarFixed&&"index"===this.settings.context)&&!Garnish.isMobileBrowser(!0)&&(this.addListener(Garnish.$win,"resize","updateFixedToolbar"),this.addListener(Garnish.$scrollContainer,"scroll","updateFixedToolbar")),this.initSources()){if(this.$customizeSourcesBtn.length&&this.addListener(this.$customizeSourcesBtn,"click","createCustomizeSourcesModal"),this.$statusMenuBtn.length&&(this.statusMenu=this.$statusMenuBtn.menubtn().data("menubtn").menu,this.statusMenu.on("optionselect",$.proxy(this,"_handleStatusChange"))),this.$siteMenuBtn.length){this.siteMenu=this.$siteMenuBtn.menubtn().data("menubtn").menu;var s=this.siteMenu.$options.filter(".sel:first");if(s.length||(s=this.siteMenu.$options.first()),s.length?this._setSite(s.data("site-id")):this.settings.criteria={id:"0"},this.siteMenu.on("optionselect",$.proxy(this,"_handleSiteChange")),this.siteId){var n=Craft.getLocalStorage("BaseElementIndex.siteId");if(n&&n!=this.siteId){var a=this.siteMenu.$options.filter('[data-site-id="'+n+'"]:first');a.length&&a.trigger("click")}}}else this.settings.criteria&&this.settings.criteria.siteId?this._setSite(this.settings.criteria.siteId):this._setSite(Craft.siteId);this.addListener(this.$search,"textchange",$.proxy(function(){!this.searching&&this.$search.val()?this.startSearching():this.searching&&!this.$search.val()&&this.stopSearching(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"updateElementsIfSearchTextChanged"),500)},this)),this.addListener(this.$search,"keypress",$.proxy(function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.updateElementsIfSearchTextChanged())},this)),this.addListener(this.$clearSearchBtn,"click",$.proxy(function(){this.$search.val(""),this.searchTimeout&&clearTimeout(this.searchTimeout),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.stopSearching(),this.updateElementsIfSearchTextChanged()},this)),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.$sortMenuBtn.length&&(this.sortMenu=this.$sortMenuBtn.menubtn().data("menubtn").menu,this.$sortAttributesList=this.sortMenu.$container.children(".sort-attributes"),this.$sortDirectionsList=this.sortMenu.$container.children(".sort-directions"),this.sortMenu.on("optionselect",$.proxy(this,"_handleSortChange"))),this.addListener(this.$exportBtn,"click","_showExportHud"),this.initialized=!0,this.afterInit(),this.selectDefaultSource(),"index"===this.settings.context&&this.setPage(Craft.pageNum),this.updateElements(!0)}},afterInit:function(){this.onAfterInit()},getSourceContainer:function(){return this.$sidebar.find("nav>ul")},get $sources(){if(this.sourceSelect)return this.sourceSelect.$items},initSources:function(){var t=this._getSourcesInList(this.getSourceContainer());return 0!==t.length&&(this.sourceSelect||(this.sourceSelect=new Garnish.Select(this.$sidebar.find("nav"),{multi:!1,allowEmpty:!1,vertical:!0,onSelectionChange:$.proxy(this,"_handleSourceSelectionChange")})),this.sourcesByKey={},this._initSources(t),!0)},selectDefaultSource:function(){var t,e=this.getDefaultSourceKey();e&&(t=this.getSourceByKey(e),-1===this.$visibleSources.index(t)&&(t=null)),e&&t||(t=this.$visibleSources.first()),t.length&&this.selectSource(t)},refreshSources:function(){this.sourceSelect.removeAllItems();var t={context:this.settings.context,elementType:this.elementType};this.setIndexBusy(),Craft.postActionRequest(this.settings.refreshSourcesAction,t,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e?(this.getSourceContainer().replaceWith(t.html),this.initSources(),this.selectDefaultSource()):Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))},updateFixedToolbar:function(t){this.updateFixedToolbar._scrollTop=Garnish.$scrollContainer.scrollTop(),992<Garnish.$win.width()&&17<=this.updateFixedToolbar._scrollTop?((this.updateFixedToolbar._makingFixed=!this.$toolbar.hasClass("fixed"))&&(this.$elements.css("padding-top",this.$toolbar.outerHeight()+21),this.$toolbar.addClass("fixed")),!this.updateFixedToolbar._makingFixed&&"resize"!==t.type||this.$toolbar.css({top:Garnish.$scrollContainer.offset().top,width:this.$main.width()})):this.$toolbar.hasClass("fixed")&&(this.$toolbar.removeClass("fixed"),this.$toolbar.css("width",""),this.$elements.css("padding-top",""),this.$toolbar.css("top","0"))},initSource:function(t){this.sourceSelect.addItems(t),this.initSourceToggle(t),(this.sourcesByKey[t.data("key")]=t).data("hasNestedSources")&&-1!==this.instanceState.expandedSources.indexOf(t.data("key"))&&this._expandSource(t)},initSourceToggle:function(t){this.deinitSourceToggle(t);var e=this._getSourceToggle(t);e.length?(this.addListener(t,"dblclick","_handleSourceDblClick"),this.addListener(e,"click","_handleSourceToggleClick"),t.data("hasNestedSources",!0)):t.data("hasNestedSources",!1)},deinitSource:function(t){this.sourceSelect.removeItems(t),this.deinitSourceToggle(t),delete this.sourcesByKey[t.data("key")]},deinitSourceToggle:function(t){t.data("hasNestedSources")&&(this.removeListener(t,"dblclick"),this.removeListener(this._getSourceToggle(t),"click")),t.removeData("hasNestedSources")},getDefaultInstanceState:function(){return{selectedSource:null,expandedSources:[]}},getDefaultSourceKey:function(){return this.instanceState.selectedSource},getDefaultExpandedSources:function(){return this.instanceState.expandedSources},startSearching:function(){this.$clearSearchBtn.removeClass("hidden"),this.$scoreSortAttribute||(this.$scoreSortAttribute=$('<li><a data-attr="score">'+Craft.t("app","Score")+"</a></li>"),this.sortMenu.addOptions(this.$scoreSortAttribute.children())),this.$scoreSortAttribute.prependTo(this.$sortAttributesList),this.searching=!0,this._updateStructureSortOption(),this.setSortAttribute("score")},stopSearching:function(){this.$clearSearchBtn.addClass("hidden"),this.$scoreSortAttribute.detach(),this.searching=!1,this._updateStructureSortOption()},setInstanceState:function(t,e){"object"==typeof t?$.extend(this.instanceState,t):this.instanceState[t]=e,this.storeInstanceState()},storeInstanceState:function(){this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.instanceState)},getSourceState:function(t,e,i){return void 0===this.sourceStates[t]&&(this.sourceStates[t]={}),void 0===e?this.sourceStates[t]:void 0!==this.sourceStates[t][e]?this.sourceStates[t][e]:void 0!==i?i:null},getSelectedSourceState:function(t,e){return this.getSourceState(this.instanceState.selectedSource,t,e)},setSelecetedSourceState:function(t,e){var i=this.getSelectedSourceState();"object"==typeof t?$.extend(i,t):i[t]=e,this.sourceStates[this.instanceState.selectedSource]=i,Craft.setLocalStorage(this.sourceStatesStorageKey,this.sourceStates)},storeSortAttributeAndDirection:function(){var t=this.getSelectedSortAttribute();"score"!==t&&this.setSelecetedSourceState({order:t,sort:this.getSelectedSortDirection()})},setPage:function(t){t=Math.max(t,1),this.page=t;var e=document.location.href.replace(/\?.*$/,"").replace(new RegExp("/"+Craft.pageTrigger.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\d+$"),"").replace(/\/+$/,"");1!==this.page&&("?"!==Craft.pageTrigger[0]&&(e+="/"),e+=Craft.pageTrigger+this.page),history.replaceState({},"",e)},getViewParams:function(){var t={siteId:this.siteId,search:this.searchText,offset:this.settings.batchSize*(this.page-1),limit:this.settings.batchSize,trashed:this.trashed?1:0,drafts:this.drafts?1:0};Garnish.hasAttr(this.$source,"data-override-status")||(t.status=this.status),$.extend(t,this.settings.criteria);var e={context:this.settings.context,elementType:this.elementType,source:this.instanceState.selectedSource,criteria:t,disabledElementIds:this.settings.disabledElementIds,viewState:$.extend({},this.getSelectedSourceState()),paginated:this._isViewPaginated()?1:0};return e.viewState.order=this.getSelectedSortAttribute(),e.viewState.sort=this.getSelectedSortDirection(),"structure"===this.getSelectedSortAttribute()&&(void 0===this.instanceState.collapsedElementIds&&(this.instanceState.collapsedElementIds=[]),e.collapsedElementIds=this.instanceState.collapsedElementIds),e},updateElements:function(t){if(this.initialized){this.setIndexBusy(),this.view&&(this.view.destroy(),delete this.view),this.$elements.html(""),!0!==t&&(this.$countContainer.html("&nbsp;"),this.setPage(1));var s=this.getViewParams();Craft.postActionRequest(this.settings.updateElementsAction,s,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e){var i=Math.max(Math.ceil(t.count/this.settings.batchSize),1);if(this.page>i)return this.setPage(i),void this.updateElements(!0);this._updateView(s,t)}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}},updateElementsIfSearchTextChanged:function(){this.searchText!==(this.searchText=this.searching?this.$search.val():null)&&this.updateElements()},showActionTriggers:function(){this.showingActionTriggers||(this.$toolbar.css("min-height",this.$toolbar.height()),this._$detachedToolbarItems=this.$toolbarFlexContainer.children().not(this.$selectAllContainer).not(this.$mainSpinner),this._$detachedToolbarItems.detach(),this._$triggers?this._$triggers.insertAfter(this.$selectAllContainer):this._createTriggers(),this.showingActionTriggers=!0)},submitAction:function(t,e){var i=this.view.getSelectedElementIds();if(0!==i.length){for(var s,n=0;n<this.actions.length;n++)if(this.actions[n].type===t){s=this.actions[n];break}if(s&&(!s.confirm||confirm(s.confirm))){var a=this.getViewParams(),r=$.extend(a,e,{elementAction:t,elementIds:i});this.setIndexBusy(),this._autoSelectElements=i,Craft.postActionRequest(this.settings.submitActionsAction,r,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&(t.success?(this._updateView(a,t),t.message&&Craft.cp.displayNotice(t.message),this.afterAction(s,r)):Craft.cp.displayError(t.message))},this))}}},afterAction:function(t,e){Craft.cp.runQueue(),this.onAfterAction(t,e)},hideActionTriggers:function(){this.showingActionTriggers&&(this._$detachedToolbarItems.insertBefore(this.$mainSpinner),this._$triggers.detach(),this.$toolbarFlexContainer.children().not(this.$selectAllContainer).removeClass("hidden"),this.$toolbar.css("min-height",""),this.showingActionTriggers=!1)},updateActionTriggers:function(){if(this.actions){var t=this.view.getSelectedElements().length;0!==t?(t===this.view.getEnabledElements().length?(this.$selectAllCheckbox.removeClass("indeterminate"),this.$selectAllCheckbox.addClass("checked"),this.$selectAllBtn.attr("aria-checked","true")):(this.$selectAllCheckbox.addClass("indeterminate"),this.$selectAllCheckbox.removeClass("checked"),this.$selectAllBtn.attr("aria-checked","mixed")),this.showActionTriggers()):(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false"),this.hideActionTriggers())}},getSelectedElements:function(){return this.view?this.view.getSelectedElements():$()},getSelectedElementIds:function(){return this.view?this.view.getSelectedElementIds():[]},getSortAttributeOption:function(t){return this.$sortAttributesList.find('a[data-attr="'+t+'"]:first')},getSelectedSortAttribute:function(){return this.$sortAttributesList.find("a.sel:first").data("attr")},setSortAttribute:function(t){var e=this.getSortAttributeOption(t);if(e.length){this.$sortAttributesList.find("a.sel").removeClass("sel"),e.addClass("sel");var i=e.text();this.$sortMenuBtn.attr("title",Craft.t("app","Sort by {attribute}",{attribute:i})),this.$sortMenuBtn.text(i),this.setSortDirection("score"===t?"desc":"asc"),"structure"===t?this.$sortDirectionsList.find("a").addClass("disabled"):this.$sortDirectionsList.find("a").removeClass("disabled")}},getSortDirectionOption:function(t){return this.$sortDirectionsList.find("a[data-dir="+t+"]:first")},getSelectedSortDirection:function(){return this.$sortDirectionsList.find("a.sel:first").data("dir")},getSelectedViewMode:function(){return this.getSelectedSourceState("mode")},setSortDirection:function(t){"desc"!==t&&(t="asc"),this.$sortMenuBtn.attr("data-icon",t),this.$sortDirectionsList.find("a.sel").removeClass("sel"),this.getSortDirectionOption(t).addClass("sel")},getSourceByKey:function(t){return void 0===this.sourcesByKey[t]?null:this.sourcesByKey[t]},selectSource:function(t){if(!t||!t.length)return!1;if(this.$source&&this.$source[0]&&this.$source[0]===t[0]&&t.data("key")===this.sourceKey)return!1;if(this.hideActionTriggers(),this.$source=t,this.sourceKey=t.data("key"),this.setInstanceState("selectedSource",this.sourceKey),this.sourceSelect.selectItem(t),Craft.cp.updateSidebarMenuLabel(),this.searching&&(this.searchText=null,this.$search.val(""),this.stopSearching()),Garnish.hasAttr(this.$source,"data-has-structure")?(this.$structureSortAttribute||(this.$structureSortAttribute=$('<li><a data-attr="structure">'+Craft.t("app","Structure")+"</a></li>"),this.sortMenu.addOptions(this.$structureSortAttribute.children())),this.$structureSortAttribute.prependTo(this.$sortAttributesList)):this.$structureSortAttribute&&this.$structureSortAttribute.removeClass("sel").detach(),this.setStoredSortOptionsForSource(),this.$statusMenuBtn.length&&(Garnish.hasAttr(this.$source,"data-override-status")?this.$statusMenuContainer.addClass("hidden"):this.$statusMenuContainer.removeClass("hidden")),this.$viewModeBtnContainer&&this.$viewModeBtnContainer.remove(),this.viewModeBtns={},this.viewMode=null,this.sourceViewModes=this.getViewModesForSource(),1<this.sourceViewModes.length){this.$viewModeBtnContainer=$('<div class="btngroup"/>').insertBefore(this.$mainSpinner);for(var e=0;e<this.sourceViewModes.length;e++){var i=this.sourceViewModes[e],s=$('<div data-view="'+i.mode+'" role="button" class="btn'+(void 0!==i.className?" "+i.className:"")+'" title="'+i.title+'"'+(void 0!==i.icon?' data-icon="'+i.icon+'"':"")+"/>").appendTo(this.$viewModeBtnContainer);this.viewModeBtns[i.mode]=s,this.addListener(s,"click",{mode:i.mode},function(t){this.selectViewMode(t.data.mode),this.updateElements()})}}var n=this.getSelectedViewMode();return n&&this.doesSourceHaveViewMode(n)||(n=this.viewMode&&this.doesSourceHaveViewMode(this.viewMode)?this.viewMode:this.sourceViewModes[0].mode),this.selectViewMode(n),this.onSelectSource(),!0},selectSourceByKey:function(t){var e=this.getSourceByKey(t);return!!e&&this.selectSource(e)},setStoredSortOptionsForSource:function(){var t=this.getSelectedSourceState("order"),e=this.getSelectedSourceState("sort");t&&e||(t=this.getDefaultSort(),Garnish.isArray(t)&&(e=t[1],t=t[0])),"asc"!==e&&"desc"!==e&&(e="asc"),this.setSortAttribute(t),this.setSortDirection(e)},getDefaultSort:function(){return this.$source&&Garnish.hasAttr(this.$source,"data-default-sort")?this.$source.attr("data-default-sort").split(":"):[this.$sortAttributesList.find("a:first").data("attr"),"asc"]},getViewModesForSource:function(){var t=[{mode:"table",title:Craft.t("app","Display in a table"),icon:"list"}];return this.$source&&Garnish.hasAttr(this.$source,"data-has-thumbs")&&t.push({mode:"thumbs",title:Craft.t("app","Display as thumbnails"),icon:"grid"}),t},doesSourceHaveViewMode:function(t){for(var e=0;e<this.sourceViewModes.length;e++)if(this.sourceViewModes[e].mode===t)return!0;return!1},selectViewMode:function(t,e){e||this.doesSourceHaveViewMode(t)||(t=this.sourceViewModes[0].mode),t!==this.viewMode&&(this.viewMode&&void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].removeClass("active"),this.viewMode=t,this.setSelecetedSourceState("mode",this.viewMode),void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].addClass("active"))},createView:function(t,e){return new(this.getViewClass(t))(this,this.$elements,e)},getViewClass:function(t){switch(t){case"table":return Craft.TableElementIndexView;case"thumbs":return Craft.ThumbsElementIndexView;default:throw'View mode "'+t+'" not supported.'}},rememberDisabledElementId:function(t){-1===$.inArray(t,this.settings.disabledElementIds)&&this.settings.disabledElementIds.push(t)},forgetDisabledElementId:function(t){var e=$.inArray(t,this.settings.disabledElementIds);-1!==e&&this.settings.disabledElementIds.splice(e,1)},enableElements:function(t){t.removeClass("disabled").parents(".disabled").removeClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.forgetDisabledElementId(i)}this.onEnableElements(t)},disableElements:function(t){t.removeClass("sel").addClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.rememberDisabledElementId(i)}this.onDisableElements(t)},getElementById:function(t){return this.view.getElementById(t)},enableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.enableElements(s):this.forgetDisabledElementId(i)}},disableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.disableElements(s):this.rememberDisabledElementId(i)}},selectElementAfterUpdate:function(t){null===this._autoSelectElements&&(this._autoSelectElements=[]),this._autoSelectElements.push(t)},addButton:function(t){this.getButtonContainer().append(t)},isShowingSidebar:function(){return null===this.showingSidebar&&(this.showingSidebar=this.$sidebar.length&&!this.$sidebar.hasClass("hidden")),this.showingSidebar},getButtonContainer:function(){if(this.settings.buttonContainer)return $(this.settings.buttonContainer);var t=$("#button-container");return t.length||(t=$('<div id="button-container"/>').appendTo(Craft.cp.$header)),t},setIndexBusy:function(){this.$mainSpinner.removeClass("invisible"),this.isIndexBusy=!0},setIndexAvailable:function(){this.$mainSpinner.addClass("invisible"),this.isIndexBusy=!1},createCustomizeSourcesModal:function(){var t=new Craft.CustomizeSourcesModal(this,{onHide:function(){t.destroy()}});return t},disable:function(){this.sourceSelect&&this.sourceSelect.disable(),this.view&&this.view.disable(),this.base()},enable:function(){this.sourceSelect&&this.sourceSelect.enable(),this.view&&this.view.enable(),this.base()},onAfterInit:function(){this.settings.onAfterInit(),this.trigger("afterInit")},onSelectSource:function(){this.settings.onSelectSource(this.sourceKey),this.trigger("selectSource",{sourceKey:this.sourceKey})},onSelectSite:function(){this.settings.onSelectSite(this.siteId),this.trigger("selectSite",{siteId:this.siteId})},onUpdateElements:function(){this.settings.onUpdateElements(),this.trigger("updateElements")},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},onEnableElements:function(t){this.settings.onEnableElements(t),this.trigger("enableElements",{elements:t})},onDisableElements:function(t){this.settings.onDisableElements(t),this.trigger("disableElements",{elements:t})},onAfterAction:function(t,e){this.settings.onAfterAction(t,e),this.trigger("afterAction",{action:t,params:e})},_handleSourceSelectionChange:function(){this.sourceSelect.totalSelected?this.selectSource(this.sourceSelect.$selectedItems)&&this.updateElements():this.sourceSelect.selectItem(this.$visibleSources.first())},_handleActionTriggerSubmit:function(t){t.preventDefault();var e=$(t.currentTarget);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action"),s=Garnish.getPostData(e);this.submitAction(i,s)}},_handleMenuActionTriggerSubmit:function(t){var e=$(t.option);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action");this.submitAction(i)}},_handleStatusChange:function(t){this.statusMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$statusMenuBtn.html(e.html()),this.trashed=!1,this.drafts=!1,this.status=null,Garnish.hasAttr(e,"data-trashed")?this.trashed=!0:Garnish.hasAttr(e,"data-drafts")?this.drafts=!0:this.status=e.data("status"),this._updateStructureSortOption(),this.updateElements()},_handleSiteChange:function(t){this.siteMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$siteMenuBtn.html(e.html()),this._setSite(e.data("site-id")),this.onSelectSite()},_setSite:function(t){var e,i;this.siteId=t,this.$visibleSources=$();for(var s=!1,n=0;n<this.$sources.length;n++)void 0===(i=this.$sources.eq(n)).data("sites")||-1!==i.data("sites").toString().split(",").indexOf(t.toString())?(i.parent().removeClass("hidden"),this.$visibleSources=this.$visibleSources.add(i),e||(e=i)):(i.parent().addClass("hidden"),this.$source&&this.$source.get(0)==i.get(0)&&(s=!0));s&&this.selectSource(e);var a,r=this.getSourceContainer().children(".heading");for(n=0;n<r.length;n++)0!==(a=r.eq(n)).nextUntil(".heading",":not(.hidden)").length?a.removeClass("hidden"):a.addClass("hidden");this.initialized&&(Craft.setLocalStorage("BaseElementIndex.siteId",t),this.updateElements())},_handleSortChange:function(t){var e=$(t.selectedOption);e.hasClass("disabled")||e.hasClass("sel")||(e.parent().parent().is(this.$sortAttributesList)?this.setSortAttribute(e.data("attr")):this.setSortDirection(e.data("dir")),this.storeSortAttributeAndDirection(),this.updateElements())},_handleSelectionChange:function(){this.updateActionTriggers(),this.onSelectionChange()},_handleSourceDblClick:function(t){this._toggleSource($(t.currentTarget)),t.stopPropagation()},_handleSourceToggleClick:function(t){this._toggleSource($(t.currentTarget).prev("a")),t.stopPropagation()},_updateStructureSortOption:function(){var t=this.getSortAttributeOption("structure");if(t.length)if(this.trashed||this.drafts||this.searching){if(t.addClass("disabled"),"structure"===this.getSelectedSortAttribute()){var e=this.$sortAttributesList.find("a:not(.disabled):first");this.setSortAttribute(e.data("attr")),this.setSortDirection("asc")}}else t.removeClass("disabled"),this.setStoredSortOptionsForSource()},_getSourcesInList:function(t){return t.children("li").children("a")},_getChildSources:function(t){var e=t.siblings("ul");return this._getSourcesInList(e)},_getSourceToggle:function(t){return t.siblings(".toggle")},_initSources:function(t){for(var e=0;e<t.length;e++)this.initSource($(t[e]))},_deinitSources:function(t){for(var e=0;e<t.length;e++)this.deinitSource($(t[e]))},_toggleSource:function(t){t.parent("li").hasClass("expanded")?this._collapseSource(t):this._expandSource(t)},_expandSource:function(t){t.parent("li").addClass("expanded");var e=this._getChildSources(t);this._initSources(e);var i=t.data("key");-1===this.instanceState.expandedSources.indexOf(i)&&(this.instanceState.expandedSources.push(i),this.storeInstanceState())},_collapseSource:function(t){t.parent("li").removeClass("expanded");var e=this._getChildSources(t);this._deinitSources(e);var i=this.instanceState.expandedSources.indexOf(t.data("key"));-1!==i&&(this.instanceState.expandedSources.splice(i,1),this.storeInstanceState())},_isViewPaginated:function(){return"index"===this.settings.context&&"structure"!==this.getSelectedSortAttribute()},_updateView:function(t,e){if(this.actions&&(this.hideActionTriggers(),this.actions=this.actionsHeadHtml=this.actionsFootHtml=this._$triggers=null),this.$selectAllContainer&&this.$selectAllContainer.detach(),this.$countContainer.html(""),!this._isViewPaginated()||e.count<=this.settings.batchSize)this.$countContainer.text(e.countLabel);else{var i=$('<div class="flex pagination"/>').appendTo(this.$countContainer),s=Math.max(Math.ceil(e.count/this.settings.batchSize),1),n=$("<div/>",{class:"page-link"+(1<this.page?"":" disabled"),"data-icon":"leftangle",title:Craft.t("app","Previous Page")}).appendTo(i),a=$("<div/>",{class:"page-link"+(this.page<s?"":" disabled"),"data-icon":"rightangle",title:Craft.t("app","Next Page")}).appendTo(i);$("<div/>",{class:"page-info",text:e.countLabel}).appendTo(i),1<this.page&&this.addListener(n,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page-1),this.updateElements(!0)}),this.page<s&&this.addListener(a,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page+1),this.updateElements(!0)})}e.actions&&e.actions.length&&(this.actions=e.actions,this.actionsHeadHtml=e.actionsHeadHtml,this.actionsFootHtml=e.actionsFootHtml,this.$selectAllContainer?(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false")):(this.$selectAllContainer=$('<div class="selectallcontainer"/>'),this.$selectAllBtn=$('<div class="btn"/>').appendTo(this.$selectAllContainer),this.$selectAllCheckbox=$('<div class="checkbox"/>').appendTo(this.$selectAllBtn),this.$selectAllBtn.attr({role:"checkbox",tabindex:"0","aria-checked":"false"}),this.addListener(this.$selectAllBtn,"click",function(){0===this.view.getSelectedElements().length?this.view.selectAllElements():this.view.deselectAllElements()}),this.addListener(this.$selectAllBtn,"keydown",function(t){t.keyCode===Garnish.SPACE_KEY&&(t.preventDefault(),$(t.currentTarget).trigger("click"))})),this.$selectAllContainer.prependTo(this.$toolbarFlexContainer)),this.$elements.html(e.html),Craft.appendHeadHtml(e.headHtml),Craft.appendFootHtml(e.footHtml);var r=this.actions||this.settings.selectable;if(this.view=this.createView(this.getSelectedViewMode(),{context:this.settings.context,batchSize:"index"!==this.settings.context||"structure"===this.getSelectedSortAttribute()?this.settings.batchSize:null,params:t,selectable:r,multiSelect:this.actions||this.settings.multiSelect,checkboxMode:!!this.actions,onSelectionChange:$.proxy(this,"_handleSelectionChange")}),this._autoSelectElements){if(r)for(var o=0;o<this._autoSelectElements.length;o++)this.view.selectElementById(this._autoSelectElements[o]);this._autoSelectElements=null}this.onUpdateElements()},_createTriggers:function(){var t,e,i=[],s=[],n=[];for(t=0;t<this.actions.length;t++){var a=this.actions[t];if(a.trigger){var r=$('<form id="'+Craft.formatInputId(a.type)+'-actiontrigger"/>').data("action",a.type).append(a.trigger);this.addListener(r,"submit","_handleActionTriggerSubmit"),i.push(r)}else a.destructive?n.push(a):s.push(a)}if(s.length||n.length){var o=$("<form/>");e=$('<div class="btn menubtn" data-icon="settings" title="'+Craft.t("app","Actions")+'"/>').appendTo(o);var l=$('<ul class="menu"/>').appendTo(o),h=this._createMenuTriggerList(s,!1),d=this._createMenuTriggerList(n,!0);h&&h.appendTo(l),h&&d&&$("<hr/>").appendTo(l),d&&d.appendTo(l),i.push(o)}for(this._$triggers=$(),t=0;t<i.length;t++){var c=$("<div/>").append(i[t]);this._$triggers=this._$triggers.add(c)}this._$triggers.insertAfter(this.$selectAllContainer),Craft.appendHeadHtml(this.actionsHeadHtml),Craft.appendFootHtml(this.actionsFootHtml),Craft.initUiElements(this._$triggers),e&&e.data("menubtn").on("optionSelect",$.proxy(this,"_handleMenuActionTriggerSubmit"))},_showExportHud:function(){this.$exportBtn.addClass("active");var t=$("<form/>",{class:"export-form"}),s=Craft.ui.createTextField({label:Craft.t("app","Limit"),placeholder:Craft.t("app","No limit"),type:"number",min:1}).appendTo(t);$("<input/>",{type:"submit",class:"btn submit fullwidth",value:Craft.t("app","Export")}).appendTo(t);var n=$("<div/>",{class:"spinner hidden"}).appendTo(t);new Garnish.HUD(this.$exportBtn,t).on("hide",$.proxy(function(){this.$exportBtn.removeClass("active")},this));var a=!1;this.addListener(t,"submit",function(t){if(t.preventDefault(),!a){a=!0,n.removeClass("hidden");var e=this.getViewParams();delete e.criteria.limit;var i=parseInt(s.find("input").val());i&&!isNaN(i)&&(e.criteria.limit=i),Craft.postActionRequest("element-indexes/create-export-token",e,$.proxy(function(t,e){if(a=!1,n.addClass("hidden"),"success"===e){var i={};i[Craft.tokenParam]=t.token;var s=Craft.getCpUrl("",i);document.location.href=s}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}})},_createMenuTriggerList:function(t,e){if(t&&t.length){for(var i=$("<ul/>"),s=0;s<t.length;s++){var n=t[s].type;$("<li/>").append($("<a/>",{id:Craft.formatInputId(n)+"-actiontrigger",class:e?"error":null,"data-action":n,text:t[s].name})).appendTo(i)}return i}}},{defaults:{context:"index",modal:null,storageKey:null,criteria:null,batchSize:50,disabledElementIds:[],selectable:!1,multiSelect:!1,buttonContainer:null,hideSidebar:!1,refreshSourcesAction:"element-indexes/get-source-tree-html",updateElementsAction:"element-indexes/get-elements",submitActionsAction:"element-indexes/perform-action",toolbarFixed:null,onAfterInit:$.noop,onSelectSource:$.noop,onSelectSite:$.noop,onUpdateElements:$.noop,onSelectionChange:$.noop,onEnableElements:$.noop,onDisableElements:$.noop,onAfterAction:$.noop}}),Craft.BaseElementIndexView=Garnish.Base.extend({$container:null,$loadingMoreSpinner:null,$elementContainer:null,$scroller:null,elementIndex:null,thumbLoader:null,elementSelect:null,loadingMore:!1,_totalVisible:null,_morePending:null,_handleEnableElements:null,_handleDisableElements:null,init:function(t,e,i){this.elementIndex=t,this.$container=$(e),this.setSettings(i,Craft.BaseElementIndexView.defaults),this.$loadingMoreSpinner=$('<div class="centeralign hidden"><div class="spinner loadingmore"></div></div>').insertAfter(this.$container),this.$elementContainer=this.getElementContainer();var s=this.$elementContainer.children();this.setTotalVisible(s.length),this.setMorePending(this.settings.batchSize&&s.length==this.settings.batchSize),this.thumbLoader=new Craft.ElementThumbLoader,this.thumbLoader.load(s),this.settings.selectable&&(this.elementSelect=new Garnish.Select(this.$elementContainer,s.filter(":not(.disabled)"),{multi:this.settings.multiSelect,vertical:this.isVerticalList(),handle:"index"===this.settings.context?".checkbox, .element:first":null,filter:":not(a):not(.toggle)",checkboxMode:this.settings.checkboxMode,onSelectionChange:$.proxy(this,"onSelectionChange")}),this._handleEnableElements=$.proxy(function(t){this.elementSelect.addItems(t.elements)},this),this._handleDisableElements=$.proxy(function(t){this.elementSelect.removeItems(t.elements)},this),this.elementIndex.on("enableElements",this._handleEnableElements),this.elementIndex.on("disableElements",this._handleDisableElements)),"index"===this.settings.context&&(this._handleElementEditing=$.proxy(function(t){var e=$(t.target);if("A"!==e.prop("nodeName")){var i;if(e.hasClass("element"))i=e;else if(!(i=e.closest(".element")).length)return;Garnish.hasAttr(i,"data-editable")&&this.createElementEditor(i)}},this),this.elementIndex.trashed||(this.addListener(this.$elementContainer,"dblclick",this._handleElementEditing),$.isTouchCapable()&&this.addListener(this.$elementContainer,"taphold",this._handleElementEditing))),this.afterInit(),this.settings.batchSize&&("index"===this.settings.context?this.$scroller=Garnish.$scrollContainer:this.$scroller=this.elementIndex.$main,this.$scroller.scrollTop(0),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore())},getElementContainer:function(){throw"Classes that extend Craft.BaseElementIndexView must supply a getElementContainer() method."},afterInit:function(){},getAllElements:function(){return this.$elementContainer.children()},getEnabledElements:function(){return this.$elementContainer.children(":not(.disabled)")},getElementById:function(t){var e=this.$elementContainer.children('[data-id="'+t+'"]:first');return e.length?e:null},getSelectedElements:function(){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.$selectedItems},getSelectedElementIds:function(){var t=this.getSelectedElements(),e=[];if(t)for(var i=0;i<t.length;i++)e.push(t.eq(i).data("id"));return e},selectElement:function(t){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.selectItem(t,!0),!0},selectElementById:function(t){if(!this.elementSelect)throw"This view is not selectable.";var e=this.getElementById(t);return!!e&&(this.elementSelect.selectItem(e,!0),!0)},selectAllElements:function(){this.elementSelect.selectAll()},deselectAllElements:function(){this.elementSelect.deselectAll()},isVerticalList:function(){return!1},getTotalVisible:function(){return this._totalVisible},setTotalVisible:function(t){this._totalVisible=t},getMorePending:function(){return this._morePending},setMorePending:function(t){this._morePending=t},maybeLoadMore:function(){this.canLoadMore()&&this.loadMore()},canLoadMore:function(){if(!this.getMorePending()||!this.settings.batchSize)return!1;if(this.$scroller[0]!==Garnish.$win[0])return this.$scroller.prop("scrollHeight")-this.$scroller.scrollTop()<=this.$scroller.outerHeight()+15;var t=Garnish.$win.innerHeight(),e=Garnish.$win.scrollTop();return this.$container.offset().top+this.$container.height()<=t+e},loadMore:function(){if(this.getMorePending()&&!this.loadingMore&&this.settings.batchSize){this.loadingMore=!0,this.$loadingMoreSpinner.removeClass("hidden"),this.removeListener(this.$scroller,"scroll");var t=this.getLoadMoreParams();Craft.postActionRequest(this.settings.loadMoreElementsAction,t,$.proxy(function(t,e){if(this.loadingMore=!1,this.$loadingMoreSpinner.addClass("hidden"),"success"===e){var i=$(t.html);this.appendElements(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),this.elementSelect&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.setTotalVisible(this.getTotalVisible()+i.length),this.setMorePending(i.length==this.settings.batchSize),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore()}},this))}},getLoadMoreParams:function(){var t=$.extend(!0,{},this.settings.params);return t.criteria.offset=this.getTotalVisible(),t},appendElements:function(t){t.appendTo(this.$elementContainer),this.thumbLoader.load(t),this.onAppendElements(t)},onAppendElements:function(t){this.settings.onAppendElements(t),this.trigger("appendElements",{newElements:t})},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},createElementEditor:function(t){Craft.createElementEditor(t.data("type"),t,{elementIndex:this.elementIndex})},disable:function(){this.elementSelect&&this.elementSelect.disable()},enable:function(){this.elementSelect&&this.elementSelect.enable()},destroy:function(){this.$loadingMoreSpinner.remove(),this.thumbLoader.destroy(),delete this.thumbLoader,this.elementSelect&&(this.elementIndex.off("enableElements",this._handleEnableElements),this.elementIndex.off("disableElements",this._handleDisableElements),this.elementSelect.destroy(),delete this.elementSelect),this.base()}},{defaults:{context:"index",batchSize:null,params:null,selectable:!1,multiSelect:!1,checkboxMode:!1,loadMoreElementsAction:"element-indexes/get-more-elements",onAppendElements:$.noop,onSelectionChange:$.noop}}),Craft.BaseElementSelectInput=Garnish.Base.extend({thumbLoader:null,elementSelect:null,elementSort:null,modal:null,elementEditor:null,$container:null,$elementsContainer:null,$elements:null,$addElementBtn:null,_initialized:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","elementType","sources","criteria","sourceElementId","limit","modalStorageKey","fieldId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.setSettings(t,Craft.BaseElementSelectInput.defaults),this.settings.modalStorageKey&&(this.modalStorageKey="BaseElementSelectInput."+this.settings.modalStorageKey),1==this.settings.limit&&(this.settings.sortable=!1),this.$container=this.getContainer(),this.$container.data("elementSelect",this),this.$elementsContainer=this.getElementsContainer(),this.$addElementBtn=this.getAddElementsBtn(),this.$addElementBtn&&1==this.settings.limit&&this.$addElementBtn.css("position","absolute").css("top",0).css(Craft.left,0),this.thumbLoader=new Craft.ElementThumbLoader,this.initElementSelect(),this.initElementSort(),this.resetElements(),this.$addElementBtn&&this.addListener(this.$addElementBtn,"activate","showModal"),this._initialized=!0},get totalSelected(){return this.$elements.length},getContainer:function(){return $("#"+this.settings.id)},getElementsContainer:function(){return this.$container.children(".elements")},getElements:function(){return this.$elementsContainer.children()},getAddElementsBtn:function(){return this.$container.children(".btn.add")},initElementSelect:function(){this.settings.selectable&&(this.elementSelect=new Garnish.Select({multi:this.settings.sortable,filter:":not(.delete)"}))},initElementSort:function(){this.settings.sortable&&(this.elementSort=new Garnish.DragSort({container:this.$elementsContainer,filter:this.settings.selectable?$.proxy(function(){return this.elementSort.$targetItem.hasClass("sel")?this.elementSelect.getSelectedItems():this.elementSort.$targetItem},this):null,ignoreHandleSelector:".delete",axis:this.getElementSortAxis(),collapseDraggees:!0,magnetStrength:4,helperLagBase:1.5,onSortChange:this.settings.selectable?$.proxy(function(){this.elementSelect.resetItemOrder()},this):null}))},getElementSortAxis:function(){return"list"===this.settings.viewMode?"y":null},canAddMoreElements:function(){return!this.settings.limit||this.$elements.length<this.settings.limit},updateAddElementsBtn:function(){this.canAddMoreElements()?this.enableAddElementsBtn():this.disableAddElementsBtn()},disableAddElementsBtn:function(){this.$addElementBtn&&!this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.addClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeOut",Craft.BaseElementSelectInput.ADD_FX_DURATION):this.$addElementBtn.hide()))},enableAddElementsBtn:function(){this.$addElementBtn&&this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.removeClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeIn",Craft.BaseElementSelectInput.REMOVE_FX_DURATION):this.$addElementBtn.show()))},resetElements:function(){null!==this.$elements?this.removeElements(this.$elements):this.$elements=$(),this.addElements(this.getElements())},addElements:function(t){this.thumbLoader.load(t),this.settings.selectable&&this.elementSelect.addItems(t),this.settings.sortable&&this.elementSort.addItems(t),this.settings.editable&&(this._handleShowElementEditor=$.proxy(function(t){var e=$(t.currentTarget);!Garnish.hasAttr(e,"data-editable")||e.hasClass("disabled")||e.hasClass("loading")||(this.elementEditor=this.createElementEditor(e))},this),this.addListener(t,"dblclick",this._handleShowElementEditor),$.isTouchCapable()&&this.addListener(t,"taphold",this._handleShowElementEditor)),t.find(".delete").on("click",$.proxy(function(t){this.removeElement($(t.currentTarget).closest(".element"))},this)),this.$elements=this.$elements.add(t),this.updateAddElementsBtn()},createElementEditor:function(t,e){return e||(e={}),e.prevalidate=this.settings.prevalidate,Craft.createElementEditor(this.settings.elementType,t,e)},removeElements:function(t){if(this.settings.selectable&&this.elementSelect.removeItems(t),this.modal){for(var e=[],i=0;i<t.length;i++){var s=t.eq(i).data("id");s&&e.push(s)}e.length&&this.modal.elementIndex.enableElementsById(e)}t.children("input").prop("disabled",!0),this.$elements=this.$elements.not(t),this.updateAddElementsBtn(),this.onRemoveElements()},removeElement:function(t){this.removeElements(t),this.animateElementAway(t,function(){t.remove()})},animateElementAway:function(t,e){t.css("z-index",0);var i={opacity:-1};i["margin-"+Craft.left]=-(t.outerWidth()+parseInt(t.css("margin-"+Craft.right))),"list"!==this.settings.viewMode&&0!==this.$elements.length||(i["margin-bottom"]=-(t.outerHeight()+parseInt(t.css("margin-bottom")))),t.velocity(i,Craft.BaseElementSelectInput.REMOVE_FX_DURATION,e)},showModal:function(){this.canAddMoreElements()&&(this.modal?this.modal.show():this.modal=this.createModal())},createModal:function(){return Craft.createElementSelectorModal(this.settings.elementType,this.getModalSettings())},getModalSettings:function(){return $.extend({closeOtherModals:!1,storageKey:this.modalStorageKey,sources:this.settings.sources,criteria:this.settings.criteria,multiSelect:1!=this.settings.limit,showSiteMenu:this.settings.showSiteMenu,disabledElementIds:this.getDisabledElementIds(),onSelect:$.proxy(this,"onModalSelect")},this.settings.modalSettings)},getSelectedElementIds:function(){for(var t=[],e=0;e<this.$elements.length;e++)t.push(this.$elements.eq(e).data("id"));return t},getDisabledElementIds:function(){var t=this.getSelectedElementIds();return this.settings.sourceElementId&&t.push(this.settings.sourceElementId),t},onModalSelect:function(t){if(this.settings.limit){var e=this.settings.limit-this.$elements.length;t.length>e&&(t=t.slice(0,e))}this.selectElements(t),this.updateDisabledElementsInModal()},selectElements:function(t){for(var e=0;e<t.length;e++){var i=t[e],s=this.createNewElement(i);this.appendElement(s),this.addElements(s),this.animateElementIntoPlace(i.$element,s)}this.onSelectElements(t)},createNewElement:function(t){var e=t.$element.clone();return Craft.setElementSize(e,"large"===this.settings.viewMode?"large":"small"),e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e},appendElement:function(t){t.appendTo(this.$elementsContainer)},animateElementIntoPlace:function(t,e){var i=t.offset(),s=e.offset(),n=e.clone().appendTo(Garnish.$bod);e.css("visibility","hidden"),n.css({position:"absolute",zIndex:1e4,top:i.top,left:i.left});var a={top:s.top,left:s.left};n.velocity(a,Craft.BaseElementSelectInput.ADD_FX_DURATION,function(){n.remove(),e.css("visibility","visible")})},updateDisabledElementsInModal:function(){this.modal.elementIndex&&this.modal.elementIndex.disableElementsById(this.getDisabledElementIds())},getElementById:function(t){for(var e=0;e<this.$elements.length;e++){var i=this.$elements.eq(e);if(i.data("id")==t)return i}},onSelectElements:function(t){this.trigger("selectElements",{elements:t}),this.settings.onSelectElements(t),window.draftEditor&&window.draftEditor.checkForm()},onRemoveElements:function(){this.trigger("removeElements"),this.settings.onRemoveElements()}},{ADD_FX_DURATION:200,REMOVE_FX_DURATION:200,defaults:{id:null,name:null,fieldId:null,elementType:null,sources:null,criteria:{},sourceElementId:null,viewMode:"list",limit:null,showSiteMenu:!1,modalStorageKey:null,modalSettings:{},onSelectElements:$.noop,onRemoveElements:$.noop,sortable:!0,selectable:!0,editable:!0,prevalidate:!1,editorSettings:{}}}),Craft.BaseElementSelectorModal=Garnish.Modal.extend({elementType:null,elementIndex:null,$body:null,$selectBtn:null,$sidebar:null,$sources:null,$sourceToggles:null,$main:null,$search:null,$elements:null,$tbody:null,$primaryButtons:null,$secondaryButtons:null,$cancelBtn:null,$footerSpinner:null,init:function(t,e){this.elementType=t,this.setSettings(e,Craft.BaseElementSelectorModal.defaults);var i=$('<div class="modal elementselectormodal"></div>').appendTo(Garnish.$bod),s=$('<div class="body"><div class="spinner big"></div></div>').appendTo(i),n=$('<div class="footer"/>').appendTo(i);this.base(i,this.settings),this.$footerSpinner=$('<div class="spinner hidden"/>').appendTo(n),this.$primaryButtons=$('<div class="buttons right"/>').appendTo(n),this.$secondaryButtons=$('<div class="buttons left secondary-buttons"/>').appendTo(n),this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$primaryButtons),this.$selectBtn=$('<div class="btn disabled submit">'+Craft.t("app","Select")+"</div>").appendTo(this.$primaryButtons),this.$body=s,this.addListener(this.$cancelBtn,"activate","cancel"),this.addListener(this.$selectBtn,"activate","selectElements")},onFadeIn:function(){this.elementIndex?Garnish.isMobileBrowser(!0)||this.elementIndex.$search.trigger("focus"):this._createElementIndex(),this.base()},onSelectionChange:function(){this.updateSelectBtnState()},updateSelectBtnState:function(){this.$selectBtn&&(this.elementIndex.getSelectedElements().length?this.enableSelectBtn():this.disableSelectBtn())},enableSelectBtn:function(){this.$selectBtn.removeClass("disabled")},disableSelectBtn:function(){this.$selectBtn.addClass("disabled")},enableCancelBtn:function(){this.$cancelBtn.removeClass("disabled")},disableCancelBtn:function(){this.$cancelBtn.addClass("disabled")},showFooterSpinner:function(){this.$footerSpinner.removeClass("hidden")},hideFooterSpinner:function(){this.$footerSpinner.addClass("hidden")},cancel:function(){this.$cancelBtn.hasClass("disabled")||this.hide()},selectElements:function(){if(this.elementIndex&&this.elementIndex.getSelectedElements().length){this.elementIndex.view.elementSelect.clearMouseUpTimeout();var t=this.elementIndex.getSelectedElements(),e=this.getElementInfo(t);this.onSelect(e),this.settings.disableElementsOnSelect&&this.elementIndex.disableElements(this.elementIndex.getSelectedElements()),this.settings.hideOnSelect&&this.hide()}},getElementInfo:function(t){for(var e=[],i=0;i<t.length;i++){var s=$(t[i]),n=Craft.getElementInfo(s);e.push(n)}return e},show:function(){this.updateSelectBtnState(),this.base()},onSelect:function(t){this.settings.onSelect(t)},disable:function(){this.elementIndex&&this.elementIndex.disable(),this.base()},enable:function(){this.elementIndex&&this.elementIndex.enable(),this.base()},_createElementIndex:function(){var t={context:"modal",elementType:this.elementType,sources:this.settings.sources};null!==this.settings.showSiteMenu&&"auto"!==this.settings.showSiteMenu&&(t.showSiteMenu=this.settings.showSiteMenu?"1":"0"),Craft.postActionRequest("elements/get-modal-body",t,$.proxy(function(t,e){"success"===e&&(this.$body.html(t.html),this.$body.has(".sidebar:not(.hidden)").length&&this.$body.addClass("has-sidebar"),this.elementIndex=Craft.createElementIndex(this.elementType,this.$body,{context:"modal",modal:this,storageKey:this.settings.storageKey,criteria:this.settings.criteria,disabledElementIds:this.settings.disabledElementIds,selectable:!0,multiSelect:this.settings.multiSelect,buttonContainer:this.$secondaryButtons,onSelectionChange:$.proxy(this,"onSelectionChange"),hideSidebar:this.settings.hideSidebar}),this.addListener(this.elementIndex.$elements,"doubletap",function(t,e){e.firstTap.target===e.secondTap.target&&this.selectElements()}))},this))}},{defaults:{resizable:!0,storageKey:null,sources:null,criteria:null,multiSelect:!1,showSiteMenu:null,disabledElementIds:[],disableElementsOnSelect:!1,hideOnSelect:!0,onCancel:$.noop,onSelect:$.noop,hideIndexSidebar:!1}}),Craft.BaseInputGenerator=Garnish.Base.extend({$source:null,$target:null,$form:null,settings:null,listening:null,timeout:null,init:function(t,e,i){this.$source=$(t),this.$target=$(e),this.$form=this.$source.closest("form"),this.setSettings(i),this.startListening()},setNewSource:function(t){var e=this.listening;this.stopListening(),this.$source=$(t),e&&this.startListening()},startListening:function(){this.listening||(this.listening=!0,this.addListener(this.$source,"textchange","onSourceTextChange"),this.addListener(this.$target,"textchange","onTargetTextChange"),this.addListener(this.$form,"submit","onFormSubmit"))},stopListening:function(){this.listening&&(this.listening=!1,this.timeout&&clearTimeout(this.timeout),this.removeAllListeners(this.$source),this.removeAllListeners(this.$target),this.removeAllListeners(this.$form))},onSourceTextChange:function(){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout($.proxy(this,"updateTarget"),250)},onTargetTextChange:function(){this.$target.get(0)===document.activeElement&&this.stopListening()},onFormSubmit:function(){this.timeout&&clearTimeout(this.timeout),this.updateTarget()},updateTarget:function(){var t=this.$source.val();if(void 0!==t){var e=this.generateTargetValue(t);this.$target.val(e),this.$target.trigger("change"),this.$target.is(":focus")&&Craft.selectFullValue(this.$target)}},generateTargetValue:function(t){return t}}),Craft.AdminTable=Garnish.Base.extend({settings:null,totalItems:null,sorter:null,$noItems:null,$table:null,$tbody:null,$deleteBtns:null,init:function(t){this.setSettings(t,Craft.AdminTable.defaults),this.settings.allowDeleteAll||(this.settings.minItems=1),this.$noItems=$(this.settings.noItemsSelector),this.$table=$(this.settings.tableSelector),this.$tbody=this.$table.children("tbody"),this.totalItems=this.$tbody.children().length,this.settings.sortable&&(this.sorter=new Craft.DataTableSorter(this.$table,{onSortChange:$.proxy(this,"reorderItems")})),this.$deleteBtns=this.$table.find(".delete:not(.disabled)"),this.addListener(this.$deleteBtns,"click","handleDeleteBtnClick"),this.updateUI()},addRow:function(t){if(!(this.settings.maxItems&&this.totalItems>=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){if(this.settings.sortable){for(var i=[],t=0;t<this.sorter.$items.length;t++){var e=$(this.sorter.$items[t]).attr(this.settings.idAttribute);i.push(e)}var s={ids:JSON.stringify(i)};Craft.postActionRequest(this.settings.reorderAction,s,$.proxy(function(t,e){"success"===e&&(t.success?(this.onReorderItems(i),Craft.cp.displayNotice(Craft.t("app",this.settings.reorderSuccessMessage))):Craft.cp.displayError(Craft.t("app",this.settings.reorderFailMessage)))},this))}},handleDeleteBtnClick:function(t){if(!(this.settings.minItems&&this.totalItems<=this.settings.minItems)){var e=$(t.target).closest("tr");this.confirmDeleteItem(e)&&this.deleteItem(e)}},confirmDeleteItem:function(t){var e=this.getItemName(t);return confirm(Craft.t("app",this.settings.confirmDeleteMessage,{name:e}))},deleteItem:function(i){var t={id:this.getItemId(i)};Craft.postActionRequest(this.settings.deleteAction,t,$.proxy(function(t,e){"success"===e&&this.handleDeleteItemResponse(t,i)},this))},handleDeleteItemResponse:function(t,e){var i=this.getItemId(e),s=this.getItemName(e);t.success?(this.sorter&&this.sorter.removeItems(e),e.remove(),this.totalItems--,this.updateUI(),this.onDeleteItem(i),Craft.cp.displayNotice(Craft.t("app",this.settings.deleteSuccessMessage,{name:Craft.escapeHtml(s)}))):Craft.cp.displayError(Craft.t("app",this.settings.deleteFailMessage,{name:Craft.escapeHtml(s)}))},onReorderItems:function(t){this.settings.onReorderItems(t)},onDeleteItem:function(t){this.settings.onDeleteItem(t)},getItemId:function(t){return t.attr(this.settings.idAttribute)},getItemName:function(t){return t.attr(this.settings.nameAttribute)},updateUI:function(){if(0===this.totalItems?(this.$table.hide(),this.$noItems.removeClass("hidden")):(this.$table.show(),this.$noItems.addClass("hidden")),this.settings.sortable){var t=this.$table.find(".move");1===this.totalItems?t.addClass("disabled"):t.removeClass("disabled")}this.settings.minItems&&this.totalItems<=this.settings.minItems?this.$deleteBtns.addClass("disabled"):this.$deleteBtns.removeClass("disabled"),this.settings.newItemBtnSelector&&(this.settings.maxItems&&this.totalItems>=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}}),Craft.AssetEditor=Craft.BaseElementEditor.extend({reloadIndex:!1,updateForm:function(t){if(this.base(t),this.$element.data("id")){var e=this.$fieldsContainer.find("> .meta > .image-preview-container.editable");e.length&&this.addListener(e,"click","showImageEditor")}},showImageEditor:function(){new Craft.AssetImageEditor(this.$element.data("id"),{onSave:function(){this.reloadIndex=!0,this.reloadForm()}.bind(this),allowDegreeFractions:Craft.isImagick})},onHideHud:function(){this.reloadIndex&&this.settings.elementIndex&&this.settings.elementIndex.updateElements(),this.base()}}),Craft.registerElementEditorClass("craft\\elements\\Asset",Craft.AssetEditor),Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinnerCanvas:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,croppingConstraint:!1,spinnerInterval:null,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,renderImage:null,renderCropper:null,init:function(t,e){this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('<form class="modal fitted imageeditor"></form>').appendTo(Garnish.$bod),this.$body=$('<div class="body"></div>').appendTo(this.$container),this.$footer=$('<div class="footer"/>').appendTo(this.$container),this.base(this.$container,this.settings),this.$buttons=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn cancel">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$buttons),this.$replaceBtn=$('<div class="btn submit save replace">'+Craft.t("app","Save")+"</div>").appendTo(this.$buttons),this.settings.allowSavingAsNew&&(this.$saveBtn=$('<div class="btn submit save copy">'+Craft.t("app","Save as a new asset")+"</div>").appendTo(this.$buttons),this.addListener(this.$saveBtn,"activate",this.saveImage.bind(this))),this.addListener(this.$replaceBtn,"activate",this.saveImage.bind(this)),this.addListener(this.$cancelBtn,"activate",$.proxy(this,"hide")),this.removeListener(this.$shade,"click"),this.maxImageSize=this.getMaxImageSize(),Craft.postActionRequest("assets/image-editor",{assetId:t},$.proxy(this,"loadEditor"))},getMaxImageSize:function(){var t=Garnish.$doc.get(0).documentElement.clientWidth,e=Garnish.$doc.get(0).documentElement.clientHeight;return Math.max(e,t)*(1<window.devicePixelRatio?2:1)},loadEditor:function(r){r.html||alert(Craft.t("app","Could not load the image editor.")),this.$body.html(r.html),this.$tabs=$(".tabs li",this.$body),this.$viewsContainer=$(".views",this.$body),this.$views=$("> div",this.$viewsContainer),this.$imageTools=$(".image-container .image-tools",this.$body),this.$editorContainer=$(".image-container .image",this.$body),this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this._showSpinner(),this.updateSizeAndPosition(),this.canvas=new fabric.StaticCanvas("image-canvas"),this.$croppingCanvas=$("#cropping-canvas",this.$editorContainer),this.$croppingCanvas.width(this.editorWidth),this.$croppingCanvas.height(this.editorHeight),this.canvas.enableRetinaScaling=!0,this.renderImage=function(){Garnish.requestAnimationFrame(this.canvas.renderAll.bind(this.canvas))}.bind(this);var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});fabric.Image.fromURL(t,$.proxy(function(t){this.image=t,this.image.set({originX:"center",originY:"center",left:this.editorWidth/2,top:this.editorHeight/2}),this.canvas.add(this.image),this.originalHeight=this.image.getHeight(),this.originalWidth=this.image.getWidth(),this.zoomRatio=1,this.lastLoadedDimensions=this.getScaledImageDimensions(),this._setFittedImageVerticeCoordinates(),this._repositionEditorElements();var e={imageDimensions:this.getScaledImageDimensions(),offsetX:0,offsetY:0},i=!1;if(r.focalPoint){var s=r.focalPoint,n=e.imageDimensions.width*s.x,a=e.imageDimensions.height*s.y;e.offsetX=n-e.imageDimensions.width/2,e.offsetY=a-e.imageDimensions.height/2,i=!0}this.storeFocalPointState(e),i&&this._createFocalPoint(),this._createViewport(),this.storeCropperState(),this._addControlListeners(),this.addListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.addListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.addListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.addListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this._hideSpinner(),this.renderImage(),this.$tabs.first().trigger("click")},this))},_reloadImage:function(){if(!this.imageIsLoading){this.imageIsLoading=!0,this.maxImageSize=this.getMaxImageSize();var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});this.image.setSrc(t,function(t){this.originalHeight=t.getHeight(),this.originalWidth=t.getWidth(),this.lastLoadedDimensions={width:this.originalHeight,height:this.originalWidth},this.updateSizeAndPosition(),this.renderImage(),this.imageIsLoading=!1}.bind(this))}},updateSizeAndPosition:function(){if(this.$container){var t=window.innerWidth,e=window.innerHeight;this.$container.css({width:t,"min-width":t,left:0,height:e,"min-height":e,top:0}),this.$body.css({height:e-58}),t<e?this.$container.addClass("vertical"):this.$container.removeClass("vertical"),this.$spinnerCanvas&&this.$spinnerCanvas.css({left:this.$spinnerCanvas.parent().width()/2-this.$spinnerCanvas.width()/2+"px",top:this.$spinnerCanvas.parent().height()/2-this.$spinnerCanvas.height()/2+"px"}),this.$editorContainer&&this.image&&this._repositionEditorElements()}},_repositionEditorElements:function(){var t={width:this.editorWidth,height:this.editorHeight};this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this.canvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var e=this.getScaledImageDimensions();if("crop"===this.currentView){this.zoomRatio=this.getZoomToFitRatio(this.getScaledImageDimensions());var i=this._getBoundingRectangle(this.imageVerticeCoords);this._setFittedImageVerticeCoordinates(),this._repositionCropper(i)}else this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor;this._repositionImage(t),this._repositionViewport(),this._repositionFocalPoint(t),this._zoomImage(),this.renderImage(),(1.5<e.width/this.lastLoadedDimensions.width||1.5<e.height/this.lastLoadedDimensions.height)&&this._reloadImage()},_repositionImage:function(t){this.image.set({left:this.image.left-(t.width-this.editorWidth)/2,top:this.image.top-(t.height-this.editorHeight)/2})},_createViewport:function(){this.viewport=new fabric.Rect({width:this.image.width,height:this.image.height,fill:"rgba(127,0,0,1)",originX:"center",originY:"center",globalCompositeOperation:"destination-in",left:this.image.left,top:this.image.top}),this.canvas.add(this.viewport),this.renderImage()},_createFocalPoint:function(){var t=this.focalPointState,e=this.getScaledImageDimensions().width/t.imageDimensions.width,i=t.offsetX*e*this.zoomRatio*this.scaleFactor,s=t.offsetY*e*this.zoomRatio*this.scaleFactor;i+=this.image.left,s+=this.image.top;var n=0,a=0;this.viewport&&0===t.offsetX&&0===t.offsetY&&(a="crop"!==this.currentView?(n=this.viewport.left-this.image.left,this.viewport.top-this.image.top):(n=this.clipper.left-this.image.left,this.clipper.top-this.image.top),i+=n,s+=a,t.offsetX+=n/(e*this.zoomRatio*this.scaleFactor),t.offsetY+=a/(e*this.zoomRatio*this.scaleFactor)),this.focalPoint=new fabric.Group([new fabric.Circle({radius:8,fill:"rgba(0,0,0,0.5)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"}),new fabric.Circle({radius:1,fill:"rgba(255,255,255,0)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"})],{originX:"center",originY:"center",left:i,top:s}),this.storeFocalPointState(t),this.canvas.add(this.focalPoint)},toggleFocalPoint:function(){this.focalPoint?(this.canvas.remove(this.focalPoint),this.focalPoint=null):this._createFocalPoint(),this.renderImage()},_repositionViewport:function(){if(this.viewport){var t={left:this.editorWidth/2,top:this.editorHeight/2};if("crop"===this.currentView)t.width=this.editorWidth,t.height=this.editorHeight;else if(this.cropperState){var e=this.cropperState,i=this.getScaledImageDimensions().width/e.imageDimensions.width;t.width=e.width*i*this.zoomRatio,t.height=e.height*i*this.zoomRatio,this.image.set({left:this.editorWidth/2-e.offsetX*i,top:this.editorHeight/2-e.offsetY*i})}else $.extend(t,this.getScaledImageDimensions());this.viewport.set(t)}},_repositionFocalPoint:function(t){if(this.focalPoint){var e=this.focalPoint.left-this.editorWidth/2,i=this.focalPoint.top-this.editorHeight/2,s=this.image.width,n=this.getScaledImageDimensions().width*this.zoomRatio/s/this.scaleFactor;e-=(t.width-this.editorWidth)/2,i-=(t.height-this.editorHeight)/2,e*=n,i*=n,this.focalPoint.set({left:this.editorWidth/2+e,top:this.editorHeight/2+i})}},hasOrientationChanged:function(){return this.viewportRotation%180!=0},getScaledImageDimensions:function(){var t=this.originalHeight/this.originalWidth,e={};return this.editorHeight/this.editorWidth<t?(e.height=Math.min(this.editorHeight,this.originalHeight),e.width=Math.round(this.originalWidth/(this.originalHeight/e.height))):(e.width=Math.min(this.editorWidth,this.originalWidth),e.height=Math.round(this.originalHeight*(e.width/this.originalWidth))),e},_zoomImage:function(){var t=this.getScaledImageDimensions();this.image.set({width:t.width*this.zoomRatio,height:t.height*this.zoomRatio})},_addControlListeners:function(){this.addListener(this.$tabs,"click","_handleTabClick"),this.addListener($(".focal-point"),"click",function(t){this.toggleFocalPoint(t)}.bind(this)),this.addListener($(".rotate-left"),"click",function(){this.rotateImage(-90)}.bind(this)),this.addListener($(".rotate-right"),"click",function(){this.rotateImage(90)}.bind(this)),this.addListener($(".flip-vertical"),"click",function(){this.flipImage("y")}.bind(this)),this.addListener($(".flip-horizontal"),"click",function(){this.flipImage("x")}.bind(this)),this.straighteningInput=new Craft.SlideRuleInput("slide-rule",{onStart:function(){this._showGrid()}.bind(this),onChange:function(t){this.straighten(t)}.bind(this),onEnd:function(){this._hideGrid(),this._cleanupFocalPointAfterStraighten()}.bind(this)}),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!0)}.bind(this)),this.addListener(Garnish.$doc,"keyup",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!1)}.bind(this)),new Garnish.MenuBtn($(".crop .menubtn",this.$container),{onOptionSelect:function(t){$(".constraint",this.$container).html($(t).html()),this.setCroppingConstraint($(t).data("constraint")),this.enforceCroppingConstraint()}.bind(this)}).menu.$container.addClass("dark")},_handleTabClick:function(t){if(!this.animationInProgress){var e=$(t.currentTarget),i=e.data("view");this.$tabs.removeClass("selected"),e.addClass("selected"),this.showView(i)}},showView:function(t){this.currentView!==t&&(this.$views.addClass("hidden"),this.$views.filter('[data-view="'+t+'"]').removeClass("hidden"),"rotate"===t?this.enableSlider():this.disableSlider(),this.updateSizeAndPosition(),"crop"===this.currentView&&"crop"!==t?this.disableCropMode():"crop"!==this.currentView&&"crop"===t&&this.enableCropMode(),this.currentView=t)},storeCropperState:function(t){if(t)this.cropperState=t;else if(this.clipper){var e=1/this.zoomRatio;this.cropperState={offsetX:(this.clipper.left-this.image.left)*e,offsetY:(this.clipper.top-this.image.top)*e,height:this.clipper.height*e,width:this.clipper.width*e,imageDimensions:this.getScaledImageDimensions()}}else{var i=this.getScaledImageDimensions();this.cropperState={offsetX:0,offsetY:0,height:i.height,width:i.width,imageDimensions:i}}},storeFocalPointState:function(t){if(t)this.focalPointState=t;else if(this.focalPoint){var e=1/this.zoomRatio;this.focalPointState={offsetX:(this.focalPoint.left-this.image.left)*e/this.scaleFactor,offsetY:(this.focalPoint.top-this.image.top)*e/this.scaleFactor,imageDimensions:this.getScaledImageDimensions()}}},rotateImage:function(e){if(!this.animationInProgress){if(90!==e&&-90!==e)return!1;this.animationInProgress=!0,this.viewportRotation+=e,this.viewportRotation=parseInt((this.viewportRotation+360)%360,10);var t,i=this.image.angle+e,s=this.getScaledImageDimensions();t=this.hasOrientationChanged()?this.getZoomToCoverRatio({height:s.width,width:s.height}):this.getZoomToCoverRatio(s),this.zoomRatio>t&&(t=this.zoomRatio);var n={angle:90===e?"+=90":"-=90"},a={angle:i,width:s.width*t,height:s.height*t},r=1;this.scaleFactor<1?(r=1/this.scaleFactor,this.scaleFactor=1):(this.viewport.width>this.editorHeight?r=this.editorHeight/this.viewport.width:this.viewport.height>this.editorWidth&&(r=this.editorWidth/this.viewport.height),this.scaleFactor=r),r<1&&(a.width*=r,a.height*=r);var o=this.cropperState,l=o.offsetX,h=o.offsetY,d=e*(Math.PI/180),c=l*Math.cos(d)-h*Math.sin(d),u=l*Math.sin(d)+h*Math.cos(d),p=s.width/o.imageDimensions.width,g=c*p*this.zoomRatio*this.scaleFactor,f=u*p*this.zoomRatio*this.scaleFactor;a.left=this.editorWidth/2-g,a.top=this.editorHeight/2-f,o.offsetX=c,o.offsetY=u;var m=o.width;o.width=o.height,o.height=m,this.storeCropperState(o),this.focalPoint&&this.canvas.remove(this.focalPoint),this.viewport.animate(n,{duration:this.settings.animationDuration,onComplete:function(){var t=this.viewport.height*r;this.viewport.height=this.viewport.width*r,this.viewport.width=t,this.viewport.set({angle:0})}.bind(this)}),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){var t=parseFloat((this.image.angle+360)%360);this.image.set({angle:t}),this.animationInProgress=!1,this.focalPoint?(this._adjustFocalPointByAngle(e),this.straighten(this.straighteningInput),this.canvas.add(this.focalPoint)):this._resetFocalPointPosition()}.bind(this)})}},flipImage:function(t){if(!this.animationInProgress){this.animationInProgress=!0,this.hasOrientationChanged()&&(t="y"===t?"x":"y"),this.focalPoint?this.canvas.remove(this.focalPoint):this._resetFocalPointPosition();var e=this.editorWidth/2,i=this.editorHeight/2;this.straighteningInput.setValue(-this.imageStraightenAngle),this.imageStraightenAngle=-this.imageStraightenAngle;var s,n,a={angle:this.viewportRotation+this.imageStraightenAngle},r=this.cropperState,o=this.focalPointState;"y"===t&&this.hasOrientationChanged()||"y"!==t&&!this.hasOrientationChanged()?(r.offsetX=-r.offsetX,o.offsetX=-o.offsetX,n=this.image.left-e,a.left=e-n):(r.offsetY=-r.offsetY,o.offsetY=-o.offsetY,s=this.image.top-i,a.top=i-s),"y"===t?(a.scaleY=-1*this.image.scaleY,this.flipData.y=1-this.flipData.y):(a.scaleX=-1*this.image.scaleX,this.flipData.x=1-this.flipData.x),this.storeCropperState(r),this.storeFocalPointState(o),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){this.animationInProgress=!1,this.focalPoint&&(this._adjustFocalPointByAngle(0),this.canvas.add(this.focalPoint))}.bind(this)})}},straighten:function(t){if(!this.animationInProgress){this.animationInProgress=!0;var e=this.image.angle;this.imageStraightenAngle=(this.settings.allowDegreeFractions?parseFloat(t.value):Math.round(parseFloat(t.value)))%360,this.image.set({angle:this.viewportRotation+this.imageStraightenAngle}),this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,this._zoomImage(),this.cropperState&&this._adjustEditorElementsOnStraighten(e),this.renderImage(),this.animationInProgress=!1}},_adjustEditorElementsOnStraighten:function(t){var e,i,s,n,a,r=this.getScaledImageDimensions(),o=this.image.angle-t,l=this.cropperState,h=this.zoomRatio,d=1;do{var c=l.offsetX,u=l.offsetY,p=o*(Math.PI/180);s=c*Math.cos(p)-u*Math.sin(p),n=c*Math.sin(p)+u*Math.cos(p),e=s*h*(a=r.width/l.imageDimensions.width),i=n*h*a;var g=this.getImageVerticeCoords(h),f={width:this.viewport.width,height:this.viewport.height,left:this.editorWidth/2-this.viewport.width/2+e,top:this.editorHeight/2-this.viewport.height/2+i};h*=d=this._getZoomRatioToFitRectangle(f,g)}while(1!==d);this.image.set({left:this.editorWidth/2-e,top:this.editorHeight/2-i}),l.offsetX=s,l.offsetY=n,l.width=this.viewport.width/h/a,l.height=this.viewport.height/h/a,this.storeCropperState(l),this.zoomRatio=h,this.focalPoint?(this._adjustFocalPointByAngle(o),this._isCenterInside(this.focalPoint,this.viewport)?this.focalPoint.set({opacity:1}):this.focalPoint.set({opacity:0})):0!=o&&this._resetFocalPointPosition(),this._zoomImage()},_cleanupFocalPointAfterStraighten:function(){if(this.focalPoint&&!this._isCenterInside(this.focalPoint,this.viewport)){this.focalPoint.set({opacity:1});var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t),this.toggleFocalPoint()}},_resetFocalPointPosition:function(){var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t)},_isCenterInside:function(t,e){return t.left>e.left-e.width/2&&t.top>e.top-e.height/2&&t.left<e.left+e.width/2&&t.top<e.top+e.height/2},_adjustFocalPointByAngle:function(t){var e=t*(Math.PI/180),i=this.focalPointState,s=i.offsetX,n=i.offsetY,a=s*Math.cos(e)-n*Math.sin(e),r=s*Math.sin(e)+n*Math.cos(e),o=this.getScaledImageDimensions().width/i.imageDimensions.width,l=a*o*this.zoomRatio,h=r*o*this.zoomRatio;this.focalPoint.left=this.image.left+l,this.focalPoint.top=this.image.top+h,i.offsetX=a,i.offsetY=r,this.storeFocalPointState(i)},_getZoomRatioToFitRectangle:function(t,e){for(var i,s,n=this._getRectangleVertices(t),a=0;a<n.length&&(i=n[a],this.arePointsInsideRectangle([i],e));a++)i=!1;if(i){var r=this._getEdgeCrossed(e,i),o=t.left+t.width/2,l=t.top+t.height/2,h=Math.abs((r[1].y-r[0].y)*i.x-(r[1].x-r[0].x)*i.y+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2)),d=Math.abs((r[1].y-r[0].y)*o-(r[1].x-r[0].x)*l+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2));s=(h+d)/d}else s=1;return s},saveImage:function(t){var e=$(t.currentTarget);if(e.hasClass("disabled"))return!1;$(".btn",this.$buttons).addClass("disabled"),this.$buttons.append('<div class="spinner"></div>');var i={assetId:this.assetId,viewportRotation:this.viewportRotation,imageRotation:this.imageStraightenAngle,replace:e.hasClass("replace")?1:0};if(this.cropperState){var s={};s.height=this.cropperState.height,s.width=this.cropperState.width,s.offsetX=this.cropperState.offsetX,s.offsetY=this.cropperState.offsetY,i.imageDimensions=this.cropperState.imageDimensions,i.cropData=s}else i.imageDimensions=this.getScaledImageDimensions();this.focalPoint&&(i.focalPoint=this.focalPointState),i.flipData=this.flipData,i.zoom=this.zoomRatio,Craft.postActionRequest("assets/save-image",i,function(t){this.$buttons.find(".btn").removeClass("disabled").end().find(".spinner").remove(),t.error?alert(t.error):(this.onSave(),this.hide(),Craft.cp.runQueue())}.bind(this))},getZoomToCoverRatio:function(t){var e=Math.abs(this.imageStraightenAngle)*(Math.PI/180),i=Math.sin(e)*t.height+Math.cos(e)*t.width,s=Math.sin(e)*t.width+Math.cos(e)*t.height;return Math.max(i/t.width,s/t.height)},getZoomToFitRatio:function(t){var e=this._getImageBoundingBox(t),i=1;if(e.height>this.editorHeight||e.width>this.editorWidth){var s=this.editorHeight/e.height,n=this.editorWidth/e.width;i=Math.min(n,s)}return i},getCombinedZoomRatio:function(t){return this.getZoomToCoverRatio(t)/this.getZoomToFitRatio(t)},_showGrid:function(){if(!this.grid){var t,e={strokeWidth:1,stroke:"rgba(255,255,255,0.5)"},i=this.viewport.width,s=this.viewport.height,n=i/9,a=s/9,r=[new fabric.Rect({strokeWidth:2,stroke:"rgba(255,255,255,1)",originX:"center",originY:"center",width:i,height:s,left:i/2,top:s/2,fill:"rgba(255,255,255,0)"})];for(t=1;t<=8;t++)r.push(new fabric.Line([t*n,0,t*n,s],e));for(t=1;t<=8;t++)r.push(new fabric.Line([0,t*a,i,t*a],e));this.grid=new fabric.Group(r,{left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",angle:this.viewport.angle}),this.canvas.add(this.grid),this.renderImage()}},_hideGrid:function(){this.canvas.remove(this.grid),this.grid=null,this.renderImage()},onFadeOut:function(){this.removeListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.removeListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.removeListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.removeListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this.destroy()},show:function(){this.base(),$("html").addClass("noscroll")},hide:function(){this.removeAllListeners(),this.straighteningInput.removeAllListeners(),$("html").removeClass("noscroll"),this.base()},onSave:function(){this.settings.onSave(),this.trigger("save")},enableSlider:function(){this.$imageTools.removeClass("hidden")},disableSlider:function(){this.$imageTools.addClass("hidden")},enableCropMode:function(){var t=this.getScaledImageDimensions();this.zoomRatio=this.getZoomToFitRatio(t);var e={width:this.editorWidth,height:this.editorHeight},i={width:t.width*this.zoomRatio,height:t.height*this.zoomRatio,left:this.editorWidth/2,top:this.editorHeight/2},s=function(){this._setFittedImageVerticeCoordinates();var t=this.cropperState,e=this.getScaledImageDimensions(),i=e.width/t.imageDimensions.width,s={left:this.image.left+t.offsetX*i*this.zoomRatio,top:this.image.top+t.offsetY*i*this.zoomRatio,width:t.width*i*this.zoomRatio,height:t.height*i*this.zoomRatio};this._showCropper(s),this.focalPoint&&(i=e.width/this.focalPointState.imageDimensions.width,this.focalPoint.left=this.image.left+this.focalPointState.offsetX*i*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*i*this.zoomRatio,this.canvas.add(this.focalPoint))}.bind(this);this._editorModeTransition(s,i,e)},disableCropMode:function(){var t={},e={left:this.editorWidth/2,top:this.editorHeight/2};this._hideCropper();var i=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,s=i/this.zoomRatio;this.zoomRatio=i;var n=(this.clipper.left-this.image.left)*s,a=(this.clipper.top-this.image.top)*s;e.left=this.editorWidth/2-n,e.top=this.editorHeight/2-a,t.height=this.clipper.height*s,t.width=this.clipper.width*s,this.focalPoint&&(!this.focalPoint||this._isCenterInside(this.focalPoint,this.clipper))||(this.focalPoint&&this.toggleFocalPoint(),this._resetFocalPointPosition());var r=function(){if(this.focalPoint){var t=this.getScaledImageDimensions().width/this.focalPointState.imageDimensions.width;this.focalPoint.left=this.image.left+this.focalPointState.offsetX*t*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*t*this.zoomRatio,this.canvas.add(this.focalPoint)}}.bind(this);this._editorModeTransition(r,e,t)},_editorModeTransition:function(t,e,i){this.animationInProgress||(this.animationInProgress=!0,this.focalPoint&&(this.canvas.remove(this.focalPoint),this.renderImage()),this.image.animate(e,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){t(),this.animationInProgress=!1,this.renderImage()}.bind(this)}),this.viewport.animate(i,{duration:this.settings.animationDuration}))},_showSpinner:function(){this.$spinnerCanvas=$('<canvas id="spinner-canvas"></canvas>').appendTo($(".image",this.$container));var i=document.getElementById("spinner-canvas").getContext("2d"),s=new Date,n=i.canvas.width,a=i.canvas.height;this.spinnerInterval=window.setInterval(function(){var t=parseInt((new Date-s)/1e3*16)/16;i.save(),i.clearRect(0,0,n,a),i.translate(n/2,a/2),i.rotate(2*Math.PI*t);for(var e=0;e<16;e++)i.beginPath(),i.rotate(2*Math.PI/16),i.moveTo(n/10,0),i.lineTo(n/4,0),i.lineWidth=n/30,i.strokeStyle="rgba(255,255,255,"+e/16+")",i.stroke();i.restore()},1e3/30)},_hideSpinner:function(){window.clearInterval(this.spinnerInterval),this.$spinnerCanvas.remove(),this.$spinnerCanvas=null},_showCropper:function(t){this._setupCropperLayer(t),this._redrawCropperElements(),this.renderCropper()},_hideCropper:function(){this.clipper&&(this.croppingCanvas.remove(this.clipper),this.croppingCanvas.remove(this.croppingShade),this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle),this.croppingCanvas=null,this.renderCropper=null)},_setupCropperLayer:function(t){this.croppingCanvas=new fabric.StaticCanvas("cropping-canvas",{backgroundColor:"rgba(0,0,0,0)",hoverCursor:"default",selection:!1}),this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight}),this.renderCropper=function(){Garnish.requestAnimationFrame(this.croppingCanvas.renderAll.bind(this.croppingCanvas))}.bind(this),$("#cropping-canvas",this.$editorContainer).css({position:"absolute",top:0,left:0}),this.croppingShade=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:this.editorWidth,height:this.editorHeight,fill:"rgba(0,0,0,0.7)"});var e=this.getScaledImageDimensions(),i=0===this.imageStraightenAngle?1:1.2*this.getCombinedZoomRatio(e),s=e.width/i,n=e.height/i;if(this.hasOrientationChanged()){var a=n;n=s,s=a}this.clipper=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:s,height:n,stroke:"black",fill:"rgba(128,0,0,1)",strokeWidth:0}),t&&this.clipper.set(t),this.clipper.globalCompositeOperation="destination-out",this.croppingCanvas.add(this.croppingShade),this.croppingCanvas.add(this.clipper)},_redrawCropperElements:function(){this.cropperHandles&&(this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle));var t={strokeWidth:4,stroke:"rgb(255,255,255)",fill:!1},e={strokeWidth:2,stroke:"rgba(255,255,255,0.5)"},i=[new fabric.Path("M 0,10 L 0,0 L 10,0",t),new fabric.Path("M "+(this.clipper.width-8)+",0 L "+(this.clipper.width+4)+",0 L "+(this.clipper.width+4)+",10",t),new fabric.Path("M "+(this.clipper.width+4)+","+(this.clipper.height-8)+" L"+(this.clipper.width+4)+","+(this.clipper.height+4)+" L "+(this.clipper.width-8)+","+(this.clipper.height+4),t),new fabric.Path("M 10,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height-8),t)];this.cropperHandles=new fabric.Group(i,{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingRectangle=new fabric.Rect({left:this.clipper.left,top:this.clipper.top,width:this.clipper.width,height:this.clipper.height,fill:"rgba(0,0,0,0)",stroke:"rgba(255,255,255,0.8)",strokeWidth:2,originX:"center",originY:"center"}),this.cropperGrid=new fabric.Group([new fabric.Line([.33*this.clipper.width,0,.33*this.clipper.width,this.clipper.height],e),new fabric.Line([.66*this.clipper.width,0,.66*this.clipper.width,this.clipper.height],e),new fabric.Line([0,.33*this.clipper.height,this.clipper.width,.33*this.clipper.height],e),new fabric.Line([0,.66*this.clipper.height,this.clipper.width,.66*this.clipper.height],e)],{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingCanvas.add(this.cropperHandles),this.croppingCanvas.add(this.cropperGrid),this.croppingCanvas.add(this.croppingRectangle)},_repositionCropper:function(t){if(this.croppingCanvas){var e=this.clipper.left-this.croppingCanvas.width/2,i=this.clipper.top-this.croppingCanvas.height/2;this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var s=this._getBoundingRectangle(this.imageVerticeCoords).width/t.width;this.clipper.width=Math.round(this.clipper.width*s),this.clipper.height=Math.round(this.clipper.height*s),this.clipper.left=this.editorWidth/2+e*s,this.clipper.top=this.editorHeight/2+i*s,this.croppingShade.set({width:this.editorWidth,height:this.editorHeight,left:this.editorWidth/2,top:this.editorHeight/2}),this._redrawCropperElements(),this.renderCropper()}},_getBoundingRectangle:function(t){return{width:Math.max(t.a.x,t.b.x,t.c.x,t.d.x)-Math.min(t.a.x,t.b.x,t.c.x,t.d.x),height:Math.max(t.a.y,t.b.y,t.c.y,t.d.y)-Math.min(t.a.y,t.b.y,t.c.y,t.d.y)}},_handleMouseDown:function(t){var e=this.focalPoint&&this._isMouseOver(t,this.focalPoint),i=this.croppingCanvas&&this._isMouseOver(t,this.clipper),s=this.croppingCanvas&&this._cropperHandleHitTest(t);(s||i||e)&&(this.previousMouseX=t.pageX,this.previousMouseY=t.pageY,e?this.draggingFocal=!0:s?this.scalingCropper=s:i&&(this.draggingCropper=!0))},_handleMouseMove:function(t){this.focalPoint&&this.draggingFocal?(this._handleFocalDrag(t),this.storeFocalPointState(),this.renderImage()):this.draggingCropper||this.scalingCropper?(this.draggingCropper?this._handleCropperDrag(t):this._handleCropperResize(t),this._redrawCropperElements(),this.storeCropperState(),this.renderCropper()):this._setMouseCursor(t),this.previousMouseX=t.pageX,this.previousMouseY=t.pageY},_handleMouseUp:function(t){this.draggingCropper=!1,this.scalingCropper=!1,this.draggingFocal=!1},_handleCropperDrag:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0!=e||0!=i){var s={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height},n=this._getRectangleVertices(s,e,i);this.arePointsInsideRectangle(n,this.imageVerticeCoords)&&this.clipper.set({left:this.clipper.left+e,top:this.clipper.top+i})}},_handleFocalDrag:function(t){if(this.focalPoint){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0==e&&0==i)return;var s=this.focalPoint.left+e,n=this.focalPoint.top+i;if("crop"===this.currentView){if(!this.arePointsInsideRectangle([{x:s,y:n}],this.imageVerticeCoords))return}else if(!(this.viewport.left-this.viewport.width/2-s<0&&0<this.viewport.left+this.viewport.width/2-s&&this.viewport.top-this.viewport.height/2-n<0&&0<this.viewport.top+this.viewport.height/2-n))return;this.focalPoint.set({left:this.focalPoint.left+e,top:this.focalPoint.top+i})}},setCroppingConstraint:function(t){switch(this.updateSizeAndPosition(),t){case"none":t=!1;break;case"original":t=this.originalWidth/this.originalHeight;break;case"current":t=this.clipper.width/this.clipper.height;break;default:t=parseFloat(t)}this.croppingConstraint=t},enforceCroppingConstraint:function(){if(!this.animationInProgress&&this.croppingConstraint){this.animationInProgress=!0;var t={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.clipper.width>this.clipper.height*this.croppingConstraint){var e=t.height;t.height=this.clipper.width/this.croppingConstraint,t.top-=(t.height-e)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.width=this.clipper.height*this.croppingConstraint,t.height=t.width/this.croppingConstraint)}else{var i=t.width;t.width=this.clipper.height*this.croppingConstraint,t.left-=(t.width-i)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.height=this.clipper.width/this.croppingConstraint,t.width=t.height*this.croppingConstraint)}var s={height:t.height,width:t.width};this.clipper.animate(s,{onChange:function(){this._redrawCropperElements(),this.croppingCanvas.renderAll()}.bind(this),duration:this.settings.animationDuration,onComplete:function(){this._redrawCropperElements(),this.animationInProgress=!1,this.renderCropper()}.bind(this)})}},_handleCropperResize:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY,s=0,n=0;if("b"!==this.scalingCropper&&"t"!==this.scalingCropper||(e=0),"l"!==this.scalingCropper&&"r"!==this.scalingCropper||(i=0),0!==e||0!==i){var a={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.croppingConstraint){var r=0;switch(this.scalingCropper){case"t":r=-i;break;case"b":r=i;break;case"r":r=e;break;case"l":r=-e;break;case"tr":r=-i+e;break;case"tl":r=-i-e;break;case"br":r=i+e;break;case"bl":r=i-e}1<this.croppingConstraint?i=(e=r)/this.croppingConstraint:e=(i=r)*this.croppingConstraint,a.height+=i,a.width+=e,this.scalingCropper.match(/t/)&&(a.top-=i,a.left-=e/2,s=-i/2),this.scalingCropper.match(/b/)&&(a.left+=-e/2,s=i/2),this.scalingCropper.match(/r/)&&(a.top+=-i/2,n=e/2),this.scalingCropper.match(/l/)&&(a.top-=i/2,a.left-=e,n=-e/2)}else{if(this.shiftKeyHeld&&("tl"===this.scalingCropper||"tr"===this.scalingCropper||"bl"===this.scalingCropper||"br"===this.scalingCropper))Math.abs(e)>Math.abs(i)?(i=e/(this.clipper.width/this.clipper.height),i*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1):(e=i*(this.clipper.width/this.clipper.height),e*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1);this.scalingCropper.match(/t/)&&(a.top+=i,a.height-=i),this.scalingCropper.match(/b/)&&(a.height+=i),this.scalingCropper.match(/r/)&&(a.width+=e),this.scalingCropper.match(/l/)&&(a.left+=e,a.width-=e),s=i/2,n=e/2}a.height<30||a.width<30||this.arePointsInsideRectangle(this._getRectangleVertices(a),this.imageVerticeCoords)&&(this.clipper.set({top:this.clipper.top+s,left:this.clipper.left+n,width:a.width,height:a.height}),this._redrawCropperElements())}},_setMouseCursor:function(t){var e="default",i=this.croppingCanvas&&this._cropperHandleHitTest(t);this.focalPoint&&this._isMouseOver(t,this.focalPoint)?e="pointer":i?"t"===i||"b"===i?e="ns-resize":"l"===i||"r"===i?e="ew-resize":"tl"===i||"br"===i?e="nwse-resize":"bl"!==i&&"tr"!==i||(e="nesw-resize"):this.croppingCanvas&&this._isMouseOver(t,this.clipper)&&(e="move"),$(".body").css("cursor",e)},_cropperHandleHitTest:function(t){var e=this.$croppingCanvas.offset(),i=t.pageX-e.left,s=t.pageY-e.top,n=this.clipper.left-this.clipper.width/2,a=n+this.clipper.width,r=this.clipper.top-this.clipper.height/2,o=r+this.clipper.height;if(i<10+n&&n-3<i){if(s<10+r&&r-3<s)return"tl";if(s<o+3&&o-10<s)return"bl"}if(a-13<i&&i<a+3){if(s<10+r&&r-3<s)return"tr";if(s<o+2&&o-10<s)return"br"}return i<3+n&&n-3<i&&s<o-10&&10+r<s?"l":i<a+1&&a-5<i&&s<o-10&&10+r<s?"r":s<4+r&&r-2<s&&10+n<i&&i<a-10?"t":s<o+2&&o-4<s&&10+n<i&&i<a-10&&"b"},_isMouseOver:function(t,e){var i=this.$croppingCanvas.offset(),s=t.pageX-i.left,n=t.pageY-i.top,a=e.left-e.width/2,r=a+e.width,o=e.top-e.height/2,l=o+e.height;return a<=s&&s<=r&&o<=n&&n<=l},_getRectangleVertices:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var s={x:t.left+e,y:t.top+i},n={x:s.x+t.width,y:s.y},a={x:n.x,y:n.y+t.height};return[s,n,a,{x:s.x,y:a.y}]},_setFittedImageVerticeCoordinates:function(){this.imageVerticeCoords=this.getImageVerticeCoords("fit")},getImageVerticeCoords:function(t){var e,i=-1*((this.hasOrientationChanged()?90:0)+this.imageStraightenAngle)*(Math.PI/180),s=this.getScaledImageDimensions();e="number"==typeof t?t:"cover"===t?this.getZoomToCoverRatio(s):this.getZoomToFitRatio(s);var n=s.height*e,a=s.width*e,r=Math.cos(i)*n,o=Math.sin(i)*a,l=Math.cos(i)*a,h=Math.sin(i)*n,d=(this.editorHeight-(r+o))/2,c=(this.editorWidth-(h+l))/2;return{a:{x:c+l,y:d},b:{x:this.editorWidth-c,y:d+r},c:{x:c+h,y:this.editorHeight-d},d:{x:c,y:d+o}}},_debug:function(t){this.canvas.remove(this.debugger),this.debugger=t,this.canvas.add(this.debugger)},arePointsInsideRectangle:function(t,e){for(var i=this._getVector(e.a,e.b),s=this._getVector(e.b,e.c),n=this._getScalarProduct(i,i),a=this._getScalarProduct(s,s),r=0;r<t.length;r++){var o=t[r],l=this._getVector(e.a,o),h=this._getVector(e.b,o),d=this._getScalarProduct(i,l),c=this._getScalarProduct(s,h);if(!(0<=d&&d<=n)||!(0<=c&&c<=a))return!1}return!0},_getVector:function(t,e){return{x:e.x-t.x,y:e.y-t.y}},_getScalarProduct:function(t,e){return t.x*e.x+t.y*e.y},_getVectorMagnitude:function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},_getAngleBetweenVectors:function(t,e){return Math.round(180*Math.acos(Math.min(1,this._getScalarProduct(t,e)/(this._getVectorMagnitude(t)*this._getVectorMagnitude(e))))/Math.PI*100)/100},_getEdgeCrossed:function(t,e){for(var i=[[t.a,t.b],[t.b,t.c],[t.c,t.d],[t.d,t.a]],s={x:this.editorWidth/2,y:this.editorHeight/2},n=180,a=null,r=0;r<i.length;r++){var o=i[r],l=this._getVector(o[0],s),h=this._getVector(o[0],o[1]),d=this._getVector(o[0],e),c=Math.abs(this._getAngleBetweenVectors(l,d)-(this._getAngleBetweenVectors(l,h)+this._getAngleBetweenVectors(h,d)));c<n&&(n=c,a=o)}return a},_getImageBoundingBox:function(t){var e={},i=Math.abs(this.imageStraightenAngle)*(Math.PI/180),s=t.height/t.width;if(e.height=t.width*(Math.sin(i)+Math.cos(i)*s),e.width=t.width*(Math.cos(i)+Math.sin(i)*s),this.hasOrientationChanged()){var n=e.width;e.width=e.height,e.height=n}return e}},{defaults:{animationDuration:100,allowSavingAsNew:!0,onSave:$.noop,allowDegreeFractions:!0}}),Craft.AssetIndex=Craft.BaseElementIndex.extend({$includeSubfoldersContainer:null,$includeSubfoldersCheckbox:null,showingIncludeSubfoldersCheckbox:!1,$uploadButton:null,$uploadInput:null,$progressBar:null,$folders:null,uploader:null,promptHandler:null,progressBar:null,_uploadTotalFiles:0,_uploadFileProgress:{},_uploadedAssetIds:[],_currentUploaderSettings:{},_assetDrag:null,_folderDrag:null,_expandDropTargetFolderTimeout:null,_tempExpandedFolders:[],_fileConflictTemplate:{choices:[{value:"keepBoth",title:Craft.t("app","Keep both")},{value:"replace",title:Craft.t("app","Replace it")}]},_folderConflictTemplate:{choices:[{value:"replace",title:Craft.t("app","Replace the folder (all existing files will be deleted)")},{value:"merge",title:Craft.t("app","Merge the folder (any conflicting files will be replaced)")}]},init:function(t,e,i){this.base(t,e,i),"index"===this.settings.context?(this._folderDrag||this._initIndexPageMode(),this.addListener(Garnish.$win,"resize,scroll","_positionProgressBar")):(this.addListener(this.$main,"scroll","_positionProgressBar"),this.settings.modal&&this.settings.modal.on("updateSizeAndPosition",$.proxy(this,"_positionProgressBar")))},initSources:function(){return"index"!==this.settings.context||this._folderDrag||this._initIndexPageMode(),this.base()},initSource:function(t){this.base(t),this._createFolderContextMenu(t),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&t.data("folder-id")&&this._folderDrag.addItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},deinitSource:function(t){this.base(t);var e=t.data("contextmenu");e&&e.destroy(),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&this._folderDrag.removeItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},_getSourceLevel:function(t){return t.parentsUntil("nav","ul").length},_initIndexPageMode:function(){if(!this._folderDrag){this.settings.selectable=!0,this.settings.multiSelect=!0;var t=$.proxy(this,"_onDragStart"),e=$.proxy(this,"_onDropTargetChange");this._assetDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){return this.view.getSelectedElements()},this),helper:$.proxy(function(t){return this._getFileDragHelper(t)},this),dropTargets:$.proxy(function(){for(var t=[],e=0;e<this.$sources.length;e++){var i=this.$sources.eq(e);this._getFolderUidFromSourceKey(i.data("key"))&&t.push(i)}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFileDragStop")}),this._folderDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){for(var t=this.sourceSelect.getSelectedItems(),e=[],i=0;i<t.length;i++){var s=t.eq(i);!this._getFolderUidFromSourceKey(s.data("key"))||s.hasClass("sel")&&1<this._getSourceLevel(s)&&e.push(s.parent()[0])}return $(e)},this),helper:$.proxy(function(t){var e=$('<div class="sidebar" style="padding-top: 0; padding-bottom: 0;"/>'),i=$("<nav/>").appendTo(e),s=$("<ul/>").appendTo(i);return t.appendTo(s).removeClass("expanded"),t.children("a").addClass("sel"),t.css({"padding-top":this._folderDrag.$draggee.css("padding-top"),"padding-right":this._folderDrag.$draggee.css("padding-right"),"padding-bottom":this._folderDrag.$draggee.css("padding-bottom"),"padding-left":this._folderDrag.$draggee.css("padding-left")}),e},this),dropTargets:$.proxy(function(){var t=[],e=[];this._folderDrag.$draggee.find("a[data-key]").each(function(){e.push($(this).data("key"))});for(var i=0;i<this.$sources.length;i++){var s=this.$sources.eq(i),n=s.data("key");this._getFolderUidFromSourceKey(n)&&(Craft.inArray(n,e)||t.push(s))}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFolderDragStop")})}},_onFileDragStop:function(){if(this._assetDrag.$activeDropTarget&&this._assetDrag.$activeDropTarget[0]!==this.$source[0]){for(var r=this.$source,o=this._assetDrag.$activeDropTarget.data("folder-id"),l=[],t=0;t<this._assetDrag.$draggee.length;t++){var e=Craft.getElementInfo(this._assetDrag.$draggee[t]).id;l.push(e)}if(l.length){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(l.length),this.progressBar.showProgressBar();var i=[];for(t=0;t<l.length;t++)i.push({action:"assets/move-asset",params:{assetId:l[t],folderId:o}});var h=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var i=t[e];i.conflict&&this.promptHandler.addPrompt({assetId:i.assetId,suggestedFilename:i.suggestedFilename,prompt:{message:i.conflict,choices:this._fileConflictTemplate.choices}}),i.error&&alert(i.error)}this.setIndexAvailable(),this.progressBar.hideProgressBar();function s(){this.sourceSelect.selectItem(r),this._totalVisible-=this._assetDrag.$draggee.length;for(var t=0;t<l.length;t++)$("[data-id="+l[t]+"]").remove();this.view.deselectAllElements(),this._collapseExtraExpandedFolders(o),n&&this.updateElements()}var n=!1;if(this.promptHandler.getPromptCount()){var a=$.proxy(function(t){for(var e=[],i=0;i<t.length;i++)"cancel"!==t[i].choice?("keepBoth"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,filename:t[i].suggestedFilename}}),"replace"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,force:!0}})):n=!0;0===e.length?s.apply(this):(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,h))},this);this._assetDrag.fadeOutHelpers(),this.promptHandler.showBatchPrompts(a)}else s.apply(this),this._assetDrag.fadeOutHelpers()},this);return void this._performBatchRequests(i,h)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._assetDrag.returnHelpersToDraggees()},_onFolderDragStop:function(){if(this._folderDrag.$activeDropTarget&&0===this._folderDrag.$activeDropTarget.siblings("ul").children("li").filter(this._folderDrag.$draggee).length){var t=this._folderDrag.$activeDropTarget.data("folder-id");this._collapseExtraExpandedFolders(t);for(var a=[],e=0;e<this._folderDrag.$draggee.length;e++){var i=this._folderDrag.$draggee.eq(e).children("a").data("folder-id");if(i!=t){a.push(i);break}}if(a.length){a.sort(),a.reverse(),this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(a.length),this.progressBar.showProgressBar();var s=[];for(e=0;e<a.length;e++)s.push({action:"assets/move-folder",params:{folderId:a[e],parentId:t}});this.requestId++;var r=[],o="",l=function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var n=t[e];n.success&&(n.transferList&&(r=n.transferList),n.newFolderId&&(o=this._folderDrag.$activeDropTarget.data("key")+"/folder:"+n.newFolderUid)),n.conflict&&(n.prompt={message:n.conflict,choices:this._folderConflictTemplate.choices},this.promptHandler.addPrompt(n)),n.error&&alert(n.error)}if(this.promptHandler.getPromptCount()){var i=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=[],i={},s=0;s<t.length;s++)"cancel"!==t[s].choice&&("replace"===t[s].choice&&(i.force=!0),"merge"===t[s].choice&&(i.merge=!0),i.folderId=n.folderId,i.parentId=n.parentId,e.push({action:"assets/move-folder",params:i}));0===e.length?$.proxy(this,"_performActualFolderMove",r,a,o)():(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,l))},this);this.promptHandler.showBatchPrompts(i),this.setIndexAvailable(),this.progressBar.hideProgressBar()}else $.proxy(this,"_performActualFolderMove",r,a,o)()}.bind(this);return void this._performBatchRequests(s,l)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._folderDrag.returnHelpersToDraggees()},_performActualFolderMove:function(t,e,n){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(1),this.progressBar.showProgressBar();var i=function(t){for(var e=0,i=t.length,s=0;s<t.length;s++)Craft.postActionRequest("assets/delete-folder",{folderId:t[s]},function(){++e===i&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._folderDrag.returnHelpersToDraggees(),this.setInstanceState("selectedSource",n),this.refreshSources())}.bind(this))}.bind(this);if(0<t.length){for(var s=[],a=0;a<t.length;a++)s.push({action:"assets/move-asset",params:t[a]});this._performBatchRequests(s,function(){i(e)})}else i(e)},_getParentSource:function(t){if(1<this._getSourceLevel(t))return t.parent().parent().siblings("a")},_selectSourceByFolderId:function(t){for(var e=this._getSourceByKey(t),i=e.parent().parents("li"),s=0;s<i.length;s++){var n=$(i[s]);n.hasClass("expanded")||n.children(".toggle").trigger("click")}this.selectSource(e),this.updateElements()},afterInit:function(){this.$uploadButton||(this.$uploadButton=$('<div class="btn submit" data-icon="upload" style="position: relative; overflow: hidden;" role="button">'+Craft.t("app","Upload files")+"</div>"),this.addButton(this.$uploadButton),this.$uploadInput=$('<input type="file" multiple="multiple" name="assets-upload" />').hide().insertBefore(this.$uploadButton)),this.promptHandler=new Craft.PromptHandler,this.progressBar=new Craft.ProgressBar(this.$main,!0);var t={url:Craft.getActionUrl("assets/save-asset"),fileInput:this.$uploadInput,dropZone:this.$container};t.events={fileuploadstart:$.proxy(this,"_onUploadStart"),fileuploadprogressall:$.proxy(this,"_onUploadProgress"),fileuploaddone:$.proxy(this,"_onUploadComplete")},this.settings.criteria&&void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),this._currentUploaderSettings=t,this.uploader=new Craft.Uploader(this.$uploadButton,t),this.$uploadButton.on("click",$.proxy(function(){this.$uploadButton.hasClass("disabled")||this.isIndexBusy||this.$uploadButton.parent().find("input[name=assets-upload]").trigger("click")},this)),this.base()},onSelectSource:function(){this._getSourceByKey(this.sourceKey).data("folder-id")&&this.$source.attr("data-upload")?(this.uploader.setParams({folderId:this.$source.attr("data-folder-id")}),this.$uploadButton.removeClass("disabled")):this.$uploadButton.addClass("disabled"),this.base()},_getFolderUidFromSourceKey:function(t){var e=t.match(/\bfolder:([0-9a-f\-]+)$/);return e?e[1]:null},startSearching:function(){if(this.$source.siblings("ul").length){if(null===this.$includeSubfoldersContainer){var t="includeSubfolders-"+Math.floor(1e9*Math.random());this.$includeSubfoldersContainer=$('<div style="margin-bottom: -23px; opacity: 0;"/>').insertAfter(this.$search);var e=$('<div style="padding-top: 5px;"/>').appendTo(this.$includeSubfoldersContainer);this.$includeSubfoldersCheckbox=$('<input type="checkbox" id="'+t+'" class="checkbox"/>').appendTo(e),$('<label class="light smalltext" for="'+t+'"/>').text(" "+Craft.t("app","Search in subfolders")).appendTo(e),this.addListener(this.$includeSubfoldersCheckbox,"change",function(){this.setSelecetedSourceState("includeSubfolders",this.$includeSubfoldersCheckbox.prop("checked")),this.updateElements()})}else this.$includeSubfoldersContainer.velocity("stop");var i=this.getSelectedSourceState("includeSubfolders",!1);this.$includeSubfoldersCheckbox.prop("checked",i),this.$includeSubfoldersContainer.velocity({marginBottom:0,opacity:1},"fast"),this.showingIncludeSubfoldersCheckbox=!0}this.base()},stopSearching:function(){this.showingIncludeSubfoldersCheckbox&&(this.$includeSubfoldersContainer.velocity("stop"),this.$includeSubfoldersContainer.velocity({marginBottom:-23,opacity:0},"fast"),this.showingIncludeSubfoldersCheckbox=!1),this.base()},getViewParams:function(){var t=this.base();return this.showingIncludeSubfoldersCheckbox&&this.$includeSubfoldersCheckbox.prop("checked")&&(t.criteria.includeSubfolders=!0),t},_onUploadStart:function(){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar(),this.promptHandler.resetPrompts()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){var i=e.result,s=e.files[0].name,n=!0;i.success||i.conflict?(this._uploadedAssetIds.push(i.assetId),i.conflict&&(i.prompt={message:Craft.t("app",i.conflict,{file:i.filename}),choices:this._fileConflictTemplate.choices},this.promptHandler.addPrompt(i)),Craft.cp.runQueue()):(i.error?alert(Craft.t("app","Upload failed. The error message was: “{error}”",{error:i.error})):alert(Craft.t("app","Upload failed for {filename}.",{filename:s})),n=!1),this.uploader.isLastUpload()&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this.promptHandler.getPromptCount()?this.promptHandler.showBatchPrompts($.proxy(this,"_uploadFollowup")):n&&this._updateAfterUpload())},_updateAfterUpload:function(){"index"!==this.settings.context&&(this.setSortAttribute("dateModified"),this.setSortDirection("desc")),this.updateElements()},_uploadFollowup:function(t){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.promptHandler.resetPrompts();var e=function(){this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._updateAfterUpload()}.bind(this);this.progressBar.setItemCount(t.length);var r=function(i,s,n){var t={},e=null,a=function(t,e){"success"===e&&t.assetId?this._uploadedAssetIds.push(t.assetId):t.error&&alert(t.error),s++,this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),s===i.length?n():r(i,s,n)}.bind(this);"replace"===i[s].choice?(e="assets/replace-file",t.sourceAssetId=i[s].assetId,i[s].conflictingAssetId?t.assetId=i[s].conflictingAssetId:t.targetFilename=i[s].filename):"cancel"===i[s].choice&&(e="assets/delete-asset",t.assetId=i[s].assetId),e?Craft.postActionRequest(e,t,a):a({assetId:i[s].assetId},"success")}.bind(this);this.progressBar.showProgressBar(),r(t,0,e)},onUpdateElements:function(){this._onUpdateElements(!1,this.view.getAllElements()),this.view.on("appendElements",$.proxy(function(t){this._onUpdateElements(!0,t.newElements)},this)),this.base()},_onUpdateElements:function(t,e){if("index"===this.settings.context&&(t||this._assetDrag.removeAllItems(),this._assetDrag.addItems(e)),this._uploadedAssetIds.length){if(this.view.settings.selectable)for(var i=0;i<this._uploadedAssetIds.length;i++)this.view.selectElementById(this._uploadedAssetIds[i]);this._uploadedAssetIds=[]}this.base(t,e),this.removeListener(this.$elements,"keydown"),this.addListener(this.$elements,"keydown",this._onKeyDown.bind(this)),this.view.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.view.elementSelect.$focusedItem.find(".element");e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item).find(".element");Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.view.elementSelect,e)},_onDragStart:function(){this._tempExpandedFolders=[]},_getFileDragHelper:function(t){var e,i;switch(this.getSelectedSourceState("mode")){case"table":e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e);var s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.view.$table.children("tbody").children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove(),e.css("margin-"+Craft.left,19);else{var l=$(this._$firstRowCells[r]),h=l.width();l.width(h),o.width(h)}}return e;case"thumbs":return e=$('<div class="elements thumbviewhelper"/>').appendTo(Garnish.$bod),i=$('<ul class="thumbsview"/>').appendTo(e),t.appendTo(i),e}return $()},_onDropTargetChange:function(t){if(clearTimeout(this._expandDropTargetFolderTimeout),t){var e=t.data("folder-id");e?(this.dropTargetFolder=this._getSourceByKey(e),this._hasSubfolders(this.dropTargetFolder)&&!this._isExpanded(this.dropTargetFolder)&&(this._expandDropTargetFolderTimeout=setTimeout($.proxy(this,"_expandFolder"),500))):this.dropTargetFolder=null}t&&t[0]!==this.$source[0]?this.$source.removeClass("sel"):this.$source.addClass("sel")},_collapseExtraExpandedFolders:function(t){var e;clearTimeout(this._expandDropTargetFolderTimeout),t&&(e=this._getSourceByKey(t).parents("li").children("a"));for(var i=this._tempExpandedFolders.length-1;0<=i;i--){var s=this._tempExpandedFolders[i];void 0!==e&&0!==e.filter('[data-key="'+s.data("key")+'"]').length||(this._collapseFolder(s),this._tempExpandedFolders.splice(i,1))}},_getSourceByKey:function(t){return this.$sources.filter('[data-key$="'+t+'"]')},_hasSubfolders:function(t){return t.siblings("ul").find("li").length},_isExpanded:function(t){return t.parent("li").hasClass("expanded")},_expandFolder:function(){this._collapseExtraExpandedFolders(this.dropTargetFolder.data("folder-id")),this.dropTargetFolder.siblings(".toggle").trigger("click"),this._tempExpandedFolders.push(this.dropTargetFolder)},_collapseFolder:function(t){t.parent().hasClass("expanded")&&t.siblings(".toggle").trigger("click")},_createFolderContextMenu:function(t){if(this._getFolderUidFromSourceKey(t.data("key"))){var e=[{label:Craft.t("app","New subfolder"),onClick:$.proxy(this,"_createSubfolder",t)}];"index"===this.settings.context&&1<this._getSourceLevel(t)&&(e.push({label:Craft.t("app","Rename folder"),onClick:$.proxy(this,"_renameFolder",t)}),e.push({label:Craft.t("app","Delete folder"),onClick:$.proxy(this,"_deleteFolder",t)})),new Garnish.ContextMenu(t,e,{menuClass:"menu"})}},_createSubfolder:function(n){var t=prompt(Craft.t("app","Enter the name of the folder"));if(t){var e={parentId:n.data("folder-id"),folderName:t};this.setIndexBusy(),Craft.postActionRequest("assets/create-folder",e,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){this._prepareParentForChildren(n);var i=$('<li><a data-key="'+n.data("key")+"/folder:"+t.folderUid+'"'+(Garnish.hasAttr(n,"data-has-thumbs")?" data-has-thumbs":"")+' data-upload="'+n.attr("data-upload")+'" data-folder-id="'+t.folderId+'">'+t.folderName+"</a></li>"),s=i.children("a:first");this._appendSubfolder(n,i),this.initSource(s)}"success"===e&&t.error&&alert(t.error)},this))}},_deleteFolder:function(s){if(confirm(Craft.t("app","Really delete folder “{folder}”?",{folder:$.trim(s.text())}))){var t={folderId:s.data("folder-id")};this.setIndexBusy(),Craft.postActionRequest("assets/delete-folder",t,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){var i=this._getParentSource(s);this.deinitSource(s),s.parent().remove(),this._cleanUpTree(i)}"success"===e&&t.error&&alert(t.error)},this))}},_renameFolder:function(i){var t=$.trim(i.text()),e=prompt(Craft.t("app","Rename folder"),t);if(e&&e!==t){var s={folderId:i.data("folder-id"),newName:e};this.setIndexBusy(),Craft.postActionRequest("assets/rename-folder",s,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&t.success&&(i.text(t.newName),this._getFolderUidFromSourceKey(this.sourceSelect.$selectedItems.data("key"))===this._getFolderUidFromSourceKey(i.data("key"))&&this.updateElements()),"success"===e&&t.error&&alert(t.error)},this),"json")}},_prepareParentForChildren:function(t){this._hasSubfolders(t)||(t.parent().addClass("expanded").append('<div class="toggle"></div><ul></ul>'),this.initSourceToggle(t))},_appendSubfolder:function(t,e){for(var i=t.siblings("ul").children("li"),s=$.trim(e.children("a:first").text()),n=!1,a=0;a<i.length;a++){var r=$(i[a]);if($.trim(r.children("a:first").text())>s){r.before(e),n=!0;break}}n||t.siblings("ul").append(e)},_cleanUpTree:function(t){null!==t&&0===t.siblings("ul").children("li").length&&(this.deinitSourceToggle(t),t.siblings("ul").remove(),t.siblings(".toggle").remove(),t.parent().removeClass("expanded"))},_positionProgressBar:function(){this.progressBar||(this.progressBar=new Craft.ProgressBar(this.$main,!0));var t=$(),e=0,i=0,s=(e="index"===this.settings.context?(t=this.progressBar.$progressBar.closest("#content"),Garnish.$win.scrollTop()):(t=this.progressBar.$progressBar.closest(".main"),this.$main.scrollTop()))-t.offset().top,n=Garnish.$win.height();i=t.height()>n?n/2-6+s:t.height()/2-6,"index"!==this.settings.context&&(i=e+(t.height()/2-6)),this.progressBar.$progressBar.css({top:i})},_performBatchRequests:function(i,s){for(var n=[],t=function(t){Craft.postActionRequest(t.action,t.params,function(t,e){this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),"success"===e&&(n.push(t),Craft.cp.runQueue()),n.length>=i.length&&s(n)}.bind(this))}.bind(this),e=0;e<i.length;e++)t(i[e])}}),Craft.registerElementIndexClass("craft\\elements\\Asset",Craft.AssetIndex),Craft.AssetSelectInput=Craft.BaseElementSelectInput.extend({requestId:0,hud:null,uploader:null,progressBar:null,originalFilename:"",originalExtension:"",init:function(){0<arguments.length&&"object"==typeof arguments[0]&&(arguments[0].editorSettings={onShowHud:$.proxy(this.resetOriginalFilename,this),onCreateForm:$.proxy(this._renameHelper,this),validators:[$.proxy(this.validateElementForm,this)]}),this.base.apply(this,arguments),this._attachUploader(),this.addListener(this.$elementsContainer,"keydown",this._onKeyDown.bind(this)),this.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.elementSelect.$focusedItem;e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item);Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.elementSelect,e)},createElementEditor:function(t){return this.base(t,{params:{defaultFieldLayoutId:this.settings.defaultFieldLayoutId}})},_attachUploader:function(){this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl("assets/save-asset"),dropZone:this.$container,formData:{fieldId:this.settings.fieldId,elementId:this.settings.sourceElementId}};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),t.canAddMoreFiles=$.proxy(this,"canAddMoreFiles"),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),this.uploader=new Craft.Uploader(this.$container,t)},selectUploadedFile:function(t){if(this.canAddMoreElements()){var e=t.$element;e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e.appendTo(this.$elementsContainer);var i=-(e.outerWidth()+10);this.$addElementBtn.css("margin-"+Craft.left,i+"px");var s={};s["margin-"+Craft.left]=0,this.$addElementBtn.velocity(s,"fast"),this.addElements(e),delete this.modal}},_onUploadStart:function(){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{var i={elementId:e.result.assetId,siteId:this.settings.criteria.siteId,size:this.settings.viewMode};Craft.postActionRequest("elements/get-element-html",i,function(t){if(t.error)alert(t.error);else{var e=$(t.html);Craft.appendHeadHtml(t.headHtml),this.selectUploadedFile(Craft.getElementInfo(e))}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"),window.draftEditor&&window.draftEditor.checkForm())}.bind(this)),Craft.cp.runQueue()}},canAddMoreFiles:function(t){return!this.settings.limit||this.$elements.length+t<this.settings.limit},_parseFilename:function(t){var e=t.split("."),i="";return 1<e.length&&(i=e.pop()),{extension:i,baseFileName:e.join(".")}},_renameHelper:function(t){$(".renameHelper",t).on("focus",$.proxy(function(t){var e=t.currentTarget,i=this._parseFilename(e.value);""===this.originalFilename&&""===this.originalExtension&&(this.originalFilename=i.baseFileName,this.originalExtension=i.extension);var s=i.baseFileName.length;if(void 0!==e.selectionStart)e.selectionStart=0,e.selectionEnd=s;else if(document.selection&&document.selection.createRange){e.select();var n=document.selection.createRange();n.collapse(!0),n.moveEnd("character",s),n.moveStart("character",0),n.select()}},this))},resetOriginalFilename:function(){this.originalFilename="",this.originalExtension=""},validateElementForm:function(){var t=$(".renameHelper",this.elementEditor.hud.$hud.data("elementEditor").$form),e=this._parseFilename(t.val());return e.extension===this.originalExtension||(""===e.extension?this.originalFilename!==e.baseFileName?(t.val(e.baseFileName+"."+this.originalExtension),!0):confirm(Craft.t("app","Are you sure you want to remove the extension “.{ext}”?",{ext:this.originalExtension})):confirm(Craft.t("app","Are you sure you want to change the extension from “.{oldExt}” to “.{newExt}”?",{oldExt:this.originalExtension,newExt:e.extension})))}}),Craft.AssetSelectorModal=Craft.BaseElementSelectorModal.extend({$selectTransformBtn:null,_selectedTransform:null,init:function(t,e){e=$.extend({},Craft.AssetSelectorModal.defaults,e),this.base(t,e),e.transforms.length&&this.createSelectTransformButton(e.transforms)},createSelectTransformButton:function(t){if(t&&t.length){var e=$('<div class="btngroup"/>').appendTo(this.$primaryButtons);this.$selectBtn.appendTo(e),this.$selectTransformBtn=$('<div class="btn menubtn disabled">'+Craft.t("app","Select transform")+"</div>").appendTo(e);for(var i=$('<div class="menu" data-align="right"></div>').insertAfter(this.$selectTransformBtn),s=$("<ul></ul>").appendTo(i),n=0;n<t.length;n++)$('<li><a data-transform="'+t[n].handle+'">'+t[n].name+"</a></li>").appendTo(s);var a=new Garnish.MenuBtn(this.$selectTransformBtn,{onOptionSelect:$.proxy(this,"onSelectTransform")});a.disable(),this.$selectTransformBtn.data("menuButton",a)}},onSelectionChange:function(t){var e=this.elementIndex.getSelectedElements(),i=!1;if(e.length&&this.settings.transforms.length){i=!0;for(var s=0;s<e.length&&$(".element.hasthumb:first",e[s]).length;s++);}var n=null;this.$selectTransformBtn&&(n=this.$selectTransformBtn.data("menuButton")),i?(n&&n.enable(),this.$selectTransformBtn.removeClass("disabled")):this.$selectTransformBtn&&(n&&n.disable(),this.$selectTransformBtn.addClass("disabled")),this.base()},onSelectTransform:function(t){var e=$(t).data("transform");this.selectImagesWithTransform(e)},selectImagesWithTransform:function(t){void 0===Craft.AssetSelectorModal.transformUrls[t]&&(Craft.AssetSelectorModal.transformUrls[t]={});for(var e=this.elementIndex.getSelectedElements(),i=[],s=0;s<e.length;s++){var n=$(e[s]),a=Craft.getElementInfo(n).id;void 0===Craft.AssetSelectorModal.transformUrls[t][a]&&i.push(a)}i.length?(this.showFooterSpinner(),this.fetchMissingTransformUrls(i,t,$.proxy(function(){this.hideFooterSpinner(),this.selectImagesWithTransform(t)},this))):(this._selectedTransform=t,this.selectElements(),this._selectedTransform=null)},fetchMissingTransformUrls:function(i,s,n){var a=i.pop(),t={assetId:a,handle:s};Craft.postActionRequest("assets/generate-transform",t,$.proxy(function(t,e){Craft.AssetSelectorModal.transformUrls[s][a]=!1,"success"!==e||t.url&&(Craft.AssetSelectorModal.transformUrls[s][a]=t.url),i.length?this.fetchMissingTransformUrls(i,s,n):n()},this))},getElementInfo:function(t){var e=this.base(t);if(this._selectedTransform)for(var i=0;i<e.length;i++){var s=e[i].id;void 0!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&!1!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&(e[i].url=Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s])}return e},onSelect:function(t){this.settings.onSelect(t,this._selectedTransform)}},{defaults:{canSelectImageTransforms:!1,transforms:[]},transformUrls:{}}),Craft.registerElementSelectorModalClass("craft\\elements\\Asset",Craft.AssetSelectorModal),Craft.AuthManager=Garnish.Base.extend({remainingSessionTime:null,checkRemainingSessionTimer:null,showLoginModalTimer:null,decrementLogoutWarningInterval:null,showingLogoutWarningModal:!1,showingLoginModal:!1,logoutWarningModal:null,loginModal:null,$logoutWarningPara:null,$passwordInput:null,$passwordSpinner:null,$loginBtn:null,$loginErrorPara:null,submitLoginIfLoggedOut:!1,init:function(){this.updateRemainingSessionTime(Craft.remainingSessionTime)},setCheckRemainingSessionTimer:function(t){this.checkRemainingSessionTimer&&clearTimeout(this.checkRemainingSessionTimer),this.checkRemainingSessionTimer=setTimeout($.proxy(this,"checkRemainingSessionTime"),1e3*t)},checkRemainingSessionTime:function(t){$.ajax({url:Craft.getActionUrl("users/get-remaining-session-time",t?null:"dontExtendSession=1"),type:"GET",dataType:"json",complete:$.proxy(function(t,e){"success"===e?(void 0!==t.responseJSON.csrfTokenValue&&void 0!==Craft.csrfTokenValue&&(Craft.csrfTokenValue=t.responseJSON.csrfTokenValue),this.updateRemainingSessionTime(t.responseJSON.timeout),this.submitLoginIfLoggedOut=!1):this.updateRemainingSessionTime(-1)},this)})},updateRemainingSessionTime:function(t){this.remainingSessionTime=parseInt(t),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime?(this.remainingSessionTime?(this.showingLogoutWarningModal||this.showLogoutWarningModal(),this.remainingSessionTime<Craft.AuthManager.checkInterval&&(this.showLoginModalTimer&&clearTimeout(this.showLoginModalTimer),this.showLoginModalTimer=setTimeout($.proxy(this,"showLoginModal"),1e3*this.remainingSessionTime))):this.showingLoginModal?this.submitLoginIfLoggedOut&&this.submitLogin():this.showLoginModal(),this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval)):(this.hideLogoutWarningModal(),this.hideLoginModal(),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime+Craft.AuthManager.checkInterval?this.setCheckRemainingSessionTimer(this.remainingSessionTime-Craft.AuthManager.minSafeSessiotTime+1):this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval))},showLogoutWarningModal:function(){var t;if(t=!!this.showingLoginModal&&(this.hideLoginModal(!0),!0),this.showingLogoutWarningModal=!0,!this.logoutWarningModal){var e=$('<form id="logoutwarningmodal" class="modal alert fitted"/>'),i=$('<div class="body"/>').appendTo(e),s=$('<div class="buttons right"/>').appendTo(i),n=$('<div class="btn">'+Craft.t("app","Log out now")+"</div>").appendTo(s),a=$('<input type="submit" class="btn submit" value="'+Craft.t("app","Keep me logged in")+'" />').appendTo(s);this.$logoutWarningPara=$("<p/>").prependTo(i),this.logoutWarningModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark logoutwarningmodalshade",onFadeIn:function(){Garnish.isMobileBrowser(!0)||setTimeout(function(){a.trigger("focus")},100)}}),this.addListener(n,"activate","logout"),this.addListener(e,"submit","renewSession")}t?this.logoutWarningModal.quickShow():this.logoutWarningModal.show(),this.updateLogoutWarningMessage(),this.decrementLogoutWarningInterval=setInterval($.proxy(this,"decrementLogoutWarning"),1e3)},updateLogoutWarningMessage:function(){this.$logoutWarningPara.text(Craft.t("app","Your session will expire in {time}.",{time:Craft.secondsToHumanTimeDuration(this.remainingSessionTime)})),this.logoutWarningModal.updateSizeAndPosition()},decrementLogoutWarning:function(){0<this.remainingSessionTime&&(this.remainingSessionTime--,this.updateLogoutWarningMessage()),0===this.remainingSessionTime&&clearInterval(this.decrementLogoutWarningInterval)},hideLogoutWarningModal:function(t){this.showingLogoutWarningModal=!1,this.logoutWarningModal&&(t?this.logoutWarningModal.quickHide():this.logoutWarningModal.hide(),this.decrementLogoutWarningInterval&&clearInterval(this.decrementLogoutWarningInterval))},showLoginModal:function(){var t;if(t=!!this.showingLogoutWarningModal&&(this.hideLogoutWarningModal(!0),!0),this.showingLoginModal=!0,!this.loginModal){var e=$('<form id="loginmodal" class="modal alert fitted"/>'),i=$('<div class="body"><h2>'+Craft.t("app","Your session has ended.")+"</h2><p>"+Craft.t("app","Enter your password to log back in.")+"</p></div>").appendTo(e),s=$('<div class="inputcontainer">').appendTo(i),n=$('<div class="flex"/>').appendTo(s),a=$('<div class="flex-grow"/>').appendTo(n),r=$("<div/>").appendTo(n),o=$('<div class="passwordwrapper"/>').appendTo(a);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'"/>').appendTo(o),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(s),this.$loginBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Login")+'" />').appendTo(r),this.$loginErrorPara=$('<p class="error"/>').appendTo(i),this.loginModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark loginmodalshade",onFadeIn:$.proxy(function(){Garnish.isMobileBrowser(!0)||setTimeout($.proxy(function(){this.$passwordInput.trigger("focus")},this),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(e,"submit","login")}t?this.loginModal.quickShow():this.loginModal.show()},hideLoginModal:function(t){this.showingLoginModal=!1,this.loginModal&&(t?this.loginModal.quickHide():this.loginModal.hide())},logout:function(){$.get({url:Craft.getActionUrl("users/logout"),dataType:"json",success:$.proxy(function(){Craft.redirectTo("")},this)})},renewSession:function(t){t&&t.preventDefault(),this.hideLogoutWarningModal(),this.checkRemainingSessionTime(!0)},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$loginBtn.removeClass("disabled"),!0):(this.$loginBtn.addClass("disabled"),!1)},login:function(t){t&&t.preventDefault(),this.validatePassword()&&(this.$passwordSpinner.removeClass("hidden"),this.clearLoginError(),void 0!==Craft.csrfTokenValue?(this.submitLoginIfLoggedOut=!0,this.checkRemainingSessionTime()):this.submitLogin())},submitLogin:function(){var t={loginName:Craft.username,password:this.$passwordInput.val()};Craft.postActionRequest("users/login",t,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.hideLoginModal(),this.checkRemainingSessionTime()):(this.showLoginError(t.error),Garnish.shake(this.loginModal.$container),Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")):this.showLoginError()},this))},showLoginError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$loginErrorPara.text(t),this.loginModal.updateSizeAndPosition()},clearLoginError:function(){this.showLoginError("")}},{checkInterval:60,minSafeSessiotTime:120}),Craft.CategoryIndex=Craft.BaseElementIndex.extend({editableGroups:null,$newCategoryBtnGroup:null,$newCategoryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.editableGroups=[];for(var t=0;t<Craft.editableCategoryGroups.length;t++){var e=Craft.editableCategoryGroups[t];this.getSourceByKey("group:"+e.uid)&&this.editableGroups.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultGroupHandle)for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultGroupHandle)return e.data("key")}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s=this.$source.data("handle");if(this.editableGroups.length){var n,a;if(this.$newCategoryBtnGroup&&this.$newCategoryBtnGroup.remove(),s)for(t=0;t<this.editableGroups.length;t++)if(this.editableGroups[t].handle===s){n=this.editableGroups[t];break}if(this.$newCategoryBtnGroup=$('<div class="btngroup submit"/>'),n?(e=this._getGroupTriggerHref(n),i="index"===this.settings.context?Craft.t("app","New category"):Craft.t("app","New {group} category",{group:n.name}),this.$newCategoryBtn=$('<a class="btn submit add icon" '+e+">"+Craft.escapeHtml(i)+"</a>").appendTo(this.$newCategoryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newCategoryBtn,"click",function(t){this._openCreateCategoryModal(t.currentTarget.getAttribute("data-id"))}),1<this.editableGroups.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newCategoryBtnGroup))):this.$newCategoryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New category")+"</div>").appendTo(this.$newCategoryBtnGroup),a){var r='<div class="menu"><ul>';for(t=0;t<this.editableGroups.length;t++){var o=this.editableGroups[t];"index"!==this.settings.context&&o===n||(e=this._getGroupTriggerHref(o),i="index"===this.settings.context?o.name:Craft.t("app","New {group} category",{group:o.name}),r+="<li><a "+e+'">'+Craft.escapeHtml(i)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newCategoryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateCategoryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newCategoryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="categories";s&&(h+="/"+s),history.replaceState({},"",Craft.getUrl(h))}}},_getGroupTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="categories/"+t.handle+"/new";if(this.siteId&&this.siteId!=Craft.primarySiteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(e+="/"+Craft.sites[i].handle);return'href="'+Craft.getUrl(e)+'"'},_openCreateCategoryModal:function(t){if(!this.$newCategoryBtn.hasClass("loading")){for(var i,e=0;e<this.editableGroups.length;e++)if(this.editableGroups[e].id==t){i=this.editableGroups[e];break}if(i){this.$newCategoryBtn.addClass("inactive");var s=this.$newCategoryBtn.text();this.$newCategoryBtn.text(Craft.t("app","New {group} category",{group:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newCategoryBtnGroup,elementType:"craft\\elements\\Category",siteId:this.siteId,attributes:{groupId:t},onBeginLoading:$.proxy(function(){this.$newCategoryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newCategoryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newCategoryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="group:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Category",Craft.CategoryIndex),Craft.CategorySelectInput=Craft.BaseElementSelectInput.extend({setSettings:function(){this.base.apply(this,arguments),this.settings.sortable=!1},getModalSettings:function(){var t=this.base();return t.hideOnSelect=!1,t},getElements:function(){return this.$elementsContainer.find(".element")},onModalSelect:function(o){this.modal.disable(),this.modal.disableCancelBtn(),this.modal.disableSelectBtn(),this.modal.showFooterSpinner();for(var t=this.getSelectedElementIds(),e=0;e<o.length;e++)t.push(o[e].id);var i={categoryIds:t,siteId:o[0].siteId,id:this.settings.id,name:this.settings.name,branchLimit:this.settings.branchLimit,selectionLabel:this.settings.selectionLabel};Craft.postActionRequest("elements/get-categories-input-html",i,$.proxy(function(t,e){if(this.modal.enable(),this.modal.enableCancelBtn(),this.modal.enableSelectBtn(),this.modal.hideFooterSpinner(),"success"===e){var i=$(t.html).children(".elements");this.$elementsContainer.replaceWith(i),this.$elementsContainer=i,this.resetElements();for(var s=[],n=0;n<o.length;n++){var a=o[n],r=this.getElementById(a.id);r&&(this.animateElementIntoPlace(a.$element,r),s.push(a))}this.updateDisabledElementsInModal(),this.modal.hide(),this.onSelectElements(s)}},this))},removeElement:function(t){var e=t.add(t.parent().siblings("ul").find(".element"));this.removeElements(e);for(var i=0;i<e.length;i++)this._animateCategoryAway(e,i)},_animateCategoryAway:function(i,t){var e;t===i.length-1&&(e=$.proxy(function(){var t=i.first().parent().parent(),e=t.parent();e[0]===this.$elementsContainer[0]||t.siblings().length?t.remove():e.remove()},this));var s=$.proxy(function(){this.animateElementAway(i.eq(t),e)},this);0===t?s():setTimeout(s,100*t)}}),Craft.charts={},Craft.charts.DataTable=Garnish.Base.extend({columns:null,rows:null,init:function(t){columns=t.columns,rows=t.rows,rows.forEach($.proxy(function(i){$.each(i,function(t){var e;switch(columns[t].type){case"date":e=d3.timeParse("%Y-%m-%d"),i[t]=e(i[t]);break;case"datetime":e=d3.timeParse("%Y-%m-%d %H:00:00"),i[t]=e(i[t]);break;case"percent":i[t]=i[t]/100;break;case"number":i[t]=+i[t]}})},this)),this.columns=columns,this.rows=rows}}),Craft.charts.Tip=Garnish.Base.extend({$container:null,$tip:null,init:function(t){this.$container=t,this.$tip=$('<div class="tooltip"></div>').appendTo(this.$container),this.hide()},setContent:function(t){this.$tip.html(t)},setPosition:function(t){this.$tip.css("left",t.left+"px"),this.$tip.css("top",t.top+"px")},show:function(){this.$tip.css("display","block")},hide:function(){this.$tip.css("display","none")}}),Craft.charts.BaseChart=Garnish.Base.extend({$container:null,$chart:null,chartBaseClass:"cp-chart",dataTable:null,formatLocale:null,timeFormatLocale:null,orientation:null,svg:null,width:null,height:null,init:function(t,e){this.$container=t,this.setSettings(Craft.charts.BaseChart.defaults),this.setSettings(e);var i={formats:window.d3Formats,formatLocaleDefinition:window.d3FormatLocaleDefinition,timeFormatLocaleDefinition:window.d3TimeFormatLocaleDefinition};this.setSettings(i),d3.select(window).on("resize",$.proxy(function(){this.resize()},this))},setSettings:function(t,e){var i=void 0===this.settings?{}:this.settings;this.settings=$.extend(!0,{},i,e,t)},draw:function(t,e){this.setSettings(e),this.dataTable=t,this.formatLocale=d3.formatLocale(this.settings.formatLocaleDefinition),this.timeFormatLocale=d3.timeFormatLocale(this.settings.timeFormatLocaleDefinition),this.orientation=this.settings.orientation,this.$chart&&this.$chart.remove();var i=this.chartBaseClass;this.settings.chartClass&&(i+=" "+this.settings.chartClass),this.$chart=$('<div class="'+i+'" />').appendTo(this.$container)},resize:function(){this.draw(this.dataTable,this.settings)},onAfterDrawTicks:function(){$(".tick",this.$chart).each(function(t,e){var i=$("text",e);i.clone().appendTo(e),i.attr("stroke","#ffffff"),i.attr("stroke-width",3)})}},{defaults:{formatLocaleDefinition:null,timeFormatLocaleDefinition:null,formats:{numberFormat:",.2f",percentFormat:",.2%",currencyFormat:"$,.2f",shortDateFormats:{day:"%-m/%-d",month:"%-m/%y",year:"%Y"}},margin:{top:0,right:0,bottom:0,left:0},chartClass:null,colors:["#0594D1","#DE3800","#FF9A00","#009802","#9B009B"]}}),Craft.charts.Area=Craft.charts.BaseChart.extend({tip:null,drawingArea:null,init:function(t,e){this.base(t,Craft.charts.Area.defaults),this.setSettings(e)},draw:function(t,e){this.base(t,e),this.tip&&(this.tip=null);var i=this.getChartMargin();this.width=this.$chart.width()-i.left-i.right,this.height=this.$chart.height()-i.top-i.bottom;var s={width:this.width+(i.left+i.right),height:this.height+(i.top+i.bottom),translateX:"rtl"!==this.orientation?i.left:i.right,translateY:i.top};this.svg=d3.select(this.$chart.get(0)).append("svg").attr("width",s.width).attr("height",s.height),this.drawingArea=this.svg.append("g").attr("transform","translate("+s.translateX+","+s.translateY+")"),this.drawTicks(),this.drawAxes(),this.drawChart(),this.drawTipTriggers()},drawTicks:function(){var t=this.getX(!0),e=d3.axisBottom(t).tickFormat(this.getXFormatter()).ticks(3);this.drawingArea.append("g").attr("class","x ticks-axis").attr("transform","translate(0, "+this.height+")").call(e);var i,s=this.getY();"rtl"!==this.orientation?(i=d3.axisLeft(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").call(i)):(i=d3.axisRight(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").attr("transform","translate("+this.width+",0)").call(i)),this.onAfterDrawTicks()},drawAxes:function(){if(this.settings.xAxis.showAxis){var t=this.getX(),e=d3.axisBottom(t).ticks(0).tickSizeOuter(0);this.drawingArea.append("g").attr("class","x axis").attr("transform","translate(0, "+this.height+")").call(e)}if(this.settings.yAxis.showAxis){var i,s=this.getY();"rtl"===this.orientation?(i=d3.axisLeft(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate("+(this.width-0)+", 0)").call(i)):(i=d3.axisRight(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(i))}},drawChart:function(){var e=this.getX(!0),i=this.getY();if(this.settings.xAxis.gridlines){var t=d3.axisBottom(e);this.drawingArea.append("g").attr("class","x grid-line").attr("transform","translate(0,"+this.height+")").call(t.tickSize(-this.height,0,0).tickFormat(""))}if(this.settings.yAxis.gridlines){var s=d3.axisLeft(i);this.drawingArea.append("g").attr("class","y grid-line").attr("transform","translate(0 , 0)").call(s.tickSize(-this.width,0).tickFormat("").tickValues(this.getYTickValues()).ticks(2))}var n=d3.line().x(function(t){return e(t[0])}).y(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-line").append("path").datum(this.dataTable.rows).style("fill","none").style("stroke",this.settings.colors[0]).style("stroke-width","3px").attr("d",n);var a=d3.area().x(function(t){return e(t[0])}).y0(this.height).y1(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-area").append("path").datum(this.dataTable.rows).style("fill",this.settings.colors[0]).style("fill-opacity","0.3").attr("d",a),this.settings.plots&&this.drawingArea.append("g").attr("class","plots").selectAll("circle").data(this.dataTable.rows).enter().append("circle").style("fill",this.settings.colors[0]).attr("class",$.proxy(function(t,e){return"plot plot-"+e},this)).attr("r",4).attr("cx",$.proxy(function(t){return e(t[0])},this)).attr("cy",$.proxy(function(t){return i(t[1])},this))},drawTipTriggers:function(){if(this.settings.tips){this.tip||(this.tip=new Craft.charts.Tip(this.$chart));var t=this.getChartMargin(),e=(this.drawingArea.select(".x path.domain").node().getTotalLength()-t.left-t.right-12)/(this.dataTable.rows.length-1),i=Math.max(0,e),c=this.getX(!0),u=this.getY();this.drawingArea.append("g").attr("class","tip-triggers").selectAll("rect").data(this.dataTable.rows).enter().append("rect").attr("class","tip-trigger").style("fill","transparent").style("fill-opacity","1").attr("width",i).attr("height",this.height).attr("x",$.proxy(function(t){return c(t[0])-i/2},this)).on("mouseover",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",5);var i=$("<div />"),s=$('<div class="x-value" />').appendTo(i),n=$('<div class="y-value" />').appendTo(i);s.html(this.getXFormatter()(t[0])),n.html(this.getYFormatter()(t[1]));var a=i.get(0);this.tip.setContent(a);var r,o=this.getChartMargin(),l=u(t[1])+24;if("rtl"!==this.orientation){r=c(t[0])+o.left+24;var h=this.$chart.offset().left+r+this.tip.$tip.width();this.$chart.offset().left+this.$chart.width()-24<h&&(r=c(t[0])-(this.tip.$tip.width()+24))}else r=c(t[0])-(this.tip.$tip.width()+o.left+24);r<0&&(r=c(t[0])+o.left+24);var d={top:l,left:r};this.tip.setPosition(d),this.tip.show()},this)).on("mouseout",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",4),this.tip.hide()},this))}},getChartMargin:function(){var t=this.settings.margin,e=this.getYTickValues(),s=0;return $.each(e,$.proxy(function(t,e){var i=8*this.getYFormatter()(e).length;s<i&&(s=i)},this)),s+=10,t.left=s,t},getX:function(t){var e=d3.min(this.dataTable.rows,function(t){return t[0]}),i=d3.max(this.dataTable.rows,function(t){return t[0]}),s=[e,i];"rtl"===this.orientation&&(s=[i,e]);var n=0,a=0;t&&(a=n=0);var r=d3.scaleTime().range([n,this.width-a]);return r.domain(s),r},getY:function(){var t=[0,this.getYMaxValue()],e=d3.scaleLinear().range([this.height,0]);return e.domain(t),e},getXFormatter:function(){return this.settings.xAxis.formatter!==$.noop?this.settings.xAxis.formatter(this):Craft.charts.utils.getTimeFormatter(this.timeFormatLocale,this.settings)},getYFormatter:function(){return this.settings.yAxis.formatter!==$.noop?this.settings.yAxis.formatter(this):Craft.charts.utils.getNumberFormatter(this.formatLocale,this.dataTable.columns[1].type,this.settings)},getYMaxValue:function(){return d3.max(this.dataTable.rows,function(t){return t[1]})},getYTickValues:function(){var t=this.getYMaxValue();return 1<t?[t/2,t]:[0,t]}},{defaults:{chartClass:"area",margin:{top:25,right:5,bottom:25,left:0},plots:!0,tips:!0,xAxis:{gridlines:!1,showAxis:!0,formatter:$.noop},yAxis:{gridlines:!0,showAxis:!1,formatter:$.noop}}}),Craft.charts.utils={getDuration:function(t){var e=parseInt(t,10),i={hours:Math.floor(e/3600),minutes:Math.floor((e-3600*i.hours)/60),seconds:e-3600*i.hours-60*i.minutes};return i.hours<10&&(i.hours="0"+i.hours),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds),i.hours+":"+i.minutes+":"+i.seconds},getTimeFormatter:function(t,e){switch(e.dataScale){case"year":return t.format("%Y");case"month":return t.format(e.formats.shortDateFormats.month);case"hour":return t.format(e.formats.shortDateFormats.day+" %H:00:00");default:return t.format(e.formats.shortDateFormats.day)}},getNumberFormatter:function(t,e,i){switch(e){case"currency":return t.format(i.formats.currencyFormat);case"percent":return t.format(i.formats.percentFormat);case"time":return Craft.charts.utils.getDuration;case"number":return t.format(i.formats.numberFormat)}}},Craft.ColorInput=Garnish.Base.extend({$container:null,$input:null,$colorContainer:null,$colorPreview:null,$colorInput:null,init:function(t){this.$container=$(t),this.$input=this.$container.children(".color-input"),this.$colorContainer=this.$container.children(".color"),this.$colorPreview=this.$colorContainer.children(".color-preview"),this.createColorInput(),this.handleTextChange(),this.addListener(this.$input,"textchange","handleTextChange")},createColorInput:function(){var t=document.createElement("input");t.setAttribute("type","color"),"color"===t.type&&(this.$colorContainer.removeClass("static"),this.$colorInput=$(t).addClass("hidden").insertAfter(this.$input),this.addListener(this.$colorContainer,"click",function(){this.$colorInput.trigger("click")}),this.addListener(this.$colorInput,"change","updateColor"))},updateColor:function(){this.$input.val(this.$colorInput.val()),this.$input.data("garnish-textchange-value",this.$colorInput.val()),this.handleTextChange()},handleTextChange:function(){var t=this.$input.val();t.length&&"#"!==t?("#"!==t[0]&&(t="#"+t,this.$input.val(t),this.$input.data("garnish-textchange-value",t)),this.$colorPreview.css("background-color",t),this.$colorInput&&this.$colorInput.val(t)):this.$colorPreview.css("background-color","")}},{_browserSupportsColorInputs:null,doesBrowserSupportColorInputs:function(){return Craft.ColorInput._browserSupportsColorInputs,Craft.ColorInput._browserSupportsColorInputs}}),Craft.CP=Garnish.Base.extend({authManager:null,$nav:null,$mainContainer:null,$alerts:null,$crumbs:null,$notificationContainer:null,$main:null,$primaryForm:null,$header:null,$mainContent:null,$details:null,$selectedTab:null,$sidebar:null,$contentContainer:null,$edition:null,$collapsibleTables:null,fixedHeader:!1,enableQueue:!0,jobInfo:null,displayedJobInfo:null,displayedJobInfoUnchanged:1,trackJobProgressTimeout:null,jobProgressIcon:null,checkingForUpdates:!1,forcingRefreshOnUpdatesCheck:!1,checkForUpdatesCallbacks:null,init:function(){0!==Craft.remainingSessionTime&&(this.authManager=new Craft.AuthManager),this.$nav=$("#nav"),this.$mainContainer=$("#main-container"),this.$alerts=$("#alerts"),this.$crumbs=$("#crumbs"),this.$notificationContainer=$("#notifications"),this.$main=$("#main"),this.$primaryForm=$("#main-form"),this.$header=$("#header"),this.$mainContent=$("#main-content"),this.$details=$("#details"),this.$sidebar=$("#sidebar"),this.$contentContainer=$("#content-container"),this.$collapsibleTables=$("table.collapsible"),this.$edition=$("#edition"),this.updateSidebarMenuLabel(),this.addListener(Garnish.$win,"scroll","updateFixedHeader"),this.updateFixedHeader(),Garnish.$doc.ready($.proxy(function(){this.addListener(Garnish.$win,"resize","updateResponsiveTables"),this.updateResponsiveTables();var t=this.$notificationContainer.children(".error"),e=this.$notificationContainer.children(":not(.error)");t.delay(2*Craft.CP.notificationDuration).velocity("fadeOut"),e.delay(Craft.CP.notificationDuration).velocity("fadeOut"),Garnish.requestAnimationFrame($.proxy(this,"initConfirmUnloadForms"))},this)),this.$alerts.length&&this.initAlerts(),this.addListener($("#nav-toggle"),"click","toggleNav"),this.addListener($("#sidebar-toggle"),"click","toggleSidebar"),this.$primaryForm.length||(this.$primaryForm=$("form[data-saveshortcut]:first")),this.$primaryForm.length&&Garnish.hasAttr(this.$primaryForm,"data-saveshortcut")&&this.addListener(Garnish.$doc,"keydown",function(t){return Garnish.isCtrlKeyPressed(t)&&t.keyCode===Garnish.S_KEY&&(t.preventDefault(),this.submitPrimaryForm()),!0}),this.initTabs(),this.$edition.hasClass("hot")&&this.addListener(this.$edition,"click",function(){document.location.href=Craft.getUrl("plugin-store/upgrade-craft")}),$.isTouchCapable()&&(this.$mainContainer.on("focus","input, textarea, .focusable-input",$.proxy(this,"_handleInputFocus")),this.$mainContainer.on("blur","input, textarea, .focusable-input",$.proxy(this,"_handleInputBlur"))),$("a").each(function(){this.hostname.length&&this.hostname!==location.hostname&&void 0===$(this).attr("target")&&$(this).attr("rel","noopener").attr("target","_blank")})},initConfirmUnloadForms:function(){if(this.$confirmUnloadForms=$("form[data-confirm-unload]"),this.$confirmUnloadForms.length){for(var t,e,i=0;i<this.$confirmUnloadForms.length;i++)(t=this.$confirmUnloadForms.eq(i)).data("initialSerializedValue")||(e="function"==typeof t.data("serializer")?t.data("serializer")():t.serialize(),t.data("initialSerializedValue",e)),this.addListener(t,"submit",function(){this.removeListener(Garnish.$win,"beforeunload")});this.addListener(Garnish.$win,"beforeunload",function(t){var e,i,s=!1;if(void 0!==Craft.livePreview&&Craft.livePreview.inPreviewMode)s=!0;else for(var n=0;n<this.$confirmUnloadForms.length;n++)if(i="function"==typeof(e=this.$confirmUnloadForms.eq(n)).data("serializer")?e.data("serializer")():e.serialize(),e.data("initialSerializedValue")!==i){s=!0;break}if(s){var a=Craft.t("app","Any changes will be lost if you leave this page.");return t?t.originalEvent.returnValue=a:window.event.returnValue=a,a}})}},_handleInputFocus:function(){this.updateFixedHeader()},_handleInputBlur:function(){this.updateFixedHeader()},submitPrimaryForm:function(){this.trigger("beforeSaveShortcut"),this.$primaryForm.data("saveshortcut-redirect")&&$('<input type="hidden" name="redirect" value="'+this.$primaryForm.data("saveshortcut-redirect")+'"/>').appendTo(this.$primaryForm),this.$primaryForm.trigger({type:"submit",saveShortcut:!0})},updateSidebarMenuLabel:function(){var t=this.$sidebar.find("a.sel:first"),e=t.children(".label");$("#selected-sidebar-item-label").text(e.length?e.text():t.text()),Garnish.$bod.removeClass("showing-sidebar")},toggleNav:function(){Garnish.$bod.toggleClass("showing-nav")},toggleSidebar:function(){Garnish.$bod.toggleClass("showing-sidebar")},initTabs:function(){this.$selectedTab=null;var t,e,i,s=$("#tabs").find("> ul > li"),n=[],a=[],r=0;for(t=0;t<s.length;t++)n[t]=$(s[t]),a[t]=n[t].width(),r+=a[t],(i=(e=n[t].children("a")).attr("href"))&&"#"===i.charAt(0)&&(this.addListener(e,"click",function(t){t.preventDefault(),this.selectTab(t.currentTarget)}),encodeURIComponent(i.substr(1))===document.location.hash.substr(1)&&this.selectTab(e)),!this.$selectedTab&&e.hasClass("sel")&&(this.$selectedTab=e);for(t=0;t<s.length;t++)n[t].css("max-width",100*a[t]/r+"%")},selectTab:function(t){var e=$(t);if(this.$selectedTab){if(this.$selectedTab.get(0)===e.get(0))return;this.deselectTab()}e.addClass("sel");var i=e.attr("href");$(i).removeClass("hidden"),"undefined"!=typeof history&&history.replaceState(void 0,void 0,i),Garnish.$win.trigger("resize"),Garnish.$doc.trigger("scroll"),this.$selectedTab=e},deselectTab:function(){this.$selectedTab&&(this.$selectedTab.removeClass("sel"),"#"===this.$selectedTab.attr("href").charAt(0)&&$(this.$selectedTab.attr("href")).addClass("hidden"),this.$selectedTab=null)},updateResponsiveTables:function(){for(this.updateResponsiveTables._i=0;this.updateResponsiveTables._i<this.$collapsibleTables.length;this.updateResponsiveTables._i++)this.updateResponsiveTables._$table=this.$collapsibleTables.eq(this.updateResponsiveTables._i),this.updateResponsiveTables._containerWidth=this.updateResponsiveTables._$table.parent().width(),this.updateResponsiveTables._check=!1,0<this.updateResponsiveTables._containerWidth&&(void 0===this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._check=!0:(this.updateResponsiveTables._isCollapsed=this.updateResponsiveTables._$table.hasClass("collapsed"),this.updateResponsiveTables._containerWidth>this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._isCollapsed&&(this.updateResponsiveTables._$table.removeClass("collapsed"),this.updateResponsiveTables._check=!0):this.updateResponsiveTables._isCollapsed||(this.updateResponsiveTables._check=!0)),!this.updateResponsiveTables._check||this.updateResponsiveTables._$table.width()>this.updateResponsiveTables._containerWidth&&this.updateResponsiveTables._$table.addClass("collapsed"),this.updateResponsiveTables._$table.data("lastContainerWidth",this.updateResponsiveTables._containerWidth))},updateFixedHeader:function(){if(this.$main.length&&this.$main[0].getBoundingClientRect().top<0){if(!this.fixedHeader){var t=this.$header.outerHeight(),e={top:t+"px","max-height":"calc(100vh - "+t+"px)"};this.$sidebar.css(e),this.$details.css(e),this.$mainContent.css("margin-top",this.$header.outerHeight()),Garnish.$bod.addClass("fixed-header"),this.fixedheader=!0}}else this.fixedheader&&(Garnish.$bod.removeClass("fixed-header"),this.$details.css({top:null,"max-height":null}),this.$header.css("top",0),this.$mainContent.css("margin-top",0),this.fixedheader=!1)},displayNotification:function(t,e){var i=Craft.CP.notificationDuration;"error"===t&&(i*=2);var s=$('<div class="notification '+t+'">'+e+"</div>").appendTo(this.$notificationContainer),n=-s.outerWidth()/2+"px";s.hide().css({opacity:0,"margin-left":n,"margin-right":n}).velocity({opacity:1,"margin-left":"2px","margin-right":"2px"},{display:"inline-block",duration:"fast"}).delay(i).velocity({opacity:0,"margin-left":n,"margin-right":n},{complete:function(){s.remove()}}),this.trigger("displayNotification",{notificationType:t,message:e})},displayNotice:function(t){this.displayNotification("notice",t)},displayError:function(t){t||(t=Craft.t("app","An unknown error occurred.")),this.displayNotification("error",t)},fetchAlerts:function(){var t={path:Craft.path};Craft.queueActionRequest("app/get-cp-alerts",t,$.proxy(this,"displayAlerts"))},displayAlerts:function(t){if(this.$alerts.remove(),Garnish.isArray(t)&&t.length){this.$alerts=$('<ul id="alerts"/>').prependTo(this.$mainContainer);for(var e=0;e<t.length;e++)$("<li>"+t[e]+"</li>").appendTo(this.$alerts);var i=this.$alerts.outerHeight();this.$alerts.css("margin-top",-i).velocity({"margin-top":0},"fast"),this.initAlerts()}},initAlerts:function(){for(var t=this.$alerts.find('a[class^="shun:"]'),e=0;e<t.length;e++)this.addListener(t[e],"click",$.proxy(function(t){t.preventDefault();var i=$(t.currentTarget),e={message:i.prop("className").substr(5)};Craft.queueActionRequest("app/shun-cp-alert",e,$.proxy(function(t,e){"success"===e&&(t.success?i.parent().remove():this.displayError(t.error))},this))},this))},checkForUpdates:function(t,e){if(this.checkingForUpdates&&!0===t&&!this.forcingRefreshOnUpdatesCheck){var i=e;e=function(){Craft.cp.checkForUpdates(!0,i)}}if("function"==typeof e&&(Garnish.isArray(this.checkForUpdatesCallbacks)||(this.checkForUpdatesCallbacks=[]),this.checkForUpdatesCallbacks.push(e)),!this.checkingForUpdates){this.checkingForUpdates=!0,this.forcingRefreshOnUpdatesCheck=!0===t;var s={forceRefresh:!0===t};Craft.queueActionRequest("app/check-for-updates",s,$.proxy(function(t){if(this.updateUtilitiesBadge(),this.checkingForUpdates=!1,Garnish.isArray(this.checkForUpdatesCallbacks)){var e=this.checkForUpdatesCallbacks;this.checkForUpdatesCallbacks=null;for(var i=0;i<e.length;i++)e[i](t)}this.trigger("checkForUpdates",{updateInfo:t})},this))}},updateUtilitiesBadge:function(){var i=$("#nav-utilities").find("> a:not(.sel)");i.length&&Craft.queueActionRequest("app/get-utilities-badge-count",$.proxy(function(t){var e=i.children(".badge");t.badgeCount?(e.length||(e=$('<span class="badge"/>').appendTo(i)),e.text(t.badgeCount)):e.length&&e.remove()},this))},runQueue:function(){this.enableQueue&&(Craft.runQueueAutomatically?Craft.queueActionRequest("queue/run",$.proxy(function(t,e){"success"===e&&this.trackJobProgress(!1,!0)},this)):this.trackJobProgress(!1,!0))},trackJobProgress:function(t,e){if(e&&this.trackJobProgressTimeout&&(clearTimeout(this.trackJobProgressTimeout),this.trackJobProgressTimeout=null),!this.trackJobProgressTimeout&&this.enableQueue)if(!0===t){var i=Math.min(6e4,500*this.displayedJobInfoUnchanged);this.trackJobProgressTimeout=setTimeout($.proxy(this,"_trackJobProgressInternal"),i)}else this._trackJobProgressInternal()},_trackJobProgressInternal:function(){Craft.queueActionRequest("queue/get-job-info?dontExtendSession=1",$.proxy(function(t,e){"success"===e&&(this.trackJobProgressTimeout=null,this.setJobInfo(t,!0),this.jobInfo.length&&this.trackJobProgress(!0))},this))},setJobInfo:function(t,e){if(this.enableQueue){this.jobInfo=t;var i=this.displayedJobInfo;this.displayedJobInfo=this.getDisplayedJobInfo(),i&&this.displayedJobInfo&&i.id===this.displayedJobInfo.id&&i.progress===this.displayedJobInfo.progress&&i.progressLabel===this.displayedJobInfo.progressLabel&&i.status===this.displayedJobInfo.status?this.displayedJobInfoUnchanged++:this.displayedJobInfoUnchanged=1,this.updateJobIcon(e),this.trigger("setJobInfo")}},getDisplayedJobInfo:function(){if(!this.enableQueue)return null;for(var t=[Craft.CP.JOB_STATUS_RESERVED,Craft.CP.JOB_STATUS_FAILED,Craft.CP.JOB_STATUS_WAITING],e=0;e<t.length;e++)for(var i=0;i<this.jobInfo.length;i++)if(this.jobInfo[i].status===t[e])return this.jobInfo[i]},updateJobIcon:function(t){this.enableQueue&&this.$nav.length&&(this.displayedJobInfo?(this.jobProgressIcon||(this.jobProgressIcon=new e),this.displayedJobInfo.status===Craft.CP.JOB_STATUS_RESERVED||this.displayedJobInfo.status===Craft.CP.JOB_STATUS_WAITING?(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.setDescription(this.displayedJobInfo.description),this.jobProgressIcon.setProgress(this.displayedJobInfo.progress,t)):this.displayedJobInfo.status===Craft.CP.JOB_STATUS_FAILED&&this.jobProgressIcon.showFailMode(Craft.t("app","Failed"))):this.jobProgressIcon&&(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.complete(),delete this.jobProgressIcon))}},{notificationDuration:2e3,JOB_STATUS_WAITING:1,JOB_STATUS_RESERVED:2,JOB_STATUS_DONE:3,JOB_STATUS_FAILED:4}),Garnish.$scrollContainer=$("#content"),Craft.cp=new Craft.CP;var e=Garnish.Base.extend({$li:null,$a:null,$label:null,hud:null,failMode:!1,_canvasSupported:null,_$bgCanvas:null,_$staticCanvas:null,_$hoverCanvas:null,_$failCanvas:null,_staticCtx:null,_hoverCtx:null,_canvasSize:null,_arcPos:null,_arcRadius:null,_lineWidth:null,_arcStartPos:0,_arcEndPos:0,_arcStartStepSize:null,_arcEndStepSize:null,_arcStep:null,_arcStepTimeout:null,_arcAnimateCallback:null,_progressBar:null,init:function(){if(this.$li=$("<li/>").appendTo(Craft.cp.$nav.children("ul")),this.$a=$('<a id="job-icon"/>').appendTo(this.$li),this.$canvasContainer=$('<span class="icon"/>').appendTo(this.$a),this.$label=$('<span class="label"></span>').appendTo(this.$a),this._canvasSupported=!!document.createElement("canvas").getContext,this._canvasSupported){var t=1<window.devicePixelRatio?2:1;this._canvasSize=18*t,this._arcPos=this._canvasSize/2,this._arcRadius=7*t,this._lineWidth=3*t,this._$bgCanvas=this._createCanvas("bg","#61666b"),this._$staticCanvas=this._createCanvas("static","#d7d9db"),this._$hoverCanvas=this._createCanvas("hover","#fff"),this._$failCanvas=this._createCanvas("fail","#da5a47").hide(),this._staticCtx=this._$staticCanvas[0].getContext("2d"),this._hoverCtx=this._$hoverCanvas[0].getContext("2d"),this._drawArc(this._$bgCanvas[0].getContext("2d"),0,1),this._drawArc(this._$failCanvas[0].getContext("2d"),0,1)}else this._progressBar=new Craft.ProgressBar(this.$canvasContainer),this._progressBar.showProgressBar();this.addListener(this.$a,"click","toggleHud")},setDescription:function(t){this.$a.attr("title",t),this.$label.text(t)},setProgress:function(t,e){this._canvasSupported?e?this._animateArc(0,t/100):this._setArc(0,t/100):this._progressBar.setProgressPercentage(t)},complete:function(){this._canvasSupported?this._animateArc(0,1,$.proxy(function(){this._$bgCanvas.velocity("fadeOut"),this._animateArc(1,1,$.proxy(function(){this.$a.remove(),this.destroy()},this))},this)):(this._progressBar.setProgressPercentage(100),this.$a.velocity("fadeOut"))},showFailMode:function(t){this.failMode||(this.failMode=!0,this._canvasSupported?(this._$bgCanvas.hide(),this._$staticCanvas.hide(),this._$hoverCanvas.hide(),this._$failCanvas.show()):(this._progressBar.$progressBar.css("border-color","#da5a47"),this._progressBar.$innerProgressBar.css("background-color","#da5a47"),this._progressBar.setProgressPercentage(50)),this.setDescription(t))},hideFailMode:function(){this.failMode&&(this.failMode=!1,this._canvasSupported?(this._$bgCanvas.show(),this._$staticCanvas.show(),this._$hoverCanvas.show(),this._$failCanvas.hide()):(this._progressBar.$progressBar.css("border-color",""),this._progressBar.$innerProgressBar.css("background-color",""),this._progressBar.setProgressPercentage(50)))},toggleHud:function(){this.hud?this.hud.toggle():this.hud=new o},_createCanvas:function(t,e){var i=$('<canvas id="job-icon-'+t+'" width="'+this._canvasSize+'" height="'+this._canvasSize+'"/>').appendTo(this.$canvasContainer),s=i[0].getContext("2d");return s.strokeStyle=e,s.lineWidth=this._lineWidth,s.lineCap="round",i},_setArc:function(t,e){this._arcStartPos=t,this._arcEndPos=e,this._drawArc(this._staticCtx,t,e),this._drawArc(this._hoverCtx,t,e)},_drawArc:function(t,e,i){t.clearRect(0,0,this._canvasSize,this._canvasSize),t.beginPath(),t.arc(this._arcPos,this._arcPos,this._arcRadius,(1.5+2*e)*Math.PI,(1.5+2*i)*Math.PI),t.stroke(),t.closePath()},_animateArc:function(t,e,i){this._arcStepTimeout&&clearTimeout(this._arcStepTimeout),this._arcStep=0,this._arcStartStepSize=(t-this._arcStartPos)/10,this._arcEndStepSize=(e-this._arcEndPos)/10,this._arcAnimateCallback=i,this._takeNextArcStep()},_takeNextArcStep:function(){this._setArc(this._arcStartPos+this._arcStartStepSize,this._arcEndPos+this._arcEndStepSize),this._arcStep++,this._arcStep<10?this._arcStepTimeout=setTimeout($.proxy(this,"_takeNextArcStep"),50):this._arcAnimateCallback&&this._arcAnimateCallback()}}),o=Garnish.HUD.extend({jobsById:null,completedJobs:null,updateViewProxy:null,init:function(){this.jobsById={},this.completedJobs=[],this.updateViewProxy=$.proxy(this,"updateView"),this.base(Craft.cp.jobProgressIcon.$a),this.$main.attr("id","queue-hud")},onShow:function(){Craft.cp.on("setJobInfo",this.updateViewProxy),this.updateView(),this.base()},onHide:function(){if(Craft.cp.off("setJobInfo",this.updateViewProxy),this.completedJobs.length){for(var t=0;t<this.completedJobs.length;t++)this.completedJobs[t].destroy();this.completedJobs=[]}this.base()},updateView:function(){var t,e=[];if(Craft.cp.jobInfo)for(t=0;t<Craft.cp.jobInfo.length;t++)e.push(parseInt(Craft.cp.jobInfo[t].id));for(var i in this.jobsById)this.jobsById.hasOwnProperty(i)&&(Craft.inArray(parseInt(i),e)||(this.jobsById[i].complete(),this.completedJobs.push(this.jobsById[i]),delete this.jobsById[i]));if(Craft.cp.jobInfo&&Craft.cp.jobInfo.length)for(t=0;t<Craft.cp.jobInfo.length;t++){var s=Craft.cp.jobInfo[t];if(this.jobsById[s.id])this.jobsById[s.id].updateStatus(s);else{this.jobsById[s.id]=new o.Job(this,s);for(var n=!1,a=t+1;a<Craft.cp.jobInfo.length;a++)if(this.jobsById[Craft.cp.jobInfo[a].id]){this.jobsById[s.id].$container.insertBefore(this.jobsById[Craft.cp.jobInfo[a].id].$container),n=!0;break}if(!n){var r=this.$main.children("object");r.length?this.jobsById[s.id].$container.insertBefore(r):this.jobsById[s.id].$container.appendTo(this.$main)}}}else this.hide()}});o.Job=Garnish.Base.extend({hud:null,id:null,description:null,status:null,progress:null,$container:null,$statusContainer:null,$descriptionContainer:null,$progressLabel:null,_progressBar:null,init:function(t,e){this.hud=t,this.id=e.id,this.description=e.description,this.$container=$("<div/>",{class:"job"});var i=$("<div/>",{class:"flex"}).appendTo(this.$container);$("<div/>",{class:"flex-grow"}).text(e.description).appendTo(i),this.$statusContainer=$('<div class="job-status"/>').appendTo(i),this.$container.data("job",this),this.updateStatus(e)},updateStatus:function(t){if(this.status!==(this.status=t.status))switch(this.$statusContainer.empty(),this.status){case Craft.CP.JOB_STATUS_WAITING:this.$statusContainer.text(Craft.t("app","Pending"));break;case Craft.CP.JOB_STATUS_RESERVED:this._progressBar=new Craft.ProgressBar(this.$statusContainer),this._progressBar.showProgressBar();break;case Craft.CP.JOB_STATUS_FAILED:$("<span/>",{class:"error",text:Craft.t("app","Failed"),title:t.error}).appendTo(this.$statusContainer);var e=$('<a class="menubtn error" title="'+Craft.t("app","Options")+'"/>').appendTo(this.$statusContainer);$('<div class="menu"><ul><li><a data-action="retry">'+Craft.t("app","Try again")+'</a></li><li><a data-action="release">'+Craft.t("app","Cancel")+"</a></li></ul></div>").appendTo(this.$statusContainer),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"performErrorAction")})}this.status===Craft.CP.JOB_STATUS_RESERVED?(this._progressBar.setProgressPercentage(t.progress),t.progressLabel&&(this.$progressLabel||(this.$progressLabel=$('<div class="light smalltext"/>').appendTo(this.$container)),this.$progressLabel.text(t.progressLabel))):this.$progressLabel&&(this.$progressLabel.remove(),this.$progressLabel=null)},performErrorAction:function(t){switch($(t).data("action")){case"retry":Craft.cp.displayedJobInfo.status=Craft.CP.JOB_STATUS_WAITING,Craft.cp.displayedJobInfo.progress=0,Craft.cp.updateJobIcon(!1),Craft.postActionRequest("queue/retry",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this));break;case"release":Craft.postActionRequest("queue/release",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this))}},complete:function(){this.$statusContainer.empty(),$('<div data-icon="check"/>').appendTo(this.$statusContainer)},destroy:function(){this.hud.jobsById[this.id]&&delete this.hud.jobsById[this.id],this.$container.remove(),this.base()}}),Craft.CustomizeSourcesModal=Garnish.Modal.extend({elementIndex:null,$elementIndexSourcesContainer:null,$sidebar:null,$sourcesContainer:null,$sourceSettingsContainer:null,$newHeadingBtn:null,$footer:null,$footerBtnContainer:null,$saveBtn:null,$cancelBtn:null,$saveSpinner:null,$loadingSpinner:null,sourceSort:null,sources:null,selectedSource:null,updateSourcesOnSave:!1,availableTableAttributes:null,init:function(t,e){this.base(),this.setSettings(e,{resizable:!0}),this.elementIndex=t,this.$elementIndexSourcesContainer=this.elementIndex.$sidebar.children("nav").children("ul");var i=$('<form class="modal customize-sources-modal"/>').appendTo(Garnish.$bod);this.$sidebar=$('<div class="cs-sidebar block-types"/>').appendTo(i),this.$sourcesContainer=$('<div class="sources">').appendTo(this.$sidebar),this.$sourceSettingsContainer=$('<div class="source-settings">').appendTo(i),this.$footer=$('<div class="footer"/>').appendTo(i),this.$footerBtnContainer=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn" role="button"/>').text(Craft.t("app","Cancel")).appendTo(this.$footerBtnContainer),this.$saveBtn=$('<div class="btn submit disabled" role="button"/>').text(Craft.t("app","Save")).appendTo(this.$footerBtnContainer),this.$saveSpinner=$('<div class="spinner hidden"/>').appendTo(this.$footerBtnContainer),this.$newHeadingBtn=$('<div class="btn submit add icon"/>').text(Craft.t("app","New heading")).appendTo($('<div class="buttons left secondary-buttons"/>').appendTo(this.$footer)),this.$loadingSpinner=$('<div class="spinner"/>').appendTo(i),this.setContainer(i),this.show();var s={elementType:this.elementIndex.elementType};Craft.postActionRequest("element-index-settings/get-customize-sources-modal-data",s,$.proxy(function(t,e){this.$loadingSpinner.remove(),"success"===e&&(this.$saveBtn.removeClass("disabled"),this.buildModal(t))},this)),this.addListener(this.$newHeadingBtn,"click","handleNewHeadingBtnClick"),this.addListener(this.$cancelBtn,"click","hide"),this.addListener(this.$saveBtn,"click","save"),this.addListener(this.$container,"submit","save")},buildModal:function(t){this.availableTableAttributes=t.availableTableAttributes,this.sourceSort=new Garnish.DragSort({handle:".move",axis:"y",onSortChange:$.proxy(function(){this.updateSourcesOnSave=!0},this)}),this.sources=[];for(var e=0;e<t.sources.length;e++){var i=this.addSource(t.sources[e]);this.sources.push(i)}this.selectedSource||void 0===this.sources[0]||this.sources[0].select()},addSource:function(t){var e,i=$('<div class="customize-sources-item"/>').appendTo(this.$sourcesContainer),s=$('<div class="label"/>').appendTo(i),n=$('<input type="hidden"/>').appendTo(i);return $('<a class="move icon" title="'+Craft.t("app","Reorder")+'" role="button"></a>').appendTo(i),void 0!==t.heading?(i.addClass("heading"),n.attr("name","sourceOrder[][heading]"),(e=new Craft.CustomizeSourcesModal.Heading(this,i,s,n,t)).updateItemLabel(t.heading)):(n.attr("name","sourceOrder[][key]").val(t.key),(e=new Craft.CustomizeSourcesModal.Source(this,i,s,n,t)).updateItemLabel(t.label),(this.elementIndex.sourceKey+"/").substr(0,t.key.length+1)===t.key+"/"&&e.select()),this.sourceSort.addItems(i),e},handleNewHeadingBtnClick:function(){var t=this.addSource({heading:""});Garnish.scrollContainerToElement(this.$sidebar,t.$item),t.select(),this.updateSourcesOnSave=!0},save:function(t){if(t&&t.preventDefault(),!this.$saveBtn.hasClass("disabled")&&this.$saveSpinner.hasClass("hidden")){this.$saveSpinner.removeClass("hidden");var e=this.$container.serialize()+"&elementType="+this.elementIndex.elementType;Craft.postActionRequest("element-index-settings/save-customize-sources-modal-settings",e,$.proxy(function(t,e){if(this.$saveSpinner.addClass("hidden"),"success"===e&&t.success){if(this.updateSourcesOnSave&&this.$elementIndexSourcesContainer.length){for(var i,s=null,n=0;n<this.sourceSort.$items.length;n++){var a=this.sourceSort.$items.eq(n).data("source"),r=a.getIndexSource();r&&(a.isHeading()?i=r:(i&&(this.appendSource(i,s),s=i,i=null),this.appendSource(r,s),s=r))}if(s){var o=s.nextAll();this.elementIndex.sourceSelect.removeItems(o),o.remove()}}this.selectedSource&&this.selectedSource.sourceData.key&&(this.elementIndex.selectSourceByKey(this.selectedSource.sourceData.key),this.elementIndex.updateElements()),Craft.cp.displayNotice(Craft.t("app","Source settings saved")),this.hide()}else{var l="success"===e&&t.error?t.error:Craft.t("app","An unknown error occurred.");Craft.cp.displayError(l)}},this))}},appendSource:function(t,e){e?t.insertAfter(e):t.prependTo(this.$elementIndexSourcesContainer)},destroy:function(){for(var t=0;t<this.sources.length;t++)this.sources[t].destroy();delete this.sources,this.base()}}),Craft.CustomizeSourcesModal.BaseSource=Garnish.Base.extend({modal:null,$item:null,$itemLabel:null,$itemInput:null,$settingsContainer:null,sourceData:null,init:function(t,e,i,s,n){this.modal=t,this.$item=e,this.$itemLabel=i,this.$itemInput=s,this.sourceData=n,this.$item.data("source",this),this.addListener(this.$item,"click","select")},isHeading:function(){return!1},isSelected:function(){return this.modal.selectedSource===this},select:function(){this.isSelected()||(this.modal.selectedSource&&this.modal.selectedSource.deselect(),this.$item.addClass("sel"),(this.modal.selectedSource=this).$settingsContainer?this.$settingsContainer.removeClass("hidden"):this.$settingsContainer=$("<div/>").append(this.createSettings()).appendTo(this.modal.$sourceSettingsContainer),this.modal.$sourceSettingsContainer.scrollTop(0))},createSettings:function(){},getIndexSource:function(){},deselect:function(){this.$item.removeClass("sel"),this.modal.selectedSource=null,this.$settingsContainer.addClass("hidden")},updateItemLabel:function(t){this.$itemLabel.text(t)},destroy:function(){this.$item.data("source",null),this.base()}}),Craft.CustomizeSourcesModal.Source=Craft.CustomizeSourcesModal.BaseSource.extend({createSettings:function(){if(this.sourceData.tableAttributes.length){var t,e,i,s,n=this.sourceData.tableAttributes[0],a=n[0],r=n[1],o=this.createTableColumnOption(a,r,!0,!0),l=$("<div/>"),h=[a];for($('<input type="hidden" name="sources['+this.sourceData.key+'][tableAttributes][]" value=""/>').appendTo(l),t=1;t<this.sourceData.tableAttributes.length;t++)i=(e=this.sourceData.tableAttributes[t])[0],s=e[1],l.append(this.createTableColumnOption(i,s,!1,!0)),h.push(i);for(t=0;t<this.modal.availableTableAttributes.length;t++)i=(e=this.modal.availableTableAttributes[t])[0],s=e[1],Craft.inArray(i,h)||l.append(this.createTableColumnOption(i,s,!1,!1));return new Garnish.DragSort(l.children(),{handle:".move",axis:"y"}),Craft.ui.createField($([o[0],l[0]]),{label:Craft.t("app","Table Columns"),instructions:Craft.t("app","Choose which table columns should be visible for this source, and in which order.")})}},createTableColumnOption:function(t,e,i,s){var n=$('<div class="customize-sources-table-column"/>').append('<div class="icon move"/>').append(Craft.ui.createCheckbox({label:e,name:"sources["+this.sourceData.key+"][tableAttributes][]",value:t,checked:s,disabled:i}));return i&&n.children(".move").addClass("disabled"),n},getIndexSource:function(){var t=this.modal.elementIndex.getSourceByKey(this.sourceData.key);if(t)return t.closest("li")}}),Craft.CustomizeSourcesModal.Heading=Craft.CustomizeSourcesModal.BaseSource.extend({$labelField:null,$labelInput:null,$deleteBtn:null,isHeading:function(){return!0},select:function(){this.base(),this.$labelInput.trigger("focus")},createSettings:function(){return this.$labelField=Craft.ui.createTextField({label:Craft.t("app","Heading"),instructions:Craft.t("app","This can be left blank if you just want an unlabeled separator."),value:this.sourceData.heading}),this.$labelInput=this.$labelField.find(".text"),this.$deleteBtn=$('<a class="error delete"/>').text(Craft.t("app","Delete heading")),this.addListener(this.$labelInput,"textchange","handleLabelInputChange"),this.addListener(this.$deleteBtn,"click","deleteHeading"),$([this.$labelField[0],$("<hr/>")[0],this.$deleteBtn[0]])},handleLabelInputChange:function(){this.updateItemLabel(this.$labelInput.val()),this.modal.updateSourcesOnSave=!0},updateItemLabel:function(t){this.$itemLabel.html((t?Craft.escapeHtml(t):'<em class="light">'+Craft.t("app","(blank)")+"</em>")+"&nbsp;"),this.$itemInput.val(t)},deleteHeading:function(){this.modal.sourceSort.removeItems(this.$item),this.modal.sources.splice($.inArray(this,this.modal.sources),1),this.modal.updateSourcesOnSave=!0,this.isSelected()&&(this.deselect(),this.modal.sources.length&&this.modal.sources[0].select()),this.$item.remove(),this.$settingsContainer.remove(),this.destroy()},getIndexSource:function(){var t=this.$labelInput?this.$labelInput.val():this.sourceData.heading;return $('<li class="heading"/>').append($("<span/>").text(t))}}),Craft.DataTableSorter=Garnish.DragSort.extend({$table:null,init:function(t,e){this.$table=$(t);var i=this.$table.children("tbody").children(":not(.filler)");(e=$.extend({},Craft.DataTableSorter.defaults,e)).container=this.$table.children("tbody"),e.helper=$.proxy(this,"getHelper"),e.caboose="<tr/>",e.axis=Garnish.Y_AXIS,e.magnetStrength=4,e.helperLagBase=1.5,this.base(i,e)},getHelper:function(t){var e=$('<div class="'+this.settings.helperClass+'"/>').appendTo(Garnish.$bod),i=$("<table/>").appendTo(e),s=$("<tbody/>").appendTo(i);t.appendTo(s),i.width(this.$table.width()),i.prop("className",this.$table.prop("className"));for(var n=this.$table.find("tr:first").children(),a=t.children(),r=0;r<a.length;r++)$(a[r]).width($(n[r]).width());return e}},{defaults:{handle:".move",helperClass:"datatablesorthelper"}}),Craft.DeleteUserModal=Garnish.Modal.extend({id:null,userId:null,$deleteActionRadios:null,$deleteSpinner:null,userSelect:null,_deleting:!1,init:function(t,e){this.id=Math.floor(1e9*Math.random()),this.userId=t,e=$.extend(Craft.DeleteUserModal.defaults,e);var i,s=$('<form class="modal fitted deleteusermodal" method="post" accept-charset="UTF-8">'+Craft.getCsrfInput()+'<input type="hidden" name="action" value="users/delete-user"/>'+(Garnish.isArray(this.userId)?"":'<input type="hidden" name="userId" value="'+this.userId+'"/>')+(e.redirect?'<input type="hidden" name="redirect" value="'+e.redirect+'"/>':"")+"</form>").appendTo(Garnish.$bod),n=$('<div class="body"><div class="content-summary"><p>'+Craft.t("app","What do you want to do with their content?")+'</p><ul class="bullets"></ul></div><div class="options"><label><input type="radio" name="contentAction" value="transfer"/> '+Craft.t("app","Transfer it to:")+'</label><div id="transferselect'+this.id+'" class="elementselect"><div class="elements"></div><div class="btn add icon dashed">'+Craft.t("app","Choose a user")+'</div></div></div><div><label class="error"><input type="radio" name="contentAction" value="delete"/> '+Craft.t("app","Delete it")+"</label></div></div>").appendTo(s),a=$('<div class="buttons right"/>').appendTo(n),r=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(a);if(e.contentSummary.length)for(var o=0;o<e.contentSummary.length;o++)n.find("ul").append($("<li/>",{text:e.contentSummary[o]}));else n.find("ul").remove();if(this.$deleteActionRadios=n.find("input[type=radio]"),this.$deleteSubmitBtn=$('<input type="submit" class="btn submit disabled" value="'+(Garnish.isArray(this.userId)?Craft.t("app","Delete users"):Craft.t("app","Delete user"))+'" />').appendTo(a),this.$deleteSpinner=$('<div class="spinner hidden"/>').appendTo(a),Garnish.isArray(this.userId)){i=["and"];for(o=0;o<this.userId.length;o++)i.push("not "+this.userId[o])}else i="not "+this.userId;this.userSelect=new Craft.BaseElementSelectInput({id:"transferselect"+this.id,name:"transferContentTo",elementType:"craft\\elements\\User",criteria:{id:i},limit:1,modalSettings:{closeOtherModals:!1},onSelectElements:$.proxy(function(){this.updateSizeAndPosition(),this.$deleteActionRadios.first().prop("checked")?this.validateDeleteInputs():this.$deleteActionRadios.first().trigger("click")},this),onRemoveElements:$.proxy(this,"validateDeleteInputs"),selectable:!1,editable:!1}),this.addListener(r,"click","hide"),this.addListener(this.$deleteActionRadios,"change","validateDeleteInputs"),this.addListener(s,"submit","handleSubmit"),this.base(s,e)},validateDeleteInputs:function(){var t=!1;return this.$deleteActionRadios.eq(0).prop("checked")?t=!!this.userSelect.totalSelected:this.$deleteActionRadios.eq(1).prop("checked")&&(t=!0),t?this.$deleteSubmitBtn.removeClass("disabled"):this.$deleteSubmitBtn.addClass("disabled"),t},handleSubmit:function(t){!this._deleting&&this.validateDeleteInputs()?(this.$deleteSubmitBtn.addClass("active"),this.$deleteSpinner.removeClass("hidden"),this.disable(),this.userSelect.disable(),!(this._deleting=!0)===this.settings.onSubmit()&&t.preventDefault()):t.preventDefault()},onFadeIn:function(){Garnish.isMobileBrowser(!0)||this.$deleteActionRadios.first().trigger("focus"),this.base()}},{defaults:{contentSummary:[],onSubmit:$.noop,redirect:null}}),Craft.DraftEditor=Garnish.Base.extend({$revisionBtn:null,$revisionLabel:null,$spinner:null,$statusIcon:null,$editMetaBtn:null,metaHud:null,$nameTextInput:null,$notesTextInput:null,$saveMetaBtn:null,lastSerializedValue:null,timeout:null,saving:!1,saveXhr:null,checkFormAfterUpdate:!1,submittingForm:!1,duplicatedElements:null,errors:null,preview:null,previewToken:null,init:function(t){if(this.setSettings(t,Craft.DraftEditor.defaults),this.duplicatedElements={},this.$revisionBtn=$("#revision-btn"),this.$revisionLabel=$("#revision-label"),this.$spinner=$("#revision-spinner"),this.$statusIcon=$("#revision-status"),this.settings.previewTargets.length){this.settings.enablePreview&&this.addListener($("#preview-btn"),"click","openPreview");var e=$("#share-btn");1===this.settings.previewTargets.length?this.addListener(e,"click",function(){this.openShareLink(this.settings.previewTargets[0].url)}):this.createShareMenu(e)}this.settings.revisionId||(this.lastSerializedValue=this.serializeForm(!0),Craft.cp.$primaryForm.data("initialSerializedValue",this.lastSerializedValue),Craft.cp.$primaryForm.data("serializer",function(){return this.serializeForm(!0)}.bind(this)),this.settings.draftId?this.initForDraft():(this.addListener($("#save-draft-btn"),"click",function(t){t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut")}.bind(this)),this.settings.canUpdateSource||this.addListener(Craft.cp.$primaryForm,"submit.saveShortcut",function(t){t.saveShortcut&&(t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut"))}.bind(this))))},initForDraft:function(){this.createEditMetaBtn(),this.addListener(Garnish.$bod,"keypress keyup change focus blur click mousedown mouseup",function(t){$(t.target).is(this.statusIcons())||(clearTimeout(this.timeout),Craft.inArray(t.type,["keypress","keyup","change"])?this.timeout=setTimeout(this.checkForm.bind(this),500):this.checkForm())}),this.addListener(Craft.cp.$primaryForm,"submit","handleFormSubmit"),this.addListener(this.$statusIcon,"click",function(){this.showStatusHud(this.$statusIcon)}.bind(this))},showStatusHud:function(t){if(null===this.errors)e="<p>"+Craft.t("app","The draft has been saved.")+"</p>";else{var e='<p class="error">'+Craft.t("app","The draft could not be saved.")+"</p>";if(this.errors.length){for(e+='<ul class="errors">',i=0;i<this.errors.length;i++)e+="<li>"+Craft.escapeHtml(this.errors[i])+"</li>";e+="</ul>"}}var s=new Garnish.HUD(t,e,{onHide:function(){s.destroy(),delete s}})},spinners:function(){return this.preview?this.$spinner.add(this.preview.$spinner):this.$spinner},statusIcons:function(){return this.preview?this.$statusIcon.add(this.preview.$statusIcon):this.$statusIcon},createEditMetaBtn:function(){this.$editMetaBtn=$("<a/>",{class:"btn edit icon",title:Craft.t("app","Edit draft settings")}).appendTo($("#revision-btngroup")),this.addListener(this.$editMetaBtn,"click","showMetaHud")},createShareMenu:function(t){t.addClass("menubtn");for(var e,i,s=$("<div/>",{class:"menu"}).insertAfter(t),n=$("<ul/>").appendTo(s),a=0;a<this.settings.previewTargets.length;a++)e=$("<li/>").appendTo(n),i=$("<a/>",{text:this.settings.previewTargets[a].label}).appendTo(e),this.addListener(i,"click",{target:a},function(t){this.openShareLink(this.settings.previewTargets[t.data.target].url)}.bind(this))},getPreviewToken:function(){return new Promise(function(i,s){this.previewToken?i(this.previewToken):Craft.postActionRequest("preview/create-token",{elementType:this.settings.elementType,sourceId:this.settings.sourceId,siteId:this.settings.siteId,draftId:this.settings.draftId,revisionId:this.settings.revisionId},function(t,e){"success"===e?(this.previewToken=t.token,i(this.previewToken)):s()}.bind(this))}.bind(this))},getTokenizedPreviewUrl:function(s,n){return new Promise(function(e,t){var i={};!n&&this.settings.isLive||(i[n||"x-craft-preview"]=Craft.randomString(10)),this.settings.isLive?e(Craft.getUrl(s,i)):this.getPreviewToken().then(function(t){i[Craft.tokenParam]=t,e(Craft.getUrl(s,i))}).catch(t)}.bind(this))},openShareLink:function(t){this.getTokenizedPreviewUrl(t).then(function(t){window.open(t)})},getPreview:function(){return this.preview||(this.preview=new Craft.Preview(this)),this.preview},openPreview:function(){return new Promise(function(t,e){this.ensureIsDraftOrRevision().then(function(){this.getPreview().open(),t()}.bind(this)).catch(e)}.bind(this))},ensureIsDraftOrRevision:function(){return new Promise(function(t,e){this.settings.draftId||this.settings.revisionid?t():this.createDraft().then(t).catch(e)}.bind(this))},serializeForm:function(t){var e=Craft.cp.$primaryForm.serialize();return this.isPreviewActive()&&(e=e.replace("__PREVIEW_FIELDS__=1",this.preview.$editor.serialize())),t&&!this.settings.isUnsavedDraft&&(e=(e=e.replace(/&action=[^&]*/,"")).replace(/&redirect=[^&]*/,"")),e},checkForm:function(t){if(this.settings.draftId){clearTimeout(this.timeout),this.timeout=null;var e=this.serializeForm(!0);!t&&e===this.lastSerializedValue||this.saveDraft(e)}},isPreviewActive:function(){return this.preview&&this.preview.isActive},createDraft:function(){return new Promise(function(t,e){this.saveDraft(this.serializeForm(!0)).then(t).catch(e)}.bind(this))},saveDraft:function(b){return new Promise(function(f,m){if(this.submittingForm)m();else if(this.lastSerializedValue=b,this.saving)this.checkFormAfterUpdate=!0;else{this.saving=!0;var v=this.spinners().removeClass("hidden"),C=this.statusIcons().removeClass("invisible checkmark-icon alert-icon").addClass("hidden");this.$saveMetaBtn&&this.$saveMetaBtn.addClass("active"),this.errors=null;var t=Craft.getActionUrl(this.settings.saveDraftAction);this.saveXhr=Craft.postActionRequest(t,this.prepareData(b),function(t,e){if(v.addClass("hidden"),this.$saveMetaBtn&&this.$saveMetaBtn.removeClass("active"),this.saving=!1,"abort"!==e){if("success"!==e||t.errors)return this.errors=(t?t.errors:null)||[],C.removeClass("hidden checkmark-icon").addClass("alert-icon").attr("title",Craft.t("app","The draft could not be saved.")),void m();t.title&&$("#header h1").text(t.title),t.docTitle&&(document.title=t.docTitle),this.$revisionLabel.text(t.draftName),this.settings.draftName=t.draftName,this.settings.draftNotes=t.draftNotes;var i=this.$revisionBtn.data("menubtn")?this.$revisionBtn.data("menubtn").menu:null,s=!this.settings.draftId;if(s){var n,a=document.location.href.search("#");n=-1!==a?document.location.href.substr(0,a):document.location.href,n+=(n.match(/\?/)?"&":"?")+"draftId="+t.draftId,-1!==a&&(n+=document.location.href.substr(a)),history.replaceState({},"",n);var r=$("#save-btn-container");r.length&&r.replaceWith($("<input/>",{type:"submit",class:"btn submit",value:Craft.t("app","Update {type}",{type:this.settings.elementTypeDisplayName})}));var o=$("#save-draft-btn-container");if(o.add(o.prev(".spacer")).remove(),this.settings.draftId=t.draftId,this.settings.isLive=!1,this.settings.canDeleteDraft=!0,this.previewToken=null,this.initForDraft(),i){i.$options.filter(":not(.site-option)").removeClass("sel");var l=i.$container.find(".revision-group-drafts");if(!l.length){var h=$("<h6/>",{text:Craft.t("app","Drafts")}).insertAfter(i.$container.find(".revision-group-current"));l=$("<ul/>",{class:"padded revision-group-drafts"}).insertAfter(h)}var d=$("<li/>").appendTo(l),c=$("<a/>",{class:"sel",html:'<span class="draft-name"></span> <span class="draft-creator light"></span>'}).appendTo(d);i.addOptions(c),i.selectOption(c);for(var u=i.$options.filter(".site-option[href]"),p=0;p<u.length;p++){var g=u.eq(p);g.attr("href",Craft.getUrl(g.attr("href"),{draftId:t.draftId}))}}}i&&(i.$options.filter(".sel").find(".draft-name").text(t.draftName),i.$options.filter(".sel").find(".draft-creator").text(Craft.t("app","by {creator}",{creator:t.creator}))),t.previewTargets&&JSON.stringify(t.previewTargets)!==JSON.stringify(this.settings.previewTargets)&&this.updatePreviewTargets(t.previewTargets),this.afterUpdate(b),s&&this.trigger("createDraft"),this.$nameTextInput&&this.checkMetaValues(),$.extend(this.duplicatedElements,t.duplicatedElements),f()}}.bind(this))}}.bind(this))},prepareData:function(t){for(var e in this.duplicatedElements)this.duplicatedElements.hasOwnProperty(e)&&(t=t.replace(new RegExp(Craft.escapeRegex(encodeURIComponent("]["+e+"]")),"g"),"]["+this.duplicatedElements[e]+"]"));return this.settings.draftId&&(t+="&draftId="+this.settings.draftId+"&draftName="+encodeURIComponent(this.settings.draftName)+"&draftNotes="+encodeURIComponent(this.settings.draftNotes||"")),t},updatePreviewTargets:function(t){for(var e={},i=0;i<this.settings.previewTargets.length;i++)e[this.settings.previewTargets[i].label]=this.settings.previewTargets[i];for(i=0;i<t.length;i++)e[t[i].label]&&(e[t[i].label].url=t[i].url)},afterUpdate:function(t){Craft.cp.$primaryForm.data("initialSerializedValue",t),this.statusIcons().removeClass("hidden").addClass("checkmark-icon").attr("title",Craft.t("app","The draft has been saved.")),this.trigger("update"),this.checkFormAfterUpdate&&(this.checkFormAfterUpdate=!1,this.timeout||this.checkForm())},showMetaHud:function(){this.metaHud?this.metaHud.show():(this.createMetaHud(),this.onMetaHudShow()),Garnish.isMobileBrowser(!0)||this.$nameTextInput.trigger("focus")},createMetaHud:function(){var t,e,i=$("<div/>");t=$('<div class="field"><div class="heading"><label for="draft-name">'+Craft.t("app","Draft Name")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$nameTextInput=$('<input type="text" class="text fullwidth" id="draft-name"/>').appendTo(e).val(this.settings.draftName),t=$('<div class="field"><div class="heading"><label for="draft-notes">'+Craft.t("app","Notes")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$notesTextInput=$('<textarea class="text fullwidth" id="draft-notes" rows="2"/>').appendTo(e).val(this.settings.draftNotes);var s=$('<div class="hud-footer flex flex-center"/>').appendTo(i);if(this.settings.canDeleteDraft)var n=$('<a class="error" role="button">'+Craft.t("app","Delete")+"</a>").appendTo(s);$('<div class="flex-grow"></div>').appendTo(s),this.$saveMetaBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Save")+'"/>').appendTo(s),this.metaHud=new Garnish.HUD(this.$editMetaBtn,i,{onSubmit:this.saveMeta.bind(this)}),new Garnish.NiceText(this.$notesTextInput),this.addListener(this.$notesTextInput,"keydown","onNotesKeydown"),this.addListener(this.$nameTextInput,"textchange","checkMetaValues"),this.addListener(this.$notesTextInput,"textchange","checkMetaValues"),this.metaHud.on("show",this.onMetaHudShow.bind(this)),this.metaHud.on("hide",this.onMetaHudHide.bind(this)),this.metaHud.on("escape",this.onMetaHudEscape.bind(this)),n&&this.addListener(n,"click","deleteDraft")},onMetaHudShow:function(){this.$editMetaBtn.addClass("active")},onMetaHudHide:function(){this.$editMetaBtn.removeClass("active")},onMetaHudEscape:function(){this.$nameTextInput.val(this.settings.draftName),this.$notesTextInput.val(this.settings.draftNotes)},onNotesKeydown:function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.metaHud.submit())},checkMetaValues:function(){return!this.$nameTextInput.val()||this.$nameTextInput.val()===this.settings.draftName&&this.$notesTextInput.val()===this.settings.draftNotes?(this.$saveMetaBtn.addClass("disabled"),!1):(this.$saveMetaBtn.removeClass("disabled"),!0)},shakeMetaHud:function(){Garnish.shake(this.metaHud.$hud)},saveMeta:function(){this.checkMetaValues()?(this.settings.draftName=this.$nameTextInput.val(),this.settings.draftNotes=this.$notesTextInput.val(),this.metaHud.hide(),this.checkForm(!0)):this.shakeMetaHud()},deleteDraft:function(){confirm(Craft.t("app","Are you sure you want to delete this draft?"))&&Craft.postActionRequest(this.settings.deleteDraftAction,{draftId:this.settings.draftId},function(t,e){"success"===e&&(window.location.href=this.settings.cpEditUrl)}.bind(this))},handleFormSubmit:function(t){if(t.preventDefault(),!this.submittingForm&&(t.customTrigger||this.settings.isUnsavedDraft||!this.settings.draftId||this.settings.canUpdateSource)){Craft.cp.$confirmUnloadForms=Craft.cp.$confirmUnloadForms.not(Craft.cp.$primaryForm),this.saving&&this.saveXhr.abort();for(var e,i=$("<form/>",{attr:{"accept-charset":Craft.cp.$primaryForm.attr("accept-charset"),action:Craft.cp.$primaryForm.attr("action"),enctype:Craft.cp.$primaryForm.attr("enctype"),method:Craft.cp.$primaryForm.attr("method"),target:Craft.cp.$primaryForm.attr("target")}}),s=this.prepareData(this.serializeForm(!1)).split("&"),n=0;n<s.length;n++)e=s[n].split("=",2),$("<input/>",{type:"hidden",name:decodeURIComponent(e[0]),value:decodeURIComponent(e[1]||"")}).appendTo(i);t.customTrigger&&t.customTrigger.data("action")||$("<input/>",{type:"hidden",name:"action",value:this.settings.applyDraftAction}).appendTo(i),t.saveShortcut&&Craft.cp.$primaryForm.data("saveshortcut-redirect")||t.customTrigger&&t.customTrigger.data("redirect")||$("<input/>",{type:"hidden",name:"redirect",value:this.settings.hashedRedirectUrl}).appendTo(i),i.appendTo(Garnish.$bod),i.submit(),this.submittingForm=!0}}},{defaults:{elementType:null,sourceId:null,siteId:null,isLive:!1,cpEditUrl:null,draftId:null,revisionId:null,draftName:null,draftNotes:null,canDeleteDraft:!1,canUpdateSource:!1,saveDraftAction:null,deleteDraftAction:null,applyDraftAction:null,enablePreview:!1,previewTargets:[]}}),Craft.DynamicGenerator=Craft.BaseInputGenerator.extend({callback:$.noop,init:function(t,e,i){this.callback=i,this.base(t,e)},generateTargetValue:function(t){return this.callback(t)}}),Craft.EditableTable=Garnish.Base.extend({initialized:!1,id:null,baseName:null,columns:null,sorter:null,biggestId:-1,$table:null,$tbody:null,$addRowBtn:null,rowCount:0,hasMaxRows:!1,hasMinRows:!1,radioCheckboxes:null,init:function(t,e,i,s){if(this.id=t,this.baseName=e,this.columns=i,this.setSettings(s,Craft.EditableTable.defaults),this.radioCheckboxes={},this.$table=$("#"+t),this.$tbody=this.$table.children("tbody"),this.rowCount=this.$tbody.find("tr").length,this.$table.data("editable-table")&&(Garnish.log("Double-instantiating an editable table on an element"),this.$table.data("editable-table").destroy()),this.$table.data("editable-table",this),this.sorter=new Craft.DataTableSorter(this.$table,{helperClass:"editabletablesorthelper",copyDraggeeInputValuesToHelper:!0}),this.isVisible()?this.initialize():setTimeout($.proxy(this,"initializeIfVisible"),500),this.settings.minRows&&this.rowCount<this.settings.minRows)for(var n=this.rowCount;n<this.settings.minRows;n++)this.addRow()},isVisible:function(){return 0<this.$table.height()},initialize:function(){if(this.initialized)return!1;this.initialized=!0,this.removeListener(Garnish.$win,"resize");for(var t=this.$tbody.children(),e=0;e<t.length;e++)this.createRowObj(t[e]);return this.$addRowBtn=this.$table.next(".add"),this.updateAddRowButton(),this.addListener(this.$addRowBtn,"activate","addRow"),!0},initializeIfVisible:function(){this.removeListener(Garnish.$win,"resize"),this.isVisible()?this.initialize():this.addListener(Garnish.$win,"resize","initializeIfVisible")},updateAddRowButton:function(){this.canAddRow()?(this.$addRowBtn.css("opacity","1"),this.$addRowBtn.css("pointer-events","auto")):(this.$addRowBtn.css("opacity","0.2"),this.$addRowBtn.css("pointer-events","none"))},canDeleteRow:function(){return this.rowCount>this.settings.minRows},deleteRow:function(t){this.canDeleteRow()&&(this.sorter.removeItems(t.$tr),t.$tr.remove(),this.rowCount--,this.updateAddRowButton(),this.settings.onDeleteRow(t.$tr),t.destroy())},canAddRow:function(){return!this.settings.staticRows&&(!this.settings.maxRows||this.rowCount<this.settings.maxRows)},addRow:function(t,e){if(this.canAddRow()){var i=this.settings.rowIdPrefix+(this.biggestId+1),s=this.createRow(i,this.columns,this.baseName,$.extend({},this.settings.defaultValues));e?s.prependTo(this.$tbody):s.appendTo(this.$tbody);var n=this.createRowObj(s);return this.sorter.addItems(s),!1!==t&&s.find("input:visible,textarea:visible,select:visible").first().trigger("focus"),this.rowCount++,this.updateAddRowButton(),this.settings.onAddRow(s),n}},createRow:function(t,e,i,s){return Craft.EditableTable.createRow(t,e,i,s)},createRowObj:function(t){return new Craft.EditableTable.Row(this,t)},focusOnPrevRow:function(t,e,i){var s,n=t.prev("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1,!0))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnPrevRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}},focusOnNextRow:function(t,e,i){var s,n=t.next("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnNextRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}}},{textualColTypes:["color","date","email","multiline","number","singleline","template","time","url"],defaults:{rowIdPrefix:"",defaultValues:{},staticRows:!1,minRows:null,maxRows:null,onAddRow:$.noop,onDeleteRow:$.noop},createRow:function(t,e,i,s){var n=$("<tr/>",{"data-id":t});for(var a in e)if(e.hasOwnProperty(a)){var r,o=e[a],l=void 0!==s[a]?s[a]:"";if("heading"===o.type)r=$("<th/>",{scope:"row",class:o.class,html:l});else{var h=i+"["+t+"]["+a+"]",d=Craft.inArray(o.type,Craft.EditableTable.textualColTypes);switch(r=$("<td/>",{class:o.class,width:o.width}),d&&r.addClass("textual"),o.code&&r.addClass("code"),o.type){case"checkbox":Craft.ui.createCheckbox({name:h,value:o.value||"1",checked:!!l}).appendTo(r);break;case"color":Craft.ui.createColorInput({name:h,value:l,small:!0}).appendTo(r);break;case"date":Craft.ui.createDateInput({name:h,value:l}).appendTo(r);break;case"lightswitch":Craft.ui.createLightswitch({name:h,value:o.value||"1",on:!!l,small:!0}).appendTo(r);break;case"select":Craft.ui.createSelect({name:h,options:o.options,value:l||function(){for(var t in o.options)if(o.options.hasOwnProperty(t)&&o.options[t].default)return void 0!==o.options[t].value?o.options[t].value:t;return null}(),class:"small"}).appendTo(r);break;case"time":Craft.ui.createTimeInput({name:h,value:l}).appendTo(r);break;case"email":case"url":Craft.ui.createTextInput({name:h,value:l,type:o.type,placeholder:o.placeholder||null}).appendTo(r);break;default:$("<textarea/>",{name:h,rows:1,val:l,placeholder:o.placeholder}).appendTo(r)}}r.appendTo(n)}return $("<td/>",{class:"thin action"}).append($("<a/>",{class:"move icon",title:Craft.t("app","Reorder")})).appendTo(n),$("<td/>",{class:"thin action"}).append($("<a/>",{class:"delete icon",title:Craft.t("app","Delete")})).appendTo(n),n}}),Craft.EditableTable.Row=Garnish.Base.extend({table:null,id:null,niceTexts:null,$tr:null,$tds:null,tds:null,$textareas:null,$deleteBtn:null,init:function(t,e){this.table=t,this.$tr=$(e),this.$tds=this.$tr.children(),this.tds=[],this.id=this.$tr.attr("data-id"),this.$tr.data("editable-table-row",this);var i=parseInt(this.id.substr(this.table.settings.rowIdPrefix.length));i>this.table.biggestId&&(this.table.biggestId=i),this.$textareas=$(),this.niceTexts=[];var s,n,a,r,o,l={},h=0;for(s in this.table.columns)this.table.columns.hasOwnProperty(s)&&(n=this.table.columns[s],a=this.tds[s]=this.$tds[h],Craft.inArray(n.type,Craft.EditableTable.textualColTypes)?(r=$("textarea, input.text",a),this.$textareas=this.$textareas.add(r),this.addListener(r,"focus","onTextareaFocus"),this.addListener(r,"mousedown","ignoreNextTextareaFocus"),this.niceTexts.push(new Garnish.NiceText(r,{onHeightChange:$.proxy(this,"onTextareaHeightChange")})),this.addListener(r,"keypress",{tdIndex:h,type:n.type},"handleKeypress"),this.addListener(r,"textchange",{type:n.type},"validateValue"),r.trigger("textchange"),l[s]=r):"checkbox"===n.type&&(o=$('input[type="checkbox"]',a),n.radioMode&&(void 0===this.table.radioCheckboxes[s]&&(this.table.radioCheckboxes[s]=[]),this.table.radioCheckboxes[s].push(o[0]),this.addListener(o,"change",{colId:s},"onRadioCheckboxChange")),n.toggle&&this.addListener(o,"change",{colId:s},function(t){this.applyToggleCheckbox(t.data.colId)})),h++);for(s in this.onTextareaHeightChange(),this.table.columns)!this.table.columns.hasOwnProperty(s)||"checkbox"===(n=this.table.columns[s]).type&&n.toggle&&this.applyToggleCheckbox(s);for(s in this.table.columns)!this.table.columns.hasOwnProperty(s)||(n=this.table.columns[s]).autopopulate&&void 0!==l[n.autopopulate]&&!l[s].val()&&new Craft.HandleGenerator(l[s],l[n.autopopulate],{allowNonAlphaStart:!0});var d=this.$tr.children().last().find(".delete");this.addListener(d,"click","deleteRow")},onTextareaFocus:function(t){this.onTextareaHeightChange();var e=$(t.currentTarget);e.data("ignoreNextFocus")?e.data("ignoreNextFocus",!1):setTimeout(function(){Craft.selectFullValue(e)},0)},onRadioCheckboxChange:function(t){if(t.currentTarget.checked)for(var e=0;e<this.table.radioCheckboxes[t.data.colId].length;e++){var i=this.table.radioCheckboxes[t.data.colId][e];i.checked=i===t.currentTarget}},applyToggleCheckbox:function(t){for(var e,i,s=this.table.columns[t],n=$('input[type="checkbox"]',this.tds[t]).prop("checked"),a=0;a<s.toggle.length;a++)e=s.toggle[a],this.table.colum,(i="!"===e[0])&&(e=e.substr(1)),n&&!i||!n&&i?$(this.tds[e]).removeClass("disabled").find("textarea, input").prop("disabled",!1):$(this.tds[e]).addClass("disabled").find("textarea, input").prop("disabled",!0)},ignoreNextTextareaFocus:function(t){$.data(t.currentTarget,"ignoreNextFocus",!0)},handleKeypress:function(t){var e=t.keyCode?t.keyCode:t.charCode,i=Garnish.isCtrlKeyPressed(t);if(e===Garnish.RETURN_KEY&&("multiline"!==t.data.type||i))return t.preventDefault(),void(t.shiftKey?this.table.focusOnPrevRow(this.$tr,t.data.tdIndex,t.currentTarget):this.table.focusOnNextRow(this.$tr,t.data.tdIndex,t.currentTarget));"number"!==t.data.type||i||Craft.inArray(e,Craft.EditableTable.Row.numericKeyCodes)||t.preventDefault()},validateValue:function(t){if("multiline"!==t.data.type){var e;if("number"===t.data.type){var i=t.currentTarget.value.match(/^\s*(-?[\d\\.]*)/);e=null!==i?i[1]:""}else e=t.currentTarget.value.replace(/[\r\n]/g,"");e!==t.currentTarget.value&&(t.currentTarget.value=e)}},onTextareaHeightChange:function(){for(var t=-1,e=0;e<this.niceTexts.length;e++)this.niceTexts[e].height>t&&(t=this.niceTexts[e].height);this.$textareas.css("min-height",t);var i=this.$textareas.filter(":visible").first().parent().height();t<i&&this.$textareas.css("min-height",i)},deleteRow:function(){this.table.deleteRow(this)}},{numericKeyCodes:[9,8,37,38,39,40,45,91,46,190,48,49,50,51,52,53,54,55,56,57]}),Craft.ElementActionTrigger=Garnish.Base.extend({maxLevels:null,newChildUrl:null,$trigger:null,$selectedItems:null,triggerEnabled:!0,init:function(t){this.setSettings(t,Craft.ElementActionTrigger.defaults),this.$trigger=$("#"+t.type.replace(/[\[\]\\]+/g,"-")+"-actiontrigger"),this.settings.activate&&(this.$trigger.data("custom-handler",!0),"FORM"===this.$trigger.prop("nodeName")?this.addListener(this.$trigger,"submit","handleTriggerActivation"):this.addListener(this.$trigger,"click","handleTriggerActivation")),this.updateTrigger(),Craft.elementIndex.on("selectionChange",$.proxy(this,"updateTrigger"))},updateTrigger:function(){0!==Craft.elementIndex.getSelectedElements().length&&(this.validateSelection()?this.enableTrigger():this.disableTrigger())},validateSelection:function(){var t=!0;return this.$selectedItems=Craft.elementIndex.getSelectedElements(),!this.settings.batch&&1<this.$selectedItems.length?t=!1:"function"==typeof this.settings.validateSelection&&(t=this.settings.validateSelection(this.$selectedItems)),t},enableTrigger:function(){this.triggerEnabled||(this.$trigger.removeClass("disabled"),this.triggerEnabled=!0)},disableTrigger:function(){this.triggerEnabled&&(this.$trigger.addClass("disabled"),this.triggerEnabled=!1)},handleTriggerActivation:function(t){t.preventDefault(),t.stopPropagation(),this.triggerEnabled&&this.settings.activate(this.$selectedItems)}},{defaults:{type:null,batch:!0,validateSelection:null,activate:null}}),Craft.ElementThumbLoader=Garnish.Base.extend({queue:null,workers:[],init:function(){this.queue=[];for(var t=0;t<3;t++)this.workers.push(new Craft.ElementThumbLoader.Worker(this))},load:function(t){if(this.queue=this.queue.concat(t.find(".elementthumb").toArray()),this.queue.length)for(var e=0;e<this.workers.length;e++)this.workers[e].active||this.workers[e].loadNext()},destroy:function(){for(var t=0;t<this.workers.length;t++)this.workers[t].destroy();this.base()}}),Craft.ElementThumbLoader.Worker=Garnish.Base.extend({loader:null,active:!1,init:function(t){this.loader=t},loadNext:function(){var t=this.loader.queue.shift();if(void 0!==t){this.active=!0;var e=$(t);if(e.find("img").length)this.loadNext();else{var i=$("<img/>",{sizes:e.attr("data-sizes"),srcset:e.attr("data-srcset"),alt:""});this.addListener(i,"load","loadNext"),i.appendTo(e),picturefill({elements:[i[0]]})}}else this.active=!1}}),Craft.ElevatedSessionForm=Garnish.Base.extend({$form:null,inputs:null,init:function(t,e){if(this.$form=$(t),void 0!==e){this.inputs=[],e=$.makeArray(e);for(var i=0;i<e.length;i++)for(var s=$(e[i]),n=0;n<s.length;n++){var a=s.eq(n);this.inputs.push({input:a,val:Garnish.getInputPostVal(a)})}}this.addListener(this.$form,"submit","handleFormSubmit")},handleFormSubmit:function(t){if(Craft.elevatedSessionManager.fetchingTimeout)t.preventDefault();else{if(this.inputs){for(var e,i=!1,s=0;s<this.inputs.length;s++)if((e=this.inputs[s].input).data("passwordInput")&&(e=e.data("passwordInput").$currentInput),Garnish.getInputPostVal(e)!==this.inputs[s].val){i=!0;break}if(!i)return}t.preventDefault(),Craft.elevatedSessionManager.requireElevatedSession($.proxy(this,"submitForm"))}},submitForm:function(){this.disable(),this.$form.trigger("submit"),this.enable()}}),Craft.ElevatedSessionManager=Garnish.Base.extend({fetchingTimeout:!1,passwordModal:null,$passwordInput:null,$passwordSpinner:null,$submitBtn:null,$errorPara:null,callback:null,requireElevatedSession:function(t){this.callback=t,this.fetchingTimeout=!0,Craft.postActionRequest("users/get-elevated-session-timeout",$.proxy(function(t,e){this.fetchingTimeout=!1,"success"===e&&(!1===t.timeout||t.timeout>=Craft.ElevatedSessionManager.minSafeElevatedSessionTimeout?this.callback():this.showPasswordModal())},this))},showPasswordModal:function(){if(this.passwordModal)this.passwordModal.show();else{var t=$('<form id="elevatedsessionmodal" class="modal secure fitted"/>'),e=$('<div class="body"><p>'+Craft.t("app","Enter your password to continue.")+"</p></div>").appendTo(t),i=$('<div class="inputcontainer">').appendTo(e),s=$('<div class="flex"/>').appendTo(i),n=$('<div class="flex-grow"/>').appendTo(s),a=$("<td/>").appendTo(s),r=$('<div class="passwordwrapper"/>').appendTo(n);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'" autocomplete="current-password"/>').appendTo(r),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(i),this.$submitBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Submit")+'" />').appendTo(a),this.$errorPara=$('<p class="error"/>').appendTo(e),this.passwordModal=new Garnish.Modal(t,{closeOtherModals:!1,onFadeIn:$.proxy(function(){setTimeout($.proxy(this,"focusPasswordInput"),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(t,"submit","submitPassword")}},focusPasswordInput:function(){Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$submitBtn.removeClass("disabled"),!0):(this.$submitBtn.addClass("disabled"),!1)},submitPassword:function(t){if(t&&t.preventDefault(),this.validatePassword()){this.$passwordSpinner.removeClass("hidden"),this.clearLoginError();var e={currentPassword:this.$passwordInput.val()};Craft.postActionRequest("users/start-elevated-session",e,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.passwordModal.hide(),this.callback()):(this.showPasswordError(t.message||Craft.t("app","Incorrect password.")),Garnish.shake(this.passwordModal.$container),this.focusPasswordInput()):this.showPasswordError()},this))}},showPasswordError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$errorPara.text(t),this.passwordModal.updateSizeAndPosition()},clearLoginError:function(){this.showPasswordError("")}},{minSafeElevatedSessionTimeout:5}),Craft.elevatedSessionManager=new Craft.ElevatedSessionManager,Craft.EntryIndex=Craft.BaseElementIndex.extend({publishableSections:null,$newEntryBtnGroup:null,$newEntryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.publishableSections=[];for(var t=0;t<Craft.publishableSections.length;t++){var e=Craft.publishableSections[t];this.getSourceByKey("section:"+e.uid)&&this.publishableSections.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultSectionHandle){if("singles"===defaultSectionHandle)return"singles";for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultSectionHandle)return e.data("key")}}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s;if(t="singles"===this.$source.data("key")?"singles":this.$source.data("handle"),this.publishableSections.length){var n,a;if(this.$newEntryBtnGroup&&this.$newEntryBtnGroup.remove(),t)for(e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].handle===t){n=this.publishableSections[e];break}if(this.$newEntryBtnGroup=$('<div class="btngroup submit"/>'),n?(i=this._getSectionTriggerHref(n),s="index"===this.settings.context?Craft.t("app","New entry"):Craft.t("app","New {section} entry",{section:n.name}),this.$newEntryBtn=$('<a class="btn submit add icon" '+i+">"+Craft.escapeHtml(s)+"</a>").appendTo(this.$newEntryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newEntryBtn,"click",function(t){this._openCreateEntryModal(t.currentTarget.getAttribute("data-id"))}),1<this.publishableSections.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newEntryBtnGroup))):this.$newEntryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New entry")+"</div>").appendTo(this.$newEntryBtnGroup),a){var r='<div class="menu"><ul>';for(e=0;e<this.publishableSections.length;e++){var o=this.publishableSections[e];("index"===this.settings.context&&-1!==$.inArray(this.siteId,o.sites)||"index"!==this.settings.context&&o!==n)&&(i=this._getSectionTriggerHref(o),s="index"===this.settings.context?o.name:Craft.t("app","New {section} entry",{section:o.name}),r+="<li><a "+i+'">'+Craft.escapeHtml(s)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newEntryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateEntryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newEntryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="entries";t&&(h+="/"+t),history.replaceState({},"",Craft.getUrl(h))}}},_getSectionTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="entries/"+t.handle+"/new";if(params={},this.siteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(params.site=Craft.sites[i].handle);return'href="'+Craft.getUrl(e,params)+'"'},_openCreateEntryModal:function(t){if(!this.$newEntryBtn.hasClass("loading")){for(var i,e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].id==t){i=this.publishableSections[e];break}if(i){this.$newEntryBtn.addClass("inactive");var s=this.$newEntryBtn.text();this.$newEntryBtn.text(Craft.t("app","New {section} entry",{section:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newEntryBtnGroup,elementType:"craft\\elements\\Entry",siteId:this.siteId,attributes:{sectionId:t,typeId:i.entryTypes[0].id},onBeginLoading:$.proxy(function(){this.$newEntryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newEntryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newEntryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="section:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Entry",Craft.EntryIndex),Craft.FieldLayoutDesigner=Garnish.Base.extend({$container:null,$tabContainer:null,$unusedFieldContainer:null,$newTabBtn:null,$allFields:null,tabGrid:null,unusedFieldGrid:null,tabDrag:null,fieldDrag:null,init:function(t,e){this.$container=$(t),this.setSettings(e,Craft.FieldLayoutDesigner.defaults),this.$tabContainer=this.$container.children(".fld-tabs"),this.$unusedFieldContainer=this.$container.children(".unusedfields"),this.$newTabBtn=this.$container.find("> .newtabbtn-container > .btn"),this.$allFields=this.$unusedFieldContainer.find(".fld-field"),this.tabGrid=new Craft.Grid(this.$tabContainer,Craft.FieldLayoutDesigner.gridSettings),this.unusedFieldGrid=new Craft.Grid(this.$unusedFieldContainer,Craft.FieldLayoutDesigner.gridSettings);for(var i=this.$tabContainer.children(),s=0;s<i.length;s++)this.initTab($(i[s]));this.fieldDrag=new Craft.FieldLayoutDesigner.FieldDrag(this),this.settings.customizableTabs&&(this.tabDrag=new Craft.FieldLayoutDesigner.TabDrag(this),this.addListener(this.$newTabBtn,"activate","addTab"))},initTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);$('<li><a data-action="rename">'+Craft.t("app","Rename")+"</a></li>").appendTo(s),$('<li><a data-action="delete">'+Craft.t("app","Delete")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onTabOptionSelect")})}for(var n=t.children(".fld-tabcontent").children(),a=0;a<n.length;a++)this.initField($(n[a]))},initField:function(t){var e=t.find(".settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);t.hasClass("fld-required")?$('<li><a data-action="toggle-required">'+Craft.t("app","Make not required")+"</a></li>").appendTo(s):$('<li><a data-action="toggle-required">'+Craft.t("app","Make required")+"</a></li>").appendTo(s),$('<li><a data-action="remove">'+Craft.t("app","Remove")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onFieldOptionSelect")})},onTabOptionSelect:function(t){if(this.settings.customizableTabs){var e=$(t),i=e.data("menu").$anchor.parent().parent().parent();switch(e.data("action")){case"rename":this.renameTab(i);break;case"delete":this.deleteTab(i)}}},onFieldOptionSelect:function(t){var e=$(t),i=e.data("menu").$anchor.parent();switch(e.data("action")){case"toggle-required":this.toggleRequiredField(i,e);break;case"remove":this.removeField(i)}},renameTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .tab span"),i=e.text(),s=prompt(Craft.t("app","Give your tab a name."),i);s&&s!==i&&(e.text(s),t.find(".id-input").attr("name",this.getFieldInputName(s)))}},deleteTab:function(t){if(this.settings.customizableTabs){for(var e=t.find(".fld-field"),i=0;i<e.length;i++){var s=$(e[i]).attr("data-id");this.removeFieldById(s)}this.tabGrid.removeItems(t),this.tabDrag.removeItems(t),t.remove()}},toggleRequiredField:function(t,e){t.hasClass("fld-required")?(t.removeClass("fld-required"),t.find(".required-input").remove(),setTimeout(function(){e.text(Craft.t("app","Make required"))},500)):(t.addClass("fld-required"),$('<input class="required-input" type="hidden" name="'+this.settings.requiredFieldInputName+'" value="'+t.data("id")+'">').appendTo(t),setTimeout(function(){e.text(Craft.t("app","Make not required"))},500))},removeField:function(t){var e=t.attr("data-id");t.remove(),this.removeFieldById(e),this.tabGrid.refreshCols(!0)},removeFieldById:function(t){var e=this.$allFields.filter("[data-id="+t+"]:first"),i=e.closest(".fld-tab");e.removeClass("hidden"),i.hasClass("hidden")?(i.removeClass("hidden"),this.unusedFieldGrid.addItems(i),this.settings.customizableTabs&&this.tabDrag.addItems(i)):this.unusedFieldGrid.refreshCols(!0)},addTab:function(){if(this.settings.customizableTabs){var t=$('<div class="fld-tab"><div class="tabs"><div class="tab sel draggable"><span>Tab '+(this.tabGrid.$items.length+1)+'</span><a class="settings icon" title="'+Craft.t("app","Rename")+'"></a></div></div><div class="fld-tabcontent"></div></div>').appendTo(this.$tabContainer);this.tabGrid.addItems(t),this.tabDrag.addItems(t),this.initTab(t)}},getFieldInputName:function(t){return this.settings.fieldInputName.replace(/__TAB_NAME__/g,Craft.encodeUriComponent(t))}},{gridSettings:{itemSelector:".fld-tab:not(.hidden)",minColWidth:240,fillMode:"grid",snapToGrid:30},defaults:{customizableTabs:!0,fieldInputName:"fieldLayout[__TAB_NAME__][]",requiredFieldInputName:"requiredFields[]"}}),Craft.FieldLayoutDesigner.BaseDrag=Garnish.Drag.extend({designer:null,$insertion:null,showingInsertion:!1,$caboose:null,draggingUnusedItem:!1,addToTabGrid:!1,init:function(t,e){this.designer=t;var i=this.designer.$tabContainer.find(this.itemSelector).add(this.designer.$unusedFieldContainer.find(this.itemSelector));this.base(i,e)},onDragStart:function(){this.base(),this.draggingUnusedItem=this.$draggee.hasClass("unused"),this.$insertion=this.getInsertion(),this.addCaboose(),this.$items=$().add(this.$items.add(this.$caboose)),this.addToTabGrid&&this.designer.tabGrid.addItems(this.$caboose),this.draggingUnusedItem?this.showingInsertion=!1:(this.$insertion.insertBefore(this.$draggee),this.$draggee.detach(),this.$items=$().add(this.$items.not(this.$draggee).add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$draggee),this.designer.tabGrid.addItems(this.$insertion))),this.setMidpoints()},addCaboose:$.noop,getItemContainer:$.noop,isItemInTabContainer:function(t){return this.getItemContainer(t)[0]===this.designer.$tabContainer[0]},setMidpoints:function(){for(var t=0;t<this.$items.length;t++){var e=$(this.$items[t]);if(this.isItemInTabContainer(e)){var i=e.offset();e.data("midpoint",{left:i.left+e.outerWidth()/2,top:i.top+e.outerHeight()/2})}}},onDrag:function(){this.draggingUnusedItem&&!Garnish.hitTest(this.mouseX,this.mouseY,this.designer.$tabContainer)?this.showingInsertion&&(this.$insertion.remove(),this.$items=$().add(this.$items.not(this.$insertion)),this.showingInsertion=!1,this.addToTabGrid?this.designer.tabGrid.removeItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints()):(this.onDrag._closestItem=this.getClosestItem(),this.onDrag._closestItem!==this.$insertion[0]&&(this.showingInsertion&&$.inArray(this.$insertion[0],this.$items)<$.inArray(this.onDrag._closestItem,this.$items)&&-1===$.inArray(this.onDrag._closestItem,this.$caboose)?this.$insertion.insertAfter(this.onDrag._closestItem):this.$insertion.insertBefore(this.onDrag._closestItem),this.$items=$().add(this.$items.add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid?this.designer.tabGrid.addItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints())),this.base()},getClosestItem:function(){for(this.getClosestItem._closestItem=null,this.getClosestItem._closestItemMouseDiff=null,this.getClosestItem._i=0;this.getClosestItem._i<this.$items.length;this.getClosestItem._i++)this.getClosestItem._$item=$(this.$items[this.getClosestItem._i]),this.isItemInTabContainer(this.getClosestItem._$item)&&(this.getClosestItem._midpoint=this.getClosestItem._$item.data("midpoint"),this.getClosestItem._mouseDiff=Garnish.getDist(this.getClosestItem._midpoint.left,this.getClosestItem._midpoint.top,this.mouseX,this.mouseY),(null===this.getClosestItem._closestItem||this.getClosestItem._mouseDiff<this.getClosestItem._closestItemMouseDiff)&&(this.getClosestItem._closestItem=this.getClosestItem._$item[0],this.getClosestItem._closestItemMouseDiff=this.getClosestItem._mouseDiff));return this.getClosestItem._closestItem},onDragStop:function(){this.showingInsertion&&(this.$insertion.replaceWith(this.$draggee),this.$items=$().add(this.$items.not(this.$insertion).add(this.$draggee)),this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$insertion),this.designer.tabGrid.addItems(this.$draggee))),this.$items=this.$items.not(this.$caboose),this.$caboose.remove(),this.addToTabGrid&&this.designer.tabGrid.removeItems(this.$caboose),this.$draggee.css({display:this.draggeeDisplay,visibility:"hidden"}),this.designer.tabGrid.refreshCols(!0),this.designer.unusedFieldGrid.refreshCols(!0),this.returnHelpersToDraggees(),this.base()}}),Craft.FieldLayoutDesigner.TabDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab",addToTabGrid:!0,init:function(t){this.base(t,{handle:".tab"})},addCaboose:function(){this.$caboose=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(this.designer.$tabContainer)},getInsertion:function(){var t=this.$draggee.find(".tab");return $('<div class="fld-tab fld-insertion" style="height: '+this.$draggee.height()+'px;"><div class="tabs"><div class="tab sel draggable" style="width: '+t.width()+"px; height: "+t.height()+'px;"></div></div><div class="fld-tabcontent" style="height: '+this.$draggee.find(".fld-tabcontent").height()+'px;"></div></div>')},getItemContainer:function(t){return t.parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused"),e=t.find(".tab span").text();t.find(".fld-field").removeClass("unused"),t.find(".tabs .tab").append('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');var i=t.find(".fld-field"),s=i.filter(".hidden").remove();(i=i.not(s)).prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');for(var n=0;n<i.length;n++){var a=$(i[n]),r=this.designer.getFieldInputName(e);a.append('<input class="id-input" type="hidden" name="'+r+'" value="'+a.data("id")+'">')}this.designer.fieldDrag.addItems(i),this.designer.initTab(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),this.$draggee.find(".fld-field").addClass("hidden"),this.$draggee=t,this.addItems(t),this.designer.tabGrid.addItems(t),this.designer.unusedFieldGrid.removeItems(this.$draggee)}this.base()}}),Craft.FieldLayoutDesigner.FieldDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab .fld-field",addCaboose:function(){this.$caboose=$();for(var t=this.designer.$tabContainer.children().children(".fld-tabcontent"),e=0;e<t.length;e++){var i=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(t[e]);this.$caboose=this.$caboose.add(i)}},getInsertion:function(){return $('<div class="fld-field fld-insertion" style="height: '+this.$draggee.height()+'px;"/>')},getItemContainer:function(t){return t.parent().parent().parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused");if(t.prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>'),this.designer.initField(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),0===this.$draggee.siblings(":not(.hidden)").length){var e=this.$draggee.parent().parent();e.addClass("hidden"),this.designer.unusedFieldGrid.removeItems(e)}this.$draggee=t,this.addItems(t)}if(this.showingInsertion){var i=this.$insertion.parent().parent().find(".tab span").text(),s=this.designer.getFieldInputName(i);this.draggingUnusedItem?this.$draggee.append('<input class="id-input" type="hidden" name="'+s+'" value="'+this.$draggee.data("id")+'">'):this.$draggee.find(".id-input").attr("name",s)}this.base()}}),Craft.FieldToggle=Garnish.Base.extend({$toggle:null,targetPrefix:null,targetSelector:null,reverseTargetSelector:null,_$target:null,_$reverseTarget:null,type:null,init:function(t){this.$toggle=$(t),this.$toggle.data("fieldtoggle")&&(Garnish.log("Double-instantiating a field toggle on an element"),this.$toggle.data("fieldtoggle").destroy()),this.$toggle.data("fieldtoggle",this),this.type=this.getType(),"select"===this.type?this.targetPrefix=this.$toggle.attr("data-target-prefix")||"":(this.targetSelector=this.normalizeTargetSelector(this.$toggle.data("target")),this.reverseTargetSelector=this.normalizeTargetSelector(this.$toggle.data("reverse-target"))),this.findTargets(),"link"===this.type?this.addListener(this.$toggle,"click","onToggleChange"):this.addListener(this.$toggle,"change","onToggleChange")},normalizeTargetSelector:function(t){return t&&!t.match(/^[#\.]/)&&(t="#"+t),t},getType:function(){return"INPUT"===this.$toggle.prop("nodeName")&&"checkbox"===this.$toggle.attr("type").toLowerCase()?"checkbox":"SELECT"===this.$toggle.prop("nodeName")?"select":"A"===this.$toggle.prop("nodeName")?"link":"DIV"===this.$toggle.prop("nodeName")&&this.$toggle.hasClass("lightswitch")?"lightswitch":void 0},findTargets:function(){"select"===this.type?this._$target=$(this.normalizeTargetSelector(this.targetPrefix+this.getToggleVal())):(this.targetSelector&&(this._$target=$(this.targetSelector)),this.reverseTargetSelector&&(this._$reverseTarget=$(this.reverseTargetSelector)))},getToggleVal:function(){if("lightswitch"===this.type)return this.$toggle.children("input").val();var t=Garnish.getInputPostVal(this.$toggle);return null===t?null:t.replace(/[\[\]\\]+/g,"-")},onToggleChange:function(){"select"===this.type?(this.hideTarget(this._$target),this.findTargets(),this.showTarget(this._$target)):("link"===this.type?this.onToggleChange._show=this.$toggle.hasClass("collapsed")||!this.$toggle.hasClass("expanded"):this.onToggleChange._show=!!this.getToggleVal(),this.onToggleChange._show?(this.showTarget(this._$target),this.hideTarget(this._$reverseTarget)):(this.hideTarget(this._$target),this.showTarget(this._$reverseTarget)),delete this.onToggleChange._show)},showTarget:function(t){t&&t.length&&(this.showTarget._currentHeight=t.height(),t.removeClass("hidden"),"select"!==this.type&&("link"===this.type&&(this.$toggle.removeClass("collapsed"),this.$toggle.addClass("expanded")),t.height("auto"),this.showTarget._targetHeight=t.height(),t.css({height:this.showTarget._currentHeight,overflow:"hidden"}),t.velocity("stop"),t.velocity({height:this.showTarget._targetHeight},"fast",function(){t.css({height:"",overflow:""})}),delete this.showTarget._targetHeight),delete this.showTarget._currentHeight,Garnish.$win.trigger("resize"))},hideTarget:function(t){t&&t.length&&("select"===this.type?t.addClass("hidden"):("link"===this.type&&(this.$toggle.removeClass("expanded"),this.$toggle.addClass("collapsed")),t.css("overflow","hidden"),t.velocity("stop"),t.velocity({height:0},"fast",function(){t.addClass("hidden")})))}}),Craft.Grid=Garnish.Base.extend({$container:null,$items:null,items:null,totalCols:null,colGutterDrop:null,colPctWidth:null,possibleItemColspans:null,possibleItemPositionsByColspan:null,itemPositions:null,itemColspansByPosition:null,layouts:null,layout:null,itemHeights:null,leftPadding:null,_refreshingCols:!1,_refreshColsAfterRefresh:!1,_forceRefreshColsAfterRefresh:!1,init:function(t,e){this.$container=$(t),this.$container.data("grid")&&(Garnish.log("Double-instantiating a grid on an element"),this.$container.data("grid").destroy()),this.$container.data("grid",this),this.setSettings(e,Craft.Grid.defaults),this.handleContainerHeightProxy=$.proxy(function(){this.refreshCols(!1,!0)},this),this.$items=this.$container.children(this.settings.itemSelector),this.setItems(),this.refreshCols(!0,!1),Garnish.$doc.ready($.proxy(function(){this.refreshCols(!1,!1)},this))},addItems:function(t){this.$items=$().add(this.$items.add(t)),this.setItems(),this.refreshCols(!0,!0)},removeItems:function(t){this.$items=$().add(this.$items.not(t)),this.setItems(),this.refreshCols(!0,!0)},resetItemOrder:function(){this.$items=$().add(this.$items),this.setItems(),this.refreshCols(!0,!0)},setItems:function(){for(this.setItems._={},this.items=[],this.setItems._.i=0;this.setItems._.i<this.$items.length;this.setItems._.i++)this.items.push($(this.$items[this.setItems._.i]));delete this.setItems._},refreshCols:function(t){if(this._refreshingCols)return this._refreshColsAfterRefresh=!0,void(t&&(this._forceRefreshColsAfterRefresh=!0));if(this._refreshingCols=!0,this.items.length)if(this.refreshCols._={},this.refreshCols._.oldHeight=this.$container[0].style.height,this.$container[0].style.height=1,this.refreshCols._.scrollHeight=this.$container[0].scrollHeight,this.$container[0].style.height=this.refreshCols._.oldHeight,0!==this.refreshCols._.scrollHeight)if(this.settings.cols?this.refreshCols._.totalCols=this.settings.cols:(this.refreshCols._.totalCols=Math.floor(this.$container.width()/this.settings.minColWidth),null!==this.totalCols&&this.refreshCols._.totalCols>this.totalCols&&(this.refreshCols._.totalCols=Math.floor((this.$container.width()-20)/this.settings.minColWidth)),this.settings.maxCols&&this.refreshCols._.totalCols>this.settings.maxCols&&(this.refreshCols._.totalCols=this.settings.maxCols)),0===this.refreshCols._.totalCols&&(this.refreshCols._.totalCols=1),!0===t||this.totalCols!==this.refreshCols._.totalCols){if(this.totalCols=this.refreshCols._.totalCols,this.colGutterDrop=this.settings.gutter*(this.totalCols-1)/this.totalCols,this.removeListener(this.$container,"resize"),"grid"===this.settings.fillMode)for(this.refreshCols._.itemIndex=0;this.refreshCols._.itemIndex<this.items.length;){for(this.refreshCols._.tallestItemHeight=-1,this.refreshCols._.colIndex=0,this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.itemHeight=this.items[this.refreshCols._.i].height("auto").height(),this.refreshCols._.itemHeight>this.refreshCols._.tallestItemHeight&&(this.refreshCols._.tallestItemHeight=this.refreshCols._.itemHeight),this.refreshCols._.colIndex++;for(this.settings.snapToGrid&&(this.refreshCols._.remainder=this.refreshCols._.tallestItemHeight%this.settings.snapToGrid,this.refreshCols._.remainder&&(this.refreshCols._.tallestItemHeight+=this.settings.snapToGrid-this.refreshCols._.remainder)),this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.items[this.refreshCols._.i].height(this.refreshCols._.tallestItemHeight);this.refreshCols._.itemIndex+=this.totalCols}else if(this.removeListener(this.$items,"resize"),1===this.totalCols)this.$container.height("auto"),this.$items.show().css({position:"relative",width:"auto",top:0}).css(Craft.left,0);else{for(this.$items.css("position","absolute"),this.colPctWidth=100/this.totalCols,this.layouts=[],this.itemPositions=[],this.itemColspansByPosition=[],this.possibleItemColspans=[],this.possibleItemPositionsByColspan=[],this.itemHeightsByColspan=[],this.refreshCols._.item=0;this.refreshCols._.item<this.items.length;this.refreshCols._.item++)for(this.possibleItemColspans[this.refreshCols._.item]=[],this.possibleItemPositionsByColspan[this.refreshCols._.item]={},this.itemHeightsByColspan[this.refreshCols._.item]={},this.refreshCols._.$item=this.items[this.refreshCols._.item].show(),this.refreshCols._.positionRight="right"===this.refreshCols._.$item.data("position"),this.refreshCols._.positionLeft="left"===this.refreshCols._.$item.data("position"),this.refreshCols._.minColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("min-colspan")?this.refreshCols._.$item.data("min-colspan"):1,this.refreshCols._.maxColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("max-colspan")?this.refreshCols._.$item.data("max-colspan"):this.totalCols,this.refreshCols._.minColspan>this.totalCols&&(this.refreshCols._.minColspan=this.totalCols),this.refreshCols._.maxColspan>this.totalCols&&(this.refreshCols._.maxColspan=this.totalCols),this.refreshCols._.colspan=this.refreshCols._.minColspan;this.refreshCols._.colspan<=this.refreshCols._.maxColspan;this.refreshCols._.colspan++)for(this.refreshCols._.$item.css("width",this.getItemWidthCss(this.refreshCols._.colspan)),this.itemHeightsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=this.refreshCols._.$item.outerHeight(),this.possibleItemColspans[this.refreshCols._.item].push(this.refreshCols._.colspan),this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=[],this.refreshCols._.positionLeft?(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=0):this.refreshCols._.positionRight?(this.refreshCols._.minPosition=this.totalCols-this.refreshCols._.colspan,this.refreshCols._.maxPosition=this.refreshCols._.minPosition):(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=this.totalCols-this.refreshCols._.colspan),this.refreshCols._.position=this.refreshCols._.minPosition;this.refreshCols._.position<=this.refreshCols._.maxPosition;this.refreshCols._.position++)this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan].push(this.refreshCols._.position);for(this.refreshCols._.colHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.totalCols;this.refreshCols._.i++)this.refreshCols._.colHeights.push(0);for(this.createLayouts(0,[],[],this.refreshCols._.colHeights,0),this.refreshCols._.layoutTotalCols=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)for(this.refreshCols._.layoutTotalCols[this.refreshCols._.i]=0,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j]&&this.refreshCols._.layoutTotalCols[this.refreshCols._.i]++;for(this.refreshCols._.highestTotalCols=Math.max.apply(null,this.refreshCols._.layoutTotalCols),this.refreshCols._.i=this.layouts.length-1;0<=this.refreshCols._.i;this.refreshCols._.i--)this.refreshCols._.layoutTotalCols[this.refreshCols._.i]!==this.refreshCols._.highestTotalCols&&this.layouts.splice(this.refreshCols._.i,1);for(this.refreshCols._.layoutHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)this.refreshCols._.layoutHeights.push(Math.max.apply(null,this.layouts[this.refreshCols._.i].colHeights));for(this.refreshCols._.shortestHeight=Math.min.apply(null,this.refreshCols._.layoutHeights),this.refreshCols._.shortestLayouts=[],this.refreshCols._.emptySpaces=[],this.refreshCols._.i=0;this.refreshCols._.i<this.refreshCols._.layoutHeights.length;this.refreshCols._.i++)if(this.refreshCols._.layoutHeights[this.refreshCols._.i]===this.refreshCols._.shortestHeight){for(this.refreshCols._.shortestLayouts.push(this.layouts[this.refreshCols._.i]),this.refreshCols._.emptySpace=this.layouts[this.refreshCols._.i].emptySpace,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.refreshCols._.emptySpace+=this.refreshCols._.shortestHeight-this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j];this.refreshCols._.emptySpaces.push(this.refreshCols._.emptySpace)}for(this.layout=this.refreshCols._.shortestLayouts[$.inArray(Math.min.apply(null,this.refreshCols._.emptySpaces),this.refreshCols._.emptySpaces)],this.refreshCols._.i=0;this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.css={width:this.getItemWidthCss(this.layout.colspans[this.refreshCols._.i])},this.refreshCols._.css[Craft.left]=this.getItemLeftPosCss(this.layout.positions[this.refreshCols._.i]),this.items[this.refreshCols._.i].css(this.refreshCols._.css);this.isSimpleLayout()?(this.$container.height("auto"),this.$items.css({position:"relative",top:0,"margin-bottom":this.settings.gutter+"px"})):(this.$items.css("position","absolute"),this.positionItems(),this.addListener(this.$items,"resize","onItemResize"))}this.completeRefreshCols(),this.addListener(this.$container,"resize",this.handleContainerHeightProxy),this.onRefreshCols()}else this.completeRefreshCols();else this.completeRefreshCols();else this.completeRefreshCols()},completeRefreshCols:function(){if(void 0!==this.refreshCols._&&delete this.refreshCols._,this._refreshingCols=!1,this._refreshColsAfterRefresh){var t=this._forceRefreshColsAfterRefresh;this._refreshColsAfterRefresh=!1,this._forceRefreshColsAfterRefresh=!1,Garnish.requestAnimationFrame($.proxy(function(){this.refreshCols(t)},this))}},getItemWidth:function(t){return this.colPctWidth*t},getItemWidthCss:function(t){return"calc("+this.getItemWidth(t)+"% - "+this.colGutterDrop+"px)"},getItemWidthInPx:function(t){return this.getItemWidth(t)/100*this.$container.width()-this.colGutterDrop},getItemLeftPosCss:function(t){return"calc(("+this.getItemWidth(1)+"% + "+(this.settings.gutter-this.colGutterDrop)+"px) * "+t+")"},getItemLeftPosInPx:function(t){return(this.getItemWidth(1)/100*this.$container.width()+(this.settings.gutter-this.colGutterDrop))*t},createLayouts:function(t,e,i,s,n){new Craft.Grid.LayoutGenerator(this).createLayouts(t,e,i,s,n)},isSimpleLayout:function(){for(this.isSimpleLayout._={},this.isSimpleLayout._.i=0;this.isSimpleLayout._.i<this.layout.positions.length;this.isSimpleLayout._.i++)if(0!==this.layout.positions[this.isSimpleLayout._.i])return delete this.isSimpleLayout._,!1;return delete this.isSimpleLayout._,!0},positionItems:function(){for(this.positionItems._={},this.positionItems._.colHeights=[],this.positionItems._.i=0;this.positionItems._.i<this.totalCols;this.positionItems._.i++)this.positionItems._.colHeights.push(0);for(this.positionItems._.i=0;this.positionItems._.i<this.items.length;this.positionItems._.i++){for(this.positionItems._.endingCol=this.layout.positions[this.positionItems._.i]+this.layout.colspans[this.positionItems._.i]-1,this.positionItems._.affectedColHeights=[],this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.affectedColHeights.push(this.positionItems._.colHeights[this.positionItems._.col]);for(this.positionItems._.top=Math.max.apply(null,this.positionItems._.affectedColHeights),0<this.positionItems._.top&&(this.positionItems._.top+=this.settings.gutter),this.items[this.positionItems._.i].css("top",this.positionItems._.top),this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.colHeights[this.positionItems._.col]=this.positionItems._.top+this.itemHeightsByColspan[this.positionItems._.i][this.layout.colspans[this.positionItems._.i]]}this.$container.height(Math.max.apply(null,this.positionItems._.colHeights)),delete this.positionItems._},onItemResize:function(t){this.onItemResize._={},t.stopPropagation(),this.onItemResize._.item=$.inArray(t.currentTarget,this.$items),-1!==this.onItemResize._.item&&(this.onItemResize._.newHeight=this.items[this.onItemResize._.item].outerHeight(),this.onItemResize._.newHeight!==this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]&&(this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]=this.onItemResize._.newHeight,this.positionItems(!1))),delete this.onItemResize._},onRefreshCols:function(){this.trigger("refreshCols"),this.settings.onRefreshCols()}},{defaults:{itemSelector:".item",cols:null,maxCols:null,minColWidth:320,gutter:14,fillMode:"top",colClass:"col",snapToGrid:null,onRefreshCols:$.noop}}),Craft.Grid.LayoutGenerator=Garnish.Base.extend({grid:null,_:null,init:function(t){this.grid=t},createLayouts:function(t,e,i,s,n){for(this._={},this._.c=0;this._.c<this.grid.possibleItemColspans[t].length;this._.c++){for(this._.colspan=this.grid.possibleItemColspans[t][this._.c],this._.tallestColHeightsByPosition=[],this._.p=0;this._.p<this.grid.possibleItemPositionsByColspan[t][this._.colspan].length;this._.p++){for(this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.colHeightsForPosition=[],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.colHeightsForPosition.push(s[this._.col]);this._.tallestColHeightsByPosition[this._.p]=Math.max.apply(null,this._.colHeightsForPosition)}for(this._.p=$.inArray(Math.min.apply(null,this._.tallestColHeightsByPosition),this._.tallestColHeightsByPosition),this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.positions=e.slice(0),this._.colspans=i.slice(0),this._.colHeights=s.slice(0),this._.emptySpace=n,this._.positions.push(this._.position),this._.colspans.push(this._.colspan),this._.tallestColHeight=this._.tallestColHeightsByPosition[this._.p],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.emptySpace+=this._.tallestColHeight-this._.colHeights[this._.col],this._.colHeights[this._.col]=this._.tallestColHeight+this.grid.itemHeightsByColspan[t][this._.colspan];t===this.grid.items.length-1?this.grid.layouts.push({positions:this._.positions,colspans:this._.colspans,colHeights:this._.colHeights,emptySpace:this._.emptySpace}):this.grid.createLayouts(t+1,this._.positions,this._.colspans,this._.colHeights,this._.emptySpace)}delete this._}}),Craft.HandleGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){var e=t.replace("/<(.*?)>/g","");e=(e=e.replace(/['"‘’“”\[\]\(\)\{\}:]/g,"")).toLowerCase(),e=Craft.asciiString(e),this.settings.allowNonAlphaStart||(e=e.replace(/^[^a-z]+/,""));var i=Craft.filterArray(e.split(/[^a-z0-9]+/));e="";for(var s=0;s<i.length;s++)e+=0===s?i[s]:i[s].charAt(0).toUpperCase()+i[s].substr(1);return e}}),Craft.ImageUpload=Garnish.Base.extend({$container:null,progressBar:null,uploader:null,init:function(t){this.setSettings(t,Craft.ImageUpload.defaults),this.initImageUpload()},initImageUpload:function(){this.$container=$(this.settings.containerSelector),this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl(this.settings.uploadAction),formData:this.settings.postParameters,fileInput:this.$container.find(this.settings.fileInputSelector),paramName:this.settings.uploadParamName};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),t.events.fileuploadfail=$.proxy(this,"_onUploadError"),this.uploader=new Craft.Uploader(this.$container,t),this.initButtons()},initButtons:function(){this.$container.find(this.settings.uploadButtonSelector).on("click",$.proxy(function(t){this.$container.find(this.settings.fileInputSelector).trigger("click")},this)),this.$container.find(this.settings.deleteButtonSelector).on("click",$.proxy(function(t){confirm(Craft.t("app","Are you sure you want to delete this image?"))&&($(t.currentTarget).parent().append('<div class="blocking-modal"></div>'),Craft.postActionRequest(this.settings.deleteAction,this.settings.postParameters,$.proxy(function(t,e){"success"===e&&this.refreshImage(t)},this)))},this))},refreshImage:function(t){$(this.settings.containerSelector).replaceWith(t.html),this.settings.onAfterRefreshImage(t),this.initImageUpload()},_onUploadStart:function(t){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{$(e.result.html);this.refreshImage(e.result)}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"))},_onUploadError:function(t,e){e.jqXHR.responseJSON.error&&(alert(e.jqXHR.responseJSON.error),this.$container.removeClass("uploading"),this.progressBar.hideProgressBar(),this.progressBar.resetProgressBar())}},{defaults:{postParameters:{},uploadAction:"",deleteAction:"",fileInputSelector:"",onAfterRefreshImage:$.noop,containerSelector:null,uploadButtonSelector:null,deleteButtonSelector:null,uploadParamName:"files"}}),Craft.InfoIcon=Garnish.Base.extend({$icon:null,hud:null,init:function(t){this.$icon=$(t),this.addListener(this.$icon,"click","showHud")},showHud:function(){this.hud?this.hud.show():this.hud=new Garnish.HUD(this.$icon,this.$icon.html(),{hudClass:"hud info-hud",closeOtherHUDs:!1})}}),Craft.LightSwitch=Garnish.Base.extend({settings:null,$outerContainer:null,$innerContainer:null,$input:null,small:!1,on:null,dragger:null,dragStartMargin:null,init:function(t,e){this.$outerContainer=$(t),this.$outerContainer.data("lightswitch")&&(Garnish.log("Double-instantiating a lightswitch on an element"),this.$outerContainer.data("lightswitch").destroy()),this.$outerContainer.data("lightswitch",this),this.small=this.$outerContainer.hasClass("small"),this.setSettings(e,Craft.LightSwitch.defaults),this.$innerContainer=this.$outerContainer.find(".lightswitch-container:first"),this.$input=this.$outerContainer.find("input:first"),this.$input.prop("disabled")||(this.on=this.$outerContainer.hasClass("on"),this.$outerContainer.attr({role:"checkbox","aria-checked":this.on?"true":"false"}),this.addListener(this.$outerContainer,"mousedown","_onMouseDown"),this.addListener(this.$outerContainer,"keydown","_onKeyDown"),this.dragger=new Garnish.BaseDrag(this.$outerContainer,{axis:Garnish.X_AXIS,ignoreHandleSelector:null,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}))},turnOn:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=0,this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(this.settings.value),this.$outerContainer.addClass("on"),this.$outerContainer.attr("aria-checked","true"),this.on!==(this.on=!0)&&this.onChange()},turnOff:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=this._getOffMargin(),this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(""),this.$outerContainer.removeClass("on"),this.$outerContainer.attr("aria-checked","false"),this.on!==(this.on=!1)&&this.onChange()},toggle:function(t){this.on?this.turnOff():this.turnOn()},onChange:function(){this.trigger("change"),this.settings.onChange(),this.$outerContainer.trigger("change")},_onMouseDown:function(){this.addListener(Garnish.$doc,"mouseup","_onMouseUp")},_onMouseUp:function(){this.removeListener(Garnish.$doc,"mouseup"),this.dragger.dragging||this.toggle()},_onKeyDown:function(t){switch(t.keyCode){case Garnish.SPACE_KEY:this.toggle(),t.preventDefault();break;case Garnish.RIGHT_KEY:"ltr"===Craft.orientation?this.turnOn():this.turnOff(),t.preventDefault();break;case Garnish.LEFT_KEY:"ltr"===Craft.orientation?this.turnOff():this.turnOn(),t.preventDefault()}},_getMargin:function(){return parseInt(this.$innerContainer.css("margin-"+Craft.left))},_onDragStart:function(){this.$outerContainer.addClass("dragging"),this.dragStartMargin=this._getMargin()},_onDrag:function(){var t;(t="ltr"===Craft.orientation?this.dragStartMargin+this.dragger.mouseDistX:this.dragStartMargin-this.dragger.mouseDistX)<this._getOffMargin()?t=this._getOffMargin():0<t&&(t=0),this.$innerContainer.css("margin-"+Craft.left,t)},_onDragStop:function(){this._getMargin()>this._getOffMargin()/2?this.turnOn():this.turnOff()},_onSettle:function(){this.$outerContainer.removeClass("dragging")},destroy:function(){this.base(),this.dragger.destroy()},_getOffMargin:function(){return this.small?-9:-11}},{animationDuration:100,defaults:{value:"1",onChange:$.noop}}),Craft.LivePreview=Garnish.Base.extend({$extraFields:null,$trigger:null,$shade:null,$editorContainer:null,$editor:null,$dragHandle:null,$iframeContainer:null,$iframe:null,$fieldPlaceholder:null,previewUrl:null,token:null,basePostData:null,inPreviewMode:!1,fields:null,lastPostData:null,updateIframeInterval:null,loading:!1,checkAgain:!1,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_handleSuccessProxy:null,_handleErrorProxy:null,_forceUpdateIframeProxy:null,_scrollX:null,_scrollY:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.setSettings(t,Craft.LivePreview.defaults),this.settings.previewUrl?this.previewUrl=this.settings.previewUrl:this.previewUrl=Craft.baseSiteUrl.replace(/\/+$/,"")+"/","https:"===document.location.protocol&&(this.previewUrl=this.previewUrl.replace(/^http:/,"https:")),this.basePostData=$.extend({},this.settings.previewParams),this._handleSuccessProxy=$.proxy(this,"handleSuccess"),this._handleErrorProxy=$.proxy(this,"handleError"),this._forceUpdateIframeProxy=$.proxy(this,"forceUpdateIframe"),this.$extraFields=$(this.settings.extraFields),this.$trigger=$(this.settings.trigger),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.LivePreview.defaultEditorWidth),this.addListener(this.$trigger,"activate","toggle"),Craft.cp.on("beforeSaveShortcut",$.proxy(function(){this.inPreviewMode&&this.moveFieldsBack()},this))},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.LivePreview.minEditorWidthInPx&&(t=(e=Craft.LivePreview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},toggle:function(){this.inPreviewMode?this.exit():this.enter()},enter:function(){if(!this.inPreviewMode)if(this.token){if(this.trigger("beforeEnter"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$iframeContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);$("<div/>",{class:"flex-grow"}).appendTo(t);var i=$('<div class="btn submit">'+Craft.t("app","Save")+"</div>").appendTo(t);this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","exit"),this.addListener(i,"click","save")}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)+"px"),this.$iframeContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];for(var s=$(this.settings.fields),n=0;n<s.length;n++){var a=$(s[n]),r=this._getClone(a);this.$fieldPlaceholder.insertAfter(a),a.detach(),this.$fieldPlaceholder.replaceWith(r),a.appendTo(this.$editor),this.fields.push({$field:a,$clone:r})}this.updateIframe()?this._slideInOnIframeLoad=!0:this.slideIn(),Garnish.on(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._forceUpdateIframeProxy),this.inPreviewMode=!0,this.trigger("enter")}else this.createToken()},createToken:function(){Craft.postActionRequest("live-preview/create-token",{previewAction:this.settings.previewAction},$.proxy(function(t,e){"success"===e&&(this.token=t.token,this.enter())},this))},save:function(){Craft.cp.submitPrimaryForm()},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$iframeContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.updateIframeInterval=setInterval($.proxy(this,"updateIframe"),1e3),this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.exit()})},this))},exit:function(){this.inPreviewMode&&(this.trigger("beforeExit"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.updateIframeInterval&&clearInterval(this.updateIframeInterval),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$iframeContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$iframeContainer.hide()},this)),Garnish.off(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),this.inPreviewMode=!1,this.trigger("exit"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$iframeContainer.width(this.getIframeWidth())},updateIframe:function(t){if(t&&(this.lastPostData=null),!this.inPreviewMode)return!1;if(this.loading)return!(this.checkAgain=!0);var e=$.extend(Garnish.getPostData(this.$editor),Garnish.getPostData(this.$extraFields));if(this.lastPostData&&Craft.compare(e,this.lastPostData,!1))return!1;this.lastPostData=e,this.loading=!0;var i=this.$iframe?$(this.$iframe[0].contentWindow.document):null;return this._scrollX=i?i.scrollLeft():0,this._scrollY=i?i.scrollTop():0,$.ajax({url:this.previewUrl+(-1!==this.previewUrl.indexOf("?")?"&":"?")+Craft.tokenParam+"="+this.token,method:"POST",data:$.extend({},e,this.basePostData),headers:{"X-Craft-Token":this.token},xhrFields:{withCredentials:!0},crossDomain:!0,success:this._handleSuccessProxy,error:this._handleErrorProxy}),!0},forceUpdateIframe:function(){return this.updateIframe(!0)},handleSuccess:function(t){var e=t+'<script type="text/javascript">window.scrollTo('+this._scrollX+", "+this._scrollY+");<\/script>",i=$('<iframe class="lp-preview" frameborder="0"/>');this.$iframe?i.insertBefore(this.$iframe):i.appendTo(this.$iframeContainer),this.addListener(i,"load",function(){this.$iframe&&this.$iframe.remove(),this.$iframe=i,this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1),this.removeListener(i,"load")}),Garnish.requestAnimationFrame($.proxy(function(){i[0].contentWindow.document.open(),i[0].contentWindow.document.write(e),i[0].contentWindow.document.close(),this.onResponse()},this))},handleError:function(){this.onResponse()},onResponse:function(){this.loading=!1,this.checkAgain&&(this.checkAgain=!1,this.updateIframe())},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$iframeContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$iframeContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:4,defaults:{trigger:".livepreviewbtn",fields:null,extraFields:null,previewUrl:null,previewAction:null,previewParams:{}}}),Craft.LivePreview.init=function(t){Craft.livePreview=new Craft.LivePreview(t)},Craft.PasswordInput=Garnish.Base.extend({$passwordInput:null,$textInput:null,$currentInput:null,$showPasswordToggle:null,showingPassword:null,init:function(t,e){this.$passwordInput=$(t),this.settings=$.extend({},Craft.PasswordInput.defaults,e),this.$passwordInput.data("passwordInput")&&(Garnish.log("Double-instantiating a password input on an element"),this.$passwordInput.data("passwordInput").destroy()),this.$passwordInput.data("passwordInput",this),this.$showPasswordToggle=$("<a/>").hide(),this.$showPasswordToggle.addClass("password-toggle"),this.$showPasswordToggle.insertAfter(this.$passwordInput),this.addListener(this.$showPasswordToggle,"mousedown","onToggleMouseDown"),this.hidePassword()},setCurrentInput:function(t){this.$currentInput&&(t.addClass("focus"),t.insertAfter(this.$currentInput),this.$currentInput.detach(),t.trigger("focus"),t.removeClass("focus"),t.val(this.$currentInput.val())),this.$currentInput=t,this.addListener(this.$currentInput,"keypress,keyup,change,blur","onInputChange")},updateToggleLabel:function(t){this.$showPasswordToggle.text(t)},showPassword:function(){this.showingPassword||(this.$textInput||(this.$textInput=this.$passwordInput.clone(!0),this.$textInput.attr("type","text")),this.setCurrentInput(this.$textInput),this.updateToggleLabel(Craft.t("app","Hide")),this.showingPassword=!0)},hidePassword:function(){!1!==this.showingPassword&&(this.setCurrentInput(this.$passwordInput),this.updateToggleLabel(Craft.t("app","Show")),this.showingPassword=!1,this.addListener(this.$passwordInput,"keydown","onKeyDown"))},togglePassword:function(){this.showingPassword?this.hidePassword():this.showPassword(),this.settings.onToggleInput(this.$currentInput)},onKeyDown:function(t){t.keyCode===Garnish.ALT_KEY&&this.$currentInput.val()&&(this.showPassword(),this.$showPasswordToggle.hide(),this.addListener(this.$textInput,"keyup","onKeyUp"))},onKeyUp:function(t){t.preventDefault(),t.keyCode===Garnish.ALT_KEY&&(this.hidePassword(),this.$showPasswordToggle.show())},onInputChange:function(){this.$currentInput.val()?this.$showPasswordToggle.show():this.$showPasswordToggle.hide()},onToggleMouseDown:function(t){if(t.preventDefault(),this.$currentInput[0].setSelectionRange){var e=this.$currentInput[0].selectionStart,i=this.$currentInput[0].selectionEnd;this.togglePassword(),this.$currentInput[0].setSelectionRange(e,i)}else this.togglePassword()}},{defaults:{onToggleInput:$.noop}}),Craft.Preview=Garnish.Base.extend({draftEditor:null,$shade:null,$editorContainer:null,$editor:null,$spinner:null,$statusIcon:null,$dragHandle:null,$previewContainer:null,$targetBtn:null,$targetMenu:null,$iframe:null,$tempInput:null,$fieldPlaceholder:null,isActive:!1,activeTarget:0,url:null,fields:null,scrollLeft:0,scrollTop:0,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_updateIframeProxy:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.draftEditor=t,this._updateIframeProxy=$.proxy(this,"updateIframe"),this.$tempInput=$("<input/>",{type:"hidden",name:"__PREVIEW_FIELDS__",value:"1"}),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.Preview.defaultEditorWidth)},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.Preview.minEditorWidthInPx&&(t=(e=Craft.Preview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},open:function(){if(!this.isActive){if(this.isActive=!0,this.trigger("beforeOpen"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$previewContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);if($("<div/>",{class:"flex-grow"}).appendTo(t),this.$spinner=$("<div/>",{class:"spinner hidden",title:Craft.t("app","Saving")}).appendTo(t),this.$statusIcon=$("<div/>",{class:"invisible"}).appendTo(t),1<this.draftEditor.settings.previewTargets.length){var i=$("<header/>",{class:"flex"}).appendTo(this.$previewContainer);this.$targetBtn=$("<div/>",{class:"btn menubtn",text:this.draftEditor.settings.previewTargets[0].label,role:"btn"}).appendTo(i),this.$targetMenu=$("<div/>",{class:"menu lp-target-menu"}).insertAfter(this.$targetBtn);for(var s,n=$("<ul/>",{class:"padded"}).appendTo(this.$targetMenu),a=0;a<this.draftEditor.settings.previewTargets.length;a++)s=$("<li/>").appendTo(n),$("<a/>",{data:{target:a},text:this.draftEditor.settings.previewTargets[a].label,class:0===a?"sel":null}).appendTo(s);new Garnish.MenuBtn(this.$targetBtn,{onOptionSelect:$.proxy(function(t){this.switchTarget($(t).data("target"))},this)})}this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","close"),this.addListener(this.$statusIcon,"click",function(){this.draftEditor.showStatusHud(this.$statusIcon)}.bind(this))}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)+"px"),this.$previewContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];var r=$("#content .field").not($("#content .field .field"));if(r.length){this.$tempInput.insertBefore(r.get(0));for(a=0;a<r.length;a++){var o=$(r[a]),l=this._getClone(o);this.$fieldPlaceholder.insertAfter(o),o.detach(),this.$fieldPlaceholder.replaceWith(l),o.appendTo(this.$editor),this.fields.push({$field:o,$clone:l})}}this._slideInOnIframeLoad=!0,this.updateIframe(),this.draftEditor.on("update",this._updateIframeProxy),Garnish.on(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.trigger("open")}},switchTarget:function(t){this.activeTarget=t,this.$targetBtn.text(this.draftEditor.settings.previewTargets[t].label),this.$targetMenu.find("a.sel").removeClass("sel"),this.$targetMenu.find("a").eq(t).addClass("sel"),this.updateIframe(!0)},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$previewContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.close()})},this))},close:function(){this.isActive&&(this.trigger("beforeClose"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.$tempInput.detach(),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.Preview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$previewContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$previewContainer.hide()},this)),this.draftEditor.off("update",this._updateIframeProxy),Garnish.off(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.off(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.isActive=!1,this.trigger("close"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$previewContainer.width(this.getIframeWidth())},updateIframe:function(n){if(!this.isActive)return!1;n=!0===n;var t=this.draftEditor.settings.previewTargets[this.activeTarget].url;this.draftEditor.getTokenizedPreviewUrl(t,"x-craft-live-preview").then(function(t){var e;if(n)this.scrollLeft=0,this.scrolllTop=0;else if((e=Craft.isSameHost(t))&&this.$iframe&&this.$iframe[0].contentWindow){var i=$(this.$iframe[0].contentWindow.document);this.scrollLeft=i.scrollLeft(),this.scrollTop=i.scrollTop()}var s=$("<iframe/>",{class:"lp-preview",frameborder:0,src:t});!n&&e&&s.on("load",function(){var t=$(s[0].contentWindow.document);t.scrollLeft(this.scrollLeft),t.scrollTop(this.scrollTop)}.bind(this)),this.$iframe?this.$iframe.replaceWith(s):s.appendTo(this.$previewContainer),this.url=t,this.$iframe=s,this.afterUpdateIframe()}.bind(this))},afterUpdateIframe:function(){this.trigger("afterUpdateIframe"),this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1)},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e.find("[name]").prop("disabled",!0),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$previewContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$previewContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:2}),Craft.PreviewFileModal=Garnish.Modal.extend({assetId:null,$spinner:null,elementSelect:null,type:null,loaded:null,requestId:0,init:function(t,e,i){if((i=$.extend(this.defaultSettings,i)).onHide=this._onHide.bind(this),Craft.PreviewFileModal.openInstance){var s=Craft.PreviewFileModal.openInstance;return s.assetId!==t&&(s.loadAsset(t,i.startingWidth,i.startingHeight),s.elementSelect=e),this.destroy()}(Craft.PreviewFileModal.openInstance=this).elementSelect=e,this.$container=$('<div id="previewmodal" class="modal loading"/>').appendTo(Garnish.$bod),this.base(this.$container,$.extend({resizable:!0},i)),this.$container&&(this.$container.velocity("stop"),this.$container.show().css("opacity",1),this.$shade.velocity("stop"),this.$shade.show().css("opacity",1)),this.loadAsset(t,i.startingWidth,i.startingHeight)},_onHide:function(){return Craft.PreviewFileModal.openInstance=null,this.elementSelect.focusItem(this.elementSelect.$focusedItem),this.$shade.remove(),this.destroy()},selfDestruct:function(){var t=Craft.PreviewFileModal.openInstance;return t.hide(),t.$shade.remove(),t.destroy(),!(Craft.PreviewFileModal.openInstance=null)},loadAsset:function(t,e,i){this.assetId=t,this.$container.empty(),this.loaded=!1,this.desiredHeight=null,this.desiredWidth=null;var n=.66*Garnish.$win.height(),a=Math.min(n/3*4,Garnish.$win.width()-2*this.settings.minGutter);if(n=a/4*3,e&&i){var s=e/i;a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=Math.min(a/s,Garnish.$win.height()-2*this.settings.minGutter),(a=n*s)>Math.min(e,Garnish.$win.width()-2*this.settings.minGutter)&&(a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=a/s)}this._resizeContainer(a,n),this.$spinner=$('<div class="spinner centeralign"></div>').appendTo(this.$container);var r=this.$container.height()/2-this.$spinner.height()/2+"px",o=this.$container.width()/2-this.$spinner.width()/2+"px";this.$spinner.css({left:o,top:r,position:"absolute"}),this.requestId++,Craft.postActionRequest("assets/preview-file",{assetId:t,requestId:this.requestId},function(t,e){if("success"===e)if(t.success){if(t.requestId!=this.requestId)return;this.$container.removeClass("loading"),this.$spinner.remove(),this.loaded=!0,this.$container.append(t.modalHtml);var i=this.$container.find(".highlight");if(i.length&&i.hasClass("json")){var s=i.find("code");s.html(JSON.stringify(JSON.parse(s.html()),void 0,4))}i.length?Prism.highlightElement(i.find("code").get(0)):this.$container.find("img").css({width:a,height:n}),this.updateSizeAndPosition()}else alert(t.error),this.hide()}.bind(this))},updateSizeAndPosition:function(){if(this.loaded){var t=this.$container.find("img");if(this.loaded&&t.length){var e=t.data("maxwidth"),i=t.data("maxheight"),s=e/i,n=this.desiredWidth?this.desiredWidth:this.$container.width(),a=(this.desiredHeight?this.desiredHeight:this.$container.height(),Math.min(n,e)),r=Math.round(Math.min(i,a/s));a=Math.round(r*s),t.css({width:a,height:r}),this._resizeContainer(a,r),this.desiredWidth=a,this.desiredHeight=r}if(this.base(),this.loaded&&t.length){var o=Math.round(Math.min(Math.max(t.height()*s),Garnish.$win.width()-2*this.settings.minGutter)),l=Math.round(Math.min(Math.max(o/s),Garnish.$win.height()-2*this.settings.minGutter));(o=Math.round(l*s))>Math.min(o,Garnish.$win.width()-2*this.settings.minGutter)&&(l=(o=Math.min(o,Garnish.$win.width()-2*this.settings.minGutter))/s),this._resizeContainer(o,l),t.css({width:o,height:l})}else this.loaded&&this.$container.find(".highlight").height(this.$container.height()).width(this.$container.width()).css({overflow:"auto"})}},_resizeContainer:function(t,e){this.$container.css({width:t,"min-width":t,"max-width":t,height:e,"min-height":e,"max-height":e,top:(Garnish.$win.height()-e)/2,left:(Garnish.$win.width()-t)/2})}},{defaultSettings:{startingWidth:null,startingHeight:null}}),Craft.ProgressBar=Garnish.Base.extend({$progressBar:null,$innerProgressBar:null,$progressBarStatus:null,_itemCount:0,_processedItemCount:0,_displaySteps:!1,init:function(t,e){e&&(this._displaySteps=!0),this.$progressBar=$('<div class="progressbar pending hidden"/>').appendTo(t),this.$innerProgressBar=$('<div class="progressbar-inner"/>').appendTo(this.$progressBar),this.$progressBarStatus=$('<div class="progressbar-status hidden" />').insertAfter(this.$progressBar),this.resetProgressBar()},resetProgressBar:function(){this.setProgressPercentage(100),this.$progressBar.addClass("pending"),this.setItemCount(1),this.setProcessedItemCount(0),this.$progressBarStatus.html(""),this._displaySteps&&this.$progressBar.addClass("has-status")},hideProgressBar:function(){this.$progressBar.fadeTo("fast",.01,$.proxy(function(){this.$progressBar.addClass("hidden").fadeTo(1,1,$.noop)},this))},showProgressBar:function(){this.$progressBar.removeClass("hidden"),this.$progressBarStatus.removeClass("hidden")},setItemCount:function(t){this._itemCount=t},incrementItemCount:function(t){this._itemCount+=t},setProcessedItemCount:function(t){this._processedItemCount=t},incrementProcessedItemCount:function(t){this._processedItemCount+=t},updateProgressBar:function(){this._itemCount=Math.max(this._itemCount,1);var t=Math.min(100,Math.round(100*this._processedItemCount/this._itemCount));this.setProgressPercentage(t),this._displaySteps&&this.$progressBarStatus.html(this._processedItemCount+" / "+this._itemCount)},setProgressPercentage:function(t,e){0===t?this.$progressBar.addClass("pending"):(this.$progressBar.removeClass("pending"),e?this.$innerProgressBar.velocity("stop").velocity({width:t+"%"},"fast"):this.$innerProgressBar.velocity("stop").width(t+"%"))}}),Craft.PromptHandler=Garnish.Base.extend({modal:null,$modalContainerDiv:null,$prompt:null,$promptApplyToRemainingContainer:null,$promptApplyToRemainingCheckbox:null,$promptApplyToRemainingLabel:null,$pomptChoices:null,_prompts:[],_promptBatchCallback:$.noop,_promptBatchReturnData:[],_promptBatchNum:0,resetPrompts:function(){this._prompts=[],this._promptBatchCallback=$.noop,this._promptBatchReturnData=[],this._promptBatchNum=0},addPrompt:function(t){this._prompts.push(t)},getPromptCount:function(){return this._prompts.length},showBatchPrompts:function(t){this._promptBatchCallback=t,this._promptBatchReturnData=[],this._promptBatchNum=0,this._showNextPromptInBatch()},_showNextPromptInBatch:function(){var t=this._prompts[this._promptBatchNum].prompt,e=this._prompts.length-(this._promptBatchNum+1);this._showPrompt(t.message,t.choices,$.proxy(this,"_handleBatchPromptSelection"),e)},_handleBatchPromptSelection:function(t,e){var i=this._prompts[this._promptBatchNum],s=this._prompts.length-(this._promptBatchNum+1),n=$.extend(i,{choice:t});this._promptBatchReturnData.push(n),s?(this._promptBatchNum++,e?this._handleBatchPromptSelection(t,!0):this._showNextPromptInBatch()):"function"==typeof this._promptBatchCallback&&this._promptBatchCallback(this._promptBatchReturnData)},_showPrompt:function(t,e,i,s){this._promptCallback=i,null===this.modal&&(this.modal=new Garnish.Modal({closeOtherModals:!1})),null===this.$modalContainerDiv&&(this.$modalContainerDiv=$('<div class="modal fitted prompt-modal"></div>').addClass().appendTo(Garnish.$bod)),this.$prompt=$('<div class="body"></div>').appendTo(this.$modalContainerDiv.empty()),this.$promptMessage=$('<p class="prompt-msg"/>').appendTo(this.$prompt),this.$promptChoices=$('<div class="options"></div>').appendTo(this.$prompt),this.$promptApplyToRemainingContainer=$('<label class="assets-applytoremaining"/>').appendTo(this.$prompt).hide(),this.$promptApplyToRemainingCheckbox=$('<input type="checkbox"/>').appendTo(this.$promptApplyToRemainingContainer),this.$promptApplyToRemainingLabel=$("<span/>").appendTo(this.$promptApplyToRemainingContainer),this.$promptButtons=$('<div class="buttons right"/>').appendTo(this.$prompt),this.modal.setContainer(this.$modalContainerDiv),this.$promptMessage.html(t);for(var n=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$promptButtons),a=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","OK")+'" />').appendTo(this.$promptButtons),r=0;r<e.length;r++){var o=$('<div><label><input type="radio" name="promptAction" value="'+e[r].value+'"/> '+e[r].title+"</label></div>").appendTo(this.$promptChoices).find("input");this.addListener(o,"click",function(){a.removeClass("disabled")})}this.addListener(a,"activate",function(t){var e=$(t.currentTarget).parents(".modal").find("input[name=promptAction]:checked").val(),i=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice(e,i)}),this.addListener(n,"activate",function(){var t=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice("cancel",t)}),s&&(this.$promptApplyToRemainingContainer.show(),this.$promptApplyToRemainingLabel.html(" "+Craft.t("app","Apply this to the {number} remaining conflicts?",{number:s}))),this.modal.show(),this.modal.removeListener(Garnish.Modal.$shade,"click"),this.addListener(Garnish.Modal.$shade,"click","_cancelPrompt")},_selectPromptChoice:function(t,e){this.$prompt.fadeOut("fast",$.proxy(function(){this.modal.hide(),this._promptCallback(t,e)},this))},_cancelPrompt:function(){this._selectPromptChoice("cancel",!0)}}),Craft.SlideRuleInput=Garnish.Base.extend({$container:null,$options:null,$selectedOption:null,$input:null,value:null,startPositionX:null,init:function(t,e){this.setSettings(e,Craft.SlideRuleInput.defaultSettings),this.value=0,this.graduationsMin=-70,this.graduationsMax=70,this.slideMin=-45,this.slideMax=45,this.$container=$("#"+t),this.$overlay=$('<div class="overlay"></div>').appendTo(this.$container),this.$cursor=$('<div class="cursor"></div>').appendTo(this.$container),this.$graduations=$('<div class="graduations"></div>').appendTo(this.$container),this.$graduationsUl=$("<ul></ul>").appendTo(this.$graduations);for(var i=this.graduationsMin;i<=this.graduationsMax;i++){var s=$('<li class="graduation" data-graduation="'+i+'"><div class="label">'+i+"</div></li>").appendTo(this.$graduationsUl);i%5==0&&s.addClass("main-graduation"),0===i&&s.addClass("selected")}this.$options=this.$container.find(".graduation"),this.addListener(this.$container,"resize",$.proxy(this,"_handleResize")),this.addListener(this.$container,"tapstart",$.proxy(this,"_handleTapStart")),this.addListener(Garnish.$bod,"tapmove",$.proxy(this,"_handleTapMove")),this.addListener(Garnish.$bod,"tapend",$.proxy(this,"_handleTapEnd")),setTimeout($.proxy(function(){this.graduationsCalculatedWidth=10*(this.$options.length-1),this.$graduationsUl.css("left",-this.graduationsCalculatedWidth/2+this.$container.width()/2)},this),50)},_handleResize:function(){var t=this.valueToPosition(this.value);this.$graduationsUl.css("left",t)},_handleTapStart:function(t,e){t.preventDefault(),this.startPositionX=e.position.x,this.startLeft=this.$graduationsUl.position().left,this.dragging=!0,this.onStart()},_handleTapMove:function(t,e){if(this.dragging){t.preventDefault();var i=this.startPositionX-e.position.x,s=this.startLeft-i,n=this.positionToValue(s);this.setValue(n),this.onChange()}},setValue:function(i){var t=this.valueToPosition(i);i<this.slideMin?(i=this.slideMin,t=this.valueToPosition(i)):i>this.slideMax&&(i=this.slideMax,t=this.valueToPosition(i)),this.$graduationsUl.css("left",t),i>=this.slideMin&&i<=this.slideMax&&(this.$options.removeClass("selected"),$.each(this.$options,function(t,e){0<$(e).data("graduation")&&$(e).data("graduation")<=i&&$(e).addClass("selected"),$(e).data("graduation")<0&&$(e).data("graduation")>=i&&$(e).addClass("selected"),0==$(e).data("graduation")&&$(e).addClass("selected")})),this.value=i},_handleTapEnd:function(t){this.dragging&&(t.preventDefault(),this.dragging=!1,this.onEnd())},positionToValue:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return(this.$graduations.width()/2+-1*t)/this.graduationsCalculatedWidth*i-e},valueToPosition:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return-((t+e)*this.graduationsCalculatedWidth/i-this.$graduations.width()/2)},onStart:function(){"function"==typeof this.settings.onChange&&this.settings.onStart(this)},onChange:function(){"function"==typeof this.settings.onChange&&this.settings.onChange(this)},onEnd:function(){"function"==typeof this.settings.onChange&&this.settings.onEnd(this)},defaultSettings:{onStart:$.noop,onChange:$.noop,onEnd:$.noop}}),Craft.SlugGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace(/<(.*?)>/g,"")).replace(/['"‘’“”\[\]\(\)\{\}:]/g,""),Craft.allowUppercaseInSlug||(t=t.toLowerCase()),Craft.limitAutoSlugsToAscii&&(t=Craft.asciiString(t,this.settings.charMap));var e=Craft.filterArray(XRegExp.matchChain(t,[XRegExp("[\\p{L}\\p{N}\\p{M}]+")]));return e.length?e.join(Craft.slugWordSeparator):""}}),Craft.Structure=Garnish.Base.extend({id:null,$container:null,state:null,structureDrag:null,init:function(t,e,i){this.id=t,this.$container=$(e),this.setSettings(i,Craft.Structure.defaults),this.$container.data("structure")&&(Garnish.log("Double-instantiating a structure on an element"),this.$container.data("structure").destroy()),this.$container.data("structure",this),this.state={},this.settings.storageKey&&$.extend(this.state,Craft.getLocalStorage(this.settings.storageKey,{})),void 0===this.state.collapsedElementIds&&(this.state.collapsedElementIds=[]);for(var s=this.$container.find("ul").prev(".row"),n=0;n<s.length;n++){var a=$(s[n]),r=a.parent(),o=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(a);-1!==$.inArray(a.children(".element").data("id"),this.state.collapsedElementIds)&&r.addClass("collapsed"),this.initToggle(o)}this.settings.sortable&&(this.structureDrag=new Craft.StructureDrag(this,this.settings.maxLevels)),this.settings.newChildUrl&&this.initNewChildMenus(this.$container.find(".add"))},initToggle:function(t){t.on("click",$.proxy(function(t){var e=$(t.currentTarget).closest("li"),i=e.children(".row").find(".element:first").data("id"),s=$.inArray(i,this.state.collapsedElementIds);e.hasClass("collapsed")?(e.removeClass("collapsed"),-1!==s&&this.state.collapsedElementIds.splice(s,1)):(e.addClass("collapsed"),-1===s&&this.state.collapsedElementIds.push(i)),this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.state)},this))},initNewChildMenus:function(t){this.addListener(t,"click","onNewChildMenuClick")},onNewChildMenuClick:function(t){var e=$(t.currentTarget);if(!e.data("menubtn")){var i=e.parent().children(".element").data("id"),s=Craft.getUrl(this.settings.newChildUrl,"parentId="+i);$('<div class="menu"><ul><li><a href="'+s+'">'+Craft.t("app","New child")+"</a></li></ul></div>").insertAfter(e),new Garnish.MenuBtn(e).showMenu()}},getIndent:function(t){return Craft.Structure.baseIndent+(t-1)*Craft.Structure.nestedIndent},addElement:function(t){var e=$('<li data-level="1"/>').appendTo(this.$container),i=$('<div class="row" style="margin-'+Craft.left+": -"+Craft.Structure.baseIndent+"px; padding-"+Craft.left+": "+Craft.Structure.baseIndent+'px;">').appendTo(e);if(i.append(t),this.settings.sortable&&(i.append('<a class="move icon" title="'+Craft.t("app","Move")+'"></a>'),this.structureDrag.addItems(e)),this.settings.newChildUrl){var s=$('<a class="add icon" title="'+Craft.t("app","New child")+'"></a>').appendTo(i);this.initNewChildMenus(s)}i.css("margin-bottom",-30),i.velocity({"margin-bottom":0},"fast")},removeElement:function(t){var e,i=t.parent().parent();this.settings.sortable&&this.structureDrag.removeItems(i),i.siblings().length||(e=i.parent()),i.css("visibility","hidden").velocity({marginBottom:-i.height()},"fast",$.proxy(function(){i.remove(),void 0!==e&&this._removeUl(e)},this))},_removeUl:function(t){t.siblings(".row").children(".toggle").remove(),t.remove()}},{baseIndent:8,nestedIndent:35,defaults:{storageKey:null,sortable:!1,newChildUrl:null,maxLevels:null}}),Craft.StructureDrag=Garnish.Drag.extend({structure:null,maxLevels:null,draggeeLevel:null,$helperLi:null,$targets:null,draggeeHeight:null,init:function(t,e){this.structure=t,this.maxLevels=e,this.$insertion=$('<li class="draginsertion"/>');var i=this.structure.$container.find("li");this.base(i,{handle:".element:first, .move:first",helper:$.proxy(this,"getHelper")})},getHelper:function(t){this.$helperLi=t;var e=$('<ul class="structure draghelper"/>').append(t);return t.css("padding-"+Craft.left,this.$draggee.css("padding-"+Craft.left)),t.find(".move").removeAttr("title"),e},onDragStart:function(){this.$targets=$(),this.findTargets(this.structure.$container),this.draggeeLevel=0;for(var t=this.$draggee;this.draggeeLevel++,(t=t.find("> ul > li")).length;);this.draggeeHeight=this.$draggee.height(),this.$draggee.velocity({height:0},"fast",$.proxy(function(){this.$draggee.addClass("hidden")},this)),this.base(),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.ESC_KEY&&this.cancelDrag()})},findTargets:function(t){for(var e=t.children().not(this.$draggee),i=0;i<e.length;i++){var s=$(e[i]);this.$targets=this.$targets.add(s.children(".row")),s.hasClass("collapsed")||this.findTargets(s.children("ul"))}},onDrag:function(){for(this._.$closestTarget&&(this._.$closestTarget.removeClass("draghover"),this.$insertion.remove()),this._.$closestTarget=null,this._.closestTargetPos=null,this._.closestTargetYDiff=null,this._.closestTargetOffset=null,this._.closestTargetHeight=null,this._.i=0;this._.i<this.$targets.length&&(this._.$target=$(this.$targets[this._.i]),this._.targetOffset=this._.$target.offset(),this._.targetHeight=this._.$target.outerHeight(),this._.targetYMidpoint=this._.targetOffset.top+this._.targetHeight/2,this._.targetYDiff=Math.abs(this.mouseY-this._.targetYMidpoint),0===this._.i||this.mouseY>=this._.targetOffset.top+5&&this._.targetYDiff<this._.closestTargetYDiff);this._.i++)this._.$closestTarget=this._.$target,this._.closestTargetPos=this._.i,this._.closestTargetYDiff=this._.targetYDiff,this._.closestTargetOffset=this._.targetOffset,this._.closestTargetHeight=this._.targetHeight;if(this._.$closestTarget)if(0===this._.closestTargetPos&&this.mouseY<this._.closestTargetOffset.top+5)this.$insertion.prependTo(this.structure.$container);else if(this._.$closestTargetLi=this._.$closestTarget.parent(),this._.closestTargetLevel=this._.$closestTargetLi.data("level"),this._.closestTargetPos<this.$targets.length-1?(this._.$nextTargetLi=$(this.$targets[this._.closestTargetPos+1]).parent(),this._.nextTargetLevel=this._.$nextTargetLi.data("level")):(this._.$nextTargetLi=null,this._.nextTargetLevel=null),this._.hoveringBetweenRows=this.mouseY>=this._.closestTargetOffset.top+this._.closestTargetHeight-5,this._.$nextTargetLi&&this._.nextTargetLevel==this._.closestTargetLevel)this._.hoveringBetweenRows?(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel-1)&&this.$insertion.insertAfter(this._.$closestTargetLi):(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover");else if(this._.$nextTargetLi&&this._.nextTargetLevel>this._.closestTargetLevel)(!this.maxLevels||this.maxLevels>=this._.nextTargetLevel+this.draggeeLevel-1)&&(this._.hoveringBetweenRows?this.$insertion.insertBefore(this._.$nextTargetLi):(this._.$closestTarget.addClass("draghover"),this.$insertion.appendTo(this._.$closestTargetLi.children("ul"))));else if(this._.hoveringBetweenRows){for(this._.draggeeX=this.mouseX-this.targetItemMouseDiffX,"rtl"===Craft.orientation&&(this._.draggeeX+=this.$helperLi.width()),this._.$parentLis=this._.$closestTarget.parentsUntil(this.structure.$container,"li"),this._.$closestParentLi=null,this._.closestParentLiXDiff=null,this._.closestParentLevel=null,this._.i=0;this._.i<this._.$parentLis.length;this._.i++)this._.$parentLi=$(this._.$parentLis[this._.i]),this._.parentLiX=this._.$parentLi.offset().left,"rtl"===Craft.orientation&&(this._.parentLiX+=this._.$parentLi.width()),this._.parentLiXDiff=Math.abs(this._.parentLiX-this._.draggeeX),this._.parentLevel=this._.$parentLi.data("level"),(!this.maxLevels||this.maxLevels>=this._.parentLevel+this.draggeeLevel-1)&&(!this._.$closestParentLi||this._.parentLiXDiff<this._.closestParentLiXDiff&&(!this._.$nextTargetLi||this._.parentLevel>=this._.nextTargetLevel))&&(this._.$closestParentLi=this._.$parentLi,this._.closestParentLiXDiff=this._.parentLiXDiff,this._.closestParentLevel=this._.parentLevel);this._.$closestParentLi&&this.$insertion.insertAfter(this._.$closestParentLi)}else(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover")},cancelDrag:function(){this.$insertion.remove(),this._.$closestTarget&&this._.$closestTarget.removeClass("draghover"),this.onMouseUp()},onDragStop:function(){if(this._.$closestTarget&&(this.$insertion.parent().length||this._.$closestTarget.hasClass("draghover"))){var t,e;if(this.$draggee.siblings().length||(t=this.$draggee.parent()),this.$insertion.parent().length){var i=this.$insertion.next().add(this.$insertion.prev());e=-1===$.inArray(this.$draggee[0],i)?(this.$insertion.replaceWith(this.$draggee),!0):(this.$insertion.remove(),!1)}else{var s=this._.$closestTargetLi.children("ul");if(t&&s.length&&s[0]===t[0])e=!1;else{if(s.length)this._.$closestTargetLi.hasClass("collapsed")&&this._.$closestTarget.children(".toggle").trigger("click");else{var n=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(this._.$closestTarget);this.structure.initToggle(n),s=$("<ul>").appendTo(this._.$closestTargetLi)}this.$draggee.appendTo(s),e=!0}}if(this._.$closestTarget.removeClass("draghover"),e){t&&this.structure._removeUl(t);var a,r=this.$draggee.parentsUntil(this.structure.$container,"li").length+1;r!=this.$draggee.data("level")&&(1==this.$draggee.data("level")?((a={})["padding-"+Craft.left]=38,this.$helperLi.velocity(a,"fast")):1==r&&((a={})["padding-"+Craft.left]=Craft.Structure.baseIndent,this.$helperLi.velocity(a,"fast")),this.setLevel(this.$draggee,r));var o=this.$draggee.children(".row").children(".element"),l={structureId:this.structure.id,elementId:o.data("id"),siteId:o.data("site-id"),prevId:this.$draggee.prev().children(".row").children(".element").data("id"),parentId:this.$draggee.parent("ul").parent("li").children(".row").children(".element").data("id")};Craft.postActionRequest("structures/move-element",l,function(t,e){"success"===e&&Craft.cp.displayNotice(Craft.t("app","New order saved."))})}}this.$draggee.velocity("stop").removeClass("hidden").velocity({height:this.draggeeHeight},"fast",$.proxy(function(){this.$draggee.css("height","auto")},this)),this.returnHelpersToDraggees(),this.base()},setLevel:function(t,e){t.data("level",e);var i=this.structure.getIndent(e),s={};s["margin-"+Craft.left]="-"+i+"px",s["padding-"+Craft.left]=i+"px",this.$draggee.children(".row").css(s);for(var n=t.children("ul").children(),a=0;a<n.length;a++)this.setLevel($(n[a]),e+1)}}),Craft.StructureTableSorter=Garnish.DragSort.extend({tableView:null,structureId:null,maxLevels:null,_helperMargin:null,_$firstRowCells:null,_$titleHelperCell:null,_titleHelperCellOuterWidth:null,_ancestors:null,_updateAncestorsFrame:null,_updateAncestorsProxy:null,_draggeeLevel:null,_draggeeLevelDelta:null,draggingLastElements:null,_loadingDraggeeLevelDelta:!1,_targetLevel:null,_targetLevelBounds:null,_positionChanged:null,init:function(t,e,i){this.tableView=t,this.structureId=this.tableView.$table.data("structure-id"),this.maxLevels=parseInt(this.tableView.$table.attr("data-max-levels")),i=$.extend({},Craft.StructureTableSorter.defaults,i,{handle:".move",collapseDraggees:!0,singleHelper:!0,helperSpacingY:2,magnetStrength:4,helper:$.proxy(this,"getHelper"),helperLagBase:1.5,axis:Garnish.Y_AXIS}),this.base(e,i)},startDragging:function(){this._helperMargin=Craft.StructureTableSorter.HELPER_MARGIN+(this.tableView.elementIndex.actions?24:0),this.base()},findDraggee:function(){this._draggeeLevel=this._targetLevel=this.$targetItem.data("level"),this._draggeeLevelDelta=0;for(var t=$(this.$targetItem),e=this.$targetItem.next();e.length;){var i=e.data("level");if(i<=this._draggeeLevel)break;var s=i-this._draggeeLevel;s>this._draggeeLevelDelta&&(this._draggeeLevelDelta=s),t=t.add(e),e=e.next()}if(this.draggingLastElements=!e.length,this.maxLevels&&this.draggingLastElements&&this.tableView.getMorePending()){this._loadingDraggeeLevelDelta=!0;var n=this._getAjaxBaseData(this.$targetItem);Craft.postActionRequest("structures/get-element-level-delta",n,$.proxy(function(t,e){"success"===e&&(this._loadingDraggeeLevelDelta=!1,this.dragging&&(this._draggeeLevelDelta=t.delta,this.drag(!1)))},this))}return t},getHelper:function(t){var e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e),s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.tableView.$elementContainer.children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove();else{var l=$(this._$firstRowCells[r]),h=l.width();if(l.width(h),o.width(h),Garnish.hasAttr(l,"data-titlecell")){this._$titleHelperCell=o;var d=parseInt(l.css("padding-"+Craft.left));this._titleHelperCellOuterWidth=h+d-(this.tableView.elementIndex.actions?12:0),o.css("padding-"+Craft.left,Craft.StructureTableSorter.BASE_PADDING)}}}return e},canInsertBefore:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t.prev(),t)},canInsertAfter:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t,t.next())},onDragStart:function(){this._ancestors=this._getAncestors(this.$targetItem,this.$targetItem.data("level")),this._setTargetLevelBounds(),this.tableView.maybeLoadMore(),this.base()},onDrag:function(){this.base(),this._updateIndent()},onInsertionPointChange:function(){this._setTargetLevelBounds(),this._updateAncestorsBeforeRepaint(),this.base()},onDragStop:function(){if(this._positionChanged=!1,this.base(),this._targetLevel!=this._draggeeLevel){for(var t=this._targetLevel-this._draggeeLevel,e=0;e<this.$draggee.length;e++){var i=$(this.$draggee[e]),s=i.data("level")+t,n=Craft.StructureTableSorter.BASE_PADDING+(this.tableView.elementIndex.actions?7:0)+this._getLevelIndent(s);i.data("level",s),i.find(".element").data("level",s),i.children("[data-titlecell]:first").css("padding-"+Craft.left,n)}this._positionChanged=!0}if(this._positionChanged){for(var a=this._getAjaxBaseData(this.$draggee),r=this.$draggee.first().prev();r.length;){var o=r.data("level");if(o==this._targetLevel){a.prevId=r.data("id");break}if(o<this._targetLevel){a.parentId=r.data("id");var l=r.find("> td > .toggle");if(!l.hasClass("expanded")){l.addClass("expanded");var h=this.tableView._createSpinnerRowAfter(r);this.tableView.elementSelect&&this.tableView.elementSelect.removeItems(this.$targetItem),this.removeItems(this.$targetItem),this.$targetItem.remove(),this.tableView._totalVisible--}break}r=r.prev()}Craft.postActionRequest("structures/move-element",a,$.proxy(function(t,e){if("success"===e){if(!t.success)return Craft.cp.displayError(Craft.t("app","An unknown error occurred.")),void this.tableView.elementIndex.updateElements();Craft.cp.displayNotice(Craft.t("app","New position saved.")),this.onPositionChange(),h&&h.parent().length&&(h.remove(),this.tableView._expandElement(l,!0)),Craft.cp.runQueue()}},this))}},onSortChange:function(){this.tableView.elementSelect&&this.tableView.elementSelect.resetItemOrder(),this._positionChanged=!0,this.base()},onPositionChange:function(){Garnish.requestAnimationFrame($.proxy(function(){this.trigger("positionChange"),this.settings.onPositionChange()},this))},onReturnHelpersToDraggees:function(){if(this._$firstRowCells.css("width",""),this.draggingLastElements&&this.tableView.getMorePending()){this.tableView._totalVisible+=this.newDraggeeIndexes[0]-this.oldDraggeeIndexes[0];var t=this.$draggee.last().nextAll();t.length&&(this.removeItems(t),t.remove(),this.tableView.maybeLoadMore())}this.base()},_getLevelBounds:function(t,e){if(e&&e.length?this._getLevelBounds._minLevel=e.data("level"):this._getLevelBounds._minLevel=1,t&&t.length?this._getLevelBounds._maxLevel=t.data("level")+1:this._getLevelBounds._maxLevel=1,this.maxLevels){if(1!=this._getLevelBounds._minLevel&&this._getLevelBounds._minLevel+this._draggeeLevelDelta>this.maxLevels)return!1;this._getLevelBounds._maxLevel+this._draggeeLevelDelta>this.maxLevels&&(this._getLevelBounds._maxLevel=this.maxLevels-this._draggeeLevelDelta,this._getLevelBounds._maxLevel<this._getLevelBounds._minLevel&&(this._getLevelBounds._maxLevel=this._getLevelBounds._minLevel))}return{min:this._getLevelBounds._minLevel,max:this._getLevelBounds._maxLevel}},_setTargetLevelBounds:function(){this._targetLevelBounds=this._getLevelBounds(this.$draggee.first().prev(),this.$draggee.last().next())},_updateIndent:function(t){this._updateIndent._mouseDist=this.realMouseX-this.mousedownX,"rtl"===Craft.orientation&&(this._updateIndent._mouseDist*=-1),this._updateIndent._indentationDist=Math.round(this._updateIndent._mouseDist/Craft.StructureTableSorter.LEVEL_INDENT),this._updateIndent._targetLevel=this._draggeeLevel+this._updateIndent._indentationDist,this._updateIndent._targetLevel<this._targetLevelBounds.min?(this._updateIndent._indentationDist+=this._targetLevelBounds.min-this._updateIndent._targetLevel,this._updateIndent._targetLevel=this._targetLevelBounds.min):this._updateIndent._targetLevel>this._targetLevelBounds.max&&(this._updateIndent._indentationDist-=this._updateIndent._targetLevel-this._targetLevelBounds.max,this._updateIndent._targetLevel=this._targetLevelBounds.max),this._targetLevel!==(this._targetLevel=this._updateIndent._targetLevel)&&this._updateAncestorsBeforeRepaint(),this._updateIndent._targetLevelMouseDiff=this._updateIndent._mouseDist-this._updateIndent._indentationDist*Craft.StructureTableSorter.LEVEL_INDENT,this._updateIndent._magnetImpact=Math.round(this._updateIndent._targetLevelMouseDiff/15),Math.abs(this._updateIndent._magnetImpact)>Craft.StructureTableSorter.MAX_GIVE&&(this._updateIndent._magnetImpact=(0<this._updateIndent._magnetImpact?1:-1)*Craft.StructureTableSorter.MAX_GIVE),this._updateIndent._closestLevelMagnetIndent=this._getLevelIndent(this._targetLevel)+this._updateIndent._magnetImpact,this.helpers[0].css("margin-"+Craft.left,this._updateIndent._closestLevelMagnetIndent+this._helperMargin),this._$titleHelperCell.width(this._titleHelperCellOuterWidth-(this._updateIndent._closestLevelMagnetIndent+Craft.StructureTableSorter.BASE_PADDING))},_getLevelIndent:function(t){return(t-1)*Craft.StructureTableSorter.LEVEL_INDENT},_getAjaxBaseData:function(t){return{structureId:this.structureId,elementId:t.data("id"),siteId:t.find(".element:first").data("site-id")}},_getAncestors:function(t,e){if(this._getAncestors._ancestors=[],0!=e)for(this._getAncestors._level=e,this._getAncestors._$prevRow=t.prev();this._getAncestors._$prevRow.length&&!(this._getAncestors._$prevRow.data("level")<this._getAncestors._level&&(this._getAncestors._ancestors.unshift(this._getAncestors._$prevRow),this._getAncestors._level=this._getAncestors._$prevRow.data("level"),0==this._getAncestors._level));)this._getAncestors._$prevRow=this._getAncestors._$prevRow.prev();return this._getAncestors._ancestors},_updateAncestorsBeforeRepaint:function(){this._updateAncestorsFrame&&Garnish.cancelAnimationFrame(this._updateAncestorsFrame),this._updateAncestorsProxy||(this._updateAncestorsProxy=$.proxy(this,"_updateAncestors")),this._updateAncestorsFrame=Garnish.requestAnimationFrame(this._updateAncestorsProxy)},_updateAncestors:function(){for(this._updateAncestorsFrame=null,this._updateAncestors._i=0;this._updateAncestors._i<this._ancestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._ancestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")-1),0==this._updateAncestors._$ancestor.data("descendants")&&this._updateAncestors._$ancestor.find("> td > .toggle:first").remove();for(this._updateAncestors._newAncestors=this._getAncestors(this.$targetItem,this._targetLevel),this._updateAncestors._i=0;this._updateAncestors._i<this._updateAncestors._newAncestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._updateAncestors._newAncestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")+1),1==this._updateAncestors._$ancestor.data("descendants")&&$('<span class="toggle expanded" title="'+Craft.t("app","Show/hide children")+'"></span>').insertAfter(this._updateAncestors._$ancestor.find("> td .move:first"));this._ancestors=this._updateAncestors._newAncestors,delete this._updateAncestors._i,delete this._updateAncestors._$ancestor,delete this._updateAncestors._newAncestors}},{BASE_PADDING:36,HELPER_MARGIN:-7,LEVEL_INDENT:44,MAX_GIVE:22,defaults:{onPositionChange:$.noop}}),Craft.TableElementIndexView=Craft.BaseElementIndexView.extend({$table:null,$selectedSortHeader:null,structureTableSort:null,_totalVisiblePostStructureTableDraggee:null,_morePendingPostStructureTableDraggee:!1,getElementContainer:function(){return this.$table=this.$container.find("table:first"),this.$table.children("tbody:first")},afterInit:function(){Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.add(this.$table),Craft.cp.updateResponsiveTables(),this.initTableHeaders(),"index"===this.elementIndex.settings.context&&"structure"===this.elementIndex.getSelectedSortAttribute()&&Garnish.hasAttr(this.$table,"data-structure-id")?this.structureTableSort=new Craft.StructureTableSorter(this,this.getAllElements(),{onSortChange:$.proxy(this,"_onStructureTableSortChange")}):this.structureTableSort=null,"structure"===this.elementIndex.getSelectedSortAttribute()&&this.addListener(this.$elementContainer,"click",function(t){var e=$(t.target);!e.hasClass("toggle")||!1===this._collapseElement(e)&&this._expandElement(e)})},initTableHeaders:function(){for(var t=this.elementIndex.getSelectedSortAttribute(),e=this.$table.children("thead").children().children("[data-attribute]"),i=0;i<e.length;i++){var s=e.eq(i),n=s.attr("data-attribute");if(n===t){this.$selectedSortHeader=s;var a=this.elementIndex.getSelectedSortDirection();s.addClass("ordered "+a).on("click",$.proxy(this,"_handleSelectedSortHeaderClick"))}else{this.elementIndex.getSortAttributeOption(n).length&&s.addClass("orderable").on("click",$.proxy(this,"_handleUnselectedSortHeaderClick"))}}},isVerticalList:function(){return!0},getTotalVisible:function(){return this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee:this._totalVisible},setTotalVisible:function(t){this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee=t:this._totalVisible=t},getMorePending:function(){return this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee:this._morePending},setMorePending:function(t){this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee=t:this._morePending=this._morePendingPostStructureTableDraggee=t},getLoadMoreParams:function(){var t=this.base();return this._isStructureTableDraggingLastElements()&&(t.criteria.positionedAfter=this.structureTableSort.$targetItem.data("id")),t},appendElements:function(t){this.base(t),this.structureTableSort&&this.structureTableSort.addItems(t),Craft.cp.updateResponsiveTables()},destroy:function(){this.$table&&(Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.not(this.$table)),this.base()},createElementEditor:function(e){Craft.createElementEditor(e.data("type"),e,{params:{includeTableAttributesForSource:this.elementIndex.sourceKey},onSaveElement:$.proxy(function(t){t.tableAttributes&&this._updateTableAttributes(e,t.tableAttributes)},this),elementIndex:this.elementIndex})},_collapseElement:function(t,e){if(!e&&!t.hasClass("expanded"))return!1;t.removeClass("expanded");for(var i=t.parent().parent(),s=i.data("id"),n=i.data("level"),a=i.next();a.length;){if(!Garnish.hasAttr(a,"data-spinnerrow")){if(a.data("level")<=n)break;this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),this._totalVisible--}var r=a.next();a.remove(),a=r}this.elementIndex.instanceState.collapsedElementIds||(this.elementIndex.instanceState.collapsedElementIds=[]),this.elementIndex.instanceState.collapsedElementIds.push(s),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds),this.maybeLoadMore()},_expandElement:function(t,e){if(!e&&t.hasClass("expanded"))return!1;if(t.addClass("expanded"),this.elementIndex.instanceState.collapsedElementIds){var i=t.parent().parent(),s=i.data("id"),n=$.inArray(s,this.elementIndex.instanceState.collapsedElementIds);if(-1!==n){this.elementIndex.instanceState.collapsedElementIds.splice(n,1),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds);var r=this._createSpinnerRowAfter(i),a=$.extend(!0,{},this.settings.params);a.criteria.descendantOf=s,Craft.postActionRequest("element-indexes/get-more-elements",a,$.proxy(function(t,e){if(r.parent().length&&"success"===e){var i=$(t.html),s=this._totalVisible+i.length,n=this.settings.batchSize&&i.length===this.settings.batchSize;if(n){var a=r.nextAll();this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),a.remove(),s-=a.length}else n=this._morePending;r.replaceWith(i),this.thumbLoader.load(i),(this.elementIndex.actions||this.settings.selectable)&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.structureTableSort&&this.structureTableSort.addItems(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.cp.updateResponsiveTables(),this.setTotalVisible(s),this.setMorePending(n),this.maybeLoadMore()}},this))}}},_createSpinnerRowAfter:function(t){return $('<tr data-spinnerrow><td class="centeralign" colspan="'+t.children().length+'"><div class="spinner"/></td></tr>').insertAfter(t)},_isStructureTableDraggingLastElements:function(){return this.structureTableSort&&this.structureTableSort.dragging&&this.structureTableSort.draggingLastElements},_handleSelectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i="asc"===this.elementIndex.getSelectedSortDirection()?"desc":"asc";this.elementIndex.setSortDirection(i),this._handleSortHeaderClick(t,e)}},_handleUnselectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i=e.attr("data-attribute");this.elementIndex.setSortAttribute(i),this._handleSortHeaderClick(t,e)}},_handleSortHeaderClick:function(t,e){this.$selectedSortHeader&&this.$selectedSortHeader.removeClass("ordered asc desc"),e.removeClass("orderable").addClass("ordered loading"),this.elementIndex.storeSortAttributeAndDirection(),this.elementIndex.updateElements(),this.elementIndex.setIndexAvailable()},_updateTableAttributes:function(t,e){var i=t.closest("tr");for(var s in e)e.hasOwnProperty(s)&&i.children('td[data-attr="'+s+'"]:first').html(e[s])}}),Craft.TagSelectInput=Craft.BaseElementSelectInput.extend({searchTimeout:null,searchMenu:null,$container:null,$elementsContainer:null,$elements:null,$addTagInput:null,$spinner:null,_ignoreBlur:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","tagGroupId","sourceElementId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.base($.extend({},Craft.TagSelectInput.defaults,t)),this.$addTagInput=this.$container.children(".add").children(".text"),this.$spinner=this.$addTagInput.next(),this.addListener(this.$addTagInput,"textchange",$.proxy(function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"searchForTags"),500)},this)),this.addListener(this.$addTagInput,"keypress",function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchMenu&&this.selectTag(this.searchMenu.$options[0]))}),this.addListener(this.$addTagInput,"focus",function(){this.searchMenu&&this.searchMenu.show()}),this.addListener(this.$addTagInput,"blur",function(){this._ignoreBlur?this._ignoreBlur=!1:setTimeout($.proxy(function(){this.searchMenu&&this.searchMenu.hide()},this),1)})},getAddElementsBtn:$.noop,getElementSortAxis:function(){return null},searchForTags:function(){if(this.searchMenu&&this.killSearchMenu(),this.$addTagInput.val()){this.$spinner.removeClass("hidden");for(var t=[],e=0;e<this.$elements.length;e++){var i=$(this.$elements[e]).data("id");i&&t.push(i)}this.settings.sourceElementId&&t.push(this.settings.sourceElementId);var r={search:this.$addTagInput.val(),tagGroupId:this.settings.tagGroupId,excludeIds:t};Craft.postActionRequest("tags/search-for-tags",r,$.proxy(function(t,e){if(this.searchMenu&&this.killSearchMenu(),this.$spinner.addClass("hidden"),"success"===e){for(var i,s=$('<div class="menu tagmenu"/>').appendTo(Garnish.$bod),n=$("<ul/>").appendTo(s),a=0;a<t.tags.length;a++)i=$("<li/>").appendTo(n),$('<a data-icon="tag"/>').appendTo(i).text(t.tags[a].title).data("id",t.tags[a].id).addClass(t.tags[a].exclude?"disabled":"");t.exactMatch||(i=$("<li/>").appendTo(n),$('<a data-icon="plus"/>').appendTo(i).text(r.search)),n.find("a:not(.disabled):first").addClass("hover"),this.searchMenu=new Garnish.Menu(s,{attachToElement:this.$addTagInput,onOptionSelect:$.proxy(this,"selectTag")}),this.addListener(s,"mousedown",$.proxy(function(){this._ignoreBlur=!0},this)),this.searchMenu.show()}},this))}else this.$spinner.addClass("hidden")},selectTag:function(t){var e=$(t);if(!e.hasClass("disabled")){var i=e.data("id"),s=e.text(),n=$("<div/>",{class:"element small removable","data-id":i,"data-site-id":this.settings.targetSiteId,"data-label":s,"data-editable":"1"}).appendTo(this.$elementsContainer),a=$("<input/>",{type:"hidden",name:this.settings.name+"[]",value:i}).appendTo(n);$("<a/>",{class:"delete icon",title:Craft.t("app","Remove")}).appendTo(n);var r=$("<div/>",{class:"label"}).appendTo(n);$("<span/>",{class:"title",text:s}).appendTo(r);var o=-(n.outerWidth()+10);this.$addTagInput.css("margin-"+Craft.left,o+"px");var l={};if(l["margin-"+Craft.left]=0,this.$addTagInput.velocity(l,"fast"),this.$elements=this.$elements.add(n),this.addElements(n),this.killSearchMenu(),this.$addTagInput.val(""),this.$addTagInput.trigger("focus"),!i){n.addClass("loading disabled");var h={groupId:this.settings.tagGroupId,title:s};Craft.postActionRequest("tags/create-tag",h,$.proxy(function(t,e){"success"===e&&t.success?(n.attr("data-id",t.id),a.val(t.id),n.removeClass("loading disabled")):(this.removeElement(n),"success"===e&&Craft.cp.displayError(Craft.t("app","An unknown error occurred.")))},this))}}},killSearchMenu:function(){this.searchMenu.hide(),this.searchMenu.destroy(),this.searchMenu=null}},{defaults:{tagGroupId:null}}),Craft.ThumbsElementIndexView=Craft.BaseElementIndexView.extend({getElementContainer:function(){return this.$container.children("ul")}}),Craft.ui={createTextInput:function(t){var e=$("<input/>",{attr:{class:"text",type:t.type||"text",id:t.id,size:t.size,name:t.name,value:t.value,maxlength:t.maxlength,autofocus:this.getAutofocusValue(t.autofocus),autocomplete:void 0!==t.autocomplete&&t.autocomplete?null:"off",disabled:this.getDisabledValue(t.disabled),readonly:t.readonly,title:t.title,placeholder:t.placeholder,step:t.step,min:t.min,max:t.max}});return t.class&&e.addClass(t.class),t.placeholder&&e.addClass("nicetext"),"password"===t.type&&e.addClass("password"),t.disabled&&e.addClass("disabled"),t.size||e.addClass("fullwidth"),t.showCharsLeft&&t.maxlength&&e.attr("data-show-chars-left").css("padding-"+("ltr"===Craft.orientation?"right":"left"),7.2*t.maxlength.toString().length+14+"px"),(t.placeholder||t.showCharsLeft)&&new Garnish.NiceText(e),"password"===t.type?$('<div class="passwordwrapper"/>').append(e):e},createTextField:function(t){return this.createField(this.createTextInput(t),t)},createTextarea:function(t){var e=$("<textarea/>",{class:"text",rows:t.rows||2,cols:t.cols||50,id:t.id,name:t.name,maxlength:t.maxlength,autofocus:t.autofocus&&!Garnish.isMobileBrowser(!0),disabled:!!t.disabled,placeholder:t.placeholder,html:t.value});return t.showCharsLeft&&e.attr("data-show-chars-left",""),t.class&&e.addClass(t.class),t.size||e.addClass("fullwidth"),e},createTextareaField:function(t){return this.createField(this.createTextarea(t),t)},createSelect:function(t){var e=$("<div/>",{class:"select"});t.class&&e.addClass(t.class);var i=$("<select/>",{id:t.id,name:t.name,autofocus:t.autofocus&&Garnish.isMobileBrowser(!0),disabled:t.disabled,"data-target-prefix":t.targetPrefix}).appendTo(e),s=null;for(var n in t.options)if(t.options.hasOwnProperty(n)){var a=t.options[n];if(void 0!==a.optgroup)s=$("<optgroup/>",{label:a.label}).appendTo(i);else{var r=void 0!==a.label?a.label:a,o=void 0!==a.value?a.value:n,l=void 0!==a.disabled&&a.disabled;$("<option/>",{value:o,selected:o==t.value,disabled:l,html:r}).appendTo(s||i)}}return t.toggle&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),e},createSelectField:function(t){return this.createField(this.createSelect(t),t)},createCheckbox:function(t){var e=t.id||"checkbox"+Math.floor(1e9*Math.random()),i=$("<input/>",{type:"checkbox",value:void 0!==t.value?t.value:"1",id:e,class:"checkbox",name:t.name,checked:t.checked?"checked":null,autofocus:this.getAutofocusValue(t.autofocus),disabled:this.getDisabledValue(t.disabled),"data-target":t.toggle,"data-reverse-target":t.reverseToggle});t.class&&i.addClass(t.class),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i));var s=$("<label/>",{for:e,text:t.label});return t.name&&(t.name.length<3||"[]"!==t.name.substr(-2))?$([$("<input/>",{type:"hidden",name:t.name,value:""})[0],i[0],s[0]]):$([i[0],s[0]])},createCheckboxField:function(t){var e=$('<div class="field checkboxfield"/>',{id:t.id?t.id+"-field":null});return t.first&&e.addClass("first"),t.instructions&&e.addClass("has-instructions"),this.createCheckbox(t).appendTo(e),t.instructions&&$('<div class="instructions"/>').text(t.instructions).appendTo(e),e},createCheckboxSelect:function(t){var e,i,s=$('<div class="checkbox-select"/>');t.class&&s.addClass(t.class),t.showAllOption?(e=t.allValue||"*",i=t.values==e,$("<div/>").appendTo(s).append(this.createCheckbox({id:t.id,class:"all",label:"<b>"+(t.allLabel||Craft.t("app","All"))+"</b>",name:t.name,value:e,checked:i,autofocus:t.autofocus}))):i=!1;for(var n=0;n<t.options.length;n++){var a=t.options[n];a.value!=e&&$("<div/>").appendTo(s).append(this.createCheckbox({label:a.label,name:t.name?t.name+"[]":null,value:a.value,checked:i||Craft.inArray(a.value,t.values),disabled:i}))}return new Garnish.CheckboxSelect(s),s},createCheckboxSelectField:function(t){return this.createField(this.createCheckboxSelect(t),t)},createLightswitch:function(t){var e=t.value||"1",i=$("<div/>",{class:"lightswitch",tabindex:"0","data-value":e,id:t.id,"aria-labelledby":t.labelId,"data-target":t.toggle,"data-reverse-target":t.reverseToggle});return t.on&&i.addClass("on"),t.small&&i.addClass("small"),t.disabled&&i.addClass("disabled"),$('<div class="lightswitch-container"><div class="label on"></div><div class="handle"></div><div class="label off"></div></div>').appendTo(i),t.name&&$("<input/>",{type:"hidden",name:t.name,value:t.on?e:"",disabled:t.disabled}).appendTo(i),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),i.lightswitch()},createLightswitchField:function(t){return this.createField(this.createLightswitch(t),t)},createColorInput:function(t){var e=t.id||"color"+Math.floor(1e9*Math.random()),i=t.containerId||e+"-container",s=t.name||null,n=t.value||null,a=t.small||!1,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{id:i,class:"flex color-container"}),h=$("<div/>",{class:"color static"+(a?" small":"")}).appendTo(l);$("<div/>",{class:"color-preview",style:t.value?{backgroundColor:t.value}:null}).appendTo(h),this.createTextInput({id:e,name:s,value:n,size:10,class:"color-input",autofocus:r,disabled:o}).appendTo(l);return new Craft.ColorInput(l),l},createColorField:function(t){return this.createField(this.createColorInput(t),t)},createDateInput:function(t){var e=(t.id||"date"+Math.floor(1e9*Math.random()))+"-date",i=t.name||null,s=i?i+"[date]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=n?Craft.formatDate(n):null,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{class:"datewrapper"}),h=this.createTextInput({id:e,name:s,value:a,placeholder:" ",autocomplete:!1,autofocus:r,disabled:o}).appendTo(l);return $('<div data-icon="date"></div>').appendTo(l),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(l),h.datepicker($.extend({defaultDate:n||new Date},Craft.datepickerOptions)),l},createDateField:function(t){return this.createField(this.createDateInput(t),t)},createTimeInput:function(t){var e=(t.id||"time"+Math.floor(1e9*Math.random()))+"-time",i=t.name||null,s=i?i+"[time]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=t.autofocus&&Garnish.isMobileBrowser(!0),r=t.disabled||!1,o=$("<div/>",{class:"timewrapper"}),l=this.createTextInput({id:e,name:s,placeholder:" ",autocomplete:!1,autofocus:a,disabled:r}).appendTo(o);return $('<div data-icon="time"></div>').appendTo(o),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(o),l.timepicker(Craft.timepickerOptions),n&&l.timepicker("setTime",3600*n.getHours()+60*n.getMinutes()+n.getSeconds()),o},createTimeField:function(t){return this.createField(this.createTimeInput(t),t)},createField:function(t,e){var i=e.label&&"__blank__"!==e.label?e.label:null,s=Craft.isMultiSite&&e.siteId?e.siteId:null,n=$("<div/>",{class:"field",id:e.fieldId||(e.id?e.id+"-field":null)});if(e.first&&n.addClass("first"),i||e.instructions){var a=$('<div class="heading"/>').appendTo(n);if(i){var r=$("<label/>",{id:e.labelId||(e.id?e.id+"-label":null),class:e.required?"required":null,for:e.id,text:i}).appendTo(a);if(s)for(var o=0;o<Craft.sites.length;o++)if(Craft.sites[o].id==s){$('<span class="site"/>').text(Craft.sites[o].name).appendTo(r);break}}e.instructions&&$('<div class="instructions"/>').text(e.instructions).appendTo(a)}return $('<div class="input"/>').append(t).appendTo(n),e.warning&&$('<p class="warning"/>').text(e.warning).appendTo(n),e.errors&&this.addErrorsToField(n,e.errors),n},createErrorList:function(t){var e=$('<ul class="errors"/>');return t&&this.addErrorsToList(e,t),e},addErrorsToList:function(t,e){for(var i=0;i<e.length;i++)$("<li/>").text(e[i]).appendTo(t)},addErrorsToField:function(t,e){if(e){t.addClass("has-errors"),t.children(".input").addClass("errors");var i=t.children("ul.errors");i.length||(i=this.createErrorList().appendTo(t)),this.addErrorsToList(i,e)}},clearErrorsFromField:function(t){t.removeClass("has-errors"),t.children(".input").removeClass("errors"),t.children("ul.errors").remove()},getAutofocusValue:function(t){return t&&!Garnish.isMobileBrowser(!0)?"autofocus":null},getDisabledValue:function(t){return t?"disabled":null}},Craft.Uploader=Garnish.Base.extend({uploader:null,allowedKinds:null,$element:null,settings:null,_rejectedFiles:{},_extensionList:null,_totalFileCounter:0,_validFileCounter:0,init:function(t,e){this._rejectedFiles={size:[],type:[],limit:[]},this.$element=t,this.allowedKinds=null,this._extensionList=null,this._totalFileCounter=0,this._validFileCounter=0;var i=(e=$.extend({},Craft.Uploader.defaults,e)).events;for(var s in delete e.events,e.allowedKinds&&e.allowedKinds.length&&("string"==typeof e.allowedKinds&&(e.allowedKinds=[e.allowedKinds]),this.allowedKinds=e.allowedKinds,delete e.allowedKinds),e.autoUpload=!1,this.uploader=this.$element.fileupload(e),i)i.hasOwnProperty(s)&&this.uploader.on(s,i[s]);this.settings=e,this.uploader.on("fileuploadadd",$.proxy(this,"onFileAdd"))},setParams:function(t){void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t[Craft.csrfTokenName]=Craft.csrfTokenValue),this.uploader.fileupload("option",{formData:t})},getInProgress:function(){return this.uploader.fileupload("active")},isLastUpload:function(){return this.getInProgress()<2},onFileAdd:function(t,s){t.stopPropagation();var n=!1;return this.allowedKinds&&(this._extensionList||this._createExtensionList(),n=!0),s.process().done($.proxy(function(){var t=s.files[0],e=!0;if(n){var i=t.name.match(/\.([a-z0-4_]+)$/i)[1];-1===$.inArray(i.toLowerCase(),this._extensionList)&&(e=!1,this._rejectedFiles.type.push("“"+t.name+"”"))}t.size>this.settings.maxFileSize&&(this._rejectedFiles.size.push("“"+t.name+"”"),e=!1),e&&"function"==typeof this.settings.canAddMoreFiles&&!this.settings.canAddMoreFiles(this._validFileCounter)&&(this._rejectedFiles.limit.push("“"+t.name+"”"),e=!1),e&&(this._validFileCounter++,s.submit()),++this._totalFileCounter===s.originalFiles.length&&(this._totalFileCounter=0,this._validFileCounter=0,this.processErrorMessages())},this)),!0},processErrorMessages:function(){var t;this._rejectedFiles.type.length&&(t=1===this._rejectedFiles.type.length?"The file {files} could not be uploaded. The allowed file kinds are: {kinds}.":"The files {files} could not be uploaded. The allowed file kinds are: {kinds}.",t=Craft.t("app",t,{files:this._rejectedFiles.type.join(", "),kinds:this.allowedKinds.join(", ")}),this._rejectedFiles.type=[],alert(t)),this._rejectedFiles.size.length&&(t=1===this._rejectedFiles.size.length?"The file {files} could not be uploaded, because it exceeds the maximum upload size of {size}.":"The files {files} could not be uploaded, because they exceeded the maximum upload size of {size}.",t=Craft.t("app",t,{files:this._rejectedFiles.size.join(", "),size:this.humanFileSize(Craft.maxUploadSize)}),this._rejectedFiles.size=[],alert(t)),this._rejectedFiles.limit.length&&(t=1===this._rejectedFiles.limit.length?"The file {files} could not be uploaded, because the field limit has been reached.":"The files {files} could not be uploaded, because the field limit has been reached.",t=Craft.t("app",t,{files:this._rejectedFiles.limit.join(", ")}),this._rejectedFiles.limit=[],alert(t))},humanFileSize:function(t){if(t<1024)return t+" B";for(var e=-1;++e,1024<=(t/=1024););return t.toFixed(1)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][e]},_createExtensionList:function(){this._extensionList=[];for(var t=0;t<this.allowedKinds.length;t++){var e=this.allowedKinds[t];if(void 0!==Craft.fileKinds[e])for(var i=0;i<Craft.fileKinds[e].extensions.length;i++){var s=Craft.fileKinds[e].extensions[i];this._extensionList.push(s)}}},destroy:function(){this.$element.fileupload("destroy"),this.base()}},{defaults:{dropZone:null,pasteZone:null,fileInput:null,sequentialUploads:!0,maxFileSize:Craft.maxUploadSize,allowedKinds:null,events:{},canAddMoreFiles:null,headers:{Accept:"application/json;q=0.9,*/*;q=0.8"},paramName:"assets-upload"}}),Craft.UriFormatGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace("/<(.*?)>/g","")).toLowerCase(),t=(t=(t=Craft.asciiString(t)).replace(/^[^a-z]+/,"")).replace(/[^a-z0-9]+$/,"");var e=Craft.filterArray(t.split(/[^a-z0-9]+/)).join("-");return e&&this.settings.suffix&&(e+=this.settings.suffix),e}})}(jQuery);
{"version":3,"sources":["Craft.js"],"names":["$","extend","Craft","navHeight","t","category","message","params","translations","key","hasOwnProperty","replace","formatDate","date","Date","datepicker","datepickerOptions","dateFormat","formatNumber","number","format","d3","formatLocale","d3FormatLocaleDefinition","formatter","escapeHtml","str","text","html","escapeRegex","getText","encodeUriComponent","encodeURIComponent","differences","!","*","'","(",")","chr","re","RegExp","selectFullValue","input","$input","val","setSelectionRange","length","formatInputId","inputName","this","rtrim","getUrl","path","baseUrl","anchor","isPlainObject","aParams","name","value","push","Garnish","isArray","join","trim","url","qpos","indexOf","substr","search","pathMatch","match","pathParam","omitScriptNameInUrls","usePathInfo","scriptName","basePath","endPath","substring","getCpUrl","baseCpUrl","getSiteUrl","baseSiteUrl","getActionUrl","actionUrl","redirectTo","document","location","href","getCsrfInput","csrfTokenName","csrfTokenValue","postActionRequest","action","data","callback","options","headers","X-Registered-Asset-Bundles","Object","keys","registeredAssetBundles","X-Registered-Js-Files","registeredJsFiles","jqXHR","ajax","type","dataType","success","error","textStatus","errorThrown","readyState","cp","displayError","alert","send","_waitingOnAjax","_ajaxQueue","queueActionRequest","undefined","_postNextActionRequestInQueue","args","shift","stringToArray","arr","split","i","expandPostArray","expanded","m","unshift","parentElem","parseInt","compare","obj1","obj2","sortObjectKeys","Array","getObjectKeys","sort","obj","escapeChars","chars","escaped","ltrim","startsWith","filterArray","filtered","inArray","elem","removeFromArray","index","splice","getLast","uppercaseFirst","charAt","toUpperCase","slice","lowercaseFirst","toLowerCase","parseUrl","scheme","host","hostname","port","query","hash","isSameHost","requestUrlInfo","urlInfo","secondsToHumanTimeDuration","seconds","showSeconds","weeks","Math","floor","days","minutes","hours","round","timeComponents","asciiString","charMap","char","asciiStr","asciiCharMap","randomString","result","random","preventOutlineOnMouseFocus","$elem","namespace","on","addClass","trigger","event","keyCode","SHIFT_KEY","CTRL_KEY","CMD_KEY","removeClass","createErrorList","errors","$ul","createElement","$li","appendTo","appendHeadHtml","$existingCss","existingCss","eq","attr","regexp","append","appendFootHtml","$existingJs","src","existingJs","$bod","initUiElements","$container","grid","infoicon","checkboxselect","fieldtoggle","lightswitch","nicetext","pill","formsubmit","menubtn","_elementIndexClasses","_elementSelectorModalClasses","_elementEditorClasses","registerElementIndexClass","elementType","func","registerElementSelectorModalClass","registerElementEditorClass","createElementIndex","settings","BaseElementIndex","createElementSelectorModal","BaseElementSelectorModal","createElementEditor","element","BaseElementEditor","getLocalStorage","defaultValue","systemUid","localStorage","JSON","parse","setLocalStorage","stringify","e","getElementInfo","$element","hasClass","find","id","siteId","label","status","hasThumb","setElementSize","size","otherSize","$oldImg","$newImg","sizes","srcset","replaceWith","picturefill","elements","fn","animateLeft","pos","duration","easing","complete","orientation","velocity","left","right","animateRight","disable","each","removeAttr","enable","itemSelector","cols","maxCols","minColWidth","mode","fillMode","colClass","snapToGrid","Grid","InfoIcon","CheckboxSelect","FieldToggle","settingName","settingValue","setSettings","thisSettings","hasAttr","LightSwitch","NiceText","Pill","ev","$btn","currentTarget","confirm","$anchor","$form","closest","customTrigger","next","menuAnchor","MenuBtn","$doc","ready","Base","elementId","$fieldsContainer","$cancelBtn","$saveBtn","$spinner","$siteSelect","$siteSpinner","hud","init","defaults","loadHud","setElementAttribute","attributes","getBaseData","prevalidate","onBeginLoading","includeSites","isMultiSite","showSiteSwitcher","proxy","showHud","response","onEndLoading","$hudContents","sites","$header","$siteSelectContainer","siteInfo","addListener","add","updateForm","onCreateForm","$footer","$buttonsContainer","updateBody","updateSizeAndPosition","hudTrigger","HUD","bodyClass","closeOtherHUDs","onShow","onHide","onSubmit","$hud","hide","switchSite","newSiteId","reloadForm","$instructions","class","children","requestAnimationFrame","headHtml","footHtml","saveElement","validators","isFunction","call","param","$body","serialize","$title","$a","cpEditUrl","newTitle","closeHud","onSaveElement","shake","onShowHud","onHideHud","runQueue","elementIndex","noop","initialized","instanceState","sourceStates","sourceStatesStorageKey","searchTimeout","sourceSelect","$main","$mainSpinner","isIndexBusy","$sidebar","showingSidebar","sourceKey","sourceViewModes","$source","sourcesByKey","$visibleSources","$customizeSourcesBtn","customizeSourcesModal","$toolbar","$toolbarFlexContainer","toolbarOffset","$search","searching","searchText","trashed","drafts","$clearSearchBtn","$statusMenuBtn","$statusMenuContainer","statusMenu","$siteMenuBtn","siteMenu","$sortMenuBtn","sortMenu","$sortAttributesList","$sortDirectionsList","$scoreSortAttribute","$structureSortAttribute","$elements","$viewModeBtnContainer","viewModeBtns","viewMode","view","_autoSelectElements","$countContainer","page","$exportBtn","actions","actionsHeadHtml","actionsFootHtml","$selectAllContainer","$selectAllCheckbox","showingActionTriggers","_$detachedToolbarItems","_$triggers","getDefaultInstanceState","storageKey","context","parent","hideSidebar","toolbarFixed","isMobileBrowser","$win","$scrollContainer","initSources","menu","$option","$options","filter","first","_setSite","criteria","storedSiteId","$storedSiteOption","startSearching","stopSearching","clearTimeout","setTimeout","RETURN_KEY","preventDefault","updateElementsIfSearchTextChanged","afterInit","selectDefaultSource","setPage","pageNum","updateElements","onAfterInit","getSourceContainer","$sources","$items","_getSourcesInList","Select","multi","allowEmpty","vertical","onSelectionChange","_initSources","getDefaultSourceKey","getSourceByKey","selectSource","refreshSources","removeAllItems","setIndexBusy","refreshSourcesAction","setIndexAvailable","updateFixedToolbar","_scrollTop","scrollTop","width","_makingFixed","css","outerHeight","top","offset","initSource","addItems","initSourceToggle","expandedSources","_expandSource","deinitSourceToggle","$toggle","_getSourceToggle","deinitSource","removeItems","removeListener","removeData","selectedSource","getDefaultExpandedSources","addOptions","prependTo","_updateStructureSortOption","setSortAttribute","detach","setInstanceState","storeInstanceState","getSourceState","source","getSelectedSourceState","setSelecetedSourceState","viewState","storeSortAttributeAndDirection","getSelectedSortAttribute","order","getSelectedSortDirection","max","pageTrigger","history","replaceState","getViewParams","batchSize","limit","disabledElementIds","paginated","_isViewPaginated","collapsedElementIds","preservePagination","destroy","updateElementsAction","totalPages","ceil","count","_updateView","showActionTriggers","height","not","insertAfter","_createTriggers","submitAction","actionClass","actionParams","selectedElementIds","getSelectedElementIds","viewParams","elementAction","elementIds","submitActionsAction","displayNotice","afterAction","onAfterAction","hideActionTriggers","insertBefore","updateActionTriggers","totalSelected","getSelectedElements","getEnabledElements","$selectAllBtn","getSortAttributeOption","attribute","setSortDirection","getSortDirectionOption","dir","getSelectedViewMode","selectItem","updateSidebarMenuLabel","setStoredSortOptionsForSource","remove","getViewModesForSource","sourceViewMode","$viewModeBtn","className","title","icon","selectViewMode","doesSourceHaveViewMode","onSelectSource","selectSourceByKey","sortAttr","sortDir","getDefaultSort","viewModes","force","createView","getViewClass","TableElementIndexView","ThumbsElementIndexView","rememberDisabledElementId","forgetDisabledElementId","enableElements","parents","onEnableElements","disableElements","onDisableElements","getElementById","enableElementsById","ids","makeArray","disableElementsById","selectElementAfterUpdate","addButton","$button","getButtonContainer","isShowingSidebar","buttonContainer","createCustomizeSourcesModal","modal","CustomizeSourcesModal","base","onSelectSite","onUpdateElements","_handleSourceSelectionChange","$selectedItems","_handleActionTriggerSubmit","getPostData","_handleMenuActionTriggerSubmit","option","_handleStatusChange","selectedOption","_handleSiteChange","$firstVisibleSource","selectNewSource","toString","get","$heading","$headings","nextUntil","_handleSortChange","is","_handleSelectionChange","_handleSourceDblClick","_toggleSource","stopPropagation","_handleSourceToggleClick","prev","$firstOption","$list","_getChildSources","siblings","_deinitSources","_collapseSource","$childSources","countLabel","$paginationContainer","$prevBtn","data-icon","$nextBtn","role","tabindex","aria-checked","selectAllElements","deselectAllElements","SPACE_KEY","selectable","multiSelect","checkboxMode","selectElementById","triggers","safeMenuActions","destructiveMenuActions","destructive","$menuTrigger","$menu","$safeList","_createMenuTriggerList","$destructiveList","$div","_showExportHud","$limitField","ui","createTextField","placeholder","min","submitting","isNaN","tokenParam","token","data-action","BaseElementIndexView","$loadingMoreSpinner","$elementContainer","$scroller","thumbLoader","elementSelect","loadingMore","_totalVisible","_morePending","_handleEnableElements","_handleDisableElements","container","getElementContainer","setTotalVisible","setMorePending","ElementThumbLoader","load","isVerticalList","handle","_handleElementEditing","$target","target","prop","isTouchCapable","maybeLoadMore","getAllElements","$selectedElements","selectElement","selectAll","deselectAll","getTotalVisible","totalVisible","getMorePending","morePending","canLoadMore","loadMore","winHeight","innerHeight","winScrollTop","getLoadMoreParams","loadMoreElementsAction","$newElements","appendElements","onAppendElements","newElements","off","BaseElementSelectInput","elementSort","elementEditor","$elementsContainer","$addElementBtn","_initialized","normalizedSettings","arguments","modalStorageKey","sortable","getContainer","getElementsContainer","getAddElementsBtn","initElementSelect","initElementSort","resetElements","getElements","DragSort","$targetItem","getSelectedItems","ignoreHandleSelector","axis","getElementSortAxis","collapseDraggees","magnetStrength","helperLagBase","onSortChange","resetItemOrder","canAddMoreElements","updateAddElementsBtn","enableAddElementsBtn","disableAddElementsBtn","ADD_FX_DURATION","REMOVE_FX_DURATION","show","removeElements","addElements","editable","_handleShowElementEditor","removeElement","onRemoveElements","animateElementAway","animateCss","opacity","outerWidth","showModal","createModal","getModalSettings","closeOtherModals","sources","showSiteMenu","getDisabledElementIds","onSelect","modalSettings","sourceElementId","onModalSelect","slotsLeft","selectElements","updateDisabledElementsInModal","elementInfo","createNewElement","appendElement","animateElementIntoPlace","onSelectElements","clone","prepend","$modalElement","$inputElement","origOffset","destOffset","$helper","position","zIndex","window","draftEditor","checkForm","fieldId","editorSettings","Modal","$selectBtn","$sourceToggles","$tbody","$primaryButtons","$secondaryButtons","$footerSpinner","onFadeIn","_createElementIndex","updateSelectBtnState","enableSelectBtn","disableSelectBtn","enableCancelBtn","disableCancelBtn","showFooterSpinner","hideFooterSpinner","cancel","clearMouseUpTimeout","disableElementsOnSelect","hideOnSelect","info","has","touchData","firstTap","secondTap","resizable","onCancel","hideIndexSidebar","BaseInputGenerator","listening","timeout","startListening","setNewSource","stopListening","removeAllListeners","onSourceTextChange","onTargetTextChange","activeElement","onFormSubmit","updateTarget","sourceVal","targetVal","generateTargetValue","AdminTable","totalItems","sorter","$noItems","$table","$deleteBtns","allowDeleteAll","minItems","noItemsSelector","tableSelector","DataTableSorter","updateUI","addRow","row","maxItems","$row","$deleteBtn","reorderItems","idAttribute","reorderAction","onReorderItems","reorderSuccessMessage","reorderFailMessage","handleDeleteBtnClick","confirmDeleteItem","deleteItem","getItemName","confirmDeleteMessage","getItemId","deleteAction","handleDeleteItemResponse","onDeleteItem","deleteSuccessMessage","deleteFailMessage","nameAttribute","$moveButtons","newItemBtnSelector","AssetEditor","reloadIndex","$imageEditorTrigger","showImageEditor","AssetImageEditor","onSave","bind","allowDegreeFractions","isImagick","$imageTools","$buttons","$replaceBtn","$editorContainer","$straighten","$croppingCanvas","$spinnerCanvas","canvas","image","viewport","focalPoint","croppingCanvas","clipper","croppingRectangle","cropperHandles","cropperGrid","croppingShade","imageStraightenAngle","viewportRotation","originalWidth","originalHeight","imageVerticeCoords","zoomRatio","animationInProgress","currentView","assetId","cacheBust","draggingCropper","scalingCropper","draggingFocal","previousMouseX","previousMouseY","shiftKeyHeld","editorHeight","editorWidth","cropperState","scaleFactor","flipData","focalPointState","croppingConstraint","spinnerInterval","maxImageSize","lastLoadedDimensions","imageIsLoading","renderImage","renderCropper","now","x","y","allowSavingAsNew","saveImage","$shade","getMaxImageSize","browserViewportWidth","documentElement","clientWidth","browserViewportHeight","clientHeight","devicePixelRatio","loadEditor","$tabs","$viewsContainer","$views","innerWidth","_showSpinner","fabric","StaticCanvas","enableRetinaScaling","renderAll","imageUrl","Image","fromURL","imageObject","set","originX","originY","getHeight","getWidth","getScaledImageDimensions","_setFittedImageVerticeCoordinates","_repositionEditorElements","focalState","imageDimensions","offsetX","offsetY","focal","focalData","adjustedX","adjustedY","storeFocalPointState","_createFocalPoint","_createViewport","storeCropperState","_addControlListeners","_handleMouseMove","_handleMouseDown","_handleMouseUp","_hideSpinner","_reloadImage","setSrc","min-width","min-height","previousEditorDimensions","setDimensions","currentScaledDimensions","getZoomToFitRatio","previouslyOccupiedArea","_getBoundingRectangle","_repositionCropper","getZoomToCoverRatio","_repositionImage","_repositionViewport","_repositionFocalPoint","_zoomImage","Rect","fill","globalCompositeOperation","sizeFactor","focalX","focalY","deltaX","deltaY","Group","Circle","radius","strokeWidth","stroke","toggleFocalPoint","dimensions","state","currentWidth","ratio","hasOrientationChanged","imageRatio","rotateImage","flipImage","straighteningInput","SlideRuleInput","onStart","_showGrid","onChange","slider","straighten","onEnd","_hideGrid","_cleanupFocalPointAfterStraighten","onOptionSelect","setCroppingConstraint","enforceCroppingConstraint","_handleTabClick","$tab","showView","enableSlider","disableSlider","disableCropMode","enableCropMode","zoomFactor","degrees","imageZoomRatio","newAngle","angle","scaledImageDimensions","viewportProperties","imageProperties","angleInRadians","PI","newDeltaX","cos","sin","newDeltaY","modifiedDeltaX","modifiedDeltaY","temp","animate","animationDuration","onComplete","cleanAngle","parseFloat","_adjustFocalPointByAngle","_resetFocalPointPosition","editorCenter","setValue","properties","scaleY","scaleX","previousAngle","_adjustEditorElementsOnStraighten","newCenterX","newCenterY","angleDelta","currentZoomRatio","adjustmentRatio","cropperCenterX","cropperCenterY","imageVertices","getImageVerticeCoords","rectangle","_getZoomRatioToFitRectangle","_isCenterInside","object","containingObject","newFocalX","newFocalY","adjustedFocalX","adjustedFocalY","containingVertices","vertex","rectangleVertices","_getRectangleVertices","verticeIndex","arePointsInsideRectangle","edge","_getEdgeCrossed","rectangleCenter","distanceFromVertexToEdge","abs","sqrt","pow","distanceFromCenterToEdge","postData","imageRotation","cropData","zoom","end","scaledWidth","scaledHeight","boundingBox","_getImageBoundingBox","scale","vertScale","horiScale","getCombinedZoomRatio","strokeOptions","gridWidth","gridHeight","xStep","yStep","Line","onFadeOut","cropperData","_showCropper","_editorModeTransition","_hideCropper","targetZoom","inverseZoomFactor","imageOffsetX","imageOffsetY","getContext","start","cW","cH","setInterval","rotation","save","clearRect","translate","rotate","beginPath","moveTo","lineTo","lineWidth","strokeStyle","restore","clearInterval","clipperData","_setupCropperLayer","_redrawCropperElements","backgroundColor","hoverCursor","selection","rectangleRatio","rectWidth","rectHeight","lineOptions","gridOptions","pathGroup","Path","previousImageArea","currentOffset","areaFactor","coordinateSet","a","b","c","d","_isMouseOver","move","_cropperHandleHitTest","pageX","pageY","_handleFocalDrag","_handleCropperDrag","_handleCropperResize","_setMouseCursor","vertices","newX","newY","constraint","previousHeight","previousWidth","topDelta","leftDelta","change","cursor","parentOffset","mouseX","mouseY","lb","rb","tb","bb","topLeft","topRight","bottomRight","zoomMode","topVerticalSegment","bottomVerticalSegment","rightHorizontalSegment","leftHorizontalSegment","verticalOffset","horizontalOffset","_debug","fabricObj","debugger","points","ab","_getVector","bc","scalarAbAb","_getScalarProduct","scalarBcBc","point","ap","bp","scalarAbAp","scalarBcBp","_getVectorMagnitude","vector","_getAngleBetweenVectors","acos","edgePoints","centerPoint","smallestDiff","edgeCrossed","edgeIndex","toCenter","edgeVector","toVertex","diff","box","proportion","AssetIndex","$includeSubfoldersContainer","$includeSubfoldersCheckbox","showingIncludeSubfoldersCheckbox","$uploadButton","$uploadInput","$progressBar","$folders","uploader","promptHandler","progressBar","_uploadTotalFiles","_uploadFileProgress","_uploadedAssetIds","_currentUploaderSettings","_assetDrag","_folderDrag","_expandDropTargetFolderTimeout","_tempExpandedFolders","_fileConflictTemplate","choices","_folderConflictTemplate","_initIndexPageMode","_createFolderContextMenu","_getSourceLevel","updateDropTargets","contextMenu","parentsUntil","onDragStartProxy","onDropTargetChangeProxy","DragDrop","activeDropTargetClass","helperOpacity","helper","$file","_getFileDragHelper","dropTargets","targets","_getFolderUidFromSourceKey","onDragStart","onDropTargetChange","onDragStop","$selected","draggees","$draggeeHelper","$helperSidebar","$helperNav","$helperUl","padding-top","$draggee","padding-right","padding-bottom","padding-left","draggedSourceIds","_onFileDragStop","$activeDropTarget","originatingSource","targetFolderId","originalAssetIds","originalAssetId","_positionProgressBar","resetProgressBar","setItemCount","showProgressBar","parameterArray","folderId","onMoveFinish","responseArray","resetPrompts","conflict","addPrompt","suggestedFilename","prompt","hideProgressBar","performAfterMoveActions","_collapseExtraExpandedFolders","getPromptCount","promptCallback","returnData","newParameterArray","choice","filename","apply","_performBatchRequests","fadeOutHelpers","showBatchPrompts","returnHelpersToDraggees","_onFolderDragStop","folderIds","reverse","parentId","requestId","fileMoveList","newSourceKey","transferList","newFolderId","newFolderUid","merge","_performActualFolderMove","folderDeleteList","moveCallback","counter","_getParentSource","_selectSourceByFolderId","$targetSource","_getSourceByKey","$parentSources","$parentSource","PromptHandler","ProgressBar","fileInput","dropZone","events","fileuploadstart","fileuploadprogressall","fileuploaddone","kind","allowedKinds","Uploader","setParams","$subContainer","checked","marginBottom","includeSubfolders","_onUploadStart","_onUploadProgress","progress","loaded","total","setProgressPercentage","_onUploadComplete","files","doReload","file","isLastUpload","_updateAfterUpload","_uploadFollowup","finalCallback","doFollowup","parameterIndex","followupCallback","incrementProcessedItemCount","updateProgressBar","sourceAssetId","conflictingAssetId","targetFilename","_onUpdateElements","_onKeyDown","_onElementFocus","shiftKey","PreviewFileModal","openInstance","selfDestruct","$focusedItem","_loadPreview","item","startingWidth","startingHeight","_onDragStart","$outerContainer","$innerContainer","_$firstRowCells","$helperCells","$helperCell","$firstRowCell","_onDropTargetChange","$dropTarget","dropTargetFolder","_hasSubfolders","_isExpanded","dropTargetFolderId","$excludedSources","_collapseFolder","_expandFolder","menuOptions","onClick","ContextMenu","menuClass","_createSubfolder","$parentFolder","subfolderName","folderName","_prepareParentForChildren","$subfolder","folderUid","_appendSubfolder","_deleteFolder","$targetFolder","folder","_cleanUpTree","_renameFolder","oldName","newName","$existingChildren","subfolderLabel","folderInserted","$existingChild","before","windowHeight","doRequest","parameters","AssetSelectInput","originalFilename","originalExtension","resetOriginalFilename","_renameHelper","validateElementForm","_attachUploader","defaultFieldLayoutId","formData","canAddMoreFiles","selectUploadedFile","$newElement","margin","slotsTaken","_parseFilename","parts","extension","pop","baseFileName","endPos","selectionStart","selectionEnd","createRange","select","range","collapse","moveEnd","moveStart","$filenameField","ext","oldExt","newExt","AssetSelectorModal","$selectTransformBtn","_selectedTransform","transforms","createSelectTransformButton","$btnGroup","$menuList","MenuButton","allowTransforms","onSelectTransform","transform","selectImagesWithTransform","transformUrls","imageIdsWithMissingUrls","$item","fetchMissingTransformUrls","canSelectImageTransforms","AuthManager","remainingSessionTime","checkRemainingSessionTimer","showLoginModalTimer","decrementLogoutWarningInterval","showingLogoutWarningModal","showingLoginModal","logoutWarningModal","loginModal","$logoutWarningPara","$passwordInput","$passwordSpinner","$loginBtn","$loginErrorPara","submitLoginIfLoggedOut","updateRemainingSessionTime","setCheckRemainingSessionTimer","checkRemainingSessionTime","extendSession","responseJSON","minSafeSessiotTime","showLogoutWarningModal","checkInterval","submitLogin","showLoginModal","hideLogoutWarningModal","hideLoginModal","quickShow","$logoutBtn","$renewSessionBtn","autoShow","hideOnEsc","hideOnShadeClick","shadeClass","updateLogoutWarningMessage","time","decrementLogoutWarning","quick","quickHide","$inputContainer","$inputsFlexContainer","$passwordContainer","$buttonContainer","$passwordWrapper","PasswordInput","onToggleInput","$newPasswordInput","logout","renewSession","validatePassword","login","clearLoginError","loginName","username","password","showLoginError","CategoryIndex","editableGroups","$newCategoryBtnGroup","$newCategoryBtn","editableCategoryGroups","group","uid","defaultGroupHandle","updateButton","selectedSourceHandle","selectedGroup","$menuBtn","_getGroupTriggerHref","_openCreateCategoryModal","getAttribute","menuHtml","menuBtn","uri","primarySiteId","groupId","newCategoryBtnText","groupSourceKey","CategorySelectInput","selectedCategoryIds","categoryIds","branchLimit","selectionLabel","$newElementsContainer","filteredElements","$allCategories","_animateCategoryAway","charts","DataTable","columns","rows","forEach","cellIndex","parseTime","timeParse","Tip","$tip","setContent","setPosition","BaseChart","$chart","chartBaseClass","dataTable","timeFormatLocale","svg","globalSettings","formats","d3Formats","formatLocaleDefinition","timeFormatLocaleDefinition","d3TimeFormatLocaleDefinition","resize","baseSettings","draw","chartClass","onAfterDrawTicks","tickKey","tick","$tickText","numberFormat","percentFormat","currencyFormat","shortDateFormats","day","month","year","bottom","colors","Area","tip","drawingArea","getChartMargin","translateX","translateY","drawTicks","drawAxes","drawChart","drawTipTriggers","getX","xAxis","axisBottom","tickFormat","getXFormatter","ticks","yAxis","getY","axisLeft","getYFormatter","tickValues","getYTickValues","axisRight","showAxis","tickSizeOuter","gridlines","xLineAxis","tickSize","yLineAxis","line","datum","style","area","y0","y1","plots","enter","tips","chartMargin","xAxisTickInterval","node","getTotalLength","tipTriggerWidth","$content","$xValue","$yValue","content","calcLeft","values","yTicksMaxWidth","computedTickWidth","padded","xDomainMin","xDomainMax","xDomain","scaleTime","domain","yDomain","getYMaxValue","scaleLinear","utils","getTimeFormatter","getNumberFormatter","maxValue","getDuration","secondsNum","chartSettings","dataScale","ColorInput","$colorContainer","$colorPreview","$colorInput","createColorInput","handleTextChange","setAttribute","updateColor","_browserSupportsColorInputs","doesBrowserSupportColorInputs","CP","authManager","$nav","$mainContainer","$alerts","$crumbs","$notificationContainer","$primaryForm","$mainContent","$details","$selectedTab","$contentContainer","$edition","$collapsibleTables","fixedHeader","enableQueue","jobInfo","displayedJobInfo","displayedJobInfoUnchanged","trackJobProgressTimeout","jobProgressIcon","checkingForUpdates","forcingRefreshOnUpdatesCheck","checkForUpdatesCallbacks","updateFixedHeader","updateResponsiveTables","$errorNotifications","$otherNotifications","delay","notificationDuration","initAlerts","isCtrlKeyPressed","S_KEY","submitPrimaryForm","initTabs","initConfirmUnloadForms","$confirmUnloadForms","serialized","confirmUnload","livePreview","inPreviewMode","originalEvent","returnValue","_handleInputFocus","_handleInputBlur","saveShortcut","$label","toggleNav","toggleClass","toggleSidebar","tabs","tabWidths","totalWidth","selectTab","tab","deselectTab","_i","_$table","_containerWidth","_check","_isCollapsed","getBoundingClientRect","headerHeight","max-height","fixedheader","displayNotification","$notification","fadedMargin","margin-left","margin-right","display","notificationType","fetchAlerts","displayAlerts","alerts","margin-top","$shunnableAlerts","$link","checkForUpdates","forceRefresh","realCallback","updateUtilitiesBadge","callbacks","updateInfo","$utilitiesLink","$badge","badgeCount","runQueueAutomatically","trackJobProgress","_trackJobProgressInternal","setJobInfo","animateIcon","oldInfo","getDisplayedJobInfo","progressLabel","updateJobIcon","statuses","JOB_STATUS_RESERVED","JOB_STATUS_FAILED","JOB_STATUS_WAITING","j","JobProgressIcon","hideFailMode","setDescription","description","setProgress","showFailMode","JOB_STATUS_DONE","failMode","_canvasSupported","_$bgCanvas","_$staticCanvas","_$hoverCanvas","_$failCanvas","_staticCtx","_hoverCtx","_canvasSize","_arcPos","_arcRadius","_lineWidth","_arcStartPos","_arcEndPos","_arcStartStepSize","_arcEndStepSize","_arcStep","_arcStepTimeout","_arcAnimateCallback","_progressBar","$canvasContainer","_createCanvas","_drawArc","_animateArc","_setArc","$innerProgressBar","toggleHud","toggle","QueueHUD","color","$canvas","ctx","lineCap","startPos","arc","closePath","targetStartPos","targetEndPos","_takeNextArcStep","jobsById","completedJobs","updateViewProxy","updateView","newJobIds","updateStatus","Job","placed","$object","$statusContainer","$descriptionContainer","$progressLabel","$flex","empty","$actionBtn","performErrorAction","$elementIndexSourcesContainer","$sourcesContainer","$sourceSettingsContainer","$newHeadingBtn","$footerBtnContainer","$saveSpinner","$loadingSpinner","sourceSort","updateSourcesOnSave","availableTableAttributes","setContainer","buildModal","addSource","sourceData","$itemLabel","$itemInput","heading","Heading","updateItemLabel","Source","handleNewHeadingBtnClick","scrollContainerToElement","$pendingHeading","$lastSource","$indexSource","getIndexSource","isHeading","appendSource","$extraSources","nextAll","BaseSource","$settingsContainer","isSelected","deselect","createSettings","tableAttributes","firstAttribute","firstKey","firstLabel","$titleColumnCheckbox","createTableColumnOption","$columnCheckboxes","selectedAttributes","createField","instructions","createCheckbox","disabled","$labelField","$labelInput","handleLabelInputChange","deleteHeading","table","$rows","caboose","Y_AXIS","getHelper","$helperRow","helperClass","$cells","DeleteUserModal","userId","$deleteActionRadios","$deleteSpinner","userSelect","_deleting","idParam","redirect","contentSummary","$deleteSubmitBtn","validateDeleteInputs","validates","handleSubmit","DraftEditor","$revisionBtn","$revisionLabel","$statusIcon","$editMetaBtn","metaHud","$nameTextInput","$notesTextInput","$saveMetaBtn","lastSerializedValue","saving","saveXhr","checkFormAfterUpdate","submittingForm","duplicatedElements","preview","previewToken","previewTargets","enablePreview","$shareBtn","openShareLink","createShareMenu","revisionId","serializeForm","draftId","initForDraft","createDraft","canUpdateSource","createEditMetaBtn","statusIcons","showStatusHud","bodyHtml","spinners","getPreviewToken","Promise","resolve","reject","sourceId","getTokenizedPreviewUrl","randoParam","isLive","then","catch","open","getPreview","Preview","openPreview","ensureIsDraftOrRevision","revisionid","removeActionParams","isPreviewActive","$editor","isUnsavedDraft","saveDraft","isActive","$spinners","$statusIcons","saveDraftAction","prepareData","docTitle","draftName","draftNotes","revisionMenu","draftCreated","newHref","anchorPos","$saveBtnContainer","elementTypeDisplayName","$saveDraftBtn","canDeleteDraft","$draftsUl","$draftHeading","$draftLi","$draftA","selectOption","$siteOptions","$siteOption","creator","updatePreviewTargets","afterUpdate","checkMetaValues","oldId","currentTargets","showMetaHud","createMetaHud","onMetaHudShow","$field","$hudBody","$deleteLink","saveMeta","onMetaHudHide","onMetaHudEscape","onNotesKeydown","submit","shakeMetaHud","deleteDraft","deleteDraftAction","handleFormSubmit","abort","chunks","accept-charset","enctype","method","decodeURIComponent","applyDraftAction","hashedRedirectUrl","DynamicGenerator","EditableTable","baseName","biggestId","$addRowBtn","rowCount","hasMaxRows","hasMinRows","radioCheckboxes","log","copyDraggeeInputValuesToHelper","isVisible","initialize","minRows","createRowObj","updateAddRowButton","initializeIfVisible","canAddRow","canDeleteRow","deleteRow","$tr","onDeleteRow","staticRows","maxRows","focus","rowId","rowIdPrefix","createRow","defaultValues","onAddRow","Row","focusOnPrevRow","tdIndex","blurTd","prevRow","$prevTr","$tds","focusOnNextRow","nextRow","$nextTr","textualColTypes","data-id","colId","$cell","col","scope","textual","code","small","createDateInput","createLightswitch","createSelect","default","createTimeInput","createTextInput","niceTexts","tds","$textareas","tr","td","$textarea","$checkbox","textareasByColId","onHeightChange","radioMode","applyToggleCheckbox","onTextareaHeightChange","autopopulate","HandleGenerator","allowNonAlphaStart","last","onTextareaFocus","onRadioCheckboxChange","checkbox","checkboxColId","neg","checkboxCol","colum","ignoreNextTextareaFocus","handleKeypress","charCode","ctrl","numericKeyCodes","validateValue","safeValue","tallestTextareaHeight","tdHeight","ElementActionTrigger","maxLevels","newChildUrl","$trigger","triggerEnabled","activate","updateTrigger","validateSelection","enableTrigger","disableTrigger","valid","batch","handleTriggerActivation","queue","workers","Worker","concat","toArray","active","loadNext","loader","$img","alt","ElevatedSessionForm","inputs","form","$inputs","getInputPostVal","elevatedSessionManager","fetchingTimeout","inputsChanged","$currentInput","requireElevatedSession","submitForm","ElevatedSessionManager","passwordModal","$submitBtn","$errorPara","minSafeElevatedSessionTimeout","showPasswordModal","$passwordModal","focusPasswordInput","submitPassword","currentPassword","showPasswordError","EntryIndex","publishableSections","$newEntryBtnGroup","$newEntryBtn","section","defaultSectionHandle","selectedSection","_getSectionTriggerHref","_openCreateEntryModal","site","sectionId","newEntryBtnText","typeId","entryTypes","sectionSourceKey","FieldLayoutDesigner","$tabContainer","$unusedFieldContainer","$newTabBtn","$allFields","tabGrid","unusedFieldGrid","tabDrag","fieldDrag","gridSettings","initTab","FieldDrag","customizableTabs","TabDrag","$editBtn","$fields","initField","onTabOptionSelect","renameTab","deleteTab","onFieldOptionSelect","toggleRequiredField","removeField","$labelSpan","getFieldInputName","removeFieldById","requiredFieldInputName","refreshCols","$group","addTab","tabName","fieldInputName","BaseDrag","Drag","designer","$insertion","showingInsertion","$caboose","draggingUnusedItem","addToTabGrid","getInsertion","addCaboose","setMidpoints","getItemContainer","isItemInTabContainer","onDrag","hitTest","_closestItem","getClosestItem","_closestItemMouseDiff","_$item","_midpoint","_mouseDiff","getDist","draggeeDisplay","visibility","$hiddenFields","$fieldContainers","targetPrefix","targetSelector","reverseTargetSelector","_$target","_$reverseTarget","getType","normalizeTargetSelector","findTargets","selector","getToggleVal","postVal","onToggleChange","hideTarget","showTarget","_show","_currentHeight","_targetHeight","overflow","items","totalCols","colGutterDrop","colPctWidth","possibleItemColspans","possibleItemPositionsByColspan","itemPositions","itemColspansByPosition","layouts","layout","itemHeights","leftPadding","_refreshingCols","_refreshColsAfterRefresh","_forceRefreshColsAfterRefresh","handleContainerHeightProxy","setItems","_","oldHeight","scrollHeight","gutter","itemIndex","tallestItemHeight","colIndex","itemHeight","remainder","itemHeightsByColspan","positionRight","positionLeft","minColspan","maxColspan","colspan","getItemWidthCss","minPosition","maxPosition","colHeights","createLayouts","layoutTotalCols","highestTotalCols","layoutHeights","shortestHeight","shortestLayouts","emptySpaces","emptySpace","colspans","getItemLeftPosCss","positions","isSimpleLayout","margin-bottom","positionItems","completeRefreshCols","onRefreshCols","getItemWidth","getItemWidthInPx","getItemLeftPosInPx","prevPositions","prevColspans","prevColHeights","prevEmptySpace","LayoutGenerator","endingCol","affectedColHeights","onItemResize","newHeight","tallestColHeightsByPosition","p","colHeightsForPosition","tallestColHeight","words","ImageUpload","initImageUpload","containerSelector","uploadAction","postParameters","fileInputSelector","paramName","uploadParamName","fileuploadfail","initButtons","uploadButtonSelector","deleteButtonSelector","refreshImage","onAfterRefreshImage","_onUploadError","$icon","hudClass","dragger","dragStartMargin","outerContainer","X_AXIS","turnOn","turnOff","_getOffMargin","_onMouseDown","_onMouseUp","dragging","RIGHT_KEY","LEFT_KEY","_getMargin","_onDrag","mouseDistX","_onDragStop","_onSettle","LivePreview","$extraFields","$dragHandle","$iframeContainer","$iframe","$fieldPlaceholder","previewUrl","basePostData","fields","lastPostData","updateIframeInterval","loading","checkAgain","dragStartEditorWidth","_slideInOnIframeLoad","_handleSuccessProxy","_handleErrorProxy","_forceUpdateIframeProxy","_scrollX","_scrollY","_editorWidth","_editorWidthInPx","protocol","previewParams","extraFields","defaultEditorWidth","moveFieldsBack","editorWidthInPx","inPx","minEditorWidthInPx","exit","$editorHeader","$closeBtn","handleWindowResize","dragHandleWidth","getIframeWidth","$clone","_getClone","updateIframe","slideIn","createToken","previewAction","updateWidths","ESC_KEY","$newClone","field","contentWindow","scrollLeft","X-Craft-Token","xhrFields","withCredentials","crossDomain","forceUpdateIframe","handleSuccess","write","close","onResponse","handleError","copyInputValues","$textInput","$showPasswordToggle","showingPassword","passwordInput","hidePassword","setCurrentInput","updateToggleLabel","showPassword","togglePassword","onKeyDown","ALT_KEY","onKeyUp","onInputChange","onToggleMouseDown","$previewContainer","$targetBtn","$targetMenu","$tempInput","activeTarget","_updateIframeProxy","$previewHeader","switchTarget","resetScroll","sameHost","scrolllTop","frameborder","afterUpdateIframe","defaultSettings","_onHide","instance","loadAsset","focusItem","desiredHeight","desiredWidth","containerHeight","containerWidth","minGutter","_resizeContainer","modalHtml","$highlight","Prism","highlightElement","maxWidth","maxHeight","max-width","$progressBarStatus","_itemCount","_processedItemCount","_displaySteps","displaySteps","setProcessedItemCount","fadeTo","incrementItemCount","percentage","$modalContainerDiv","$prompt","$promptApplyToRemainingContainer","$promptApplyToRemainingCheckbox","$promptApplyToRemainingLabel","$pomptChoices","_prompts","_promptBatchCallback","_promptBatchReturnData","_promptBatchNum","_showNextPromptInBatch","remainingInBatch","_showPrompt","_handleBatchPromptSelection","applyToRemaining","choiceData","itemsToGo","_promptCallback","$promptMessage","$promptChoices","$promptButtons","$cancelButton","$radioButton","_selectPromptChoice","fadeOut","_cancelPrompt","$selectedOption","startPositionX","graduationsMin","graduationsMax","slideMin","slideMax","$overlay","$cursor","$graduations","$graduationsUl","graduationsCalculatedWidth","_handleResize","valueToPosition","_handleTapStart","touch","startLeft","_handleTapMove","curX","positionToValue","_handleTapEnd","scaleMin","scaleMax","SlugGenerator","allowUppercaseInSlug","limitAutoSlugsToAscii","XRegExp","matchChain","slugWordSeparator","Structure","structureDrag","$parents","initToggle","StructureDrag","initNewChildMenus","viewStateKey","$addBtns","onNewChildMenuClick","showMenu","getIndent","level","baseIndent","nestedIndent","addElement","$addBtn","$parentUl","_removeUl","structure","draggeeLevel","$helperLi","$targets","draggeeHeight","$level","cancelDrag","$lis","$closestTarget","closestTargetPos","closestTargetYDiff","closestTargetOffset","closestTargetHeight","targetOffset","targetHeight","targetYMidpoint","targetYDiff","$closestTargetLi","closestTargetLevel","$nextTargetLi","nextTargetLevel","hoveringBetweenRows","draggeeX","targetItemMouseDiffX","$parentLis","$closestParentLi","closestParentLiXDiff","closestParentLevel","$parentLi","parentLiX","parentLiXDiff","parentLevel","onMouseUp","$draggeeParent","moved","$closestSiblings","newLevel","setLevel","structureId","prevId","indent","$childLis","StructureTableSorter","tableView","_helperMargin","_$titleHelperCell","_titleHelperCellOuterWidth","_ancestors","_updateAncestorsFrame","_updateAncestorsProxy","_draggeeLevel","_draggeeLevelDelta","draggingLastElements","_loadingDraggeeLevelDelta","_targetLevel","_targetLevelBounds","_positionChanged","singleHelper","helperSpacingY","startDragging","HELPER_MARGIN","findDraggee","$nextRow","nextRowLevel","nextRowLevelDelta","_getAjaxBaseData","delta","drag","padding","BASE_PADDING","canInsertBefore","_getLevelBounds","canInsertAfter","_getAncestors","_setTargetLevelBounds","_updateIndent","onInsertionPointChange","_updateAncestorsBeforeRepaint","levelDiff","_getLevelIndent","$prevRow","prevRowLevel","$spinnerRow","_createSpinnerRowAfter","onPositionChange","_expandElement","onReturnHelpersToDraggees","newDraggeeIndexes","oldDraggeeIndexes","$postDraggeeItems","_minLevel","_maxLevel","forcePositionChange","_mouseDist","realMouseX","mousedownX","_indentationDist","LEVEL_INDENT","_targetLevelMouseDiff","_magnetImpact","MAX_GIVE","_closestLevelMagnetIndent","helpers","targetLevel","_level","_$prevRow","cancelAnimationFrame","_updateAncestors","_$ancestor","_newAncestors","$selectedSortHeader","structureTableSort","_totalVisiblePostStructureTableDraggee","_morePendingPostStructureTableDraggee","initTableHeaders","_collapseElement","selectedSortAttr","$tableHeaders","selectedSortDir","_isStructureTableDraggingLastElements","positionedAfter","includeTableAttributesForSource","_updateTableAttributes","$nextNextRow","descendantOf","$nextRows","_handleSelectedSortHeaderClick","newSortDir","_handleSortHeaderClick","_handleUnselectedSortHeaderClick","TagSelectInput","searchMenu","$addTagInput","_ignoreBlur","selectTag","searchForTags","killSearchMenu","excludeIds","tagGroupId","tags","exclude","exactMatch","Menu","attachToElement","data-site-id","targetSiteId","data-label","data-editable","$titleContainer","config","maxlength","autofocus","getAutofocusValue","autocomplete","getDisabledValue","readonly","step","showCharsLeft","createTextarea","createTextareaField","$select","data-target-prefix","$optgroup","optgroup","optionLabel","optionValue","optionDisabled","selected","createSelectField","data-target","data-reverse-target","reverseToggle","for","createCheckboxField","createCheckboxSelect","allValue","allChecked","showAllOption","allLabel","createCheckboxSelectField","data-value","aria-labelledby","labelId","createLightswitchField","containerId","$colorPreviewContainer","createColorField","getMonth","formattedValue","timezone","defaultDate","createDateField","timepicker","timepickerOptions","getHours","getMinutes","getSeconds","createTimeField","required","warning","addErrorsToField","addErrorsToList","$errors","clearErrorsFromField","_rejectedFiles","_extensionList","_totalFileCounter","_validFileCounter","autoUpload","fileupload","paramObject","getInProgress","onFileAdd","validateExtension","_createExtensionList","process","done","pass","fileExtension","maxFileSize","originalFiles","processErrorMessages","kinds","humanFileSize","maxUploadSize","bytes","u","toFixed","allowedKind","fileKinds","extensions","pasteZone","sequentialUploads","Accept","UriFormatGenerator","uriFormat","suffix","jQuery"],"mappings":"CACA,SAAUA,GAKVA,EAAEC,OAAOC,MACL,CACIC,UAAW,GAUXC,EAAG,SAASC,EAAUC,EAASC,GAQ3B,QAN4C,IAAjCL,MAAMM,aAAaH,SACuB,IAA1CH,MAAMM,aAAaH,GAAUC,KAEpCA,EAAUJ,MAAMM,aAAaH,GAAUC,IAGvCC,EACA,IAAK,IAAIE,KAAOF,EACPA,EAAOG,eAAeD,KAI3BH,EAAUA,EAAQK,QAAQ,IAAMF,EAAM,IAAKF,EAAOE,KAI1D,OAAOH,GAGXM,WAAY,SAASC,GAKjB,MAJoB,iBAATA,IACPA,EAAO,IAAIC,KAAKD,IAGbb,EAAEe,WAAWH,WAAWV,MAAMc,kBAAkBC,WAAYJ,IASvEK,aAAc,SAASC,EAAQC,GAO3B,YANoB,IAAVA,IACNA,EAAS,QAGGC,GAAGC,aAAaC,0BAA0BH,OAAOA,EAE1DI,CAAUL,IASrBM,WAAY,SAASC,GACjB,OAAO1B,EAAE,UAAU2B,KAAKD,GAAKE,QASjCC,YAAa,SAASH,GAElB,OAAOA,EAAIf,QAAQ,2BAA4B,SASnDmB,QAAS,SAASJ,GACd,OAAO1B,EAAE,UAAU4B,KAAKF,GAAKC,QAUjCI,mBAAoB,SAASL,GACzBA,EAAMM,mBAAmBN,GAEzB,IAAIO,EAAc,CACdC,IAAK,MACLC,IAAK,MACLC,IAAK,MACLC,IAAK,MACLC,IAAK,OAGT,IAAK,IAAIC,KAAON,EAAa,CACzB,IAAIO,EAAK,IAAIC,OAAO,KAAOF,EAAK,KAChCb,EAAMA,EAAIf,QAAQ6B,EAAIP,EAAYM,IAGtC,OAAOb,GAQXgB,gBAAiB,SAASC,GACtB,IAAI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AazzC,OAAQgF,IAAK,CAC/C,IAAIonF,EAAcjsF,KAAKszC,aAAazuC,GAEpC,QAA4C,IAAjC7H,MAAMkvF,UAAUD,GACvB,IAAK,IAAIp9B,EAAI,EAAGA,EAAI7xD,MAAMkvF,UAAUD,GAAaE,WAAWtsF,OAAQgvD,IAAK,CACrE,IAAItU,EAAMv9C,MAAMkvF,UAAUD,GAAaE,WAAWt9B,GAClD7uD,KAAK0qF,eAAehqF,KAAK65C,MAMzCh7B,QAAS,WACLvf,KAAK+M,SAAS+9E,WAAW,WACzB9qF,KAAKukB,SAOb,CACI5S,SAAU,CACNqhC,SAAU,KACVo5C,UAAW,KACXr5C,UAAW,KACXs5C,mBAAmB,EACnBb,YAAaxuF,MAAM6uF,cACnBv4C,aAAc,KACdL,OAAQ,GACRkG,gBAAiB,KACjBp2C,QAAS,CAACupF,OAAW,oCACrB9b,UAAW,mBASvBxzE,MAAMuvF,mBAAqBvvF,MAAMq1B,mBAAmBt1B,OAChD,CACIo2B,oBAAqB,SAASF,GAK1BA,GAHAA,EAAYA,EAAUx1B,QAAQ,aAAc,KAGtBqJ,cAOtBmsB,GADAA,GAHAA,EAAYj2B,MAAMoL,YAAY6qB,IAGRx1B,QAAQ,WAAY,KACpBA,QAAQ,cAAe,IAG7C,IAEI+uF,EAFQxvF,MAAMiJ,YAAYgtB,EAAUruB,MAAM,eAExB/D,KAAK,KAM3B,OAJI2rF,GAAaxsF,KAAK8L,SAAS2gF,SAC3BD,GAAaxsF,KAAK8L,SAAS2gF,QAGxBD,KAhnpBnB,CAonpBGE","file":"Craft.min.js"}
                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: Craft.escapeHtml(name)}));
                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: Craft.escapeHtml(name)}));
            return $row.attr(this.settings.nameAttribute);
Fixed code: ### Security
- Fixed an XSS vulnerability.

/*!   - 2019-10-08 */
                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: name}));
                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: name}));
            return Craft.escapeHtml($row.attr(this.settings.nameAttribute));
!function($){$.extend(Craft,{navHeight:48,t:function(t,e,i){if(void 0!==Craft.translations[t]&&void 0!==Craft.translations[t][e]&&(e=Craft.translations[t][e]),i)for(var s in i)i.hasOwnProperty(s)&&(e=e.replace("{"+s+"}",i[s]));return e},formatDate:function(t){return"object"!=typeof t&&(t=new Date(t)),$.datepicker.formatDate(Craft.datepickerOptions.dateFormat,t)},formatNumber:function(t,e){return void 0===e&&(e=",.0f"),d3.formatLocale(d3FormatLocaleDefinition).format(e)(t)},escapeHtml:function(t){return $("<div/>").text(t).html()},escapeRegex:function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},getText:function(t){return $("<div/>").html(t).text()},encodeUriComponent:function(t){t=encodeURIComponent(t);var e={"!":"%21","*":"%2A","'":"%27","(":"%28",")":"%29"};for(var i in e){var s=new RegExp("\\"+i,"g");t=t.replace(s,e[i])}return t},selectFullValue:function(t){var e=$(t),i=e.val();if(void 0!==e[0].setSelectionRange){var s=2*i.length;e[0].setSelectionRange(0,s)}else e.val(i)},formatInputId:function(t){return this.rtrim(t.replace(/[\[\]\\]+/g,"-"),"-")},getUrl:function(t,e,i){"string"!=typeof t&&(t="");var s="";if($.isPlainObject(e)){var n=[];for(var a in e)if(e.hasOwnProperty(a)){var r=e[a];"#"===a?s=r:null!==r&&""!==r&&n.push(a+"="+r)}e=n}e=Garnish.isArray(e)?e.join("&"):Craft.trim(e,"&?");var o,l=t.indexOf("?");if(-1!==l&&(e=t.substr(l+1)+(e?"&"+e:""),t=t.substr(0,l)),-1!==t.search("://")||"/"===t[0])return t+(e?"?"+e:"");if(t=Craft.trim(t,"/"),i){if(o=i,t){var h=o.match(new RegExp("[&?]"+Craft.escapeRegex(Craft.pathParam)+"=[^&]+"));h&&(o=o.replace(h[0],Craft.rtrim(h[0],"/")+"/"+t),t="")}}else o=Craft.baseUrl;if(-1!==(l=o.indexOf("?"))&&(e=o.substr(l+1)+(e?"&"+e:""),o=o.substr(0,l)),!Craft.omitScriptNameInUrls&&t)if(Craft.usePathInfo)-1===o.search(Craft.scriptName)&&(o=Craft.rtrim(o,"/")+"/"+Craft.scriptName);else{if(e&&e.substr(0,Craft.pathParam.length+1)===Craft.pathParam+"="){var d,c=e.indexOf("&");e=-1!==c?(d=e.substring(2,c),e.substr(c+1)):(d=e.substr(2),null),t=(d=Craft.rtrim(d))+(t?"/"+t:"")}e=Craft.pathParam+"="+t+(e?"&"+e:""),t=null}return t&&(o=Craft.rtrim(o,"/")+"/"+t),e&&(o+="?"+e),s&&(o+="#"+s),o},getCpUrl:function(t,e){return this.getUrl(t,e,Craft.baseCpUrl)},getSiteUrl:function(t,e){return this.getUrl(t,e,Craft.baseSiteUrl)},getActionUrl:function(t,e){return Craft.getUrl(t,e,Craft.actionUrl)},redirectTo:function(t){document.location.href=this.getUrl(t)},getCsrfInput:function(){return Craft.csrfTokenName?'<input type="hidden" name="'+Craft.csrfTokenName+'" value="'+Craft.csrfTokenValue+'"/>':""},postActionRequest:function(t,e,s,i){"function"==typeof e&&(i=s,s=e,e={});var n={"X-Registered-Asset-Bundles":Object.keys(Craft.registeredAssetBundles).join(","),"X-Registered-Js-Files":Object.keys(Craft.registeredJsFiles).join(",")};Craft.csrfTokenValue&&Craft.csrfTokenName&&(n["X-CSRF-Token"]=Craft.csrfTokenValue);var a=$.ajax($.extend({url:Craft.getActionUrl(t),type:"POST",dataType:"json",headers:n,data:e,success:s,error:function(t,e,i){4===t.readyState&&(void 0!==Craft.cp?Craft.cp.displayError():alert(Craft.t("app","An unknown error occurred.")),s&&s(null,e,t))}},i));return i&&"function"==typeof i.send&&i.send(a),a},_waitingOnAjax:!1,_ajaxQueue:[],queueActionRequest:function(t,e,i,s){"function"==typeof e&&(s=i,i=e,e=void 0),Craft._ajaxQueue.push([t,e,i,s]),Craft._waitingOnAjax||Craft._postNextActionRequestInQueue()},_postNextActionRequestInQueue:function(){Craft._waitingOnAjax=!0;var s=Craft._ajaxQueue.shift();Craft.postActionRequest(s[0],s[1],function(t,e,i){s[2]&&"function"==typeof s[2]&&s[2](t,e,i),Craft._ajaxQueue.length?Craft._postNextActionRequestInQueue():Craft._waitingOnAjax=!1},s[3])},stringToArray:function(t){if("string"!=typeof t)return t;for(var e=t.split(","),i=0;i<e.length;i++)e[i]=$.trim(e[i]);return e},expandPostArray:function(t){var e,i={};for(var s in t)if(t.hasOwnProperty(s)){var n,a=t[s],r=s.match(/^(\w+)(\[.*)?/);if(r[2])for(n=r[2].match(/\[[^\[\]]*\]/g),e=0;e<n.length;e++)n[e]=n[e].substring(1,n[e].length-1);else n=[];n.unshift(r[1]);var o=i;for(e=0;e<n.length;e++)e<n.length-1?("object"!=typeof o[n[e]]&&(n[e+1]&&parseInt(n[e+1])!=n[e+1]?o[n[e]]={}:o[n[e]]=[]),o=o[n[e]]):(n[e]||(n[e]=o.length),o[n[e]]=a)}return i},compare:function(t,e,i){if(typeof t!=typeof e)return!1;if("object"!=typeof t)return t===e;if(t.length!==e.length)return!1;if(t instanceof Array!=e instanceof Array)return!1;if(!(t instanceof Array))if(void 0===i||!0===i){if(!Craft.compare(Craft.getObjectKeys(t).sort(),Craft.getObjectKeys(e).sort()))return!1}else if(!Craft.compare(Craft.getObjectKeys(t),Craft.getObjectKeys(e)))return!1;for(var s in t)if(t.hasOwnProperty(s)&&!Craft.compare(t[s],e[s]))return!1;return!0},getObjectKeys:function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e},escapeChars:function(t){Garnish.isArray(t)||(t=t.split());for(var e="",i=0;i<t.length;i++)e+="\\"+t[i];return e},ltrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("^["+Craft.escapeChars(e)+"]+");return t.replace(i,"")},rtrim:function(t,e){if(!t)return t;void 0===e&&(e=" \t\n\r\0\v");var i=new RegExp("["+Craft.escapeChars(e)+"]+$");return t.replace(i,"")},trim:function(t,e){return t=Craft.ltrim(t,e),t=Craft.rtrim(t,e)},startsWith:function(t,e){return t.substr(0,e.length)===e},filterArray:function(t,e){for(var i=[],s=0;s<t.length;s++){("function"==typeof e?e(t[s],s):t[s])&&i.push(t[s])}return i},inArray:function(t,e){return-1!==$.inArray(t,e)},removeFromArray:function(t,e){var i=$.inArray(t,e);return-1!==i&&(e.splice(i,1),!0)},getLast:function(t){return t.length?t[t.length-1]:null},uppercaseFirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},lowercaseFirst:function(t){return t.charAt(0).toLowerCase()+t.slice(1)},parseUrl:function(t){var e=t.match(/^(?:(https?):\/\/|\/\/)([^\/\:]*)(?:\:(\d+))?(\/[^\?]*)?(?:\?([^#]*))?(#.*)?/);return e?{scheme:e[1],host:e[2]+(e[3]?":"+e[3]:""),hostname:e[2],port:e[3]||null,path:e[4]||"/",query:e[5]||null,hash:e[6]||null}:{}},isSameHost:function(t){var e=this.parseUrl(document.location.href);if(!e)return!1;var i=this.parseUrl(t);return!!i&&e.host===i.host},secondsToHumanTimeDuration:function(t,e){void 0===e&&(e=!0);var i=Math.floor(t/604800);t%=604800;var s=Math.floor(t/86400);t%=86400;var n,a=Math.floor(t/3600);t%=3600,e?(n=Math.floor(t/60),t%=60):(n=Math.round(t/60),t=0);var r=[];return i&&r.push(i+" "+(1===i?Craft.t("app","week"):Craft.t("app","weeks"))),s&&r.push(s+" "+(1===s?Craft.t("app","day"):Craft.t("app","days"))),a&&r.push(a+" "+(1===a?Craft.t("app","hour"):Craft.t("app","hours"))),!n&&(e||i||s||a)||r.push(n+" "+(1===n?Craft.t("app","minute"):Craft.t("app","minutes"))),!t&&(!e||i||s||a||n)||r.push(t+" "+(1===t?Craft.t("app","second"):Craft.t("app","seconds"))),r.join(", ")},asciiString:function(t,e){for(var i,s="",n=0;n<t.length;n++)i=t.charAt(n),s+=(e||Craft.asciiCharMap)[i]||i;return s},randomString:function(t){for(var e="",i=0;i<t;i++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e},preventOutlineOnMouseFocus:function(t){var e=$(t),i=".preventOutlineOnMouseFocus";e.on("mousedown"+i,function(){e.addClass("no-outline"),e.trigger("focus")}).on("keydown"+i+" blur"+i,function(t){t.keyCode!==Garnish.SHIFT_KEY&&t.keyCode!==Garnish.CTRL_KEY&&t.keyCode!==Garnish.CMD_KEY&&e.removeClass("no-outline")})},createErrorList:function(t){for(var e=$(document.createElement("ul")).addClass("errors"),i=0;i<t.length;i++){var s=$(document.createElement("li"));s.appendTo(e),s.html(t[i])}return e},appendHeadHtml:function(t){if(t){var e=$("link[href]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("href").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<link\\s[^>]*href="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}$("head").append(t)}},appendFootHtml:function(t){if(t){var e=$("script[src]");if(e.length){for(var i,s=[],n=0;n<e.length;n++)i=e.eq(n).attr("src").replace(/&/g,"&amp;"),s.push(Craft.escapeRegex(i));var a=new RegExp('<script\\s[^>]*src="(?:'+s.join("|")+')".*?><\/script>',"g");t=t.replace(a,"")}Garnish.$bod.append(t)}},initUiElements:function(t){$(".grid",t).grid(),$(".info",t).infoicon(),$(".checkbox-select",t).checkboxselect(),$(".fieldtoggle",t).fieldtoggle(),$(".lightswitch",t).lightswitch(),$(".nicetext",t).nicetext(),$(".pill",t).pill(),$(".formsubmit",t).formsubmit(),$(".menubtn",t).menubtn()},_elementIndexClasses:{},_elementSelectorModalClasses:{},_elementEditorClasses:{},registerElementIndexClass:function(t,e){if(void 0!==this._elementIndexClasses[t])throw"An element index class has already been registered for the element type “"+t+"”.";this._elementIndexClasses[t]=e},registerElementSelectorModalClass:function(t,e){if(void 0!==this._elementSelectorModalClasses[t])throw"An element selector modal class has already been registered for the element type “"+t+"”.";this._elementSelectorModalClasses[t]=e},registerElementEditorClass:function(t,e){if(void 0!==this._elementEditorClasses[t])throw"An element editor class has already been registered for the element type “"+t+"”.";this._elementEditorClasses[t]=e},createElementIndex:function(t,e,i){return new(void 0!==this._elementIndexClasses[t]?this._elementIndexClasses[t]:Craft.BaseElementIndex)(t,e,i)},createElementSelectorModal:function(t,e){return new(void 0!==this._elementSelectorModalClasses[t]?this._elementSelectorModalClasses[t]:Craft.BaseElementSelectorModal)(t,e)},createElementEditor:function(t,e,i){return new(void 0!==this._elementEditorClasses[t]?this._elementEditorClasses[t]:Craft.BaseElementEditor)(e,i)},getLocalStorage:function(t,e){return t="Craft-"+Craft.systemUid+"."+t,"undefined"!=typeof localStorage&&void 0!==localStorage[t]?JSON.parse(localStorage[t]):e},setLocalStorage:function(t,e){if("undefined"!=typeof localStorage){t="Craft-"+Craft.systemUid+"."+t;try{localStorage[t]=JSON.stringify(e)}catch(t){}}},getElementInfo:function(t){var e=$(t);return e.hasClass("element")||(e=e.find(".element:first")),{id:e.data("id"),siteId:e.data("site-id"),label:e.data("label"),status:e.data("status"),url:e.data("url"),hasThumb:e.hasClass("hasthumb"),$element:e}},setElementSize:function(t,e){var i=$(t);if("small"!==e&&"large"!==e&&(e="small"),!i.hasClass(e)){var s="small"===e?"large":"small";if(i.addClass(e).removeClass(s),i.hasClass("hasthumb")){var n=i.find("> .elementthumb > img"),a=$("<img/>",{sizes:("small"===e?"30":"100")+"px",srcset:n.attr("srcset")||n.attr("data-pfsrcset")});n.replaceWith(a),picturefill({elements:[a[0]]})}}}}),$.extend($.fn,{animateLeft:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({left:t},e,i,s):this.velocity({right:t},e,i,s)},animateRight:function(t,e,i,s){return"ltr"===Craft.orientation?this.velocity({right:t},e,i,s):this.velocity({left:t},e,i,s)},disable:function(){return this.each(function(){var t=$(this);t.addClass("disabled"),t.data("activatable")&&t.removeAttr("tabindex")})},enable:function(){return this.each(function(){var t=$(this);t.removeClass("disabled"),t.data("activatable")&&t.attr("tabindex","0")})},grid:function(){return this.each(function(){var t=$(this),e={};t.data("item-selector")&&(e.itemSelector=t.data("item-selector")),t.data("cols")&&(e.cols=parseInt(t.data("cols"))),t.data("max-cols")&&(e.maxCols=parseInt(t.data("max-cols"))),t.data("min-col-width")&&(e.minColWidth=parseInt(t.data("min-col-width"))),t.data("mode")&&(e.mode=t.data("mode")),t.data("fill-mode")&&(e.fillMode=t.data("fill-mode")),t.data("col-class")&&(e.colClass=t.data("col-class")),t.data("snap-to-grid")&&(e.snapToGrid=!!t.data("snap-to-grid")),new Craft.Grid(this,e)})},infoicon:function(){return this.each(function(){new Craft.InfoIcon(this)})},checkboxselect:function(){return this.each(function(){$.data(this,"checkboxselect")||new Garnish.CheckboxSelect(this)})},fieldtoggle:function(){return this.each(function(){$.data(this,"fieldtoggle")||new Craft.FieldToggle(this)})},lightswitch:function(e,t,i){return"settings"===e?("string"==typeof t?(e={})[t]=i:e=t,this.each(function(){var t=$.data(this,"lightswitch");t&&t.setSettings(e)})):($.isPlainObject(e)||(e={}),this.each(function(){var t=$.extend({},e);Garnish.hasAttr(this,"data-value")&&(t.value=$(this).attr("data-value")),$.data(this,"lightswitch")||new Craft.LightSwitch(this,t)}))},nicetext:function(){return this.each(function(){$.data(this,"nicetext")||new Garnish.NiceText(this)})},pill:function(){return this.each(function(){$.data(this,"pill")||new Garnish.Pill(this)})},formsubmit:function(){this.on("click",function(t){var e=$(t.currentTarget);if(!e.attr("data-confirm")||confirm(e.attr("data-confirm"))){var i=e.data("menu")?e.data("menu").$anchor:e,s=i.attr("data-form")?$("#"+i.attr("data-form")):i.closest("form");e.data("action")&&$('<input type="hidden" name="action"/>').val(e.data("action")).appendTo(s),e.data("redirect")&&$('<input type="hidden" name="redirect"/>').val(e.data("redirect")).appendTo(s),e.data("param")&&$('<input type="hidden"/>').attr({name:e.data("param"),value:e.data("value")}).appendTo(s),s.trigger({type:"submit",customTrigger:e})}})},menubtn:function(){return this.each(function(){var t=$(this);if(!t.data("menubtn")&&t.next().hasClass("menu")){var e={};t.data("menu-anchor")&&(e.menuAnchor=t.data("menu-anchor")),new Garnish.MenuBtn(t,e)}})}}),Garnish.$doc.ready(function(){Craft.initUiElements()}),Craft.BaseElementEditor=Garnish.Base.extend({$element:null,elementId:null,siteId:null,$form:null,$fieldsContainer:null,$cancelBtn:null,$saveBtn:null,$spinner:null,$siteSelect:null,$siteSpinner:null,hud:null,init:function(t,e){void 0===e&&$.isPlainObject(t)&&(e=t,t=null),this.$element=$(t),this.setSettings(e,Craft.BaseElementEditor.defaults),this.loadHud()},setElementAttribute:function(t,e){this.settings.attributes||(this.settings.attributes={}),null===e?delete this.settings.attributes[t]:this.settings.attributes[t]=e},getBaseData:function(){var t=$.extend({},this.settings.params);return this.settings.siteId?t.siteId=this.settings.siteId:this.$element&&this.$element.data("site-id")&&(t.siteId=this.$element.data("site-id")),this.settings.elementId?t.elementId=this.settings.elementId:this.$element&&this.$element.data("id")&&(t.elementId=this.$element.data("id")),this.settings.elementType&&(t.elementType=this.settings.elementType),this.settings.attributes&&(t.attributes=this.settings.attributes),this.settings.prevalidate&&(t.prevalidate=1),t},loadHud:function(){this.onBeginLoading();var t=this.getBaseData();t.includeSites=Craft.isMultiSite&&this.settings.showSiteSwitcher,Craft.postActionRequest("elements/get-editor-html",t,$.proxy(this,"showHud"))},showHud:function(t,e){if(this.onEndLoading(),"success"===e){var i=$();if(t.sites){var s=$('<div class="hud-header"/>');if(1===t.sites.length)$("<h5/>",{text:t.sites[0].name}).appendTo(s);else{var n=$('<div class="select"/>').appendTo(s);this.$siteSelect=$("<select/>").appendTo(n),this.$siteSpinner=$('<div class="spinner hidden"/>').appendTo(s);for(var a=0;a<t.sites.length;a++){var r=t.sites[a];$('<option value="'+r.id+'"'+(r.id==t.siteId?' selected="selected"':"")+">"+r.name+"</option>").appendTo(this.$siteSelect)}this.addListener(this.$siteSelect,"change","switchSite")}i=i.add(s)}this.$form=$("<div/>"),this.$fieldsContainer=$('<div class="fields"/>').appendTo(this.$form),this.updateForm(t),this.onCreateForm(this.$form);var o=$('<div class="hud-footer"/>').appendTo(this.$form),l=$('<div class="buttons right"/>').appendTo(o);if(this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(l),this.$saveBtn=$('<input class="btn submit" type="submit" value="'+Craft.t("app","Save")+'"/>').appendTo(l),this.$spinner=$('<div class="spinner hidden"/>').appendTo(l),i=i.add(this.$form),this.hud)this.hud.updateBody(i),this.hud.updateSizeAndPosition();else{var h=this.settings.hudTrigger||this.$element;this.hud=new Garnish.HUD(h,i,{bodyClass:"body elementeditor",closeOtherHUDs:!1,onShow:$.proxy(this,"onShowHud"),onHide:$.proxy(this,"onHideHud"),onSubmit:$.proxy(this,"saveElement")}),this.hud.$hud.data("elementEditor",this),this.hud.on("hide",$.proxy(function(){delete this.hud},this))}i.find(".text:first").trigger("focus"),this.addListener(this.$cancelBtn,"click",function(){this.hud.hide()})}},switchSite:function(){var t=this.$siteSelect.val();t!=this.siteId&&(this.$siteSpinner.removeClass("hidden"),this.reloadForm({siteId:t},$.proxy(function(t){this.$siteSpinner.addClass("hidden"),"success"!==t&&this.$siteSelect.val(this.siteId)},this)))},reloadForm:function(t,i){t=$.extend(this.getBaseData(),t),Craft.postActionRequest("elements/get-editor-html",t,$.proxy(function(t,e){"success"===e&&this.updateForm(t),i&&i(e)},this))},updateForm:function(t){this.siteId=t.siteId,this.$fieldsContainer.html(t.html);for(var e=this.$fieldsContainer.find("> .meta > .field > .heading > .instructions"),i=0;i<e.length;i++)e.eq(i).replaceWith($("<span/>",{class:"info",html:e.eq(i).children().html()})).infoicon();Garnish.requestAnimationFrame($.proxy(function(){Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.initUiElements(this.$fieldsContainer)},this))},saveElement:function(){var t=this.settings.validators;if($.isArray(t))for(var e=0;e<t.length;e++)if($.isFunction(t[e])&&!t[e].call())return!1;this.$spinner.removeClass("hidden");var i=$.param(this.getBaseData())+"&"+this.hud.$body.serialize();Craft.postActionRequest("elements/save-element",i,$.proxy(function(t,e){if(this.$spinner.addClass("hidden"),"success"===e)if(t.success){if(this.$element&&this.siteId==this.$element.data("site-id")){var i=this.$element.find(".title"),s=i.find("a");s.length&&t.cpEditUrl?(s.attr("href",t.cpEditUrl),s.text(t.newTitle)):i.text(t.newTitle)}this.closeHud(),this.onSaveElement(t)}else this.updateForm(t),Garnish.shake(this.hud.$hud)},this))},closeHud:function(){this.hud.hide(),delete this.hud},onShowHud:function(){this.settings.onShowHud(),this.trigger("showHud")},onHideHud:function(){this.settings.onHideHud(),this.trigger("hideHud")},onBeginLoading:function(){this.$element&&this.$element.addClass("loading"),this.settings.onBeginLoading(),this.trigger("beginLoading")},onEndLoading:function(){this.$element&&this.$element.removeClass("loading"),this.settings.onEndLoading(),this.trigger("endLoading")},onSaveElement:function(t){this.settings.onSaveElement(t),this.trigger("saveElement",{response:t}),Craft.cp.runQueue()},onCreateForm:function(t){this.settings.onCreateForm(t)}},{defaults:{hudTrigger:null,showSiteSwitcher:!0,elementId:null,elementType:null,siteId:null,attributes:null,params:null,prevalidate:!1,elementIndex:null,onShowHud:$.noop,onHideHud:$.noop,onBeginLoading:$.noop,onEndLoading:$.noop,onCreateForm:$.noop,onSaveElement:$.noop,validators:[]}}),Craft.BaseElementIndex=Garnish.Base.extend({initialized:!1,elementType:null,instanceState:null,sourceStates:null,sourceStatesStorageKey:null,searchTimeout:null,sourceSelect:null,$container:null,$main:null,$mainSpinner:null,isIndexBusy:!1,$sidebar:null,showingSidebar:null,sourceKey:null,sourceViewModes:null,$source:null,sourcesByKey:null,$visibleSources:null,$customizeSourcesBtn:null,customizeSourcesModal:null,$toolbar:null,$toolbarFlexContainer:null,toolbarOffset:null,$search:null,searching:!1,searchText:null,trashed:!1,drafts:!1,$clearSearchBtn:null,$statusMenuBtn:null,$statusMenuContainer:null,statusMenu:null,status:null,$siteMenuBtn:null,siteMenu:null,siteId:null,$sortMenuBtn:null,sortMenu:null,$sortAttributesList:null,$sortDirectionsList:null,$scoreSortAttribute:null,$structureSortAttribute:null,$elements:null,$viewModeBtnContainer:null,viewModeBtns:null,viewMode:null,view:null,_autoSelectElements:null,$countContainer:null,page:1,$exportBtn:null,actions:null,actionsHeadHtml:null,actionsFootHtml:null,$selectAllContainer:null,$selectAllCheckbox:null,showingActionTriggers:!1,_$detachedToolbarItems:null,_$triggers:null,init:function(t,e,i){if(this.elementType=t,this.$container=e,this.setSettings(i,Craft.BaseElementIndex.defaults),this.instanceState=this.getDefaultInstanceState(),this.sourceStates={},this.settings.storageKey&&$.extend(this.instanceState,Craft.getLocalStorage(this.settings.storageKey),{}),this.sourceStatesStorageKey="BaseElementIndex."+this.elementType+"."+this.settings.context,$.extend(this.sourceStates,Craft.getLocalStorage(this.sourceStatesStorageKey,{})),this.$main=this.$container.find(".main"),this.$toolbar=this.$container.find(".toolbar:first"),this.$toolbarFlexContainer=this.$toolbar.children(".flex"),this.$statusMenuBtn=this.$toolbarFlexContainer.find(".statusmenubtn:first"),this.$statusMenuContainer=this.$statusMenuBtn.parent(),this.$siteMenuBtn=this.$container.find(".sitemenubtn:first"),this.$sortMenuBtn=this.$toolbarFlexContainer.find(".sortmenubtn:first"),this.$search=this.$toolbarFlexContainer.find(".search:first input:first"),this.$clearSearchBtn=this.$toolbarFlexContainer.find(".search:first > .clear"),this.$mainSpinner=this.$toolbarFlexContainer.find(".spinner:first"),this.$sidebar=this.$container.find(".sidebar:first"),this.$customizeSourcesBtn=this.$sidebar.find(".customize-sources"),this.$elements=this.$container.find(".elements:first"),this.$countContainer=this.$container.find("#count-container"),this.$exportBtn=this.$container.find("#export-btn"),this.settings.hideSidebar&&(this.$sidebar.hide(),$(".body, .content",this.$container).removeClass("has-sidebar")),(this.settings.toolbarFixed||null===this.settings.toolbarFixed&&"index"===this.settings.context)&&!Garnish.isMobileBrowser(!0)&&(this.addListener(Garnish.$win,"resize","updateFixedToolbar"),this.addListener(Garnish.$scrollContainer,"scroll","updateFixedToolbar")),this.initSources()){if(this.$customizeSourcesBtn.length&&this.addListener(this.$customizeSourcesBtn,"click","createCustomizeSourcesModal"),this.$statusMenuBtn.length&&(this.statusMenu=this.$statusMenuBtn.menubtn().data("menubtn").menu,this.statusMenu.on("optionselect",$.proxy(this,"_handleStatusChange"))),this.$siteMenuBtn.length){this.siteMenu=this.$siteMenuBtn.menubtn().data("menubtn").menu;var s=this.siteMenu.$options.filter(".sel:first");if(s.length||(s=this.siteMenu.$options.first()),s.length?this._setSite(s.data("site-id")):this.settings.criteria={id:"0"},this.siteMenu.on("optionselect",$.proxy(this,"_handleSiteChange")),this.siteId){var n=Craft.getLocalStorage("BaseElementIndex.siteId");if(n&&n!=this.siteId){var a=this.siteMenu.$options.filter('[data-site-id="'+n+'"]:first');a.length&&a.trigger("click")}}}else this.settings.criteria&&this.settings.criteria.siteId?this._setSite(this.settings.criteria.siteId):this._setSite(Craft.siteId);this.addListener(this.$search,"textchange",$.proxy(function(){!this.searching&&this.$search.val()?this.startSearching():this.searching&&!this.$search.val()&&this.stopSearching(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"updateElementsIfSearchTextChanged"),500)},this)),this.addListener(this.$search,"keypress",$.proxy(function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchTimeout&&clearTimeout(this.searchTimeout),this.updateElementsIfSearchTextChanged())},this)),this.addListener(this.$clearSearchBtn,"click",$.proxy(function(){this.$search.val(""),this.searchTimeout&&clearTimeout(this.searchTimeout),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.stopSearching(),this.updateElementsIfSearchTextChanged()},this)),Garnish.isMobileBrowser(!0)||this.$search.trigger("focus"),this.$sortMenuBtn.length&&(this.sortMenu=this.$sortMenuBtn.menubtn().data("menubtn").menu,this.$sortAttributesList=this.sortMenu.$container.children(".sort-attributes"),this.$sortDirectionsList=this.sortMenu.$container.children(".sort-directions"),this.sortMenu.on("optionselect",$.proxy(this,"_handleSortChange"))),this.addListener(this.$exportBtn,"click","_showExportHud"),this.initialized=!0,this.afterInit(),this.selectDefaultSource(),"index"===this.settings.context&&this.setPage(Craft.pageNum),this.updateElements(!0)}},afterInit:function(){this.onAfterInit()},getSourceContainer:function(){return this.$sidebar.find("nav>ul")},get $sources(){if(this.sourceSelect)return this.sourceSelect.$items},initSources:function(){var t=this._getSourcesInList(this.getSourceContainer());return 0!==t.length&&(this.sourceSelect||(this.sourceSelect=new Garnish.Select(this.$sidebar.find("nav"),{multi:!1,allowEmpty:!1,vertical:!0,onSelectionChange:$.proxy(this,"_handleSourceSelectionChange")})),this.sourcesByKey={},this._initSources(t),!0)},selectDefaultSource:function(){var t,e=this.getDefaultSourceKey();e&&(t=this.getSourceByKey(e),-1===this.$visibleSources.index(t)&&(t=null)),e&&t||(t=this.$visibleSources.first()),t.length&&this.selectSource(t)},refreshSources:function(){this.sourceSelect.removeAllItems();var t={context:this.settings.context,elementType:this.elementType};this.setIndexBusy(),Craft.postActionRequest(this.settings.refreshSourcesAction,t,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e?(this.getSourceContainer().replaceWith(t.html),this.initSources(),this.selectDefaultSource()):Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))},updateFixedToolbar:function(t){this.updateFixedToolbar._scrollTop=Garnish.$scrollContainer.scrollTop(),992<Garnish.$win.width()&&17<=this.updateFixedToolbar._scrollTop?((this.updateFixedToolbar._makingFixed=!this.$toolbar.hasClass("fixed"))&&(this.$elements.css("padding-top",this.$toolbar.outerHeight()+21),this.$toolbar.addClass("fixed")),!this.updateFixedToolbar._makingFixed&&"resize"!==t.type||this.$toolbar.css({top:Garnish.$scrollContainer.offset().top,width:this.$main.width()})):this.$toolbar.hasClass("fixed")&&(this.$toolbar.removeClass("fixed"),this.$toolbar.css("width",""),this.$elements.css("padding-top",""),this.$toolbar.css("top","0"))},initSource:function(t){this.sourceSelect.addItems(t),this.initSourceToggle(t),(this.sourcesByKey[t.data("key")]=t).data("hasNestedSources")&&-1!==this.instanceState.expandedSources.indexOf(t.data("key"))&&this._expandSource(t)},initSourceToggle:function(t){this.deinitSourceToggle(t);var e=this._getSourceToggle(t);e.length?(this.addListener(t,"dblclick","_handleSourceDblClick"),this.addListener(e,"click","_handleSourceToggleClick"),t.data("hasNestedSources",!0)):t.data("hasNestedSources",!1)},deinitSource:function(t){this.sourceSelect.removeItems(t),this.deinitSourceToggle(t),delete this.sourcesByKey[t.data("key")]},deinitSourceToggle:function(t){t.data("hasNestedSources")&&(this.removeListener(t,"dblclick"),this.removeListener(this._getSourceToggle(t),"click")),t.removeData("hasNestedSources")},getDefaultInstanceState:function(){return{selectedSource:null,expandedSources:[]}},getDefaultSourceKey:function(){return this.instanceState.selectedSource},getDefaultExpandedSources:function(){return this.instanceState.expandedSources},startSearching:function(){this.$clearSearchBtn.removeClass("hidden"),this.$scoreSortAttribute||(this.$scoreSortAttribute=$('<li><a data-attr="score">'+Craft.t("app","Score")+"</a></li>"),this.sortMenu.addOptions(this.$scoreSortAttribute.children())),this.$scoreSortAttribute.prependTo(this.$sortAttributesList),this.searching=!0,this._updateStructureSortOption(),this.setSortAttribute("score")},stopSearching:function(){this.$clearSearchBtn.addClass("hidden"),this.$scoreSortAttribute.detach(),this.searching=!1,this._updateStructureSortOption()},setInstanceState:function(t,e){"object"==typeof t?$.extend(this.instanceState,t):this.instanceState[t]=e,this.storeInstanceState()},storeInstanceState:function(){this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.instanceState)},getSourceState:function(t,e,i){return void 0===this.sourceStates[t]&&(this.sourceStates[t]={}),void 0===e?this.sourceStates[t]:void 0!==this.sourceStates[t][e]?this.sourceStates[t][e]:void 0!==i?i:null},getSelectedSourceState:function(t,e){return this.getSourceState(this.instanceState.selectedSource,t,e)},setSelecetedSourceState:function(t,e){var i=this.getSelectedSourceState();"object"==typeof t?$.extend(i,t):i[t]=e,this.sourceStates[this.instanceState.selectedSource]=i,Craft.setLocalStorage(this.sourceStatesStorageKey,this.sourceStates)},storeSortAttributeAndDirection:function(){var t=this.getSelectedSortAttribute();"score"!==t&&this.setSelecetedSourceState({order:t,sort:this.getSelectedSortDirection()})},setPage:function(t){t=Math.max(t,1),this.page=t;var e=document.location.href.replace(/\?.*$/,"").replace(new RegExp("/"+Craft.pageTrigger.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\d+$"),"").replace(/\/+$/,"");1!==this.page&&("?"!==Craft.pageTrigger[0]&&(e+="/"),e+=Craft.pageTrigger+this.page),history.replaceState({},"",e)},getViewParams:function(){var t={siteId:this.siteId,search:this.searchText,offset:this.settings.batchSize*(this.page-1),limit:this.settings.batchSize,trashed:this.trashed?1:0,drafts:this.drafts?1:0};Garnish.hasAttr(this.$source,"data-override-status")||(t.status=this.status),$.extend(t,this.settings.criteria);var e={context:this.settings.context,elementType:this.elementType,source:this.instanceState.selectedSource,criteria:t,disabledElementIds:this.settings.disabledElementIds,viewState:$.extend({},this.getSelectedSourceState()),paginated:this._isViewPaginated()?1:0};return e.viewState.order=this.getSelectedSortAttribute(),e.viewState.sort=this.getSelectedSortDirection(),"structure"===this.getSelectedSortAttribute()&&(void 0===this.instanceState.collapsedElementIds&&(this.instanceState.collapsedElementIds=[]),e.collapsedElementIds=this.instanceState.collapsedElementIds),e},updateElements:function(t){if(this.initialized){this.setIndexBusy(),this.view&&(this.view.destroy(),delete this.view),this.$elements.html(""),!0!==t&&(this.$countContainer.html("&nbsp;"),this.setPage(1));var s=this.getViewParams();Craft.postActionRequest(this.settings.updateElementsAction,s,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e){var i=Math.max(Math.ceil(t.count/this.settings.batchSize),1);if(this.page>i)return this.setPage(i),void this.updateElements(!0);this._updateView(s,t)}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}},updateElementsIfSearchTextChanged:function(){this.searchText!==(this.searchText=this.searching?this.$search.val():null)&&this.updateElements()},showActionTriggers:function(){this.showingActionTriggers||(this.$toolbar.css("min-height",this.$toolbar.height()),this._$detachedToolbarItems=this.$toolbarFlexContainer.children().not(this.$selectAllContainer).not(this.$mainSpinner),this._$detachedToolbarItems.detach(),this._$triggers?this._$triggers.insertAfter(this.$selectAllContainer):this._createTriggers(),this.showingActionTriggers=!0)},submitAction:function(t,e){var i=this.view.getSelectedElementIds();if(0!==i.length){for(var s,n=0;n<this.actions.length;n++)if(this.actions[n].type===t){s=this.actions[n];break}if(s&&(!s.confirm||confirm(s.confirm))){var a=this.getViewParams(),r=$.extend(a,e,{elementAction:t,elementIds:i});this.setIndexBusy(),this._autoSelectElements=i,Craft.postActionRequest(this.settings.submitActionsAction,r,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&(t.success?(this._updateView(a,t),t.message&&Craft.cp.displayNotice(t.message),this.afterAction(s,r)):Craft.cp.displayError(t.message))},this))}}},afterAction:function(t,e){Craft.cp.runQueue(),this.onAfterAction(t,e)},hideActionTriggers:function(){this.showingActionTriggers&&(this._$detachedToolbarItems.insertBefore(this.$mainSpinner),this._$triggers.detach(),this.$toolbarFlexContainer.children().not(this.$selectAllContainer).removeClass("hidden"),this.$toolbar.css("min-height",""),this.showingActionTriggers=!1)},updateActionTriggers:function(){if(this.actions){var t=this.view.getSelectedElements().length;0!==t?(t===this.view.getEnabledElements().length?(this.$selectAllCheckbox.removeClass("indeterminate"),this.$selectAllCheckbox.addClass("checked"),this.$selectAllBtn.attr("aria-checked","true")):(this.$selectAllCheckbox.addClass("indeterminate"),this.$selectAllCheckbox.removeClass("checked"),this.$selectAllBtn.attr("aria-checked","mixed")),this.showActionTriggers()):(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false"),this.hideActionTriggers())}},getSelectedElements:function(){return this.view?this.view.getSelectedElements():$()},getSelectedElementIds:function(){return this.view?this.view.getSelectedElementIds():[]},getSortAttributeOption:function(t){return this.$sortAttributesList.find('a[data-attr="'+t+'"]:first')},getSelectedSortAttribute:function(){return this.$sortAttributesList.find("a.sel:first").data("attr")},setSortAttribute:function(t){var e=this.getSortAttributeOption(t);if(e.length){this.$sortAttributesList.find("a.sel").removeClass("sel"),e.addClass("sel");var i=e.text();this.$sortMenuBtn.attr("title",Craft.t("app","Sort by {attribute}",{attribute:i})),this.$sortMenuBtn.text(i),this.setSortDirection("score"===t?"desc":"asc"),"structure"===t?this.$sortDirectionsList.find("a").addClass("disabled"):this.$sortDirectionsList.find("a").removeClass("disabled")}},getSortDirectionOption:function(t){return this.$sortDirectionsList.find("a[data-dir="+t+"]:first")},getSelectedSortDirection:function(){return this.$sortDirectionsList.find("a.sel:first").data("dir")},getSelectedViewMode:function(){return this.getSelectedSourceState("mode")},setSortDirection:function(t){"desc"!==t&&(t="asc"),this.$sortMenuBtn.attr("data-icon",t),this.$sortDirectionsList.find("a.sel").removeClass("sel"),this.getSortDirectionOption(t).addClass("sel")},getSourceByKey:function(t){return void 0===this.sourcesByKey[t]?null:this.sourcesByKey[t]},selectSource:function(t){if(!t||!t.length)return!1;if(this.$source&&this.$source[0]&&this.$source[0]===t[0]&&t.data("key")===this.sourceKey)return!1;if(this.hideActionTriggers(),this.$source=t,this.sourceKey=t.data("key"),this.setInstanceState("selectedSource",this.sourceKey),this.sourceSelect.selectItem(t),Craft.cp.updateSidebarMenuLabel(),this.searching&&(this.searchText=null,this.$search.val(""),this.stopSearching()),Garnish.hasAttr(this.$source,"data-has-structure")?(this.$structureSortAttribute||(this.$structureSortAttribute=$('<li><a data-attr="structure">'+Craft.t("app","Structure")+"</a></li>"),this.sortMenu.addOptions(this.$structureSortAttribute.children())),this.$structureSortAttribute.prependTo(this.$sortAttributesList)):this.$structureSortAttribute&&this.$structureSortAttribute.removeClass("sel").detach(),this.setStoredSortOptionsForSource(),this.$statusMenuBtn.length&&(Garnish.hasAttr(this.$source,"data-override-status")?this.$statusMenuContainer.addClass("hidden"):this.$statusMenuContainer.removeClass("hidden")),this.$viewModeBtnContainer&&this.$viewModeBtnContainer.remove(),this.viewModeBtns={},this.viewMode=null,this.sourceViewModes=this.getViewModesForSource(),1<this.sourceViewModes.length){this.$viewModeBtnContainer=$('<div class="btngroup"/>').insertBefore(this.$mainSpinner);for(var e=0;e<this.sourceViewModes.length;e++){var i=this.sourceViewModes[e],s=$('<div data-view="'+i.mode+'" role="button" class="btn'+(void 0!==i.className?" "+i.className:"")+'" title="'+i.title+'"'+(void 0!==i.icon?' data-icon="'+i.icon+'"':"")+"/>").appendTo(this.$viewModeBtnContainer);this.viewModeBtns[i.mode]=s,this.addListener(s,"click",{mode:i.mode},function(t){this.selectViewMode(t.data.mode),this.updateElements()})}}var n=this.getSelectedViewMode();return n&&this.doesSourceHaveViewMode(n)||(n=this.viewMode&&this.doesSourceHaveViewMode(this.viewMode)?this.viewMode:this.sourceViewModes[0].mode),this.selectViewMode(n),this.onSelectSource(),!0},selectSourceByKey:function(t){var e=this.getSourceByKey(t);return!!e&&this.selectSource(e)},setStoredSortOptionsForSource:function(){var t=this.getSelectedSourceState("order"),e=this.getSelectedSourceState("sort");t&&e||(t=this.getDefaultSort(),Garnish.isArray(t)&&(e=t[1],t=t[0])),"asc"!==e&&"desc"!==e&&(e="asc"),this.setSortAttribute(t),this.setSortDirection(e)},getDefaultSort:function(){return this.$source&&Garnish.hasAttr(this.$source,"data-default-sort")?this.$source.attr("data-default-sort").split(":"):[this.$sortAttributesList.find("a:first").data("attr"),"asc"]},getViewModesForSource:function(){var t=[{mode:"table",title:Craft.t("app","Display in a table"),icon:"list"}];return this.$source&&Garnish.hasAttr(this.$source,"data-has-thumbs")&&t.push({mode:"thumbs",title:Craft.t("app","Display as thumbnails"),icon:"grid"}),t},doesSourceHaveViewMode:function(t){for(var e=0;e<this.sourceViewModes.length;e++)if(this.sourceViewModes[e].mode===t)return!0;return!1},selectViewMode:function(t,e){e||this.doesSourceHaveViewMode(t)||(t=this.sourceViewModes[0].mode),t!==this.viewMode&&(this.viewMode&&void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].removeClass("active"),this.viewMode=t,this.setSelecetedSourceState("mode",this.viewMode),void 0!==this.viewModeBtns[this.viewMode]&&this.viewModeBtns[this.viewMode].addClass("active"))},createView:function(t,e){return new(this.getViewClass(t))(this,this.$elements,e)},getViewClass:function(t){switch(t){case"table":return Craft.TableElementIndexView;case"thumbs":return Craft.ThumbsElementIndexView;default:throw'View mode "'+t+'" not supported.'}},rememberDisabledElementId:function(t){-1===$.inArray(t,this.settings.disabledElementIds)&&this.settings.disabledElementIds.push(t)},forgetDisabledElementId:function(t){var e=$.inArray(t,this.settings.disabledElementIds);-1!==e&&this.settings.disabledElementIds.splice(e,1)},enableElements:function(t){t.removeClass("disabled").parents(".disabled").removeClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.forgetDisabledElementId(i)}this.onEnableElements(t)},disableElements:function(t){t.removeClass("sel").addClass("disabled");for(var e=0;e<t.length;e++){var i=$(t[e]).data("id");this.rememberDisabledElementId(i)}this.onDisableElements(t)},getElementById:function(t){return this.view.getElementById(t)},enableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.enableElements(s):this.forgetDisabledElementId(i)}},disableElementsById:function(t){t=$.makeArray(t);for(var e=0;e<t.length;e++){var i=t[e],s=this.getElementById(i);s&&s.length?this.disableElements(s):this.rememberDisabledElementId(i)}},selectElementAfterUpdate:function(t){null===this._autoSelectElements&&(this._autoSelectElements=[]),this._autoSelectElements.push(t)},addButton:function(t){this.getButtonContainer().append(t)},isShowingSidebar:function(){return null===this.showingSidebar&&(this.showingSidebar=this.$sidebar.length&&!this.$sidebar.hasClass("hidden")),this.showingSidebar},getButtonContainer:function(){if(this.settings.buttonContainer)return $(this.settings.buttonContainer);var t=$("#button-container");return t.length||(t=$('<div id="button-container"/>').appendTo(Craft.cp.$header)),t},setIndexBusy:function(){this.$mainSpinner.removeClass("invisible"),this.isIndexBusy=!0},setIndexAvailable:function(){this.$mainSpinner.addClass("invisible"),this.isIndexBusy=!1},createCustomizeSourcesModal:function(){var t=new Craft.CustomizeSourcesModal(this,{onHide:function(){t.destroy()}});return t},disable:function(){this.sourceSelect&&this.sourceSelect.disable(),this.view&&this.view.disable(),this.base()},enable:function(){this.sourceSelect&&this.sourceSelect.enable(),this.view&&this.view.enable(),this.base()},onAfterInit:function(){this.settings.onAfterInit(),this.trigger("afterInit")},onSelectSource:function(){this.settings.onSelectSource(this.sourceKey),this.trigger("selectSource",{sourceKey:this.sourceKey})},onSelectSite:function(){this.settings.onSelectSite(this.siteId),this.trigger("selectSite",{siteId:this.siteId})},onUpdateElements:function(){this.settings.onUpdateElements(),this.trigger("updateElements")},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},onEnableElements:function(t){this.settings.onEnableElements(t),this.trigger("enableElements",{elements:t})},onDisableElements:function(t){this.settings.onDisableElements(t),this.trigger("disableElements",{elements:t})},onAfterAction:function(t,e){this.settings.onAfterAction(t,e),this.trigger("afterAction",{action:t,params:e})},_handleSourceSelectionChange:function(){this.sourceSelect.totalSelected?this.selectSource(this.sourceSelect.$selectedItems)&&this.updateElements():this.sourceSelect.selectItem(this.$visibleSources.first())},_handleActionTriggerSubmit:function(t){t.preventDefault();var e=$(t.currentTarget);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action"),s=Garnish.getPostData(e);this.submitAction(i,s)}},_handleMenuActionTriggerSubmit:function(t){var e=$(t.option);if(!e.hasClass("disabled")&&!e.data("custom-handler")){var i=e.data("action");this.submitAction(i)}},_handleStatusChange:function(t){this.statusMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$statusMenuBtn.html(e.html()),this.trashed=!1,this.drafts=!1,this.status=null,Garnish.hasAttr(e,"data-trashed")?this.trashed=!0:Garnish.hasAttr(e,"data-drafts")?this.drafts=!0:this.status=e.data("status"),this._updateStructureSortOption(),this.updateElements()},_handleSiteChange:function(t){this.siteMenu.$options.removeClass("sel");var e=$(t.selectedOption).addClass("sel");this.$siteMenuBtn.html(e.html()),this._setSite(e.data("site-id")),this.onSelectSite()},_setSite:function(t){var e,i;this.siteId=t,this.$visibleSources=$();for(var s=!1,n=0;n<this.$sources.length;n++)void 0===(i=this.$sources.eq(n)).data("sites")||-1!==i.data("sites").toString().split(",").indexOf(t.toString())?(i.parent().removeClass("hidden"),this.$visibleSources=this.$visibleSources.add(i),e||(e=i)):(i.parent().addClass("hidden"),this.$source&&this.$source.get(0)==i.get(0)&&(s=!0));s&&this.selectSource(e);var a,r=this.getSourceContainer().children(".heading");for(n=0;n<r.length;n++)0!==(a=r.eq(n)).nextUntil(".heading",":not(.hidden)").length?a.removeClass("hidden"):a.addClass("hidden");this.initialized&&(Craft.setLocalStorage("BaseElementIndex.siteId",t),this.updateElements())},_handleSortChange:function(t){var e=$(t.selectedOption);e.hasClass("disabled")||e.hasClass("sel")||(e.parent().parent().is(this.$sortAttributesList)?this.setSortAttribute(e.data("attr")):this.setSortDirection(e.data("dir")),this.storeSortAttributeAndDirection(),this.updateElements())},_handleSelectionChange:function(){this.updateActionTriggers(),this.onSelectionChange()},_handleSourceDblClick:function(t){this._toggleSource($(t.currentTarget)),t.stopPropagation()},_handleSourceToggleClick:function(t){this._toggleSource($(t.currentTarget).prev("a")),t.stopPropagation()},_updateStructureSortOption:function(){var t=this.getSortAttributeOption("structure");if(t.length)if(this.trashed||this.drafts||this.searching){if(t.addClass("disabled"),"structure"===this.getSelectedSortAttribute()){var e=this.$sortAttributesList.find("a:not(.disabled):first");this.setSortAttribute(e.data("attr")),this.setSortDirection("asc")}}else t.removeClass("disabled"),this.setStoredSortOptionsForSource()},_getSourcesInList:function(t){return t.children("li").children("a")},_getChildSources:function(t){var e=t.siblings("ul");return this._getSourcesInList(e)},_getSourceToggle:function(t){return t.siblings(".toggle")},_initSources:function(t){for(var e=0;e<t.length;e++)this.initSource($(t[e]))},_deinitSources:function(t){for(var e=0;e<t.length;e++)this.deinitSource($(t[e]))},_toggleSource:function(t){t.parent("li").hasClass("expanded")?this._collapseSource(t):this._expandSource(t)},_expandSource:function(t){t.parent("li").addClass("expanded");var e=this._getChildSources(t);this._initSources(e);var i=t.data("key");-1===this.instanceState.expandedSources.indexOf(i)&&(this.instanceState.expandedSources.push(i),this.storeInstanceState())},_collapseSource:function(t){t.parent("li").removeClass("expanded");var e=this._getChildSources(t);this._deinitSources(e);var i=this.instanceState.expandedSources.indexOf(t.data("key"));-1!==i&&(this.instanceState.expandedSources.splice(i,1),this.storeInstanceState())},_isViewPaginated:function(){return"index"===this.settings.context&&"structure"!==this.getSelectedSortAttribute()},_updateView:function(t,e){if(this.actions&&(this.hideActionTriggers(),this.actions=this.actionsHeadHtml=this.actionsFootHtml=this._$triggers=null),this.$selectAllContainer&&this.$selectAllContainer.detach(),this.$countContainer.html(""),!this._isViewPaginated()||e.count<=this.settings.batchSize)this.$countContainer.text(e.countLabel);else{var i=$('<div class="flex pagination"/>').appendTo(this.$countContainer),s=Math.max(Math.ceil(e.count/this.settings.batchSize),1),n=$("<div/>",{class:"page-link"+(1<this.page?"":" disabled"),"data-icon":"leftangle",title:Craft.t("app","Previous Page")}).appendTo(i),a=$("<div/>",{class:"page-link"+(this.page<s?"":" disabled"),"data-icon":"rightangle",title:Craft.t("app","Next Page")}).appendTo(i);$("<div/>",{class:"page-info",text:e.countLabel}).appendTo(i),1<this.page&&this.addListener(n,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page-1),this.updateElements(!0)}),this.page<s&&this.addListener(a,"click",function(){this.removeListener(n,"click"),this.removeListener(a,"click"),this.setPage(this.page+1),this.updateElements(!0)})}e.actions&&e.actions.length&&(this.actions=e.actions,this.actionsHeadHtml=e.actionsHeadHtml,this.actionsFootHtml=e.actionsFootHtml,this.$selectAllContainer?(this.$selectAllCheckbox.removeClass("indeterminate checked"),this.$selectAllBtn.attr("aria-checked","false")):(this.$selectAllContainer=$('<div class="selectallcontainer"/>'),this.$selectAllBtn=$('<div class="btn"/>').appendTo(this.$selectAllContainer),this.$selectAllCheckbox=$('<div class="checkbox"/>').appendTo(this.$selectAllBtn),this.$selectAllBtn.attr({role:"checkbox",tabindex:"0","aria-checked":"false"}),this.addListener(this.$selectAllBtn,"click",function(){0===this.view.getSelectedElements().length?this.view.selectAllElements():this.view.deselectAllElements()}),this.addListener(this.$selectAllBtn,"keydown",function(t){t.keyCode===Garnish.SPACE_KEY&&(t.preventDefault(),$(t.currentTarget).trigger("click"))})),this.$selectAllContainer.prependTo(this.$toolbarFlexContainer)),this.$elements.html(e.html),Craft.appendHeadHtml(e.headHtml),Craft.appendFootHtml(e.footHtml);var r=this.actions||this.settings.selectable;if(this.view=this.createView(this.getSelectedViewMode(),{context:this.settings.context,batchSize:"index"!==this.settings.context||"structure"===this.getSelectedSortAttribute()?this.settings.batchSize:null,params:t,selectable:r,multiSelect:this.actions||this.settings.multiSelect,checkboxMode:!!this.actions,onSelectionChange:$.proxy(this,"_handleSelectionChange")}),this._autoSelectElements){if(r)for(var o=0;o<this._autoSelectElements.length;o++)this.view.selectElementById(this._autoSelectElements[o]);this._autoSelectElements=null}this.onUpdateElements()},_createTriggers:function(){var t,e,i=[],s=[],n=[];for(t=0;t<this.actions.length;t++){var a=this.actions[t];if(a.trigger){var r=$('<form id="'+Craft.formatInputId(a.type)+'-actiontrigger"/>').data("action",a.type).append(a.trigger);this.addListener(r,"submit","_handleActionTriggerSubmit"),i.push(r)}else a.destructive?n.push(a):s.push(a)}if(s.length||n.length){var o=$("<form/>");e=$('<div class="btn menubtn" data-icon="settings" title="'+Craft.t("app","Actions")+'"/>').appendTo(o);var l=$('<ul class="menu"/>').appendTo(o),h=this._createMenuTriggerList(s,!1),d=this._createMenuTriggerList(n,!0);h&&h.appendTo(l),h&&d&&$("<hr/>").appendTo(l),d&&d.appendTo(l),i.push(o)}for(this._$triggers=$(),t=0;t<i.length;t++){var c=$("<div/>").append(i[t]);this._$triggers=this._$triggers.add(c)}this._$triggers.insertAfter(this.$selectAllContainer),Craft.appendHeadHtml(this.actionsHeadHtml),Craft.appendFootHtml(this.actionsFootHtml),Craft.initUiElements(this._$triggers),e&&e.data("menubtn").on("optionSelect",$.proxy(this,"_handleMenuActionTriggerSubmit"))},_showExportHud:function(){this.$exportBtn.addClass("active");var t=$("<form/>",{class:"export-form"}),s=Craft.ui.createTextField({label:Craft.t("app","Limit"),placeholder:Craft.t("app","No limit"),type:"number",min:1}).appendTo(t);$("<input/>",{type:"submit",class:"btn submit fullwidth",value:Craft.t("app","Export")}).appendTo(t);var n=$("<div/>",{class:"spinner hidden"}).appendTo(t);new Garnish.HUD(this.$exportBtn,t).on("hide",$.proxy(function(){this.$exportBtn.removeClass("active")},this));var a=!1;this.addListener(t,"submit",function(t){if(t.preventDefault(),!a){a=!0,n.removeClass("hidden");var e=this.getViewParams();delete e.criteria.limit;var i=parseInt(s.find("input").val());i&&!isNaN(i)&&(e.criteria.limit=i),Craft.postActionRequest("element-indexes/create-export-token",e,$.proxy(function(t,e){if(a=!1,n.addClass("hidden"),"success"===e){var i={};i[Craft.tokenParam]=t.token;var s=Craft.getCpUrl("",i);document.location.href=s}else Craft.cp.displayError(Craft.t("app","An unknown error occurred."))},this))}})},_createMenuTriggerList:function(t,e){if(t&&t.length){for(var i=$("<ul/>"),s=0;s<t.length;s++){var n=t[s].type;$("<li/>").append($("<a/>",{id:Craft.formatInputId(n)+"-actiontrigger",class:e?"error":null,"data-action":n,text:t[s].name})).appendTo(i)}return i}}},{defaults:{context:"index",modal:null,storageKey:null,criteria:null,batchSize:50,disabledElementIds:[],selectable:!1,multiSelect:!1,buttonContainer:null,hideSidebar:!1,refreshSourcesAction:"element-indexes/get-source-tree-html",updateElementsAction:"element-indexes/get-elements",submitActionsAction:"element-indexes/perform-action",toolbarFixed:null,onAfterInit:$.noop,onSelectSource:$.noop,onSelectSite:$.noop,onUpdateElements:$.noop,onSelectionChange:$.noop,onEnableElements:$.noop,onDisableElements:$.noop,onAfterAction:$.noop}}),Craft.BaseElementIndexView=Garnish.Base.extend({$container:null,$loadingMoreSpinner:null,$elementContainer:null,$scroller:null,elementIndex:null,thumbLoader:null,elementSelect:null,loadingMore:!1,_totalVisible:null,_morePending:null,_handleEnableElements:null,_handleDisableElements:null,init:function(t,e,i){this.elementIndex=t,this.$container=$(e),this.setSettings(i,Craft.BaseElementIndexView.defaults),this.$loadingMoreSpinner=$('<div class="centeralign hidden"><div class="spinner loadingmore"></div></div>').insertAfter(this.$container),this.$elementContainer=this.getElementContainer();var s=this.$elementContainer.children();this.setTotalVisible(s.length),this.setMorePending(this.settings.batchSize&&s.length==this.settings.batchSize),this.thumbLoader=new Craft.ElementThumbLoader,this.thumbLoader.load(s),this.settings.selectable&&(this.elementSelect=new Garnish.Select(this.$elementContainer,s.filter(":not(.disabled)"),{multi:this.settings.multiSelect,vertical:this.isVerticalList(),handle:"index"===this.settings.context?".checkbox, .element:first":null,filter:":not(a):not(.toggle)",checkboxMode:this.settings.checkboxMode,onSelectionChange:$.proxy(this,"onSelectionChange")}),this._handleEnableElements=$.proxy(function(t){this.elementSelect.addItems(t.elements)},this),this._handleDisableElements=$.proxy(function(t){this.elementSelect.removeItems(t.elements)},this),this.elementIndex.on("enableElements",this._handleEnableElements),this.elementIndex.on("disableElements",this._handleDisableElements)),"index"===this.settings.context&&(this._handleElementEditing=$.proxy(function(t){var e=$(t.target);if("A"!==e.prop("nodeName")){var i;if(e.hasClass("element"))i=e;else if(!(i=e.closest(".element")).length)return;Garnish.hasAttr(i,"data-editable")&&this.createElementEditor(i)}},this),this.elementIndex.trashed||(this.addListener(this.$elementContainer,"dblclick",this._handleElementEditing),$.isTouchCapable()&&this.addListener(this.$elementContainer,"taphold",this._handleElementEditing))),this.afterInit(),this.settings.batchSize&&("index"===this.settings.context?this.$scroller=Garnish.$scrollContainer:this.$scroller=this.elementIndex.$main,this.$scroller.scrollTop(0),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore())},getElementContainer:function(){throw"Classes that extend Craft.BaseElementIndexView must supply a getElementContainer() method."},afterInit:function(){},getAllElements:function(){return this.$elementContainer.children()},getEnabledElements:function(){return this.$elementContainer.children(":not(.disabled)")},getElementById:function(t){var e=this.$elementContainer.children('[data-id="'+t+'"]:first');return e.length?e:null},getSelectedElements:function(){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.$selectedItems},getSelectedElementIds:function(){var t=this.getSelectedElements(),e=[];if(t)for(var i=0;i<t.length;i++)e.push(t.eq(i).data("id"));return e},selectElement:function(t){if(!this.elementSelect)throw"This view is not selectable.";return this.elementSelect.selectItem(t,!0),!0},selectElementById:function(t){if(!this.elementSelect)throw"This view is not selectable.";var e=this.getElementById(t);return!!e&&(this.elementSelect.selectItem(e,!0),!0)},selectAllElements:function(){this.elementSelect.selectAll()},deselectAllElements:function(){this.elementSelect.deselectAll()},isVerticalList:function(){return!1},getTotalVisible:function(){return this._totalVisible},setTotalVisible:function(t){this._totalVisible=t},getMorePending:function(){return this._morePending},setMorePending:function(t){this._morePending=t},maybeLoadMore:function(){this.canLoadMore()&&this.loadMore()},canLoadMore:function(){if(!this.getMorePending()||!this.settings.batchSize)return!1;if(this.$scroller[0]!==Garnish.$win[0])return this.$scroller.prop("scrollHeight")-this.$scroller.scrollTop()<=this.$scroller.outerHeight()+15;var t=Garnish.$win.innerHeight(),e=Garnish.$win.scrollTop();return this.$container.offset().top+this.$container.height()<=t+e},loadMore:function(){if(this.getMorePending()&&!this.loadingMore&&this.settings.batchSize){this.loadingMore=!0,this.$loadingMoreSpinner.removeClass("hidden"),this.removeListener(this.$scroller,"scroll");var t=this.getLoadMoreParams();Craft.postActionRequest(this.settings.loadMoreElementsAction,t,$.proxy(function(t,e){if(this.loadingMore=!1,this.$loadingMoreSpinner.addClass("hidden"),"success"===e){var i=$(t.html);this.appendElements(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),this.elementSelect&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.setTotalVisible(this.getTotalVisible()+i.length),this.setMorePending(i.length==this.settings.batchSize),this.addListener(this.$scroller,"scroll","maybeLoadMore"),this.maybeLoadMore()}},this))}},getLoadMoreParams:function(){var t=$.extend(!0,{},this.settings.params);return t.criteria.offset=this.getTotalVisible(),t},appendElements:function(t){t.appendTo(this.$elementContainer),this.thumbLoader.load(t),this.onAppendElements(t)},onAppendElements:function(t){this.settings.onAppendElements(t),this.trigger("appendElements",{newElements:t})},onSelectionChange:function(){this.settings.onSelectionChange(),this.trigger("selectionChange")},createElementEditor:function(t){Craft.createElementEditor(t.data("type"),t,{elementIndex:this.elementIndex})},disable:function(){this.elementSelect&&this.elementSelect.disable()},enable:function(){this.elementSelect&&this.elementSelect.enable()},destroy:function(){this.$loadingMoreSpinner.remove(),this.thumbLoader.destroy(),delete this.thumbLoader,this.elementSelect&&(this.elementIndex.off("enableElements",this._handleEnableElements),this.elementIndex.off("disableElements",this._handleDisableElements),this.elementSelect.destroy(),delete this.elementSelect),this.base()}},{defaults:{context:"index",batchSize:null,params:null,selectable:!1,multiSelect:!1,checkboxMode:!1,loadMoreElementsAction:"element-indexes/get-more-elements",onAppendElements:$.noop,onSelectionChange:$.noop}}),Craft.BaseElementSelectInput=Garnish.Base.extend({thumbLoader:null,elementSelect:null,elementSort:null,modal:null,elementEditor:null,$container:null,$elementsContainer:null,$elements:null,$addElementBtn:null,_initialized:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","elementType","sources","criteria","sourceElementId","limit","modalStorageKey","fieldId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.setSettings(t,Craft.BaseElementSelectInput.defaults),this.settings.modalStorageKey&&(this.modalStorageKey="BaseElementSelectInput."+this.settings.modalStorageKey),1==this.settings.limit&&(this.settings.sortable=!1),this.$container=this.getContainer(),this.$container.data("elementSelect",this),this.$elementsContainer=this.getElementsContainer(),this.$addElementBtn=this.getAddElementsBtn(),this.$addElementBtn&&1==this.settings.limit&&this.$addElementBtn.css("position","absolute").css("top",0).css(Craft.left,0),this.thumbLoader=new Craft.ElementThumbLoader,this.initElementSelect(),this.initElementSort(),this.resetElements(),this.$addElementBtn&&this.addListener(this.$addElementBtn,"activate","showModal"),this._initialized=!0},get totalSelected(){return this.$elements.length},getContainer:function(){return $("#"+this.settings.id)},getElementsContainer:function(){return this.$container.children(".elements")},getElements:function(){return this.$elementsContainer.children()},getAddElementsBtn:function(){return this.$container.children(".btn.add")},initElementSelect:function(){this.settings.selectable&&(this.elementSelect=new Garnish.Select({multi:this.settings.sortable,filter:":not(.delete)"}))},initElementSort:function(){this.settings.sortable&&(this.elementSort=new Garnish.DragSort({container:this.$elementsContainer,filter:this.settings.selectable?$.proxy(function(){return this.elementSort.$targetItem.hasClass("sel")?this.elementSelect.getSelectedItems():this.elementSort.$targetItem},this):null,ignoreHandleSelector:".delete",axis:this.getElementSortAxis(),collapseDraggees:!0,magnetStrength:4,helperLagBase:1.5,onSortChange:this.settings.selectable?$.proxy(function(){this.elementSelect.resetItemOrder()},this):null}))},getElementSortAxis:function(){return"list"===this.settings.viewMode?"y":null},canAddMoreElements:function(){return!this.settings.limit||this.$elements.length<this.settings.limit},updateAddElementsBtn:function(){this.canAddMoreElements()?this.enableAddElementsBtn():this.disableAddElementsBtn()},disableAddElementsBtn:function(){this.$addElementBtn&&!this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.addClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeOut",Craft.BaseElementSelectInput.ADD_FX_DURATION):this.$addElementBtn.hide()))},enableAddElementsBtn:function(){this.$addElementBtn&&this.$addElementBtn.hasClass("disabled")&&(this.$addElementBtn.removeClass("disabled"),1==this.settings.limit&&(this._initialized?this.$addElementBtn.velocity("fadeIn",Craft.BaseElementSelectInput.REMOVE_FX_DURATION):this.$addElementBtn.show()))},resetElements:function(){null!==this.$elements?this.removeElements(this.$elements):this.$elements=$(),this.addElements(this.getElements())},addElements:function(t){this.thumbLoader.load(t),this.settings.selectable&&this.elementSelect.addItems(t),this.settings.sortable&&this.elementSort.addItems(t),this.settings.editable&&(this._handleShowElementEditor=$.proxy(function(t){var e=$(t.currentTarget);!Garnish.hasAttr(e,"data-editable")||e.hasClass("disabled")||e.hasClass("loading")||(this.elementEditor=this.createElementEditor(e))},this),this.addListener(t,"dblclick",this._handleShowElementEditor),$.isTouchCapable()&&this.addListener(t,"taphold",this._handleShowElementEditor)),t.find(".delete").on("click",$.proxy(function(t){this.removeElement($(t.currentTarget).closest(".element"))},this)),this.$elements=this.$elements.add(t),this.updateAddElementsBtn()},createElementEditor:function(t,e){return e||(e={}),e.prevalidate=this.settings.prevalidate,Craft.createElementEditor(this.settings.elementType,t,e)},removeElements:function(t){if(this.settings.selectable&&this.elementSelect.removeItems(t),this.modal){for(var e=[],i=0;i<t.length;i++){var s=t.eq(i).data("id");s&&e.push(s)}e.length&&this.modal.elementIndex.enableElementsById(e)}t.children("input").prop("disabled",!0),this.$elements=this.$elements.not(t),this.updateAddElementsBtn(),this.onRemoveElements()},removeElement:function(t){this.removeElements(t),this.animateElementAway(t,function(){t.remove()})},animateElementAway:function(t,e){t.css("z-index",0);var i={opacity:-1};i["margin-"+Craft.left]=-(t.outerWidth()+parseInt(t.css("margin-"+Craft.right))),"list"!==this.settings.viewMode&&0!==this.$elements.length||(i["margin-bottom"]=-(t.outerHeight()+parseInt(t.css("margin-bottom")))),t.velocity(i,Craft.BaseElementSelectInput.REMOVE_FX_DURATION,e)},showModal:function(){this.canAddMoreElements()&&(this.modal?this.modal.show():this.modal=this.createModal())},createModal:function(){return Craft.createElementSelectorModal(this.settings.elementType,this.getModalSettings())},getModalSettings:function(){return $.extend({closeOtherModals:!1,storageKey:this.modalStorageKey,sources:this.settings.sources,criteria:this.settings.criteria,multiSelect:1!=this.settings.limit,showSiteMenu:this.settings.showSiteMenu,disabledElementIds:this.getDisabledElementIds(),onSelect:$.proxy(this,"onModalSelect")},this.settings.modalSettings)},getSelectedElementIds:function(){for(var t=[],e=0;e<this.$elements.length;e++)t.push(this.$elements.eq(e).data("id"));return t},getDisabledElementIds:function(){var t=this.getSelectedElementIds();return this.settings.sourceElementId&&t.push(this.settings.sourceElementId),t},onModalSelect:function(t){if(this.settings.limit){var e=this.settings.limit-this.$elements.length;t.length>e&&(t=t.slice(0,e))}this.selectElements(t),this.updateDisabledElementsInModal()},selectElements:function(t){for(var e=0;e<t.length;e++){var i=t[e],s=this.createNewElement(i);this.appendElement(s),this.addElements(s),this.animateElementIntoPlace(i.$element,s)}this.onSelectElements(t)},createNewElement:function(t){var e=t.$element.clone();return Craft.setElementSize(e,"large"===this.settings.viewMode?"large":"small"),e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e},appendElement:function(t){t.appendTo(this.$elementsContainer)},animateElementIntoPlace:function(t,e){var i=t.offset(),s=e.offset(),n=e.clone().appendTo(Garnish.$bod);e.css("visibility","hidden"),n.css({position:"absolute",zIndex:1e4,top:i.top,left:i.left});var a={top:s.top,left:s.left};n.velocity(a,Craft.BaseElementSelectInput.ADD_FX_DURATION,function(){n.remove(),e.css("visibility","visible")})},updateDisabledElementsInModal:function(){this.modal.elementIndex&&this.modal.elementIndex.disableElementsById(this.getDisabledElementIds())},getElementById:function(t){for(var e=0;e<this.$elements.length;e++){var i=this.$elements.eq(e);if(i.data("id")==t)return i}},onSelectElements:function(t){this.trigger("selectElements",{elements:t}),this.settings.onSelectElements(t),window.draftEditor&&window.draftEditor.checkForm()},onRemoveElements:function(){this.trigger("removeElements"),this.settings.onRemoveElements()}},{ADD_FX_DURATION:200,REMOVE_FX_DURATION:200,defaults:{id:null,name:null,fieldId:null,elementType:null,sources:null,criteria:{},sourceElementId:null,viewMode:"list",limit:null,showSiteMenu:!1,modalStorageKey:null,modalSettings:{},onSelectElements:$.noop,onRemoveElements:$.noop,sortable:!0,selectable:!0,editable:!0,prevalidate:!1,editorSettings:{}}}),Craft.BaseElementSelectorModal=Garnish.Modal.extend({elementType:null,elementIndex:null,$body:null,$selectBtn:null,$sidebar:null,$sources:null,$sourceToggles:null,$main:null,$search:null,$elements:null,$tbody:null,$primaryButtons:null,$secondaryButtons:null,$cancelBtn:null,$footerSpinner:null,init:function(t,e){this.elementType=t,this.setSettings(e,Craft.BaseElementSelectorModal.defaults);var i=$('<div class="modal elementselectormodal"></div>').appendTo(Garnish.$bod),s=$('<div class="body"><div class="spinner big"></div></div>').appendTo(i),n=$('<div class="footer"/>').appendTo(i);this.base(i,this.settings),this.$footerSpinner=$('<div class="spinner hidden"/>').appendTo(n),this.$primaryButtons=$('<div class="buttons right"/>').appendTo(n),this.$secondaryButtons=$('<div class="buttons left secondary-buttons"/>').appendTo(n),this.$cancelBtn=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$primaryButtons),this.$selectBtn=$('<div class="btn disabled submit">'+Craft.t("app","Select")+"</div>").appendTo(this.$primaryButtons),this.$body=s,this.addListener(this.$cancelBtn,"activate","cancel"),this.addListener(this.$selectBtn,"activate","selectElements")},onFadeIn:function(){this.elementIndex?Garnish.isMobileBrowser(!0)||this.elementIndex.$search.trigger("focus"):this._createElementIndex(),this.base()},onSelectionChange:function(){this.updateSelectBtnState()},updateSelectBtnState:function(){this.$selectBtn&&(this.elementIndex.getSelectedElements().length?this.enableSelectBtn():this.disableSelectBtn())},enableSelectBtn:function(){this.$selectBtn.removeClass("disabled")},disableSelectBtn:function(){this.$selectBtn.addClass("disabled")},enableCancelBtn:function(){this.$cancelBtn.removeClass("disabled")},disableCancelBtn:function(){this.$cancelBtn.addClass("disabled")},showFooterSpinner:function(){this.$footerSpinner.removeClass("hidden")},hideFooterSpinner:function(){this.$footerSpinner.addClass("hidden")},cancel:function(){this.$cancelBtn.hasClass("disabled")||this.hide()},selectElements:function(){if(this.elementIndex&&this.elementIndex.getSelectedElements().length){this.elementIndex.view.elementSelect.clearMouseUpTimeout();var t=this.elementIndex.getSelectedElements(),e=this.getElementInfo(t);this.onSelect(e),this.settings.disableElementsOnSelect&&this.elementIndex.disableElements(this.elementIndex.getSelectedElements()),this.settings.hideOnSelect&&this.hide()}},getElementInfo:function(t){for(var e=[],i=0;i<t.length;i++){var s=$(t[i]),n=Craft.getElementInfo(s);e.push(n)}return e},show:function(){this.updateSelectBtnState(),this.base()},onSelect:function(t){this.settings.onSelect(t)},disable:function(){this.elementIndex&&this.elementIndex.disable(),this.base()},enable:function(){this.elementIndex&&this.elementIndex.enable(),this.base()},_createElementIndex:function(){var t={context:"modal",elementType:this.elementType,sources:this.settings.sources};null!==this.settings.showSiteMenu&&"auto"!==this.settings.showSiteMenu&&(t.showSiteMenu=this.settings.showSiteMenu?"1":"0"),Craft.postActionRequest("elements/get-modal-body",t,$.proxy(function(t,e){"success"===e&&(this.$body.html(t.html),this.$body.has(".sidebar:not(.hidden)").length&&this.$body.addClass("has-sidebar"),this.elementIndex=Craft.createElementIndex(this.elementType,this.$body,{context:"modal",modal:this,storageKey:this.settings.storageKey,criteria:this.settings.criteria,disabledElementIds:this.settings.disabledElementIds,selectable:!0,multiSelect:this.settings.multiSelect,buttonContainer:this.$secondaryButtons,onSelectionChange:$.proxy(this,"onSelectionChange"),hideSidebar:this.settings.hideSidebar}),this.addListener(this.elementIndex.$elements,"doubletap",function(t,e){e.firstTap.target===e.secondTap.target&&this.selectElements()}))},this))}},{defaults:{resizable:!0,storageKey:null,sources:null,criteria:null,multiSelect:!1,showSiteMenu:null,disabledElementIds:[],disableElementsOnSelect:!1,hideOnSelect:!0,onCancel:$.noop,onSelect:$.noop,hideIndexSidebar:!1}}),Craft.BaseInputGenerator=Garnish.Base.extend({$source:null,$target:null,$form:null,settings:null,listening:null,timeout:null,init:function(t,e,i){this.$source=$(t),this.$target=$(e),this.$form=this.$source.closest("form"),this.setSettings(i),this.startListening()},setNewSource:function(t){var e=this.listening;this.stopListening(),this.$source=$(t),e&&this.startListening()},startListening:function(){this.listening||(this.listening=!0,this.addListener(this.$source,"textchange","onSourceTextChange"),this.addListener(this.$target,"textchange","onTargetTextChange"),this.addListener(this.$form,"submit","onFormSubmit"))},stopListening:function(){this.listening&&(this.listening=!1,this.timeout&&clearTimeout(this.timeout),this.removeAllListeners(this.$source),this.removeAllListeners(this.$target),this.removeAllListeners(this.$form))},onSourceTextChange:function(){this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout($.proxy(this,"updateTarget"),250)},onTargetTextChange:function(){this.$target.get(0)===document.activeElement&&this.stopListening()},onFormSubmit:function(){this.timeout&&clearTimeout(this.timeout),this.updateTarget()},updateTarget:function(){var t=this.$source.val();if(void 0!==t){var e=this.generateTargetValue(t);this.$target.val(e),this.$target.trigger("change"),this.$target.is(":focus")&&Craft.selectFullValue(this.$target)}},generateTargetValue:function(t){return t}}),Craft.AdminTable=Garnish.Base.extend({settings:null,totalItems:null,sorter:null,$noItems:null,$table:null,$tbody:null,$deleteBtns:null,init:function(t){this.setSettings(t,Craft.AdminTable.defaults),this.settings.allowDeleteAll||(this.settings.minItems=1),this.$noItems=$(this.settings.noItemsSelector),this.$table=$(this.settings.tableSelector),this.$tbody=this.$table.children("tbody"),this.totalItems=this.$tbody.children().length,this.settings.sortable&&(this.sorter=new Craft.DataTableSorter(this.$table,{onSortChange:$.proxy(this,"reorderItems")})),this.$deleteBtns=this.$table.find(".delete:not(.disabled)"),this.addListener(this.$deleteBtns,"click","handleDeleteBtnClick"),this.updateUI()},addRow:function(t){if(!(this.settings.maxItems&&this.totalItems>=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){if(this.settings.sortable){for(var i=[],t=0;t<this.sorter.$items.length;t++){var e=$(this.sorter.$items[t]).attr(this.settings.idAttribute);i.push(e)}var s={ids:JSON.stringify(i)};Craft.postActionRequest(this.settings.reorderAction,s,$.proxy(function(t,e){"success"===e&&(t.success?(this.onReorderItems(i),Craft.cp.displayNotice(Craft.t("app",this.settings.reorderSuccessMessage))):Craft.cp.displayError(Craft.t("app",this.settings.reorderFailMessage)))},this))}},handleDeleteBtnClick:function(t){if(!(this.settings.minItems&&this.totalItems<=this.settings.minItems)){var e=$(t.target).closest("tr");this.confirmDeleteItem(e)&&this.deleteItem(e)}},confirmDeleteItem:function(t){var e=this.getItemName(t);return confirm(Craft.t("app",this.settings.confirmDeleteMessage,{name:e}))},deleteItem:function(i){var t={id:this.getItemId(i)};Craft.postActionRequest(this.settings.deleteAction,t,$.proxy(function(t,e){"success"===e&&this.handleDeleteItemResponse(t,i)},this))},handleDeleteItemResponse:function(t,e){var i=this.getItemId(e),s=this.getItemName(e);t.success?(this.sorter&&this.sorter.removeItems(e),e.remove(),this.totalItems--,this.updateUI(),this.onDeleteItem(i),Craft.cp.displayNotice(Craft.t("app",this.settings.deleteSuccessMessage,{name:s}))):Craft.cp.displayError(Craft.t("app",this.settings.deleteFailMessage,{name:s}))},onReorderItems:function(t){this.settings.onReorderItems(t)},onDeleteItem:function(t){this.settings.onDeleteItem(t)},getItemId:function(t){return t.attr(this.settings.idAttribute)},getItemName:function(t){return Craft.escapeHtml(t.attr(this.settings.nameAttribute))},updateUI:function(){if(0===this.totalItems?(this.$table.hide(),this.$noItems.removeClass("hidden")):(this.$table.show(),this.$noItems.addClass("hidden")),this.settings.sortable){var t=this.$table.find(".move");1===this.totalItems?t.addClass("disabled"):t.removeClass("disabled")}this.settings.minItems&&this.totalItems<=this.settings.minItems?this.$deleteBtns.addClass("disabled"):this.$deleteBtns.removeClass("disabled"),this.settings.newItemBtnSelector&&(this.settings.maxItems&&this.totalItems>=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}}),Craft.AssetEditor=Craft.BaseElementEditor.extend({reloadIndex:!1,updateForm:function(t){if(this.base(t),this.$element.data("id")){var e=this.$fieldsContainer.find("> .meta > .image-preview-container.editable");e.length&&this.addListener(e,"click","showImageEditor")}},showImageEditor:function(){new Craft.AssetImageEditor(this.$element.data("id"),{onSave:function(){this.reloadIndex=!0,this.reloadForm()}.bind(this),allowDegreeFractions:Craft.isImagick})},onHideHud:function(){this.reloadIndex&&this.settings.elementIndex&&this.settings.elementIndex.updateElements(),this.base()}}),Craft.registerElementEditorClass("craft\\elements\\Asset",Craft.AssetEditor),Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinnerCanvas:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,croppingConstraint:!1,spinnerInterval:null,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,renderImage:null,renderCropper:null,init:function(t,e){this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('<form class="modal fitted imageeditor"></form>').appendTo(Garnish.$bod),this.$body=$('<div class="body"></div>').appendTo(this.$container),this.$footer=$('<div class="footer"/>').appendTo(this.$container),this.base(this.$container,this.settings),this.$buttons=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn cancel">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$buttons),this.$replaceBtn=$('<div class="btn submit save replace">'+Craft.t("app","Save")+"</div>").appendTo(this.$buttons),this.settings.allowSavingAsNew&&(this.$saveBtn=$('<div class="btn submit save copy">'+Craft.t("app","Save as a new asset")+"</div>").appendTo(this.$buttons),this.addListener(this.$saveBtn,"activate",this.saveImage.bind(this))),this.addListener(this.$replaceBtn,"activate",this.saveImage.bind(this)),this.addListener(this.$cancelBtn,"activate",$.proxy(this,"hide")),this.removeListener(this.$shade,"click"),this.maxImageSize=this.getMaxImageSize(),Craft.postActionRequest("assets/image-editor",{assetId:t},$.proxy(this,"loadEditor"))},getMaxImageSize:function(){var t=Garnish.$doc.get(0).documentElement.clientWidth,e=Garnish.$doc.get(0).documentElement.clientHeight;return Math.max(e,t)*(1<window.devicePixelRatio?2:1)},loadEditor:function(r){r.html||alert(Craft.t("app","Could not load the image editor.")),this.$body.html(r.html),this.$tabs=$(".tabs li",this.$body),this.$viewsContainer=$(".views",this.$body),this.$views=$("> div",this.$viewsContainer),this.$imageTools=$(".image-container .image-tools",this.$body),this.$editorContainer=$(".image-container .image",this.$body),this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this._showSpinner(),this.updateSizeAndPosition(),this.canvas=new fabric.StaticCanvas("image-canvas"),this.$croppingCanvas=$("#cropping-canvas",this.$editorContainer),this.$croppingCanvas.width(this.editorWidth),this.$croppingCanvas.height(this.editorHeight),this.canvas.enableRetinaScaling=!0,this.renderImage=function(){Garnish.requestAnimationFrame(this.canvas.renderAll.bind(this.canvas))}.bind(this);var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});fabric.Image.fromURL(t,$.proxy(function(t){this.image=t,this.image.set({originX:"center",originY:"center",left:this.editorWidth/2,top:this.editorHeight/2}),this.canvas.add(this.image),this.originalHeight=this.image.getHeight(),this.originalWidth=this.image.getWidth(),this.zoomRatio=1,this.lastLoadedDimensions=this.getScaledImageDimensions(),this._setFittedImageVerticeCoordinates(),this._repositionEditorElements();var e={imageDimensions:this.getScaledImageDimensions(),offsetX:0,offsetY:0},i=!1;if(r.focalPoint){var s=r.focalPoint,n=e.imageDimensions.width*s.x,a=e.imageDimensions.height*s.y;e.offsetX=n-e.imageDimensions.width/2,e.offsetY=a-e.imageDimensions.height/2,i=!0}this.storeFocalPointState(e),i&&this._createFocalPoint(),this._createViewport(),this.storeCropperState(),this._addControlListeners(),this.addListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.addListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.addListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.addListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this._hideSpinner(),this.renderImage(),this.$tabs.first().trigger("click")},this))},_reloadImage:function(){if(!this.imageIsLoading){this.imageIsLoading=!0,this.maxImageSize=this.getMaxImageSize();var t=Craft.getActionUrl("assets/edit-image",{assetId:this.assetId,size:this.maxImageSize,cacheBust:this.cacheBust});this.image.setSrc(t,function(t){this.originalHeight=t.getHeight(),this.originalWidth=t.getWidth(),this.lastLoadedDimensions={width:this.originalHeight,height:this.originalWidth},this.updateSizeAndPosition(),this.renderImage(),this.imageIsLoading=!1}.bind(this))}},updateSizeAndPosition:function(){if(this.$container){var t=window.innerWidth,e=window.innerHeight;this.$container.css({width:t,"min-width":t,left:0,height:e,"min-height":e,top:0}),this.$body.css({height:e-58}),t<e?this.$container.addClass("vertical"):this.$container.removeClass("vertical"),this.$spinnerCanvas&&this.$spinnerCanvas.css({left:this.$spinnerCanvas.parent().width()/2-this.$spinnerCanvas.width()/2+"px",top:this.$spinnerCanvas.parent().height()/2-this.$spinnerCanvas.height()/2+"px"}),this.$editorContainer&&this.image&&this._repositionEditorElements()}},_repositionEditorElements:function(){var t={width:this.editorWidth,height:this.editorHeight};this.editorHeight=this.$editorContainer.innerHeight(),this.editorWidth=this.$editorContainer.innerWidth(),this.canvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var e=this.getScaledImageDimensions();if("crop"===this.currentView){this.zoomRatio=this.getZoomToFitRatio(this.getScaledImageDimensions());var i=this._getBoundingRectangle(this.imageVerticeCoords);this._setFittedImageVerticeCoordinates(),this._repositionCropper(i)}else this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor;this._repositionImage(t),this._repositionViewport(),this._repositionFocalPoint(t),this._zoomImage(),this.renderImage(),(1.5<e.width/this.lastLoadedDimensions.width||1.5<e.height/this.lastLoadedDimensions.height)&&this._reloadImage()},_repositionImage:function(t){this.image.set({left:this.image.left-(t.width-this.editorWidth)/2,top:this.image.top-(t.height-this.editorHeight)/2})},_createViewport:function(){this.viewport=new fabric.Rect({width:this.image.width,height:this.image.height,fill:"rgba(127,0,0,1)",originX:"center",originY:"center",globalCompositeOperation:"destination-in",left:this.image.left,top:this.image.top}),this.canvas.add(this.viewport),this.renderImage()},_createFocalPoint:function(){var t=this.focalPointState,e=this.getScaledImageDimensions().width/t.imageDimensions.width,i=t.offsetX*e*this.zoomRatio*this.scaleFactor,s=t.offsetY*e*this.zoomRatio*this.scaleFactor;i+=this.image.left,s+=this.image.top;var n=0,a=0;this.viewport&&0===t.offsetX&&0===t.offsetY&&(a="crop"!==this.currentView?(n=this.viewport.left-this.image.left,this.viewport.top-this.image.top):(n=this.clipper.left-this.image.left,this.clipper.top-this.image.top),i+=n,s+=a,t.offsetX+=n/(e*this.zoomRatio*this.scaleFactor),t.offsetY+=a/(e*this.zoomRatio*this.scaleFactor)),this.focalPoint=new fabric.Group([new fabric.Circle({radius:8,fill:"rgba(0,0,0,0.5)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"}),new fabric.Circle({radius:1,fill:"rgba(255,255,255,0)",strokeWidth:2,stroke:"rgba(255,255,255,0.8)",left:0,top:0,originX:"center",originY:"center"})],{originX:"center",originY:"center",left:i,top:s}),this.storeFocalPointState(t),this.canvas.add(this.focalPoint)},toggleFocalPoint:function(){this.focalPoint?(this.canvas.remove(this.focalPoint),this.focalPoint=null):this._createFocalPoint(),this.renderImage()},_repositionViewport:function(){if(this.viewport){var t={left:this.editorWidth/2,top:this.editorHeight/2};if("crop"===this.currentView)t.width=this.editorWidth,t.height=this.editorHeight;else if(this.cropperState){var e=this.cropperState,i=this.getScaledImageDimensions().width/e.imageDimensions.width;t.width=e.width*i*this.zoomRatio,t.height=e.height*i*this.zoomRatio,this.image.set({left:this.editorWidth/2-e.offsetX*i,top:this.editorHeight/2-e.offsetY*i})}else $.extend(t,this.getScaledImageDimensions());this.viewport.set(t)}},_repositionFocalPoint:function(t){if(this.focalPoint){var e=this.focalPoint.left-this.editorWidth/2,i=this.focalPoint.top-this.editorHeight/2,s=this.image.width,n=this.getScaledImageDimensions().width*this.zoomRatio/s/this.scaleFactor;e-=(t.width-this.editorWidth)/2,i-=(t.height-this.editorHeight)/2,e*=n,i*=n,this.focalPoint.set({left:this.editorWidth/2+e,top:this.editorHeight/2+i})}},hasOrientationChanged:function(){return this.viewportRotation%180!=0},getScaledImageDimensions:function(){var t=this.originalHeight/this.originalWidth,e={};return this.editorHeight/this.editorWidth<t?(e.height=Math.min(this.editorHeight,this.originalHeight),e.width=Math.round(this.originalWidth/(this.originalHeight/e.height))):(e.width=Math.min(this.editorWidth,this.originalWidth),e.height=Math.round(this.originalHeight*(e.width/this.originalWidth))),e},_zoomImage:function(){var t=this.getScaledImageDimensions();this.image.set({width:t.width*this.zoomRatio,height:t.height*this.zoomRatio})},_addControlListeners:function(){this.addListener(this.$tabs,"click","_handleTabClick"),this.addListener($(".focal-point"),"click",function(t){this.toggleFocalPoint(t)}.bind(this)),this.addListener($(".rotate-left"),"click",function(){this.rotateImage(-90)}.bind(this)),this.addListener($(".rotate-right"),"click",function(){this.rotateImage(90)}.bind(this)),this.addListener($(".flip-vertical"),"click",function(){this.flipImage("y")}.bind(this)),this.addListener($(".flip-horizontal"),"click",function(){this.flipImage("x")}.bind(this)),this.straighteningInput=new Craft.SlideRuleInput("slide-rule",{onStart:function(){this._showGrid()}.bind(this),onChange:function(t){this.straighten(t)}.bind(this),onEnd:function(){this._hideGrid(),this._cleanupFocalPointAfterStraighten()}.bind(this)}),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!0)}.bind(this)),this.addListener(Garnish.$doc,"keyup",function(t){t.keyCode===Garnish.SHIFT_KEY&&(this.shiftKeyHeld=!1)}.bind(this)),new Garnish.MenuBtn($(".crop .menubtn",this.$container),{onOptionSelect:function(t){$(".constraint",this.$container).html($(t).html()),this.setCroppingConstraint($(t).data("constraint")),this.enforceCroppingConstraint()}.bind(this)}).menu.$container.addClass("dark")},_handleTabClick:function(t){if(!this.animationInProgress){var e=$(t.currentTarget),i=e.data("view");this.$tabs.removeClass("selected"),e.addClass("selected"),this.showView(i)}},showView:function(t){this.currentView!==t&&(this.$views.addClass("hidden"),this.$views.filter('[data-view="'+t+'"]').removeClass("hidden"),"rotate"===t?this.enableSlider():this.disableSlider(),this.updateSizeAndPosition(),"crop"===this.currentView&&"crop"!==t?this.disableCropMode():"crop"!==this.currentView&&"crop"===t&&this.enableCropMode(),this.currentView=t)},storeCropperState:function(t){if(t)this.cropperState=t;else if(this.clipper){var e=1/this.zoomRatio;this.cropperState={offsetX:(this.clipper.left-this.image.left)*e,offsetY:(this.clipper.top-this.image.top)*e,height:this.clipper.height*e,width:this.clipper.width*e,imageDimensions:this.getScaledImageDimensions()}}else{var i=this.getScaledImageDimensions();this.cropperState={offsetX:0,offsetY:0,height:i.height,width:i.width,imageDimensions:i}}},storeFocalPointState:function(t){if(t)this.focalPointState=t;else if(this.focalPoint){var e=1/this.zoomRatio;this.focalPointState={offsetX:(this.focalPoint.left-this.image.left)*e/this.scaleFactor,offsetY:(this.focalPoint.top-this.image.top)*e/this.scaleFactor,imageDimensions:this.getScaledImageDimensions()}}},rotateImage:function(e){if(!this.animationInProgress){if(90!==e&&-90!==e)return!1;this.animationInProgress=!0,this.viewportRotation+=e,this.viewportRotation=parseInt((this.viewportRotation+360)%360,10);var t,i=this.image.angle+e,s=this.getScaledImageDimensions();t=this.hasOrientationChanged()?this.getZoomToCoverRatio({height:s.width,width:s.height}):this.getZoomToCoverRatio(s),this.zoomRatio>t&&(t=this.zoomRatio);var n={angle:90===e?"+=90":"-=90"},a={angle:i,width:s.width*t,height:s.height*t},r=1;this.scaleFactor<1?(r=1/this.scaleFactor,this.scaleFactor=1):(this.viewport.width>this.editorHeight?r=this.editorHeight/this.viewport.width:this.viewport.height>this.editorWidth&&(r=this.editorWidth/this.viewport.height),this.scaleFactor=r),r<1&&(a.width*=r,a.height*=r);var o=this.cropperState,l=o.offsetX,h=o.offsetY,d=e*(Math.PI/180),c=l*Math.cos(d)-h*Math.sin(d),u=l*Math.sin(d)+h*Math.cos(d),p=s.width/o.imageDimensions.width,g=c*p*this.zoomRatio*this.scaleFactor,f=u*p*this.zoomRatio*this.scaleFactor;a.left=this.editorWidth/2-g,a.top=this.editorHeight/2-f,o.offsetX=c,o.offsetY=u;var m=o.width;o.width=o.height,o.height=m,this.storeCropperState(o),this.focalPoint&&this.canvas.remove(this.focalPoint),this.viewport.animate(n,{duration:this.settings.animationDuration,onComplete:function(){var t=this.viewport.height*r;this.viewport.height=this.viewport.width*r,this.viewport.width=t,this.viewport.set({angle:0})}.bind(this)}),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){var t=parseFloat((this.image.angle+360)%360);this.image.set({angle:t}),this.animationInProgress=!1,this.focalPoint?(this._adjustFocalPointByAngle(e),this.straighten(this.straighteningInput),this.canvas.add(this.focalPoint)):this._resetFocalPointPosition()}.bind(this)})}},flipImage:function(t){if(!this.animationInProgress){this.animationInProgress=!0,this.hasOrientationChanged()&&(t="y"===t?"x":"y"),this.focalPoint?this.canvas.remove(this.focalPoint):this._resetFocalPointPosition();var e=this.editorWidth/2,i=this.editorHeight/2;this.straighteningInput.setValue(-this.imageStraightenAngle),this.imageStraightenAngle=-this.imageStraightenAngle;var s,n,a={angle:this.viewportRotation+this.imageStraightenAngle},r=this.cropperState,o=this.focalPointState;"y"===t&&this.hasOrientationChanged()||"y"!==t&&!this.hasOrientationChanged()?(r.offsetX=-r.offsetX,o.offsetX=-o.offsetX,n=this.image.left-e,a.left=e-n):(r.offsetY=-r.offsetY,o.offsetY=-o.offsetY,s=this.image.top-i,a.top=i-s),"y"===t?(a.scaleY=-1*this.image.scaleY,this.flipData.y=1-this.flipData.y):(a.scaleX=-1*this.image.scaleX,this.flipData.x=1-this.flipData.x),this.storeCropperState(r),this.storeFocalPointState(o),this.image.animate(a,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){this.animationInProgress=!1,this.focalPoint&&(this._adjustFocalPointByAngle(0),this.canvas.add(this.focalPoint))}.bind(this)})}},straighten:function(t){if(!this.animationInProgress){this.animationInProgress=!0;var e=this.image.angle;this.imageStraightenAngle=(this.settings.allowDegreeFractions?parseFloat(t.value):Math.round(parseFloat(t.value)))%360,this.image.set({angle:this.viewportRotation+this.imageStraightenAngle}),this.zoomRatio=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,this._zoomImage(),this.cropperState&&this._adjustEditorElementsOnStraighten(e),this.renderImage(),this.animationInProgress=!1}},_adjustEditorElementsOnStraighten:function(t){var e,i,s,n,a,r=this.getScaledImageDimensions(),o=this.image.angle-t,l=this.cropperState,h=this.zoomRatio,d=1;do{var c=l.offsetX,u=l.offsetY,p=o*(Math.PI/180);s=c*Math.cos(p)-u*Math.sin(p),n=c*Math.sin(p)+u*Math.cos(p),e=s*h*(a=r.width/l.imageDimensions.width),i=n*h*a;var g=this.getImageVerticeCoords(h),f={width:this.viewport.width,height:this.viewport.height,left:this.editorWidth/2-this.viewport.width/2+e,top:this.editorHeight/2-this.viewport.height/2+i};h*=d=this._getZoomRatioToFitRectangle(f,g)}while(1!==d);this.image.set({left:this.editorWidth/2-e,top:this.editorHeight/2-i}),l.offsetX=s,l.offsetY=n,l.width=this.viewport.width/h/a,l.height=this.viewport.height/h/a,this.storeCropperState(l),this.zoomRatio=h,this.focalPoint?(this._adjustFocalPointByAngle(o),this._isCenterInside(this.focalPoint,this.viewport)?this.focalPoint.set({opacity:1}):this.focalPoint.set({opacity:0})):0!=o&&this._resetFocalPointPosition(),this._zoomImage()},_cleanupFocalPointAfterStraighten:function(){if(this.focalPoint&&!this._isCenterInside(this.focalPoint,this.viewport)){this.focalPoint.set({opacity:1});var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t),this.toggleFocalPoint()}},_resetFocalPointPosition:function(){var t=this.focalPointState;t.offsetX=0,t.offsetY=0,this.storeFocalPointState(t)},_isCenterInside:function(t,e){return t.left>e.left-e.width/2&&t.top>e.top-e.height/2&&t.left<e.left+e.width/2&&t.top<e.top+e.height/2},_adjustFocalPointByAngle:function(t){var e=t*(Math.PI/180),i=this.focalPointState,s=i.offsetX,n=i.offsetY,a=s*Math.cos(e)-n*Math.sin(e),r=s*Math.sin(e)+n*Math.cos(e),o=this.getScaledImageDimensions().width/i.imageDimensions.width,l=a*o*this.zoomRatio,h=r*o*this.zoomRatio;this.focalPoint.left=this.image.left+l,this.focalPoint.top=this.image.top+h,i.offsetX=a,i.offsetY=r,this.storeFocalPointState(i)},_getZoomRatioToFitRectangle:function(t,e){for(var i,s,n=this._getRectangleVertices(t),a=0;a<n.length&&(i=n[a],this.arePointsInsideRectangle([i],e));a++)i=!1;if(i){var r=this._getEdgeCrossed(e,i),o=t.left+t.width/2,l=t.top+t.height/2,h=Math.abs((r[1].y-r[0].y)*i.x-(r[1].x-r[0].x)*i.y+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2)),d=Math.abs((r[1].y-r[0].y)*o-(r[1].x-r[0].x)*l+r[1].x*r[0].y-r[1].y*r[0].x)/Math.sqrt(Math.pow(r[1].y-r[0].y,2)+Math.pow(r[1].x-r[0].x,2));s=(h+d)/d}else s=1;return s},saveImage:function(t){var e=$(t.currentTarget);if(e.hasClass("disabled"))return!1;$(".btn",this.$buttons).addClass("disabled"),this.$buttons.append('<div class="spinner"></div>');var i={assetId:this.assetId,viewportRotation:this.viewportRotation,imageRotation:this.imageStraightenAngle,replace:e.hasClass("replace")?1:0};if(this.cropperState){var s={};s.height=this.cropperState.height,s.width=this.cropperState.width,s.offsetX=this.cropperState.offsetX,s.offsetY=this.cropperState.offsetY,i.imageDimensions=this.cropperState.imageDimensions,i.cropData=s}else i.imageDimensions=this.getScaledImageDimensions();this.focalPoint&&(i.focalPoint=this.focalPointState),i.flipData=this.flipData,i.zoom=this.zoomRatio,Craft.postActionRequest("assets/save-image",i,function(t){this.$buttons.find(".btn").removeClass("disabled").end().find(".spinner").remove(),t.error?alert(t.error):(this.onSave(),this.hide(),Craft.cp.runQueue())}.bind(this))},getZoomToCoverRatio:function(t){var e=Math.abs(this.imageStraightenAngle)*(Math.PI/180),i=Math.sin(e)*t.height+Math.cos(e)*t.width,s=Math.sin(e)*t.width+Math.cos(e)*t.height;return Math.max(i/t.width,s/t.height)},getZoomToFitRatio:function(t){var e=this._getImageBoundingBox(t),i=1;if(e.height>this.editorHeight||e.width>this.editorWidth){var s=this.editorHeight/e.height,n=this.editorWidth/e.width;i=Math.min(n,s)}return i},getCombinedZoomRatio:function(t){return this.getZoomToCoverRatio(t)/this.getZoomToFitRatio(t)},_showGrid:function(){if(!this.grid){var t,e={strokeWidth:1,stroke:"rgba(255,255,255,0.5)"},i=this.viewport.width,s=this.viewport.height,n=i/9,a=s/9,r=[new fabric.Rect({strokeWidth:2,stroke:"rgba(255,255,255,1)",originX:"center",originY:"center",width:i,height:s,left:i/2,top:s/2,fill:"rgba(255,255,255,0)"})];for(t=1;t<=8;t++)r.push(new fabric.Line([t*n,0,t*n,s],e));for(t=1;t<=8;t++)r.push(new fabric.Line([0,t*a,i,t*a],e));this.grid=new fabric.Group(r,{left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",angle:this.viewport.angle}),this.canvas.add(this.grid),this.renderImage()}},_hideGrid:function(){this.canvas.remove(this.grid),this.grid=null,this.renderImage()},onFadeOut:function(){this.removeListener(this.$croppingCanvas,"mousemove",this._handleMouseMove.bind(this)),this.removeListener(this.$croppingCanvas,"mousedown",this._handleMouseDown.bind(this)),this.removeListener(this.$croppingCanvas,"mouseup",this._handleMouseUp.bind(this)),this.removeListener(this.$croppingCanvas,"mouseout",function(t){this._handleMouseUp(t),this._handleMouseMove(t)}.bind(this)),this.destroy()},show:function(){this.base(),$("html").addClass("noscroll")},hide:function(){this.removeAllListeners(),this.straighteningInput.removeAllListeners(),$("html").removeClass("noscroll"),this.base()},onSave:function(){this.settings.onSave(),this.trigger("save")},enableSlider:function(){this.$imageTools.removeClass("hidden")},disableSlider:function(){this.$imageTools.addClass("hidden")},enableCropMode:function(){var t=this.getScaledImageDimensions();this.zoomRatio=this.getZoomToFitRatio(t);var e={width:this.editorWidth,height:this.editorHeight},i={width:t.width*this.zoomRatio,height:t.height*this.zoomRatio,left:this.editorWidth/2,top:this.editorHeight/2},s=function(){this._setFittedImageVerticeCoordinates();var t=this.cropperState,e=this.getScaledImageDimensions(),i=e.width/t.imageDimensions.width,s={left:this.image.left+t.offsetX*i*this.zoomRatio,top:this.image.top+t.offsetY*i*this.zoomRatio,width:t.width*i*this.zoomRatio,height:t.height*i*this.zoomRatio};this._showCropper(s),this.focalPoint&&(i=e.width/this.focalPointState.imageDimensions.width,this.focalPoint.left=this.image.left+this.focalPointState.offsetX*i*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*i*this.zoomRatio,this.canvas.add(this.focalPoint))}.bind(this);this._editorModeTransition(s,i,e)},disableCropMode:function(){var t={},e={left:this.editorWidth/2,top:this.editorHeight/2};this._hideCropper();var i=this.getZoomToCoverRatio(this.getScaledImageDimensions())*this.scaleFactor,s=i/this.zoomRatio;this.zoomRatio=i;var n=(this.clipper.left-this.image.left)*s,a=(this.clipper.top-this.image.top)*s;e.left=this.editorWidth/2-n,e.top=this.editorHeight/2-a,t.height=this.clipper.height*s,t.width=this.clipper.width*s,this.focalPoint&&(!this.focalPoint||this._isCenterInside(this.focalPoint,this.clipper))||(this.focalPoint&&this.toggleFocalPoint(),this._resetFocalPointPosition());var r=function(){if(this.focalPoint){var t=this.getScaledImageDimensions().width/this.focalPointState.imageDimensions.width;this.focalPoint.left=this.image.left+this.focalPointState.offsetX*t*this.zoomRatio,this.focalPoint.top=this.image.top+this.focalPointState.offsetY*t*this.zoomRatio,this.canvas.add(this.focalPoint)}}.bind(this);this._editorModeTransition(r,e,t)},_editorModeTransition:function(t,e,i){this.animationInProgress||(this.animationInProgress=!0,this.focalPoint&&(this.canvas.remove(this.focalPoint),this.renderImage()),this.image.animate(e,{onChange:this.canvas.renderAll.bind(this.canvas),duration:this.settings.animationDuration,onComplete:function(){t(),this.animationInProgress=!1,this.renderImage()}.bind(this)}),this.viewport.animate(i,{duration:this.settings.animationDuration}))},_showSpinner:function(){this.$spinnerCanvas=$('<canvas id="spinner-canvas"></canvas>').appendTo($(".image",this.$container));var i=document.getElementById("spinner-canvas").getContext("2d"),s=new Date,n=i.canvas.width,a=i.canvas.height;this.spinnerInterval=window.setInterval(function(){var t=parseInt((new Date-s)/1e3*16)/16;i.save(),i.clearRect(0,0,n,a),i.translate(n/2,a/2),i.rotate(2*Math.PI*t);for(var e=0;e<16;e++)i.beginPath(),i.rotate(2*Math.PI/16),i.moveTo(n/10,0),i.lineTo(n/4,0),i.lineWidth=n/30,i.strokeStyle="rgba(255,255,255,"+e/16+")",i.stroke();i.restore()},1e3/30)},_hideSpinner:function(){window.clearInterval(this.spinnerInterval),this.$spinnerCanvas.remove(),this.$spinnerCanvas=null},_showCropper:function(t){this._setupCropperLayer(t),this._redrawCropperElements(),this.renderCropper()},_hideCropper:function(){this.clipper&&(this.croppingCanvas.remove(this.clipper),this.croppingCanvas.remove(this.croppingShade),this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle),this.croppingCanvas=null,this.renderCropper=null)},_setupCropperLayer:function(t){this.croppingCanvas=new fabric.StaticCanvas("cropping-canvas",{backgroundColor:"rgba(0,0,0,0)",hoverCursor:"default",selection:!1}),this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight}),this.renderCropper=function(){Garnish.requestAnimationFrame(this.croppingCanvas.renderAll.bind(this.croppingCanvas))}.bind(this),$("#cropping-canvas",this.$editorContainer).css({position:"absolute",top:0,left:0}),this.croppingShade=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:this.editorWidth,height:this.editorHeight,fill:"rgba(0,0,0,0.7)"});var e=this.getScaledImageDimensions(),i=0===this.imageStraightenAngle?1:1.2*this.getCombinedZoomRatio(e),s=e.width/i,n=e.height/i;if(this.hasOrientationChanged()){var a=n;n=s,s=a}this.clipper=new fabric.Rect({left:this.editorWidth/2,top:this.editorHeight/2,originX:"center",originY:"center",width:s,height:n,stroke:"black",fill:"rgba(128,0,0,1)",strokeWidth:0}),t&&this.clipper.set(t),this.clipper.globalCompositeOperation="destination-out",this.croppingCanvas.add(this.croppingShade),this.croppingCanvas.add(this.clipper)},_redrawCropperElements:function(){this.cropperHandles&&(this.croppingCanvas.remove(this.cropperHandles),this.croppingCanvas.remove(this.cropperGrid),this.croppingCanvas.remove(this.croppingRectangle));var t={strokeWidth:4,stroke:"rgb(255,255,255)",fill:!1},e={strokeWidth:2,stroke:"rgba(255,255,255,0.5)"},i=[new fabric.Path("M 0,10 L 0,0 L 10,0",t),new fabric.Path("M "+(this.clipper.width-8)+",0 L "+(this.clipper.width+4)+",0 L "+(this.clipper.width+4)+",10",t),new fabric.Path("M "+(this.clipper.width+4)+","+(this.clipper.height-8)+" L"+(this.clipper.width+4)+","+(this.clipper.height+4)+" L "+(this.clipper.width-8)+","+(this.clipper.height+4),t),new fabric.Path("M 10,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height+4)+" L 0,"+(this.clipper.height-8),t)];this.cropperHandles=new fabric.Group(i,{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingRectangle=new fabric.Rect({left:this.clipper.left,top:this.clipper.top,width:this.clipper.width,height:this.clipper.height,fill:"rgba(0,0,0,0)",stroke:"rgba(255,255,255,0.8)",strokeWidth:2,originX:"center",originY:"center"}),this.cropperGrid=new fabric.Group([new fabric.Line([.33*this.clipper.width,0,.33*this.clipper.width,this.clipper.height],e),new fabric.Line([.66*this.clipper.width,0,.66*this.clipper.width,this.clipper.height],e),new fabric.Line([0,.33*this.clipper.height,this.clipper.width,.33*this.clipper.height],e),new fabric.Line([0,.66*this.clipper.height,this.clipper.width,.66*this.clipper.height],e)],{left:this.clipper.left,top:this.clipper.top,originX:"center",originY:"center"}),this.croppingCanvas.add(this.cropperHandles),this.croppingCanvas.add(this.cropperGrid),this.croppingCanvas.add(this.croppingRectangle)},_repositionCropper:function(t){if(this.croppingCanvas){var e=this.clipper.left-this.croppingCanvas.width/2,i=this.clipper.top-this.croppingCanvas.height/2;this.croppingCanvas.setDimensions({width:this.editorWidth,height:this.editorHeight});var s=this._getBoundingRectangle(this.imageVerticeCoords).width/t.width;this.clipper.width=Math.round(this.clipper.width*s),this.clipper.height=Math.round(this.clipper.height*s),this.clipper.left=this.editorWidth/2+e*s,this.clipper.top=this.editorHeight/2+i*s,this.croppingShade.set({width:this.editorWidth,height:this.editorHeight,left:this.editorWidth/2,top:this.editorHeight/2}),this._redrawCropperElements(),this.renderCropper()}},_getBoundingRectangle:function(t){return{width:Math.max(t.a.x,t.b.x,t.c.x,t.d.x)-Math.min(t.a.x,t.b.x,t.c.x,t.d.x),height:Math.max(t.a.y,t.b.y,t.c.y,t.d.y)-Math.min(t.a.y,t.b.y,t.c.y,t.d.y)}},_handleMouseDown:function(t){var e=this.focalPoint&&this._isMouseOver(t,this.focalPoint),i=this.croppingCanvas&&this._isMouseOver(t,this.clipper),s=this.croppingCanvas&&this._cropperHandleHitTest(t);(s||i||e)&&(this.previousMouseX=t.pageX,this.previousMouseY=t.pageY,e?this.draggingFocal=!0:s?this.scalingCropper=s:i&&(this.draggingCropper=!0))},_handleMouseMove:function(t){this.focalPoint&&this.draggingFocal?(this._handleFocalDrag(t),this.storeFocalPointState(),this.renderImage()):this.draggingCropper||this.scalingCropper?(this.draggingCropper?this._handleCropperDrag(t):this._handleCropperResize(t),this._redrawCropperElements(),this.storeCropperState(),this.renderCropper()):this._setMouseCursor(t),this.previousMouseX=t.pageX,this.previousMouseY=t.pageY},_handleMouseUp:function(t){this.draggingCropper=!1,this.scalingCropper=!1,this.draggingFocal=!1},_handleCropperDrag:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0!=e||0!=i){var s={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height},n=this._getRectangleVertices(s,e,i);this.arePointsInsideRectangle(n,this.imageVerticeCoords)&&this.clipper.set({left:this.clipper.left+e,top:this.clipper.top+i})}},_handleFocalDrag:function(t){if(this.focalPoint){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY;if(0==e&&0==i)return;var s=this.focalPoint.left+e,n=this.focalPoint.top+i;if("crop"===this.currentView){if(!this.arePointsInsideRectangle([{x:s,y:n}],this.imageVerticeCoords))return}else if(!(this.viewport.left-this.viewport.width/2-s<0&&0<this.viewport.left+this.viewport.width/2-s&&this.viewport.top-this.viewport.height/2-n<0&&0<this.viewport.top+this.viewport.height/2-n))return;this.focalPoint.set({left:this.focalPoint.left+e,top:this.focalPoint.top+i})}},setCroppingConstraint:function(t){switch(this.updateSizeAndPosition(),t){case"none":t=!1;break;case"original":t=this.originalWidth/this.originalHeight;break;case"current":t=this.clipper.width/this.clipper.height;break;default:t=parseFloat(t)}this.croppingConstraint=t},enforceCroppingConstraint:function(){if(!this.animationInProgress&&this.croppingConstraint){this.animationInProgress=!0;var t={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.clipper.width>this.clipper.height*this.croppingConstraint){var e=t.height;t.height=this.clipper.width/this.croppingConstraint,t.top-=(t.height-e)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.width=this.clipper.height*this.croppingConstraint,t.height=t.width/this.croppingConstraint)}else{var i=t.width;t.width=this.clipper.height*this.croppingConstraint,t.left-=(t.width-i)/2,this.arePointsInsideRectangle(this._getRectangleVertices(t),this.imageVerticeCoords)||(t.height=this.clipper.width/this.croppingConstraint,t.width=t.height*this.croppingConstraint)}var s={height:t.height,width:t.width};this.clipper.animate(s,{onChange:function(){this._redrawCropperElements(),this.croppingCanvas.renderAll()}.bind(this),duration:this.settings.animationDuration,onComplete:function(){this._redrawCropperElements(),this.animationInProgress=!1,this.renderCropper()}.bind(this)})}},_handleCropperResize:function(t){var e=t.pageX-this.previousMouseX,i=t.pageY-this.previousMouseY,s=0,n=0;if("b"!==this.scalingCropper&&"t"!==this.scalingCropper||(e=0),"l"!==this.scalingCropper&&"r"!==this.scalingCropper||(i=0),0!==e||0!==i){var a={left:this.clipper.left-this.clipper.width/2,top:this.clipper.top-this.clipper.height/2,width:this.clipper.width,height:this.clipper.height};if(this.croppingConstraint){var r=0;switch(this.scalingCropper){case"t":r=-i;break;case"b":r=i;break;case"r":r=e;break;case"l":r=-e;break;case"tr":r=-i+e;break;case"tl":r=-i-e;break;case"br":r=i+e;break;case"bl":r=i-e}1<this.croppingConstraint?i=(e=r)/this.croppingConstraint:e=(i=r)*this.croppingConstraint,a.height+=i,a.width+=e,this.scalingCropper.match(/t/)&&(a.top-=i,a.left-=e/2,s=-i/2),this.scalingCropper.match(/b/)&&(a.left+=-e/2,s=i/2),this.scalingCropper.match(/r/)&&(a.top+=-i/2,n=e/2),this.scalingCropper.match(/l/)&&(a.top-=i/2,a.left-=e,n=-e/2)}else{if(this.shiftKeyHeld&&("tl"===this.scalingCropper||"tr"===this.scalingCropper||"bl"===this.scalingCropper||"br"===this.scalingCropper))Math.abs(e)>Math.abs(i)?(i=e/(this.clipper.width/this.clipper.height),i*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1):(e=i*(this.clipper.width/this.clipper.height),e*="tr"===this.scalingCropper||"bl"===this.scalingCropper?-1:1);this.scalingCropper.match(/t/)&&(a.top+=i,a.height-=i),this.scalingCropper.match(/b/)&&(a.height+=i),this.scalingCropper.match(/r/)&&(a.width+=e),this.scalingCropper.match(/l/)&&(a.left+=e,a.width-=e),s=i/2,n=e/2}a.height<30||a.width<30||this.arePointsInsideRectangle(this._getRectangleVertices(a),this.imageVerticeCoords)&&(this.clipper.set({top:this.clipper.top+s,left:this.clipper.left+n,width:a.width,height:a.height}),this._redrawCropperElements())}},_setMouseCursor:function(t){var e="default",i=this.croppingCanvas&&this._cropperHandleHitTest(t);this.focalPoint&&this._isMouseOver(t,this.focalPoint)?e="pointer":i?"t"===i||"b"===i?e="ns-resize":"l"===i||"r"===i?e="ew-resize":"tl"===i||"br"===i?e="nwse-resize":"bl"!==i&&"tr"!==i||(e="nesw-resize"):this.croppingCanvas&&this._isMouseOver(t,this.clipper)&&(e="move"),$(".body").css("cursor",e)},_cropperHandleHitTest:function(t){var e=this.$croppingCanvas.offset(),i=t.pageX-e.left,s=t.pageY-e.top,n=this.clipper.left-this.clipper.width/2,a=n+this.clipper.width,r=this.clipper.top-this.clipper.height/2,o=r+this.clipper.height;if(i<10+n&&n-3<i){if(s<10+r&&r-3<s)return"tl";if(s<o+3&&o-10<s)return"bl"}if(a-13<i&&i<a+3){if(s<10+r&&r-3<s)return"tr";if(s<o+2&&o-10<s)return"br"}return i<3+n&&n-3<i&&s<o-10&&10+r<s?"l":i<a+1&&a-5<i&&s<o-10&&10+r<s?"r":s<4+r&&r-2<s&&10+n<i&&i<a-10?"t":s<o+2&&o-4<s&&10+n<i&&i<a-10&&"b"},_isMouseOver:function(t,e){var i=this.$croppingCanvas.offset(),s=t.pageX-i.left,n=t.pageY-i.top,a=e.left-e.width/2,r=a+e.width,o=e.top-e.height/2,l=o+e.height;return a<=s&&s<=r&&o<=n&&n<=l},_getRectangleVertices:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var s={x:t.left+e,y:t.top+i},n={x:s.x+t.width,y:s.y},a={x:n.x,y:n.y+t.height};return[s,n,a,{x:s.x,y:a.y}]},_setFittedImageVerticeCoordinates:function(){this.imageVerticeCoords=this.getImageVerticeCoords("fit")},getImageVerticeCoords:function(t){var e,i=-1*((this.hasOrientationChanged()?90:0)+this.imageStraightenAngle)*(Math.PI/180),s=this.getScaledImageDimensions();e="number"==typeof t?t:"cover"===t?this.getZoomToCoverRatio(s):this.getZoomToFitRatio(s);var n=s.height*e,a=s.width*e,r=Math.cos(i)*n,o=Math.sin(i)*a,l=Math.cos(i)*a,h=Math.sin(i)*n,d=(this.editorHeight-(r+o))/2,c=(this.editorWidth-(h+l))/2;return{a:{x:c+l,y:d},b:{x:this.editorWidth-c,y:d+r},c:{x:c+h,y:this.editorHeight-d},d:{x:c,y:d+o}}},_debug:function(t){this.canvas.remove(this.debugger),this.debugger=t,this.canvas.add(this.debugger)},arePointsInsideRectangle:function(t,e){for(var i=this._getVector(e.a,e.b),s=this._getVector(e.b,e.c),n=this._getScalarProduct(i,i),a=this._getScalarProduct(s,s),r=0;r<t.length;r++){var o=t[r],l=this._getVector(e.a,o),h=this._getVector(e.b,o),d=this._getScalarProduct(i,l),c=this._getScalarProduct(s,h);if(!(0<=d&&d<=n)||!(0<=c&&c<=a))return!1}return!0},_getVector:function(t,e){return{x:e.x-t.x,y:e.y-t.y}},_getScalarProduct:function(t,e){return t.x*e.x+t.y*e.y},_getVectorMagnitude:function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},_getAngleBetweenVectors:function(t,e){return Math.round(180*Math.acos(Math.min(1,this._getScalarProduct(t,e)/(this._getVectorMagnitude(t)*this._getVectorMagnitude(e))))/Math.PI*100)/100},_getEdgeCrossed:function(t,e){for(var i=[[t.a,t.b],[t.b,t.c],[t.c,t.d],[t.d,t.a]],s={x:this.editorWidth/2,y:this.editorHeight/2},n=180,a=null,r=0;r<i.length;r++){var o=i[r],l=this._getVector(o[0],s),h=this._getVector(o[0],o[1]),d=this._getVector(o[0],e),c=Math.abs(this._getAngleBetweenVectors(l,d)-(this._getAngleBetweenVectors(l,h)+this._getAngleBetweenVectors(h,d)));c<n&&(n=c,a=o)}return a},_getImageBoundingBox:function(t){var e={},i=Math.abs(this.imageStraightenAngle)*(Math.PI/180),s=t.height/t.width;if(e.height=t.width*(Math.sin(i)+Math.cos(i)*s),e.width=t.width*(Math.cos(i)+Math.sin(i)*s),this.hasOrientationChanged()){var n=e.width;e.width=e.height,e.height=n}return e}},{defaults:{animationDuration:100,allowSavingAsNew:!0,onSave:$.noop,allowDegreeFractions:!0}}),Craft.AssetIndex=Craft.BaseElementIndex.extend({$includeSubfoldersContainer:null,$includeSubfoldersCheckbox:null,showingIncludeSubfoldersCheckbox:!1,$uploadButton:null,$uploadInput:null,$progressBar:null,$folders:null,uploader:null,promptHandler:null,progressBar:null,_uploadTotalFiles:0,_uploadFileProgress:{},_uploadedAssetIds:[],_currentUploaderSettings:{},_assetDrag:null,_folderDrag:null,_expandDropTargetFolderTimeout:null,_tempExpandedFolders:[],_fileConflictTemplate:{choices:[{value:"keepBoth",title:Craft.t("app","Keep both")},{value:"replace",title:Craft.t("app","Replace it")}]},_folderConflictTemplate:{choices:[{value:"replace",title:Craft.t("app","Replace the folder (all existing files will be deleted)")},{value:"merge",title:Craft.t("app","Merge the folder (any conflicting files will be replaced)")}]},init:function(t,e,i){this.base(t,e,i),"index"===this.settings.context?(this._folderDrag||this._initIndexPageMode(),this.addListener(Garnish.$win,"resize,scroll","_positionProgressBar")):(this.addListener(this.$main,"scroll","_positionProgressBar"),this.settings.modal&&this.settings.modal.on("updateSizeAndPosition",$.proxy(this,"_positionProgressBar")))},initSources:function(){return"index"!==this.settings.context||this._folderDrag||this._initIndexPageMode(),this.base()},initSource:function(t){this.base(t),this._createFolderContextMenu(t),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&t.data("folder-id")&&this._folderDrag.addItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},deinitSource:function(t){this.base(t);var e=t.data("contextmenu");e&&e.destroy(),"index"===this.settings.context&&(this._folderDrag&&1<this._getSourceLevel(t)&&this._folderDrag.removeItems(t.parent()),this._assetDrag&&this._assetDrag.updateDropTargets())},_getSourceLevel:function(t){return t.parentsUntil("nav","ul").length},_initIndexPageMode:function(){if(!this._folderDrag){this.settings.selectable=!0,this.settings.multiSelect=!0;var t=$.proxy(this,"_onDragStart"),e=$.proxy(this,"_onDropTargetChange");this._assetDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){return this.view.getSelectedElements()},this),helper:$.proxy(function(t){return this._getFileDragHelper(t)},this),dropTargets:$.proxy(function(){for(var t=[],e=0;e<this.$sources.length;e++){var i=this.$sources.eq(e);this._getFolderUidFromSourceKey(i.data("key"))&&t.push(i)}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFileDragStop")}),this._folderDrag=new Garnish.DragDrop({activeDropTargetClass:"sel",helperOpacity:.75,filter:$.proxy(function(){for(var t=this.sourceSelect.getSelectedItems(),e=[],i=0;i<t.length;i++){var s=t.eq(i);!this._getFolderUidFromSourceKey(s.data("key"))||s.hasClass("sel")&&1<this._getSourceLevel(s)&&e.push(s.parent()[0])}return $(e)},this),helper:$.proxy(function(t){var e=$('<div class="sidebar" style="padding-top: 0; padding-bottom: 0;"/>'),i=$("<nav/>").appendTo(e),s=$("<ul/>").appendTo(i);return t.appendTo(s).removeClass("expanded"),t.children("a").addClass("sel"),t.css({"padding-top":this._folderDrag.$draggee.css("padding-top"),"padding-right":this._folderDrag.$draggee.css("padding-right"),"padding-bottom":this._folderDrag.$draggee.css("padding-bottom"),"padding-left":this._folderDrag.$draggee.css("padding-left")}),e},this),dropTargets:$.proxy(function(){var t=[],e=[];this._folderDrag.$draggee.find("a[data-key]").each(function(){e.push($(this).data("key"))});for(var i=0;i<this.$sources.length;i++){var s=this.$sources.eq(i),n=s.data("key");this._getFolderUidFromSourceKey(n)&&(Craft.inArray(n,e)||t.push(s))}return t},this),onDragStart:t,onDropTargetChange:e,onDragStop:$.proxy(this,"_onFolderDragStop")})}},_onFileDragStop:function(){if(this._assetDrag.$activeDropTarget&&this._assetDrag.$activeDropTarget[0]!==this.$source[0]){for(var r=this.$source,o=this._assetDrag.$activeDropTarget.data("folder-id"),l=[],t=0;t<this._assetDrag.$draggee.length;t++){var e=Craft.getElementInfo(this._assetDrag.$draggee[t]).id;l.push(e)}if(l.length){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(l.length),this.progressBar.showProgressBar();var i=[];for(t=0;t<l.length;t++)i.push({action:"assets/move-asset",params:{assetId:l[t],folderId:o}});var h=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var i=t[e];i.conflict&&this.promptHandler.addPrompt({assetId:i.assetId,suggestedFilename:i.suggestedFilename,prompt:{message:i.conflict,choices:this._fileConflictTemplate.choices}}),i.error&&alert(i.error)}this.setIndexAvailable(),this.progressBar.hideProgressBar();function s(){this.sourceSelect.selectItem(r),this._totalVisible-=this._assetDrag.$draggee.length;for(var t=0;t<l.length;t++)$("[data-id="+l[t]+"]").remove();this.view.deselectAllElements(),this._collapseExtraExpandedFolders(o),n&&this.updateElements()}var n=!1;if(this.promptHandler.getPromptCount()){var a=$.proxy(function(t){for(var e=[],i=0;i<t.length;i++)"cancel"!==t[i].choice?("keepBoth"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,filename:t[i].suggestedFilename}}),"replace"===t[i].choice&&e.push({action:"assets/move-asset",params:{folderId:o,assetId:t[i].assetId,force:!0}})):n=!0;0===e.length?s.apply(this):(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,h))},this);this._assetDrag.fadeOutHelpers(),this.promptHandler.showBatchPrompts(a)}else s.apply(this),this._assetDrag.fadeOutHelpers()},this);return void this._performBatchRequests(i,h)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._assetDrag.returnHelpersToDraggees()},_onFolderDragStop:function(){if(this._folderDrag.$activeDropTarget&&0===this._folderDrag.$activeDropTarget.siblings("ul").children("li").filter(this._folderDrag.$draggee).length){var t=this._folderDrag.$activeDropTarget.data("folder-id");this._collapseExtraExpandedFolders(t);for(var a=[],e=0;e<this._folderDrag.$draggee.length;e++){var i=this._folderDrag.$draggee.eq(e).children("a").data("folder-id");if(i!=t){a.push(i);break}}if(a.length){a.sort(),a.reverse(),this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(a.length),this.progressBar.showProgressBar();var s=[];for(e=0;e<a.length;e++)s.push({action:"assets/move-folder",params:{folderId:a[e],parentId:t}});this.requestId++;var r=[],o="",l=function(t){this.promptHandler.resetPrompts();for(var e=0;e<t.length;e++){var n=t[e];n.success&&(n.transferList&&(r=n.transferList),n.newFolderId&&(o=this._folderDrag.$activeDropTarget.data("key")+"/folder:"+n.newFolderUid)),n.conflict&&(n.prompt={message:n.conflict,choices:this._folderConflictTemplate.choices},this.promptHandler.addPrompt(n)),n.error&&alert(n.error)}if(this.promptHandler.getPromptCount()){var i=$.proxy(function(t){this.promptHandler.resetPrompts();for(var e=[],i={},s=0;s<t.length;s++)"cancel"!==t[s].choice&&("replace"===t[s].choice&&(i.force=!0),"merge"===t[s].choice&&(i.merge=!0),i.folderId=n.folderId,i.parentId=n.parentId,e.push({action:"assets/move-folder",params:i}));0===e.length?$.proxy(this,"_performActualFolderMove",r,a,o)():(this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(this.promptHandler.getPromptCount()),this.progressBar.showProgressBar(),this._performBatchRequests(e,l))},this);this.promptHandler.showBatchPrompts(i),this.setIndexAvailable(),this.progressBar.hideProgressBar()}else $.proxy(this,"_performActualFolderMove",r,a,o)()}.bind(this);return void this._performBatchRequests(s,l)}}else this.$source.addClass("sel"),this._collapseExtraExpandedFolders();this._folderDrag.returnHelpersToDraggees()},_performActualFolderMove:function(t,e,n){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.progressBar.setItemCount(1),this.progressBar.showProgressBar();var i=function(t){for(var e=0,i=t.length,s=0;s<t.length;s++)Craft.postActionRequest("assets/delete-folder",{folderId:t[s]},function(){++e===i&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._folderDrag.returnHelpersToDraggees(),this.setInstanceState("selectedSource",n),this.refreshSources())}.bind(this))}.bind(this);if(0<t.length){for(var s=[],a=0;a<t.length;a++)s.push({action:"assets/move-asset",params:t[a]});this._performBatchRequests(s,function(){i(e)})}else i(e)},_getParentSource:function(t){if(1<this._getSourceLevel(t))return t.parent().parent().siblings("a")},_selectSourceByFolderId:function(t){for(var e=this._getSourceByKey(t),i=e.parent().parents("li"),s=0;s<i.length;s++){var n=$(i[s]);n.hasClass("expanded")||n.children(".toggle").trigger("click")}this.selectSource(e),this.updateElements()},afterInit:function(){this.$uploadButton||(this.$uploadButton=$('<div class="btn submit" data-icon="upload" style="position: relative; overflow: hidden;" role="button">'+Craft.t("app","Upload files")+"</div>"),this.addButton(this.$uploadButton),this.$uploadInput=$('<input type="file" multiple="multiple" name="assets-upload" />').hide().insertBefore(this.$uploadButton)),this.promptHandler=new Craft.PromptHandler,this.progressBar=new Craft.ProgressBar(this.$main,!0);var t={url:Craft.getActionUrl("assets/save-asset"),fileInput:this.$uploadInput,dropZone:this.$container};t.events={fileuploadstart:$.proxy(this,"_onUploadStart"),fileuploadprogressall:$.proxy(this,"_onUploadProgress"),fileuploaddone:$.proxy(this,"_onUploadComplete")},this.settings.criteria&&void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),this._currentUploaderSettings=t,this.uploader=new Craft.Uploader(this.$uploadButton,t),this.$uploadButton.on("click",$.proxy(function(){this.$uploadButton.hasClass("disabled")||this.isIndexBusy||this.$uploadButton.parent().find("input[name=assets-upload]").trigger("click")},this)),this.base()},onSelectSource:function(){this._getSourceByKey(this.sourceKey).data("folder-id")&&this.$source.attr("data-upload")?(this.uploader.setParams({folderId:this.$source.attr("data-folder-id")}),this.$uploadButton.removeClass("disabled")):this.$uploadButton.addClass("disabled"),this.base()},_getFolderUidFromSourceKey:function(t){var e=t.match(/\bfolder:([0-9a-f\-]+)$/);return e?e[1]:null},startSearching:function(){if(this.$source.siblings("ul").length){if(null===this.$includeSubfoldersContainer){var t="includeSubfolders-"+Math.floor(1e9*Math.random());this.$includeSubfoldersContainer=$('<div style="margin-bottom: -23px; opacity: 0;"/>').insertAfter(this.$search);var e=$('<div style="padding-top: 5px;"/>').appendTo(this.$includeSubfoldersContainer);this.$includeSubfoldersCheckbox=$('<input type="checkbox" id="'+t+'" class="checkbox"/>').appendTo(e),$('<label class="light smalltext" for="'+t+'"/>').text(" "+Craft.t("app","Search in subfolders")).appendTo(e),this.addListener(this.$includeSubfoldersCheckbox,"change",function(){this.setSelecetedSourceState("includeSubfolders",this.$includeSubfoldersCheckbox.prop("checked")),this.updateElements()})}else this.$includeSubfoldersContainer.velocity("stop");var i=this.getSelectedSourceState("includeSubfolders",!1);this.$includeSubfoldersCheckbox.prop("checked",i),this.$includeSubfoldersContainer.velocity({marginBottom:0,opacity:1},"fast"),this.showingIncludeSubfoldersCheckbox=!0}this.base()},stopSearching:function(){this.showingIncludeSubfoldersCheckbox&&(this.$includeSubfoldersContainer.velocity("stop"),this.$includeSubfoldersContainer.velocity({marginBottom:-23,opacity:0},"fast"),this.showingIncludeSubfoldersCheckbox=!1),this.base()},getViewParams:function(){var t=this.base();return this.showingIncludeSubfoldersCheckbox&&this.$includeSubfoldersCheckbox.prop("checked")&&(t.criteria.includeSubfolders=!0),t},_onUploadStart:function(){this.setIndexBusy(),this._positionProgressBar(),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar(),this.promptHandler.resetPrompts()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){var i=e.result,s=e.files[0].name,n=!0;i.success||i.conflict?(this._uploadedAssetIds.push(i.assetId),i.conflict&&(i.prompt={message:Craft.t("app",i.conflict,{file:i.filename}),choices:this._fileConflictTemplate.choices},this.promptHandler.addPrompt(i)),Craft.cp.runQueue()):(i.error?alert(Craft.t("app","Upload failed. The error message was: “{error}”",{error:i.error})):alert(Craft.t("app","Upload failed for {filename}.",{filename:s})),n=!1),this.uploader.isLastUpload()&&(this.setIndexAvailable(),this.progressBar.hideProgressBar(),this.promptHandler.getPromptCount()?this.promptHandler.showBatchPrompts($.proxy(this,"_uploadFollowup")):n&&this._updateAfterUpload())},_updateAfterUpload:function(){"index"!==this.settings.context&&(this.setSortAttribute("dateModified"),this.setSortDirection("desc")),this.updateElements()},_uploadFollowup:function(t){this.setIndexBusy(),this.progressBar.resetProgressBar(),this.promptHandler.resetPrompts();var e=function(){this.setIndexAvailable(),this.progressBar.hideProgressBar(),this._updateAfterUpload()}.bind(this);this.progressBar.setItemCount(t.length);var r=function(i,s,n){var t={},e=null,a=function(t,e){"success"===e&&t.assetId?this._uploadedAssetIds.push(t.assetId):t.error&&alert(t.error),s++,this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),s===i.length?n():r(i,s,n)}.bind(this);"replace"===i[s].choice?(e="assets/replace-file",t.sourceAssetId=i[s].assetId,i[s].conflictingAssetId?t.assetId=i[s].conflictingAssetId:t.targetFilename=i[s].filename):"cancel"===i[s].choice&&(e="assets/delete-asset",t.assetId=i[s].assetId),e?Craft.postActionRequest(e,t,a):a({assetId:i[s].assetId},"success")}.bind(this);this.progressBar.showProgressBar(),r(t,0,e)},onUpdateElements:function(){this._onUpdateElements(!1,this.view.getAllElements()),this.view.on("appendElements",$.proxy(function(t){this._onUpdateElements(!0,t.newElements)},this)),this.base()},_onUpdateElements:function(t,e){if("index"===this.settings.context&&(t||this._assetDrag.removeAllItems(),this._assetDrag.addItems(e)),this._uploadedAssetIds.length){if(this.view.settings.selectable)for(var i=0;i<this._uploadedAssetIds.length;i++)this.view.selectElementById(this._uploadedAssetIds[i]);this._uploadedAssetIds=[]}this.base(t,e),this.removeListener(this.$elements,"keydown"),this.addListener(this.$elements,"keydown",this._onKeyDown.bind(this)),this.view.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.view.elementSelect.$focusedItem.find(".element");e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item).find(".element");Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.view.elementSelect,e)},_onDragStart:function(){this._tempExpandedFolders=[]},_getFileDragHelper:function(t){var e,i;switch(this.getSelectedSourceState("mode")){case"table":e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e);var s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.view.$table.children("tbody").children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove(),e.css("margin-"+Craft.left,19);else{var l=$(this._$firstRowCells[r]),h=l.width();l.width(h),o.width(h)}}return e;case"thumbs":return e=$('<div class="elements thumbviewhelper"/>').appendTo(Garnish.$bod),i=$('<ul class="thumbsview"/>').appendTo(e),t.appendTo(i),e}return $()},_onDropTargetChange:function(t){if(clearTimeout(this._expandDropTargetFolderTimeout),t){var e=t.data("folder-id");e?(this.dropTargetFolder=this._getSourceByKey(e),this._hasSubfolders(this.dropTargetFolder)&&!this._isExpanded(this.dropTargetFolder)&&(this._expandDropTargetFolderTimeout=setTimeout($.proxy(this,"_expandFolder"),500))):this.dropTargetFolder=null}t&&t[0]!==this.$source[0]?this.$source.removeClass("sel"):this.$source.addClass("sel")},_collapseExtraExpandedFolders:function(t){var e;clearTimeout(this._expandDropTargetFolderTimeout),t&&(e=this._getSourceByKey(t).parents("li").children("a"));for(var i=this._tempExpandedFolders.length-1;0<=i;i--){var s=this._tempExpandedFolders[i];void 0!==e&&0!==e.filter('[data-key="'+s.data("key")+'"]').length||(this._collapseFolder(s),this._tempExpandedFolders.splice(i,1))}},_getSourceByKey:function(t){return this.$sources.filter('[data-key$="'+t+'"]')},_hasSubfolders:function(t){return t.siblings("ul").find("li").length},_isExpanded:function(t){return t.parent("li").hasClass("expanded")},_expandFolder:function(){this._collapseExtraExpandedFolders(this.dropTargetFolder.data("folder-id")),this.dropTargetFolder.siblings(".toggle").trigger("click"),this._tempExpandedFolders.push(this.dropTargetFolder)},_collapseFolder:function(t){t.parent().hasClass("expanded")&&t.siblings(".toggle").trigger("click")},_createFolderContextMenu:function(t){if(this._getFolderUidFromSourceKey(t.data("key"))){var e=[{label:Craft.t("app","New subfolder"),onClick:$.proxy(this,"_createSubfolder",t)}];"index"===this.settings.context&&1<this._getSourceLevel(t)&&(e.push({label:Craft.t("app","Rename folder"),onClick:$.proxy(this,"_renameFolder",t)}),e.push({label:Craft.t("app","Delete folder"),onClick:$.proxy(this,"_deleteFolder",t)})),new Garnish.ContextMenu(t,e,{menuClass:"menu"})}},_createSubfolder:function(n){var t=prompt(Craft.t("app","Enter the name of the folder"));if(t){var e={parentId:n.data("folder-id"),folderName:t};this.setIndexBusy(),Craft.postActionRequest("assets/create-folder",e,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){this._prepareParentForChildren(n);var i=$('<li><a data-key="'+n.data("key")+"/folder:"+t.folderUid+'"'+(Garnish.hasAttr(n,"data-has-thumbs")?" data-has-thumbs":"")+' data-upload="'+n.attr("data-upload")+'" data-folder-id="'+t.folderId+'">'+t.folderName+"</a></li>"),s=i.children("a:first");this._appendSubfolder(n,i),this.initSource(s)}"success"===e&&t.error&&alert(t.error)},this))}},_deleteFolder:function(s){if(confirm(Craft.t("app","Really delete folder “{folder}”?",{folder:$.trim(s.text())}))){var t={folderId:s.data("folder-id")};this.setIndexBusy(),Craft.postActionRequest("assets/delete-folder",t,$.proxy(function(t,e){if(this.setIndexAvailable(),"success"===e&&t.success){var i=this._getParentSource(s);this.deinitSource(s),s.parent().remove(),this._cleanUpTree(i)}"success"===e&&t.error&&alert(t.error)},this))}},_renameFolder:function(i){var t=$.trim(i.text()),e=prompt(Craft.t("app","Rename folder"),t);if(e&&e!==t){var s={folderId:i.data("folder-id"),newName:e};this.setIndexBusy(),Craft.postActionRequest("assets/rename-folder",s,$.proxy(function(t,e){this.setIndexAvailable(),"success"===e&&t.success&&(i.text(t.newName),this._getFolderUidFromSourceKey(this.sourceSelect.$selectedItems.data("key"))===this._getFolderUidFromSourceKey(i.data("key"))&&this.updateElements()),"success"===e&&t.error&&alert(t.error)},this),"json")}},_prepareParentForChildren:function(t){this._hasSubfolders(t)||(t.parent().addClass("expanded").append('<div class="toggle"></div><ul></ul>'),this.initSourceToggle(t))},_appendSubfolder:function(t,e){for(var i=t.siblings("ul").children("li"),s=$.trim(e.children("a:first").text()),n=!1,a=0;a<i.length;a++){var r=$(i[a]);if($.trim(r.children("a:first").text())>s){r.before(e),n=!0;break}}n||t.siblings("ul").append(e)},_cleanUpTree:function(t){null!==t&&0===t.siblings("ul").children("li").length&&(this.deinitSourceToggle(t),t.siblings("ul").remove(),t.siblings(".toggle").remove(),t.parent().removeClass("expanded"))},_positionProgressBar:function(){this.progressBar||(this.progressBar=new Craft.ProgressBar(this.$main,!0));var t=$(),e=0,i=0,s=(e="index"===this.settings.context?(t=this.progressBar.$progressBar.closest("#content"),Garnish.$win.scrollTop()):(t=this.progressBar.$progressBar.closest(".main"),this.$main.scrollTop()))-t.offset().top,n=Garnish.$win.height();i=t.height()>n?n/2-6+s:t.height()/2-6,"index"!==this.settings.context&&(i=e+(t.height()/2-6)),this.progressBar.$progressBar.css({top:i})},_performBatchRequests:function(i,s){for(var n=[],t=function(t){Craft.postActionRequest(t.action,t.params,function(t,e){this.progressBar.incrementProcessedItemCount(1),this.progressBar.updateProgressBar(),"success"===e&&(n.push(t),Craft.cp.runQueue()),n.length>=i.length&&s(n)}.bind(this))}.bind(this),e=0;e<i.length;e++)t(i[e])}}),Craft.registerElementIndexClass("craft\\elements\\Asset",Craft.AssetIndex),Craft.AssetSelectInput=Craft.BaseElementSelectInput.extend({requestId:0,hud:null,uploader:null,progressBar:null,originalFilename:"",originalExtension:"",init:function(){0<arguments.length&&"object"==typeof arguments[0]&&(arguments[0].editorSettings={onShowHud:$.proxy(this.resetOriginalFilename,this),onCreateForm:$.proxy(this._renameHelper,this),validators:[$.proxy(this.validateElementForm,this)]}),this.base.apply(this,arguments),this._attachUploader(),this.addListener(this.$elementsContainer,"keydown",this._onKeyDown.bind(this)),this.elementSelect.on("focusItem",this._onElementFocus.bind(this))},_onKeyDown:function(t){if(t.keyCode===Garnish.SPACE_KEY&&t.shiftKey){if(Craft.PreviewFileModal.openInstance)Craft.PreviewFileModal.openInstance.selfDestruct();else{var e=this.elementSelect.$focusedItem;e.length&&this._loadPreview(e)}return t.stopPropagation(),!1}},_onElementFocus:function(t){var e=$(t.item);Craft.PreviewFileModal.openInstance&&e.length&&this._loadPreview(e)},_loadPreview:function(t){var e={};t.data("image-width")&&(e.startingWidth=t.data("image-width"),e.startingHeight=t.data("image-height")),new Craft.PreviewFileModal(t.data("id"),this.elementSelect,e)},createElementEditor:function(t){return this.base(t,{params:{defaultFieldLayoutId:this.settings.defaultFieldLayoutId}})},_attachUploader:function(){this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl("assets/save-asset"),dropZone:this.$container,formData:{fieldId:this.settings.fieldId,elementId:this.settings.sourceElementId}};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),void 0!==this.settings.criteria.kind&&(t.allowedKinds=this.settings.criteria.kind),t.canAddMoreFiles=$.proxy(this,"canAddMoreFiles"),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),this.uploader=new Craft.Uploader(this.$container,t)},selectUploadedFile:function(t){if(this.canAddMoreElements()){var e=t.$element;e.addClass("removable"),e.prepend('<input type="hidden" name="'+this.settings.name+'[]" value="'+t.id+'"><a class="delete icon" title="'+Craft.t("app","Remove")+'"></a>'),e.appendTo(this.$elementsContainer);var i=-(e.outerWidth()+10);this.$addElementBtn.css("margin-"+Craft.left,i+"px");var s={};s["margin-"+Craft.left]=0,this.$addElementBtn.velocity(s,"fast"),this.addElements(e),delete this.modal}},_onUploadStart:function(){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{var i={elementId:e.result.assetId,siteId:this.settings.criteria.siteId,size:this.settings.viewMode};Craft.postActionRequest("elements/get-element-html",i,function(t){if(t.error)alert(t.error);else{var e=$(t.html);Craft.appendHeadHtml(t.headHtml),this.selectUploadedFile(Craft.getElementInfo(e))}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"),window.draftEditor&&window.draftEditor.checkForm())}.bind(this)),Craft.cp.runQueue()}},canAddMoreFiles:function(t){return!this.settings.limit||this.$elements.length+t<this.settings.limit},_parseFilename:function(t){var e=t.split("."),i="";return 1<e.length&&(i=e.pop()),{extension:i,baseFileName:e.join(".")}},_renameHelper:function(t){$(".renameHelper",t).on("focus",$.proxy(function(t){var e=t.currentTarget,i=this._parseFilename(e.value);""===this.originalFilename&&""===this.originalExtension&&(this.originalFilename=i.baseFileName,this.originalExtension=i.extension);var s=i.baseFileName.length;if(void 0!==e.selectionStart)e.selectionStart=0,e.selectionEnd=s;else if(document.selection&&document.selection.createRange){e.select();var n=document.selection.createRange();n.collapse(!0),n.moveEnd("character",s),n.moveStart("character",0),n.select()}},this))},resetOriginalFilename:function(){this.originalFilename="",this.originalExtension=""},validateElementForm:function(){var t=$(".renameHelper",this.elementEditor.hud.$hud.data("elementEditor").$form),e=this._parseFilename(t.val());return e.extension===this.originalExtension||(""===e.extension?this.originalFilename!==e.baseFileName?(t.val(e.baseFileName+"."+this.originalExtension),!0):confirm(Craft.t("app","Are you sure you want to remove the extension “.{ext}”?",{ext:this.originalExtension})):confirm(Craft.t("app","Are you sure you want to change the extension from “.{oldExt}” to “.{newExt}”?",{oldExt:this.originalExtension,newExt:e.extension})))}}),Craft.AssetSelectorModal=Craft.BaseElementSelectorModal.extend({$selectTransformBtn:null,_selectedTransform:null,init:function(t,e){e=$.extend({},Craft.AssetSelectorModal.defaults,e),this.base(t,e),e.transforms.length&&this.createSelectTransformButton(e.transforms)},createSelectTransformButton:function(t){if(t&&t.length){var e=$('<div class="btngroup"/>').appendTo(this.$primaryButtons);this.$selectBtn.appendTo(e),this.$selectTransformBtn=$('<div class="btn menubtn disabled">'+Craft.t("app","Select transform")+"</div>").appendTo(e);for(var i=$('<div class="menu" data-align="right"></div>').insertAfter(this.$selectTransformBtn),s=$("<ul></ul>").appendTo(i),n=0;n<t.length;n++)$('<li><a data-transform="'+t[n].handle+'">'+t[n].name+"</a></li>").appendTo(s);var a=new Garnish.MenuBtn(this.$selectTransformBtn,{onOptionSelect:$.proxy(this,"onSelectTransform")});a.disable(),this.$selectTransformBtn.data("menuButton",a)}},onSelectionChange:function(t){var e=this.elementIndex.getSelectedElements(),i=!1;if(e.length&&this.settings.transforms.length){i=!0;for(var s=0;s<e.length&&$(".element.hasthumb:first",e[s]).length;s++);}var n=null;this.$selectTransformBtn&&(n=this.$selectTransformBtn.data("menuButton")),i?(n&&n.enable(),this.$selectTransformBtn.removeClass("disabled")):this.$selectTransformBtn&&(n&&n.disable(),this.$selectTransformBtn.addClass("disabled")),this.base()},onSelectTransform:function(t){var e=$(t).data("transform");this.selectImagesWithTransform(e)},selectImagesWithTransform:function(t){void 0===Craft.AssetSelectorModal.transformUrls[t]&&(Craft.AssetSelectorModal.transformUrls[t]={});for(var e=this.elementIndex.getSelectedElements(),i=[],s=0;s<e.length;s++){var n=$(e[s]),a=Craft.getElementInfo(n).id;void 0===Craft.AssetSelectorModal.transformUrls[t][a]&&i.push(a)}i.length?(this.showFooterSpinner(),this.fetchMissingTransformUrls(i,t,$.proxy(function(){this.hideFooterSpinner(),this.selectImagesWithTransform(t)},this))):(this._selectedTransform=t,this.selectElements(),this._selectedTransform=null)},fetchMissingTransformUrls:function(i,s,n){var a=i.pop(),t={assetId:a,handle:s};Craft.postActionRequest("assets/generate-transform",t,$.proxy(function(t,e){Craft.AssetSelectorModal.transformUrls[s][a]=!1,"success"!==e||t.url&&(Craft.AssetSelectorModal.transformUrls[s][a]=t.url),i.length?this.fetchMissingTransformUrls(i,s,n):n()},this))},getElementInfo:function(t){var e=this.base(t);if(this._selectedTransform)for(var i=0;i<e.length;i++){var s=e[i].id;void 0!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&!1!==Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s]&&(e[i].url=Craft.AssetSelectorModal.transformUrls[this._selectedTransform][s])}return e},onSelect:function(t){this.settings.onSelect(t,this._selectedTransform)}},{defaults:{canSelectImageTransforms:!1,transforms:[]},transformUrls:{}}),Craft.registerElementSelectorModalClass("craft\\elements\\Asset",Craft.AssetSelectorModal),Craft.AuthManager=Garnish.Base.extend({remainingSessionTime:null,checkRemainingSessionTimer:null,showLoginModalTimer:null,decrementLogoutWarningInterval:null,showingLogoutWarningModal:!1,showingLoginModal:!1,logoutWarningModal:null,loginModal:null,$logoutWarningPara:null,$passwordInput:null,$passwordSpinner:null,$loginBtn:null,$loginErrorPara:null,submitLoginIfLoggedOut:!1,init:function(){this.updateRemainingSessionTime(Craft.remainingSessionTime)},setCheckRemainingSessionTimer:function(t){this.checkRemainingSessionTimer&&clearTimeout(this.checkRemainingSessionTimer),this.checkRemainingSessionTimer=setTimeout($.proxy(this,"checkRemainingSessionTime"),1e3*t)},checkRemainingSessionTime:function(t){$.ajax({url:Craft.getActionUrl("users/get-remaining-session-time",t?null:"dontExtendSession=1"),type:"GET",dataType:"json",complete:$.proxy(function(t,e){"success"===e?(void 0!==t.responseJSON.csrfTokenValue&&void 0!==Craft.csrfTokenValue&&(Craft.csrfTokenValue=t.responseJSON.csrfTokenValue),this.updateRemainingSessionTime(t.responseJSON.timeout),this.submitLoginIfLoggedOut=!1):this.updateRemainingSessionTime(-1)},this)})},updateRemainingSessionTime:function(t){this.remainingSessionTime=parseInt(t),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime?(this.remainingSessionTime?(this.showingLogoutWarningModal||this.showLogoutWarningModal(),this.remainingSessionTime<Craft.AuthManager.checkInterval&&(this.showLoginModalTimer&&clearTimeout(this.showLoginModalTimer),this.showLoginModalTimer=setTimeout($.proxy(this,"showLoginModal"),1e3*this.remainingSessionTime))):this.showingLoginModal?this.submitLoginIfLoggedOut&&this.submitLogin():this.showLoginModal(),this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval)):(this.hideLogoutWarningModal(),this.hideLoginModal(),-1!==this.remainingSessionTime&&this.remainingSessionTime<Craft.AuthManager.minSafeSessiotTime+Craft.AuthManager.checkInterval?this.setCheckRemainingSessionTimer(this.remainingSessionTime-Craft.AuthManager.minSafeSessiotTime+1):this.setCheckRemainingSessionTimer(Craft.AuthManager.checkInterval))},showLogoutWarningModal:function(){var t;if(t=!!this.showingLoginModal&&(this.hideLoginModal(!0),!0),this.showingLogoutWarningModal=!0,!this.logoutWarningModal){var e=$('<form id="logoutwarningmodal" class="modal alert fitted"/>'),i=$('<div class="body"/>').appendTo(e),s=$('<div class="buttons right"/>').appendTo(i),n=$('<div class="btn">'+Craft.t("app","Log out now")+"</div>").appendTo(s),a=$('<input type="submit" class="btn submit" value="'+Craft.t("app","Keep me logged in")+'" />').appendTo(s);this.$logoutWarningPara=$("<p/>").prependTo(i),this.logoutWarningModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark logoutwarningmodalshade",onFadeIn:function(){Garnish.isMobileBrowser(!0)||setTimeout(function(){a.trigger("focus")},100)}}),this.addListener(n,"activate","logout"),this.addListener(e,"submit","renewSession")}t?this.logoutWarningModal.quickShow():this.logoutWarningModal.show(),this.updateLogoutWarningMessage(),this.decrementLogoutWarningInterval=setInterval($.proxy(this,"decrementLogoutWarning"),1e3)},updateLogoutWarningMessage:function(){this.$logoutWarningPara.text(Craft.t("app","Your session will expire in {time}.",{time:Craft.secondsToHumanTimeDuration(this.remainingSessionTime)})),this.logoutWarningModal.updateSizeAndPosition()},decrementLogoutWarning:function(){0<this.remainingSessionTime&&(this.remainingSessionTime--,this.updateLogoutWarningMessage()),0===this.remainingSessionTime&&clearInterval(this.decrementLogoutWarningInterval)},hideLogoutWarningModal:function(t){this.showingLogoutWarningModal=!1,this.logoutWarningModal&&(t?this.logoutWarningModal.quickHide():this.logoutWarningModal.hide(),this.decrementLogoutWarningInterval&&clearInterval(this.decrementLogoutWarningInterval))},showLoginModal:function(){var t;if(t=!!this.showingLogoutWarningModal&&(this.hideLogoutWarningModal(!0),!0),this.showingLoginModal=!0,!this.loginModal){var e=$('<form id="loginmodal" class="modal alert fitted"/>'),i=$('<div class="body"><h2>'+Craft.t("app","Your session has ended.")+"</h2><p>"+Craft.t("app","Enter your password to log back in.")+"</p></div>").appendTo(e),s=$('<div class="inputcontainer">').appendTo(i),n=$('<div class="flex"/>').appendTo(s),a=$('<div class="flex-grow"/>').appendTo(n),r=$("<div/>").appendTo(n),o=$('<div class="passwordwrapper"/>').appendTo(a);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'"/>').appendTo(o),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(s),this.$loginBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Login")+'" />').appendTo(r),this.$loginErrorPara=$('<p class="error"/>').appendTo(i),this.loginModal=new Garnish.Modal(e,{autoShow:!1,closeOtherModals:!1,hideOnEsc:!1,hideOnShadeClick:!1,shadeClass:"modal-shade dark loginmodalshade",onFadeIn:$.proxy(function(){Garnish.isMobileBrowser(!0)||setTimeout($.proxy(function(){this.$passwordInput.trigger("focus")},this),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(e,"submit","login")}t?this.loginModal.quickShow():this.loginModal.show()},hideLoginModal:function(t){this.showingLoginModal=!1,this.loginModal&&(t?this.loginModal.quickHide():this.loginModal.hide())},logout:function(){$.get({url:Craft.getActionUrl("users/logout"),dataType:"json",success:$.proxy(function(){Craft.redirectTo("")},this)})},renewSession:function(t){t&&t.preventDefault(),this.hideLogoutWarningModal(),this.checkRemainingSessionTime(!0)},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$loginBtn.removeClass("disabled"),!0):(this.$loginBtn.addClass("disabled"),!1)},login:function(t){t&&t.preventDefault(),this.validatePassword()&&(this.$passwordSpinner.removeClass("hidden"),this.clearLoginError(),void 0!==Craft.csrfTokenValue?(this.submitLoginIfLoggedOut=!0,this.checkRemainingSessionTime()):this.submitLogin())},submitLogin:function(){var t={loginName:Craft.username,password:this.$passwordInput.val()};Craft.postActionRequest("users/login",t,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.hideLoginModal(),this.checkRemainingSessionTime()):(this.showLoginError(t.error),Garnish.shake(this.loginModal.$container),Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")):this.showLoginError()},this))},showLoginError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$loginErrorPara.text(t),this.loginModal.updateSizeAndPosition()},clearLoginError:function(){this.showLoginError("")}},{checkInterval:60,minSafeSessiotTime:120}),Craft.CategoryIndex=Craft.BaseElementIndex.extend({editableGroups:null,$newCategoryBtnGroup:null,$newCategoryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.editableGroups=[];for(var t=0;t<Craft.editableCategoryGroups.length;t++){var e=Craft.editableCategoryGroups[t];this.getSourceByKey("group:"+e.uid)&&this.editableGroups.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultGroupHandle)for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultGroupHandle)return e.data("key")}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s=this.$source.data("handle");if(this.editableGroups.length){var n,a;if(this.$newCategoryBtnGroup&&this.$newCategoryBtnGroup.remove(),s)for(t=0;t<this.editableGroups.length;t++)if(this.editableGroups[t].handle===s){n=this.editableGroups[t];break}if(this.$newCategoryBtnGroup=$('<div class="btngroup submit"/>'),n?(e=this._getGroupTriggerHref(n),i="index"===this.settings.context?Craft.t("app","New category"):Craft.t("app","New {group} category",{group:n.name}),this.$newCategoryBtn=$('<a class="btn submit add icon" '+e+">"+Craft.escapeHtml(i)+"</a>").appendTo(this.$newCategoryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newCategoryBtn,"click",function(t){this._openCreateCategoryModal(t.currentTarget.getAttribute("data-id"))}),1<this.editableGroups.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newCategoryBtnGroup))):this.$newCategoryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New category")+"</div>").appendTo(this.$newCategoryBtnGroup),a){var r='<div class="menu"><ul>';for(t=0;t<this.editableGroups.length;t++){var o=this.editableGroups[t];"index"!==this.settings.context&&o===n||(e=this._getGroupTriggerHref(o),i="index"===this.settings.context?o.name:Craft.t("app","New {group} category",{group:o.name}),r+="<li><a "+e+'">'+Craft.escapeHtml(i)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newCategoryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateCategoryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newCategoryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="categories";s&&(h+="/"+s),history.replaceState({},"",Craft.getUrl(h))}}},_getGroupTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="categories/"+t.handle+"/new";if(this.siteId&&this.siteId!=Craft.primarySiteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(e+="/"+Craft.sites[i].handle);return'href="'+Craft.getUrl(e)+'"'},_openCreateCategoryModal:function(t){if(!this.$newCategoryBtn.hasClass("loading")){for(var i,e=0;e<this.editableGroups.length;e++)if(this.editableGroups[e].id==t){i=this.editableGroups[e];break}if(i){this.$newCategoryBtn.addClass("inactive");var s=this.$newCategoryBtn.text();this.$newCategoryBtn.text(Craft.t("app","New {group} category",{group:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newCategoryBtnGroup,elementType:"craft\\elements\\Category",siteId:this.siteId,attributes:{groupId:t},onBeginLoading:$.proxy(function(){this.$newCategoryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newCategoryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newCategoryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="group:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Category",Craft.CategoryIndex),Craft.CategorySelectInput=Craft.BaseElementSelectInput.extend({setSettings:function(){this.base.apply(this,arguments),this.settings.sortable=!1},getModalSettings:function(){var t=this.base();return t.hideOnSelect=!1,t},getElements:function(){return this.$elementsContainer.find(".element")},onModalSelect:function(o){this.modal.disable(),this.modal.disableCancelBtn(),this.modal.disableSelectBtn(),this.modal.showFooterSpinner();for(var t=this.getSelectedElementIds(),e=0;e<o.length;e++)t.push(o[e].id);var i={categoryIds:t,siteId:o[0].siteId,id:this.settings.id,name:this.settings.name,branchLimit:this.settings.branchLimit,selectionLabel:this.settings.selectionLabel};Craft.postActionRequest("elements/get-categories-input-html",i,$.proxy(function(t,e){if(this.modal.enable(),this.modal.enableCancelBtn(),this.modal.enableSelectBtn(),this.modal.hideFooterSpinner(),"success"===e){var i=$(t.html).children(".elements");this.$elementsContainer.replaceWith(i),this.$elementsContainer=i,this.resetElements();for(var s=[],n=0;n<o.length;n++){var a=o[n],r=this.getElementById(a.id);r&&(this.animateElementIntoPlace(a.$element,r),s.push(a))}this.updateDisabledElementsInModal(),this.modal.hide(),this.onSelectElements(s)}},this))},removeElement:function(t){var e=t.add(t.parent().siblings("ul").find(".element"));this.removeElements(e);for(var i=0;i<e.length;i++)this._animateCategoryAway(e,i)},_animateCategoryAway:function(i,t){var e;t===i.length-1&&(e=$.proxy(function(){var t=i.first().parent().parent(),e=t.parent();e[0]===this.$elementsContainer[0]||t.siblings().length?t.remove():e.remove()},this));var s=$.proxy(function(){this.animateElementAway(i.eq(t),e)},this);0===t?s():setTimeout(s,100*t)}}),Craft.charts={},Craft.charts.DataTable=Garnish.Base.extend({columns:null,rows:null,init:function(t){columns=t.columns,rows=t.rows,rows.forEach($.proxy(function(i){$.each(i,function(t){var e;switch(columns[t].type){case"date":e=d3.timeParse("%Y-%m-%d"),i[t]=e(i[t]);break;case"datetime":e=d3.timeParse("%Y-%m-%d %H:00:00"),i[t]=e(i[t]);break;case"percent":i[t]=i[t]/100;break;case"number":i[t]=+i[t]}})},this)),this.columns=columns,this.rows=rows}}),Craft.charts.Tip=Garnish.Base.extend({$container:null,$tip:null,init:function(t){this.$container=t,this.$tip=$('<div class="tooltip"></div>').appendTo(this.$container),this.hide()},setContent:function(t){this.$tip.html(t)},setPosition:function(t){this.$tip.css("left",t.left+"px"),this.$tip.css("top",t.top+"px")},show:function(){this.$tip.css("display","block")},hide:function(){this.$tip.css("display","none")}}),Craft.charts.BaseChart=Garnish.Base.extend({$container:null,$chart:null,chartBaseClass:"cp-chart",dataTable:null,formatLocale:null,timeFormatLocale:null,orientation:null,svg:null,width:null,height:null,init:function(t,e){this.$container=t,this.setSettings(Craft.charts.BaseChart.defaults),this.setSettings(e);var i={formats:window.d3Formats,formatLocaleDefinition:window.d3FormatLocaleDefinition,timeFormatLocaleDefinition:window.d3TimeFormatLocaleDefinition};this.setSettings(i),d3.select(window).on("resize",$.proxy(function(){this.resize()},this))},setSettings:function(t,e){var i=void 0===this.settings?{}:this.settings;this.settings=$.extend(!0,{},i,e,t)},draw:function(t,e){this.setSettings(e),this.dataTable=t,this.formatLocale=d3.formatLocale(this.settings.formatLocaleDefinition),this.timeFormatLocale=d3.timeFormatLocale(this.settings.timeFormatLocaleDefinition),this.orientation=this.settings.orientation,this.$chart&&this.$chart.remove();var i=this.chartBaseClass;this.settings.chartClass&&(i+=" "+this.settings.chartClass),this.$chart=$('<div class="'+i+'" />').appendTo(this.$container)},resize:function(){this.draw(this.dataTable,this.settings)},onAfterDrawTicks:function(){$(".tick",this.$chart).each(function(t,e){var i=$("text",e);i.clone().appendTo(e),i.attr("stroke","#ffffff"),i.attr("stroke-width",3)})}},{defaults:{formatLocaleDefinition:null,timeFormatLocaleDefinition:null,formats:{numberFormat:",.2f",percentFormat:",.2%",currencyFormat:"$,.2f",shortDateFormats:{day:"%-m/%-d",month:"%-m/%y",year:"%Y"}},margin:{top:0,right:0,bottom:0,left:0},chartClass:null,colors:["#0594D1","#DE3800","#FF9A00","#009802","#9B009B"]}}),Craft.charts.Area=Craft.charts.BaseChart.extend({tip:null,drawingArea:null,init:function(t,e){this.base(t,Craft.charts.Area.defaults),this.setSettings(e)},draw:function(t,e){this.base(t,e),this.tip&&(this.tip=null);var i=this.getChartMargin();this.width=this.$chart.width()-i.left-i.right,this.height=this.$chart.height()-i.top-i.bottom;var s={width:this.width+(i.left+i.right),height:this.height+(i.top+i.bottom),translateX:"rtl"!==this.orientation?i.left:i.right,translateY:i.top};this.svg=d3.select(this.$chart.get(0)).append("svg").attr("width",s.width).attr("height",s.height),this.drawingArea=this.svg.append("g").attr("transform","translate("+s.translateX+","+s.translateY+")"),this.drawTicks(),this.drawAxes(),this.drawChart(),this.drawTipTriggers()},drawTicks:function(){var t=this.getX(!0),e=d3.axisBottom(t).tickFormat(this.getXFormatter()).ticks(3);this.drawingArea.append("g").attr("class","x ticks-axis").attr("transform","translate(0, "+this.height+")").call(e);var i,s=this.getY();"rtl"!==this.orientation?(i=d3.axisLeft(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").call(i)):(i=d3.axisRight(s).tickFormat(this.getYFormatter()).tickValues(this.getYTickValues()).ticks(2),this.drawingArea.append("g").attr("class","y ticks-axis").attr("transform","translate("+this.width+",0)").call(i)),this.onAfterDrawTicks()},drawAxes:function(){if(this.settings.xAxis.showAxis){var t=this.getX(),e=d3.axisBottom(t).ticks(0).tickSizeOuter(0);this.drawingArea.append("g").attr("class","x axis").attr("transform","translate(0, "+this.height+")").call(e)}if(this.settings.yAxis.showAxis){var i,s=this.getY();"rtl"===this.orientation?(i=d3.axisLeft(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate("+(this.width-0)+", 0)").call(i)):(i=d3.axisRight(s).ticks(0),this.drawingArea.append("g").attr("class","y axis").attr("transform","translate(0, 0)").call(i))}},drawChart:function(){var e=this.getX(!0),i=this.getY();if(this.settings.xAxis.gridlines){var t=d3.axisBottom(e);this.drawingArea.append("g").attr("class","x grid-line").attr("transform","translate(0,"+this.height+")").call(t.tickSize(-this.height,0,0).tickFormat(""))}if(this.settings.yAxis.gridlines){var s=d3.axisLeft(i);this.drawingArea.append("g").attr("class","y grid-line").attr("transform","translate(0 , 0)").call(s.tickSize(-this.width,0).tickFormat("").tickValues(this.getYTickValues()).ticks(2))}var n=d3.line().x(function(t){return e(t[0])}).y(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-line").append("path").datum(this.dataTable.rows).style("fill","none").style("stroke",this.settings.colors[0]).style("stroke-width","3px").attr("d",n);var a=d3.area().x(function(t){return e(t[0])}).y0(this.height).y1(function(t){return i(t[1])});this.drawingArea.append("g").attr("class","chart-area").append("path").datum(this.dataTable.rows).style("fill",this.settings.colors[0]).style("fill-opacity","0.3").attr("d",a),this.settings.plots&&this.drawingArea.append("g").attr("class","plots").selectAll("circle").data(this.dataTable.rows).enter().append("circle").style("fill",this.settings.colors[0]).attr("class",$.proxy(function(t,e){return"plot plot-"+e},this)).attr("r",4).attr("cx",$.proxy(function(t){return e(t[0])},this)).attr("cy",$.proxy(function(t){return i(t[1])},this))},drawTipTriggers:function(){if(this.settings.tips){this.tip||(this.tip=new Craft.charts.Tip(this.$chart));var t=this.getChartMargin(),e=(this.drawingArea.select(".x path.domain").node().getTotalLength()-t.left-t.right-12)/(this.dataTable.rows.length-1),i=Math.max(0,e),c=this.getX(!0),u=this.getY();this.drawingArea.append("g").attr("class","tip-triggers").selectAll("rect").data(this.dataTable.rows).enter().append("rect").attr("class","tip-trigger").style("fill","transparent").style("fill-opacity","1").attr("width",i).attr("height",this.height).attr("x",$.proxy(function(t){return c(t[0])-i/2},this)).on("mouseover",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",5);var i=$("<div />"),s=$('<div class="x-value" />').appendTo(i),n=$('<div class="y-value" />').appendTo(i);s.html(this.getXFormatter()(t[0])),n.html(this.getYFormatter()(t[1]));var a=i.get(0);this.tip.setContent(a);var r,o=this.getChartMargin(),l=u(t[1])+24;if("rtl"!==this.orientation){r=c(t[0])+o.left+24;var h=this.$chart.offset().left+r+this.tip.$tip.width();this.$chart.offset().left+this.$chart.width()-24<h&&(r=c(t[0])-(this.tip.$tip.width()+24))}else r=c(t[0])-(this.tip.$tip.width()+o.left+24);r<0&&(r=c(t[0])+o.left+24);var d={top:l,left:r};this.tip.setPosition(d),this.tip.show()},this)).on("mouseout",$.proxy(function(t,e){this.drawingArea.select(".plot-"+e).attr("r",4),this.tip.hide()},this))}},getChartMargin:function(){var t=this.settings.margin,e=this.getYTickValues(),s=0;return $.each(e,$.proxy(function(t,e){var i=8*this.getYFormatter()(e).length;s<i&&(s=i)},this)),s+=10,t.left=s,t},getX:function(t){var e=d3.min(this.dataTable.rows,function(t){return t[0]}),i=d3.max(this.dataTable.rows,function(t){return t[0]}),s=[e,i];"rtl"===this.orientation&&(s=[i,e]);var n=0,a=0;t&&(a=n=0);var r=d3.scaleTime().range([n,this.width-a]);return r.domain(s),r},getY:function(){var t=[0,this.getYMaxValue()],e=d3.scaleLinear().range([this.height,0]);return e.domain(t),e},getXFormatter:function(){return this.settings.xAxis.formatter!==$.noop?this.settings.xAxis.formatter(this):Craft.charts.utils.getTimeFormatter(this.timeFormatLocale,this.settings)},getYFormatter:function(){return this.settings.yAxis.formatter!==$.noop?this.settings.yAxis.formatter(this):Craft.charts.utils.getNumberFormatter(this.formatLocale,this.dataTable.columns[1].type,this.settings)},getYMaxValue:function(){return d3.max(this.dataTable.rows,function(t){return t[1]})},getYTickValues:function(){var t=this.getYMaxValue();return 1<t?[t/2,t]:[0,t]}},{defaults:{chartClass:"area",margin:{top:25,right:5,bottom:25,left:0},plots:!0,tips:!0,xAxis:{gridlines:!1,showAxis:!0,formatter:$.noop},yAxis:{gridlines:!0,showAxis:!1,formatter:$.noop}}}),Craft.charts.utils={getDuration:function(t){var e=parseInt(t,10),i={hours:Math.floor(e/3600),minutes:Math.floor((e-3600*i.hours)/60),seconds:e-3600*i.hours-60*i.minutes};return i.hours<10&&(i.hours="0"+i.hours),i.minutes<10&&(i.minutes="0"+i.minutes),i.seconds<10&&(i.seconds="0"+i.seconds),i.hours+":"+i.minutes+":"+i.seconds},getTimeFormatter:function(t,e){switch(e.dataScale){case"year":return t.format("%Y");case"month":return t.format(e.formats.shortDateFormats.month);case"hour":return t.format(e.formats.shortDateFormats.day+" %H:00:00");default:return t.format(e.formats.shortDateFormats.day)}},getNumberFormatter:function(t,e,i){switch(e){case"currency":return t.format(i.formats.currencyFormat);case"percent":return t.format(i.formats.percentFormat);case"time":return Craft.charts.utils.getDuration;case"number":return t.format(i.formats.numberFormat)}}},Craft.ColorInput=Garnish.Base.extend({$container:null,$input:null,$colorContainer:null,$colorPreview:null,$colorInput:null,init:function(t){this.$container=$(t),this.$input=this.$container.children(".color-input"),this.$colorContainer=this.$container.children(".color"),this.$colorPreview=this.$colorContainer.children(".color-preview"),this.createColorInput(),this.handleTextChange(),this.addListener(this.$input,"textchange","handleTextChange")},createColorInput:function(){var t=document.createElement("input");t.setAttribute("type","color"),"color"===t.type&&(this.$colorContainer.removeClass("static"),this.$colorInput=$(t).addClass("hidden").insertAfter(this.$input),this.addListener(this.$colorContainer,"click",function(){this.$colorInput.trigger("click")}),this.addListener(this.$colorInput,"change","updateColor"))},updateColor:function(){this.$input.val(this.$colorInput.val()),this.$input.data("garnish-textchange-value",this.$colorInput.val()),this.handleTextChange()},handleTextChange:function(){var t=this.$input.val();t.length&&"#"!==t?("#"!==t[0]&&(t="#"+t,this.$input.val(t),this.$input.data("garnish-textchange-value",t)),this.$colorPreview.css("background-color",t),this.$colorInput&&this.$colorInput.val(t)):this.$colorPreview.css("background-color","")}},{_browserSupportsColorInputs:null,doesBrowserSupportColorInputs:function(){return Craft.ColorInput._browserSupportsColorInputs,Craft.ColorInput._browserSupportsColorInputs}}),Craft.CP=Garnish.Base.extend({authManager:null,$nav:null,$mainContainer:null,$alerts:null,$crumbs:null,$notificationContainer:null,$main:null,$primaryForm:null,$header:null,$mainContent:null,$details:null,$selectedTab:null,$sidebar:null,$contentContainer:null,$edition:null,$collapsibleTables:null,fixedHeader:!1,enableQueue:!0,jobInfo:null,displayedJobInfo:null,displayedJobInfoUnchanged:1,trackJobProgressTimeout:null,jobProgressIcon:null,checkingForUpdates:!1,forcingRefreshOnUpdatesCheck:!1,checkForUpdatesCallbacks:null,init:function(){0!==Craft.remainingSessionTime&&(this.authManager=new Craft.AuthManager),this.$nav=$("#nav"),this.$mainContainer=$("#main-container"),this.$alerts=$("#alerts"),this.$crumbs=$("#crumbs"),this.$notificationContainer=$("#notifications"),this.$main=$("#main"),this.$primaryForm=$("#main-form"),this.$header=$("#header"),this.$mainContent=$("#main-content"),this.$details=$("#details"),this.$sidebar=$("#sidebar"),this.$contentContainer=$("#content-container"),this.$collapsibleTables=$("table.collapsible"),this.$edition=$("#edition"),this.updateSidebarMenuLabel(),this.addListener(Garnish.$win,"scroll","updateFixedHeader"),this.updateFixedHeader(),Garnish.$doc.ready($.proxy(function(){this.addListener(Garnish.$win,"resize","updateResponsiveTables"),this.updateResponsiveTables();var t=this.$notificationContainer.children(".error"),e=this.$notificationContainer.children(":not(.error)");t.delay(2*Craft.CP.notificationDuration).velocity("fadeOut"),e.delay(Craft.CP.notificationDuration).velocity("fadeOut"),Garnish.requestAnimationFrame($.proxy(this,"initConfirmUnloadForms"))},this)),this.$alerts.length&&this.initAlerts(),this.addListener($("#nav-toggle"),"click","toggleNav"),this.addListener($("#sidebar-toggle"),"click","toggleSidebar"),this.$primaryForm.length||(this.$primaryForm=$("form[data-saveshortcut]:first")),this.$primaryForm.length&&Garnish.hasAttr(this.$primaryForm,"data-saveshortcut")&&this.addListener(Garnish.$doc,"keydown",function(t){return Garnish.isCtrlKeyPressed(t)&&t.keyCode===Garnish.S_KEY&&(t.preventDefault(),this.submitPrimaryForm()),!0}),this.initTabs(),this.$edition.hasClass("hot")&&this.addListener(this.$edition,"click",function(){document.location.href=Craft.getUrl("plugin-store/upgrade-craft")}),$.isTouchCapable()&&(this.$mainContainer.on("focus","input, textarea, .focusable-input",$.proxy(this,"_handleInputFocus")),this.$mainContainer.on("blur","input, textarea, .focusable-input",$.proxy(this,"_handleInputBlur"))),$("a").each(function(){this.hostname.length&&this.hostname!==location.hostname&&void 0===$(this).attr("target")&&$(this).attr("rel","noopener").attr("target","_blank")})},initConfirmUnloadForms:function(){if(this.$confirmUnloadForms=$("form[data-confirm-unload]"),this.$confirmUnloadForms.length){for(var t,e,i=0;i<this.$confirmUnloadForms.length;i++)(t=this.$confirmUnloadForms.eq(i)).data("initialSerializedValue")||(e="function"==typeof t.data("serializer")?t.data("serializer")():t.serialize(),t.data("initialSerializedValue",e)),this.addListener(t,"submit",function(){this.removeListener(Garnish.$win,"beforeunload")});this.addListener(Garnish.$win,"beforeunload",function(t){var e,i,s=!1;if(void 0!==Craft.livePreview&&Craft.livePreview.inPreviewMode)s=!0;else for(var n=0;n<this.$confirmUnloadForms.length;n++)if(i="function"==typeof(e=this.$confirmUnloadForms.eq(n)).data("serializer")?e.data("serializer")():e.serialize(),e.data("initialSerializedValue")!==i){s=!0;break}if(s){var a=Craft.t("app","Any changes will be lost if you leave this page.");return t?t.originalEvent.returnValue=a:window.event.returnValue=a,a}})}},_handleInputFocus:function(){this.updateFixedHeader()},_handleInputBlur:function(){this.updateFixedHeader()},submitPrimaryForm:function(){this.trigger("beforeSaveShortcut"),this.$primaryForm.data("saveshortcut-redirect")&&$('<input type="hidden" name="redirect" value="'+this.$primaryForm.data("saveshortcut-redirect")+'"/>').appendTo(this.$primaryForm),this.$primaryForm.trigger({type:"submit",saveShortcut:!0})},updateSidebarMenuLabel:function(){var t=this.$sidebar.find("a.sel:first"),e=t.children(".label");$("#selected-sidebar-item-label").text(e.length?e.text():t.text()),Garnish.$bod.removeClass("showing-sidebar")},toggleNav:function(){Garnish.$bod.toggleClass("showing-nav")},toggleSidebar:function(){Garnish.$bod.toggleClass("showing-sidebar")},initTabs:function(){this.$selectedTab=null;var t,e,i,s=$("#tabs").find("> ul > li"),n=[],a=[],r=0;for(t=0;t<s.length;t++)n[t]=$(s[t]),a[t]=n[t].width(),r+=a[t],(i=(e=n[t].children("a")).attr("href"))&&"#"===i.charAt(0)&&(this.addListener(e,"click",function(t){t.preventDefault(),this.selectTab(t.currentTarget)}),encodeURIComponent(i.substr(1))===document.location.hash.substr(1)&&this.selectTab(e)),!this.$selectedTab&&e.hasClass("sel")&&(this.$selectedTab=e);for(t=0;t<s.length;t++)n[t].css("max-width",100*a[t]/r+"%")},selectTab:function(t){var e=$(t);if(this.$selectedTab){if(this.$selectedTab.get(0)===e.get(0))return;this.deselectTab()}e.addClass("sel");var i=e.attr("href");$(i).removeClass("hidden"),"undefined"!=typeof history&&history.replaceState(void 0,void 0,i),Garnish.$win.trigger("resize"),Garnish.$doc.trigger("scroll"),this.$selectedTab=e},deselectTab:function(){this.$selectedTab&&(this.$selectedTab.removeClass("sel"),"#"===this.$selectedTab.attr("href").charAt(0)&&$(this.$selectedTab.attr("href")).addClass("hidden"),this.$selectedTab=null)},updateResponsiveTables:function(){for(this.updateResponsiveTables._i=0;this.updateResponsiveTables._i<this.$collapsibleTables.length;this.updateResponsiveTables._i++)this.updateResponsiveTables._$table=this.$collapsibleTables.eq(this.updateResponsiveTables._i),this.updateResponsiveTables._containerWidth=this.updateResponsiveTables._$table.parent().width(),this.updateResponsiveTables._check=!1,0<this.updateResponsiveTables._containerWidth&&(void 0===this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._check=!0:(this.updateResponsiveTables._isCollapsed=this.updateResponsiveTables._$table.hasClass("collapsed"),this.updateResponsiveTables._containerWidth>this.updateResponsiveTables._$table.data("lastContainerWidth")?this.updateResponsiveTables._isCollapsed&&(this.updateResponsiveTables._$table.removeClass("collapsed"),this.updateResponsiveTables._check=!0):this.updateResponsiveTables._isCollapsed||(this.updateResponsiveTables._check=!0)),!this.updateResponsiveTables._check||this.updateResponsiveTables._$table.width()>this.updateResponsiveTables._containerWidth&&this.updateResponsiveTables._$table.addClass("collapsed"),this.updateResponsiveTables._$table.data("lastContainerWidth",this.updateResponsiveTables._containerWidth))},updateFixedHeader:function(){if(this.$main.length&&this.$main[0].getBoundingClientRect().top<0){if(!this.fixedHeader){var t=this.$header.outerHeight(),e={top:t+"px","max-height":"calc(100vh - "+t+"px)"};this.$sidebar.css(e),this.$details.css(e),this.$mainContent.css("margin-top",this.$header.outerHeight()),Garnish.$bod.addClass("fixed-header"),this.fixedheader=!0}}else this.fixedheader&&(Garnish.$bod.removeClass("fixed-header"),this.$details.css({top:null,"max-height":null}),this.$header.css("top",0),this.$mainContent.css("margin-top",0),this.fixedheader=!1)},displayNotification:function(t,e){var i=Craft.CP.notificationDuration;"error"===t&&(i*=2);var s=$('<div class="notification '+t+'">'+e+"</div>").appendTo(this.$notificationContainer),n=-s.outerWidth()/2+"px";s.hide().css({opacity:0,"margin-left":n,"margin-right":n}).velocity({opacity:1,"margin-left":"2px","margin-right":"2px"},{display:"inline-block",duration:"fast"}).delay(i).velocity({opacity:0,"margin-left":n,"margin-right":n},{complete:function(){s.remove()}}),this.trigger("displayNotification",{notificationType:t,message:e})},displayNotice:function(t){this.displayNotification("notice",t)},displayError:function(t){t||(t=Craft.t("app","An unknown error occurred.")),this.displayNotification("error",t)},fetchAlerts:function(){var t={path:Craft.path};Craft.queueActionRequest("app/get-cp-alerts",t,$.proxy(this,"displayAlerts"))},displayAlerts:function(t){if(this.$alerts.remove(),Garnish.isArray(t)&&t.length){this.$alerts=$('<ul id="alerts"/>').prependTo(this.$mainContainer);for(var e=0;e<t.length;e++)$("<li>"+t[e]+"</li>").appendTo(this.$alerts);var i=this.$alerts.outerHeight();this.$alerts.css("margin-top",-i).velocity({"margin-top":0},"fast"),this.initAlerts()}},initAlerts:function(){for(var t=this.$alerts.find('a[class^="shun:"]'),e=0;e<t.length;e++)this.addListener(t[e],"click",$.proxy(function(t){t.preventDefault();var i=$(t.currentTarget),e={message:i.prop("className").substr(5)};Craft.queueActionRequest("app/shun-cp-alert",e,$.proxy(function(t,e){"success"===e&&(t.success?i.parent().remove():this.displayError(t.error))},this))},this))},checkForUpdates:function(t,e){if(this.checkingForUpdates&&!0===t&&!this.forcingRefreshOnUpdatesCheck){var i=e;e=function(){Craft.cp.checkForUpdates(!0,i)}}if("function"==typeof e&&(Garnish.isArray(this.checkForUpdatesCallbacks)||(this.checkForUpdatesCallbacks=[]),this.checkForUpdatesCallbacks.push(e)),!this.checkingForUpdates){this.checkingForUpdates=!0,this.forcingRefreshOnUpdatesCheck=!0===t;var s={forceRefresh:!0===t};Craft.queueActionRequest("app/check-for-updates",s,$.proxy(function(t){if(this.updateUtilitiesBadge(),this.checkingForUpdates=!1,Garnish.isArray(this.checkForUpdatesCallbacks)){var e=this.checkForUpdatesCallbacks;this.checkForUpdatesCallbacks=null;for(var i=0;i<e.length;i++)e[i](t)}this.trigger("checkForUpdates",{updateInfo:t})},this))}},updateUtilitiesBadge:function(){var i=$("#nav-utilities").find("> a:not(.sel)");i.length&&Craft.queueActionRequest("app/get-utilities-badge-count",$.proxy(function(t){var e=i.children(".badge");t.badgeCount?(e.length||(e=$('<span class="badge"/>').appendTo(i)),e.text(t.badgeCount)):e.length&&e.remove()},this))},runQueue:function(){this.enableQueue&&(Craft.runQueueAutomatically?Craft.queueActionRequest("queue/run",$.proxy(function(t,e){"success"===e&&this.trackJobProgress(!1,!0)},this)):this.trackJobProgress(!1,!0))},trackJobProgress:function(t,e){if(e&&this.trackJobProgressTimeout&&(clearTimeout(this.trackJobProgressTimeout),this.trackJobProgressTimeout=null),!this.trackJobProgressTimeout&&this.enableQueue)if(!0===t){var i=Math.min(6e4,500*this.displayedJobInfoUnchanged);this.trackJobProgressTimeout=setTimeout($.proxy(this,"_trackJobProgressInternal"),i)}else this._trackJobProgressInternal()},_trackJobProgressInternal:function(){Craft.queueActionRequest("queue/get-job-info?dontExtendSession=1",$.proxy(function(t,e){"success"===e&&(this.trackJobProgressTimeout=null,this.setJobInfo(t,!0),this.jobInfo.length&&this.trackJobProgress(!0))},this))},setJobInfo:function(t,e){if(this.enableQueue){this.jobInfo=t;var i=this.displayedJobInfo;this.displayedJobInfo=this.getDisplayedJobInfo(),i&&this.displayedJobInfo&&i.id===this.displayedJobInfo.id&&i.progress===this.displayedJobInfo.progress&&i.progressLabel===this.displayedJobInfo.progressLabel&&i.status===this.displayedJobInfo.status?this.displayedJobInfoUnchanged++:this.displayedJobInfoUnchanged=1,this.updateJobIcon(e),this.trigger("setJobInfo")}},getDisplayedJobInfo:function(){if(!this.enableQueue)return null;for(var t=[Craft.CP.JOB_STATUS_RESERVED,Craft.CP.JOB_STATUS_FAILED,Craft.CP.JOB_STATUS_WAITING],e=0;e<t.length;e++)for(var i=0;i<this.jobInfo.length;i++)if(this.jobInfo[i].status===t[e])return this.jobInfo[i]},updateJobIcon:function(t){this.enableQueue&&this.$nav.length&&(this.displayedJobInfo?(this.jobProgressIcon||(this.jobProgressIcon=new e),this.displayedJobInfo.status===Craft.CP.JOB_STATUS_RESERVED||this.displayedJobInfo.status===Craft.CP.JOB_STATUS_WAITING?(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.setDescription(this.displayedJobInfo.description),this.jobProgressIcon.setProgress(this.displayedJobInfo.progress,t)):this.displayedJobInfo.status===Craft.CP.JOB_STATUS_FAILED&&this.jobProgressIcon.showFailMode(Craft.t("app","Failed"))):this.jobProgressIcon&&(this.jobProgressIcon.hideFailMode(),this.jobProgressIcon.complete(),delete this.jobProgressIcon))}},{notificationDuration:2e3,JOB_STATUS_WAITING:1,JOB_STATUS_RESERVED:2,JOB_STATUS_DONE:3,JOB_STATUS_FAILED:4}),Garnish.$scrollContainer=$("#content"),Craft.cp=new Craft.CP;var e=Garnish.Base.extend({$li:null,$a:null,$label:null,hud:null,failMode:!1,_canvasSupported:null,_$bgCanvas:null,_$staticCanvas:null,_$hoverCanvas:null,_$failCanvas:null,_staticCtx:null,_hoverCtx:null,_canvasSize:null,_arcPos:null,_arcRadius:null,_lineWidth:null,_arcStartPos:0,_arcEndPos:0,_arcStartStepSize:null,_arcEndStepSize:null,_arcStep:null,_arcStepTimeout:null,_arcAnimateCallback:null,_progressBar:null,init:function(){if(this.$li=$("<li/>").appendTo(Craft.cp.$nav.children("ul")),this.$a=$('<a id="job-icon"/>').appendTo(this.$li),this.$canvasContainer=$('<span class="icon"/>').appendTo(this.$a),this.$label=$('<span class="label"></span>').appendTo(this.$a),this._canvasSupported=!!document.createElement("canvas").getContext,this._canvasSupported){var t=1<window.devicePixelRatio?2:1;this._canvasSize=18*t,this._arcPos=this._canvasSize/2,this._arcRadius=7*t,this._lineWidth=3*t,this._$bgCanvas=this._createCanvas("bg","#61666b"),this._$staticCanvas=this._createCanvas("static","#d7d9db"),this._$hoverCanvas=this._createCanvas("hover","#fff"),this._$failCanvas=this._createCanvas("fail","#da5a47").hide(),this._staticCtx=this._$staticCanvas[0].getContext("2d"),this._hoverCtx=this._$hoverCanvas[0].getContext("2d"),this._drawArc(this._$bgCanvas[0].getContext("2d"),0,1),this._drawArc(this._$failCanvas[0].getContext("2d"),0,1)}else this._progressBar=new Craft.ProgressBar(this.$canvasContainer),this._progressBar.showProgressBar();this.addListener(this.$a,"click","toggleHud")},setDescription:function(t){this.$a.attr("title",t),this.$label.text(t)},setProgress:function(t,e){this._canvasSupported?e?this._animateArc(0,t/100):this._setArc(0,t/100):this._progressBar.setProgressPercentage(t)},complete:function(){this._canvasSupported?this._animateArc(0,1,$.proxy(function(){this._$bgCanvas.velocity("fadeOut"),this._animateArc(1,1,$.proxy(function(){this.$a.remove(),this.destroy()},this))},this)):(this._progressBar.setProgressPercentage(100),this.$a.velocity("fadeOut"))},showFailMode:function(t){this.failMode||(this.failMode=!0,this._canvasSupported?(this._$bgCanvas.hide(),this._$staticCanvas.hide(),this._$hoverCanvas.hide(),this._$failCanvas.show()):(this._progressBar.$progressBar.css("border-color","#da5a47"),this._progressBar.$innerProgressBar.css("background-color","#da5a47"),this._progressBar.setProgressPercentage(50)),this.setDescription(t))},hideFailMode:function(){this.failMode&&(this.failMode=!1,this._canvasSupported?(this._$bgCanvas.show(),this._$staticCanvas.show(),this._$hoverCanvas.show(),this._$failCanvas.hide()):(this._progressBar.$progressBar.css("border-color",""),this._progressBar.$innerProgressBar.css("background-color",""),this._progressBar.setProgressPercentage(50)))},toggleHud:function(){this.hud?this.hud.toggle():this.hud=new o},_createCanvas:function(t,e){var i=$('<canvas id="job-icon-'+t+'" width="'+this._canvasSize+'" height="'+this._canvasSize+'"/>').appendTo(this.$canvasContainer),s=i[0].getContext("2d");return s.strokeStyle=e,s.lineWidth=this._lineWidth,s.lineCap="round",i},_setArc:function(t,e){this._arcStartPos=t,this._arcEndPos=e,this._drawArc(this._staticCtx,t,e),this._drawArc(this._hoverCtx,t,e)},_drawArc:function(t,e,i){t.clearRect(0,0,this._canvasSize,this._canvasSize),t.beginPath(),t.arc(this._arcPos,this._arcPos,this._arcRadius,(1.5+2*e)*Math.PI,(1.5+2*i)*Math.PI),t.stroke(),t.closePath()},_animateArc:function(t,e,i){this._arcStepTimeout&&clearTimeout(this._arcStepTimeout),this._arcStep=0,this._arcStartStepSize=(t-this._arcStartPos)/10,this._arcEndStepSize=(e-this._arcEndPos)/10,this._arcAnimateCallback=i,this._takeNextArcStep()},_takeNextArcStep:function(){this._setArc(this._arcStartPos+this._arcStartStepSize,this._arcEndPos+this._arcEndStepSize),this._arcStep++,this._arcStep<10?this._arcStepTimeout=setTimeout($.proxy(this,"_takeNextArcStep"),50):this._arcAnimateCallback&&this._arcAnimateCallback()}}),o=Garnish.HUD.extend({jobsById:null,completedJobs:null,updateViewProxy:null,init:function(){this.jobsById={},this.completedJobs=[],this.updateViewProxy=$.proxy(this,"updateView"),this.base(Craft.cp.jobProgressIcon.$a),this.$main.attr("id","queue-hud")},onShow:function(){Craft.cp.on("setJobInfo",this.updateViewProxy),this.updateView(),this.base()},onHide:function(){if(Craft.cp.off("setJobInfo",this.updateViewProxy),this.completedJobs.length){for(var t=0;t<this.completedJobs.length;t++)this.completedJobs[t].destroy();this.completedJobs=[]}this.base()},updateView:function(){var t,e=[];if(Craft.cp.jobInfo)for(t=0;t<Craft.cp.jobInfo.length;t++)e.push(parseInt(Craft.cp.jobInfo[t].id));for(var i in this.jobsById)this.jobsById.hasOwnProperty(i)&&(Craft.inArray(parseInt(i),e)||(this.jobsById[i].complete(),this.completedJobs.push(this.jobsById[i]),delete this.jobsById[i]));if(Craft.cp.jobInfo&&Craft.cp.jobInfo.length)for(t=0;t<Craft.cp.jobInfo.length;t++){var s=Craft.cp.jobInfo[t];if(this.jobsById[s.id])this.jobsById[s.id].updateStatus(s);else{this.jobsById[s.id]=new o.Job(this,s);for(var n=!1,a=t+1;a<Craft.cp.jobInfo.length;a++)if(this.jobsById[Craft.cp.jobInfo[a].id]){this.jobsById[s.id].$container.insertBefore(this.jobsById[Craft.cp.jobInfo[a].id].$container),n=!0;break}if(!n){var r=this.$main.children("object");r.length?this.jobsById[s.id].$container.insertBefore(r):this.jobsById[s.id].$container.appendTo(this.$main)}}}else this.hide()}});o.Job=Garnish.Base.extend({hud:null,id:null,description:null,status:null,progress:null,$container:null,$statusContainer:null,$descriptionContainer:null,$progressLabel:null,_progressBar:null,init:function(t,e){this.hud=t,this.id=e.id,this.description=e.description,this.$container=$("<div/>",{class:"job"});var i=$("<div/>",{class:"flex"}).appendTo(this.$container);$("<div/>",{class:"flex-grow"}).text(e.description).appendTo(i),this.$statusContainer=$('<div class="job-status"/>').appendTo(i),this.$container.data("job",this),this.updateStatus(e)},updateStatus:function(t){if(this.status!==(this.status=t.status))switch(this.$statusContainer.empty(),this.status){case Craft.CP.JOB_STATUS_WAITING:this.$statusContainer.text(Craft.t("app","Pending"));break;case Craft.CP.JOB_STATUS_RESERVED:this._progressBar=new Craft.ProgressBar(this.$statusContainer),this._progressBar.showProgressBar();break;case Craft.CP.JOB_STATUS_FAILED:$("<span/>",{class:"error",text:Craft.t("app","Failed"),title:t.error}).appendTo(this.$statusContainer);var e=$('<a class="menubtn error" title="'+Craft.t("app","Options")+'"/>').appendTo(this.$statusContainer);$('<div class="menu"><ul><li><a data-action="retry">'+Craft.t("app","Try again")+'</a></li><li><a data-action="release">'+Craft.t("app","Cancel")+"</a></li></ul></div>").appendTo(this.$statusContainer),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"performErrorAction")})}this.status===Craft.CP.JOB_STATUS_RESERVED?(this._progressBar.setProgressPercentage(t.progress),t.progressLabel&&(this.$progressLabel||(this.$progressLabel=$('<div class="light smalltext"/>').appendTo(this.$container)),this.$progressLabel.text(t.progressLabel))):this.$progressLabel&&(this.$progressLabel.remove(),this.$progressLabel=null)},performErrorAction:function(t){switch($(t).data("action")){case"retry":Craft.cp.displayedJobInfo.status=Craft.CP.JOB_STATUS_WAITING,Craft.cp.displayedJobInfo.progress=0,Craft.cp.updateJobIcon(!1),Craft.postActionRequest("queue/retry",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this));break;case"release":Craft.postActionRequest("queue/release",{id:this.id},$.proxy(function(t,e){"success"===e&&Craft.cp.trackJobProgress(!1,!0)},this))}},complete:function(){this.$statusContainer.empty(),$('<div data-icon="check"/>').appendTo(this.$statusContainer)},destroy:function(){this.hud.jobsById[this.id]&&delete this.hud.jobsById[this.id],this.$container.remove(),this.base()}}),Craft.CustomizeSourcesModal=Garnish.Modal.extend({elementIndex:null,$elementIndexSourcesContainer:null,$sidebar:null,$sourcesContainer:null,$sourceSettingsContainer:null,$newHeadingBtn:null,$footer:null,$footerBtnContainer:null,$saveBtn:null,$cancelBtn:null,$saveSpinner:null,$loadingSpinner:null,sourceSort:null,sources:null,selectedSource:null,updateSourcesOnSave:!1,availableTableAttributes:null,init:function(t,e){this.base(),this.setSettings(e,{resizable:!0}),this.elementIndex=t,this.$elementIndexSourcesContainer=this.elementIndex.$sidebar.children("nav").children("ul");var i=$('<form class="modal customize-sources-modal"/>').appendTo(Garnish.$bod);this.$sidebar=$('<div class="cs-sidebar block-types"/>').appendTo(i),this.$sourcesContainer=$('<div class="sources">').appendTo(this.$sidebar),this.$sourceSettingsContainer=$('<div class="source-settings">').appendTo(i),this.$footer=$('<div class="footer"/>').appendTo(i),this.$footerBtnContainer=$('<div class="buttons right"/>').appendTo(this.$footer),this.$cancelBtn=$('<div class="btn" role="button"/>').text(Craft.t("app","Cancel")).appendTo(this.$footerBtnContainer),this.$saveBtn=$('<div class="btn submit disabled" role="button"/>').text(Craft.t("app","Save")).appendTo(this.$footerBtnContainer),this.$saveSpinner=$('<div class="spinner hidden"/>').appendTo(this.$footerBtnContainer),this.$newHeadingBtn=$('<div class="btn submit add icon"/>').text(Craft.t("app","New heading")).appendTo($('<div class="buttons left secondary-buttons"/>').appendTo(this.$footer)),this.$loadingSpinner=$('<div class="spinner"/>').appendTo(i),this.setContainer(i),this.show();var s={elementType:this.elementIndex.elementType};Craft.postActionRequest("element-index-settings/get-customize-sources-modal-data",s,$.proxy(function(t,e){this.$loadingSpinner.remove(),"success"===e&&(this.$saveBtn.removeClass("disabled"),this.buildModal(t))},this)),this.addListener(this.$newHeadingBtn,"click","handleNewHeadingBtnClick"),this.addListener(this.$cancelBtn,"click","hide"),this.addListener(this.$saveBtn,"click","save"),this.addListener(this.$container,"submit","save")},buildModal:function(t){this.availableTableAttributes=t.availableTableAttributes,this.sourceSort=new Garnish.DragSort({handle:".move",axis:"y",onSortChange:$.proxy(function(){this.updateSourcesOnSave=!0},this)}),this.sources=[];for(var e=0;e<t.sources.length;e++){var i=this.addSource(t.sources[e]);this.sources.push(i)}this.selectedSource||void 0===this.sources[0]||this.sources[0].select()},addSource:function(t){var e,i=$('<div class="customize-sources-item"/>').appendTo(this.$sourcesContainer),s=$('<div class="label"/>').appendTo(i),n=$('<input type="hidden"/>').appendTo(i);return $('<a class="move icon" title="'+Craft.t("app","Reorder")+'" role="button"></a>').appendTo(i),void 0!==t.heading?(i.addClass("heading"),n.attr("name","sourceOrder[][heading]"),(e=new Craft.CustomizeSourcesModal.Heading(this,i,s,n,t)).updateItemLabel(t.heading)):(n.attr("name","sourceOrder[][key]").val(t.key),(e=new Craft.CustomizeSourcesModal.Source(this,i,s,n,t)).updateItemLabel(t.label),(this.elementIndex.sourceKey+"/").substr(0,t.key.length+1)===t.key+"/"&&e.select()),this.sourceSort.addItems(i),e},handleNewHeadingBtnClick:function(){var t=this.addSource({heading:""});Garnish.scrollContainerToElement(this.$sidebar,t.$item),t.select(),this.updateSourcesOnSave=!0},save:function(t){if(t&&t.preventDefault(),!this.$saveBtn.hasClass("disabled")&&this.$saveSpinner.hasClass("hidden")){this.$saveSpinner.removeClass("hidden");var e=this.$container.serialize()+"&elementType="+this.elementIndex.elementType;Craft.postActionRequest("element-index-settings/save-customize-sources-modal-settings",e,$.proxy(function(t,e){if(this.$saveSpinner.addClass("hidden"),"success"===e&&t.success){if(this.updateSourcesOnSave&&this.$elementIndexSourcesContainer.length){for(var i,s=null,n=0;n<this.sourceSort.$items.length;n++){var a=this.sourceSort.$items.eq(n).data("source"),r=a.getIndexSource();r&&(a.isHeading()?i=r:(i&&(this.appendSource(i,s),s=i,i=null),this.appendSource(r,s),s=r))}if(s){var o=s.nextAll();this.elementIndex.sourceSelect.removeItems(o),o.remove()}}this.selectedSource&&this.selectedSource.sourceData.key&&(this.elementIndex.selectSourceByKey(this.selectedSource.sourceData.key),this.elementIndex.updateElements()),Craft.cp.displayNotice(Craft.t("app","Source settings saved")),this.hide()}else{var l="success"===e&&t.error?t.error:Craft.t("app","An unknown error occurred.");Craft.cp.displayError(l)}},this))}},appendSource:function(t,e){e?t.insertAfter(e):t.prependTo(this.$elementIndexSourcesContainer)},destroy:function(){for(var t=0;t<this.sources.length;t++)this.sources[t].destroy();delete this.sources,this.base()}}),Craft.CustomizeSourcesModal.BaseSource=Garnish.Base.extend({modal:null,$item:null,$itemLabel:null,$itemInput:null,$settingsContainer:null,sourceData:null,init:function(t,e,i,s,n){this.modal=t,this.$item=e,this.$itemLabel=i,this.$itemInput=s,this.sourceData=n,this.$item.data("source",this),this.addListener(this.$item,"click","select")},isHeading:function(){return!1},isSelected:function(){return this.modal.selectedSource===this},select:function(){this.isSelected()||(this.modal.selectedSource&&this.modal.selectedSource.deselect(),this.$item.addClass("sel"),(this.modal.selectedSource=this).$settingsContainer?this.$settingsContainer.removeClass("hidden"):this.$settingsContainer=$("<div/>").append(this.createSettings()).appendTo(this.modal.$sourceSettingsContainer),this.modal.$sourceSettingsContainer.scrollTop(0))},createSettings:function(){},getIndexSource:function(){},deselect:function(){this.$item.removeClass("sel"),this.modal.selectedSource=null,this.$settingsContainer.addClass("hidden")},updateItemLabel:function(t){this.$itemLabel.text(t)},destroy:function(){this.$item.data("source",null),this.base()}}),Craft.CustomizeSourcesModal.Source=Craft.CustomizeSourcesModal.BaseSource.extend({createSettings:function(){if(this.sourceData.tableAttributes.length){var t,e,i,s,n=this.sourceData.tableAttributes[0],a=n[0],r=n[1],o=this.createTableColumnOption(a,r,!0,!0),l=$("<div/>"),h=[a];for($('<input type="hidden" name="sources['+this.sourceData.key+'][tableAttributes][]" value=""/>').appendTo(l),t=1;t<this.sourceData.tableAttributes.length;t++)i=(e=this.sourceData.tableAttributes[t])[0],s=e[1],l.append(this.createTableColumnOption(i,s,!1,!0)),h.push(i);for(t=0;t<this.modal.availableTableAttributes.length;t++)i=(e=this.modal.availableTableAttributes[t])[0],s=e[1],Craft.inArray(i,h)||l.append(this.createTableColumnOption(i,s,!1,!1));return new Garnish.DragSort(l.children(),{handle:".move",axis:"y"}),Craft.ui.createField($([o[0],l[0]]),{label:Craft.t("app","Table Columns"),instructions:Craft.t("app","Choose which table columns should be visible for this source, and in which order.")})}},createTableColumnOption:function(t,e,i,s){var n=$('<div class="customize-sources-table-column"/>').append('<div class="icon move"/>').append(Craft.ui.createCheckbox({label:e,name:"sources["+this.sourceData.key+"][tableAttributes][]",value:t,checked:s,disabled:i}));return i&&n.children(".move").addClass("disabled"),n},getIndexSource:function(){var t=this.modal.elementIndex.getSourceByKey(this.sourceData.key);if(t)return t.closest("li")}}),Craft.CustomizeSourcesModal.Heading=Craft.CustomizeSourcesModal.BaseSource.extend({$labelField:null,$labelInput:null,$deleteBtn:null,isHeading:function(){return!0},select:function(){this.base(),this.$labelInput.trigger("focus")},createSettings:function(){return this.$labelField=Craft.ui.createTextField({label:Craft.t("app","Heading"),instructions:Craft.t("app","This can be left blank if you just want an unlabeled separator."),value:this.sourceData.heading}),this.$labelInput=this.$labelField.find(".text"),this.$deleteBtn=$('<a class="error delete"/>').text(Craft.t("app","Delete heading")),this.addListener(this.$labelInput,"textchange","handleLabelInputChange"),this.addListener(this.$deleteBtn,"click","deleteHeading"),$([this.$labelField[0],$("<hr/>")[0],this.$deleteBtn[0]])},handleLabelInputChange:function(){this.updateItemLabel(this.$labelInput.val()),this.modal.updateSourcesOnSave=!0},updateItemLabel:function(t){this.$itemLabel.html((t?Craft.escapeHtml(t):'<em class="light">'+Craft.t("app","(blank)")+"</em>")+"&nbsp;"),this.$itemInput.val(t)},deleteHeading:function(){this.modal.sourceSort.removeItems(this.$item),this.modal.sources.splice($.inArray(this,this.modal.sources),1),this.modal.updateSourcesOnSave=!0,this.isSelected()&&(this.deselect(),this.modal.sources.length&&this.modal.sources[0].select()),this.$item.remove(),this.$settingsContainer.remove(),this.destroy()},getIndexSource:function(){var t=this.$labelInput?this.$labelInput.val():this.sourceData.heading;return $('<li class="heading"/>').append($("<span/>").text(t))}}),Craft.DataTableSorter=Garnish.DragSort.extend({$table:null,init:function(t,e){this.$table=$(t);var i=this.$table.children("tbody").children(":not(.filler)");(e=$.extend({},Craft.DataTableSorter.defaults,e)).container=this.$table.children("tbody"),e.helper=$.proxy(this,"getHelper"),e.caboose="<tr/>",e.axis=Garnish.Y_AXIS,e.magnetStrength=4,e.helperLagBase=1.5,this.base(i,e)},getHelper:function(t){var e=$('<div class="'+this.settings.helperClass+'"/>').appendTo(Garnish.$bod),i=$("<table/>").appendTo(e),s=$("<tbody/>").appendTo(i);t.appendTo(s),i.width(this.$table.width()),i.prop("className",this.$table.prop("className"));for(var n=this.$table.find("tr:first").children(),a=t.children(),r=0;r<a.length;r++)$(a[r]).width($(n[r]).width());return e}},{defaults:{handle:".move",helperClass:"datatablesorthelper"}}),Craft.DeleteUserModal=Garnish.Modal.extend({id:null,userId:null,$deleteActionRadios:null,$deleteSpinner:null,userSelect:null,_deleting:!1,init:function(t,e){this.id=Math.floor(1e9*Math.random()),this.userId=t,e=$.extend(Craft.DeleteUserModal.defaults,e);var i,s=$('<form class="modal fitted deleteusermodal" method="post" accept-charset="UTF-8">'+Craft.getCsrfInput()+'<input type="hidden" name="action" value="users/delete-user"/>'+(Garnish.isArray(this.userId)?"":'<input type="hidden" name="userId" value="'+this.userId+'"/>')+(e.redirect?'<input type="hidden" name="redirect" value="'+e.redirect+'"/>':"")+"</form>").appendTo(Garnish.$bod),n=$('<div class="body"><div class="content-summary"><p>'+Craft.t("app","What do you want to do with their content?")+'</p><ul class="bullets"></ul></div><div class="options"><label><input type="radio" name="contentAction" value="transfer"/> '+Craft.t("app","Transfer it to:")+'</label><div id="transferselect'+this.id+'" class="elementselect"><div class="elements"></div><div class="btn add icon dashed">'+Craft.t("app","Choose a user")+'</div></div></div><div><label class="error"><input type="radio" name="contentAction" value="delete"/> '+Craft.t("app","Delete it")+"</label></div></div>").appendTo(s),a=$('<div class="buttons right"/>').appendTo(n),r=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(a);if(e.contentSummary.length)for(var o=0;o<e.contentSummary.length;o++)n.find("ul").append($("<li/>",{text:e.contentSummary[o]}));else n.find("ul").remove();if(this.$deleteActionRadios=n.find("input[type=radio]"),this.$deleteSubmitBtn=$('<input type="submit" class="btn submit disabled" value="'+(Garnish.isArray(this.userId)?Craft.t("app","Delete users"):Craft.t("app","Delete user"))+'" />').appendTo(a),this.$deleteSpinner=$('<div class="spinner hidden"/>').appendTo(a),Garnish.isArray(this.userId)){i=["and"];for(o=0;o<this.userId.length;o++)i.push("not "+this.userId[o])}else i="not "+this.userId;this.userSelect=new Craft.BaseElementSelectInput({id:"transferselect"+this.id,name:"transferContentTo",elementType:"craft\\elements\\User",criteria:{id:i},limit:1,modalSettings:{closeOtherModals:!1},onSelectElements:$.proxy(function(){this.updateSizeAndPosition(),this.$deleteActionRadios.first().prop("checked")?this.validateDeleteInputs():this.$deleteActionRadios.first().trigger("click")},this),onRemoveElements:$.proxy(this,"validateDeleteInputs"),selectable:!1,editable:!1}),this.addListener(r,"click","hide"),this.addListener(this.$deleteActionRadios,"change","validateDeleteInputs"),this.addListener(s,"submit","handleSubmit"),this.base(s,e)},validateDeleteInputs:function(){var t=!1;return this.$deleteActionRadios.eq(0).prop("checked")?t=!!this.userSelect.totalSelected:this.$deleteActionRadios.eq(1).prop("checked")&&(t=!0),t?this.$deleteSubmitBtn.removeClass("disabled"):this.$deleteSubmitBtn.addClass("disabled"),t},handleSubmit:function(t){!this._deleting&&this.validateDeleteInputs()?(this.$deleteSubmitBtn.addClass("active"),this.$deleteSpinner.removeClass("hidden"),this.disable(),this.userSelect.disable(),!(this._deleting=!0)===this.settings.onSubmit()&&t.preventDefault()):t.preventDefault()},onFadeIn:function(){Garnish.isMobileBrowser(!0)||this.$deleteActionRadios.first().trigger("focus"),this.base()}},{defaults:{contentSummary:[],onSubmit:$.noop,redirect:null}}),Craft.DraftEditor=Garnish.Base.extend({$revisionBtn:null,$revisionLabel:null,$spinner:null,$statusIcon:null,$editMetaBtn:null,metaHud:null,$nameTextInput:null,$notesTextInput:null,$saveMetaBtn:null,lastSerializedValue:null,timeout:null,saving:!1,saveXhr:null,checkFormAfterUpdate:!1,submittingForm:!1,duplicatedElements:null,errors:null,preview:null,previewToken:null,init:function(t){if(this.setSettings(t,Craft.DraftEditor.defaults),this.duplicatedElements={},this.$revisionBtn=$("#revision-btn"),this.$revisionLabel=$("#revision-label"),this.$spinner=$("#revision-spinner"),this.$statusIcon=$("#revision-status"),this.settings.previewTargets.length){this.settings.enablePreview&&this.addListener($("#preview-btn"),"click","openPreview");var e=$("#share-btn");1===this.settings.previewTargets.length?this.addListener(e,"click",function(){this.openShareLink(this.settings.previewTargets[0].url)}):this.createShareMenu(e)}this.settings.revisionId||(this.lastSerializedValue=this.serializeForm(!0),Craft.cp.$primaryForm.data("initialSerializedValue",this.lastSerializedValue),Craft.cp.$primaryForm.data("serializer",function(){return this.serializeForm(!0)}.bind(this)),this.settings.draftId?this.initForDraft():(this.addListener($("#save-draft-btn"),"click",function(t){t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut")}.bind(this)),this.settings.canUpdateSource||this.addListener(Craft.cp.$primaryForm,"submit.saveShortcut",function(t){t.saveShortcut&&(t.preventDefault(),this.createDraft(),this.removeListener(Craft.cp.$primaryForm,"submit.saveShortcut"))}.bind(this))))},initForDraft:function(){this.createEditMetaBtn(),this.addListener(Garnish.$bod,"keypress keyup change focus blur click mousedown mouseup",function(t){$(t.target).is(this.statusIcons())||(clearTimeout(this.timeout),Craft.inArray(t.type,["keypress","keyup","change"])?this.timeout=setTimeout(this.checkForm.bind(this),500):this.checkForm())}),this.addListener(Craft.cp.$primaryForm,"submit","handleFormSubmit"),this.addListener(this.$statusIcon,"click",function(){this.showStatusHud(this.$statusIcon)}.bind(this))},showStatusHud:function(t){if(null===this.errors)e="<p>"+Craft.t("app","The draft has been saved.")+"</p>";else{var e='<p class="error">'+Craft.t("app","The draft could not be saved.")+"</p>";if(this.errors.length){for(e+='<ul class="errors">',i=0;i<this.errors.length;i++)e+="<li>"+Craft.escapeHtml(this.errors[i])+"</li>";e+="</ul>"}}var s=new Garnish.HUD(t,e,{onHide:function(){s.destroy(),delete s}})},spinners:function(){return this.preview?this.$spinner.add(this.preview.$spinner):this.$spinner},statusIcons:function(){return this.preview?this.$statusIcon.add(this.preview.$statusIcon):this.$statusIcon},createEditMetaBtn:function(){this.$editMetaBtn=$("<a/>",{class:"btn edit icon",title:Craft.t("app","Edit draft settings")}).appendTo($("#revision-btngroup")),this.addListener(this.$editMetaBtn,"click","showMetaHud")},createShareMenu:function(t){t.addClass("menubtn");for(var e,i,s=$("<div/>",{class:"menu"}).insertAfter(t),n=$("<ul/>").appendTo(s),a=0;a<this.settings.previewTargets.length;a++)e=$("<li/>").appendTo(n),i=$("<a/>",{text:this.settings.previewTargets[a].label}).appendTo(e),this.addListener(i,"click",{target:a},function(t){this.openShareLink(this.settings.previewTargets[t.data.target].url)}.bind(this))},getPreviewToken:function(){return new Promise(function(i,s){this.previewToken?i(this.previewToken):Craft.postActionRequest("preview/create-token",{elementType:this.settings.elementType,sourceId:this.settings.sourceId,siteId:this.settings.siteId,draftId:this.settings.draftId,revisionId:this.settings.revisionId},function(t,e){"success"===e?(this.previewToken=t.token,i(this.previewToken)):s()}.bind(this))}.bind(this))},getTokenizedPreviewUrl:function(s,n){return new Promise(function(e,t){var i={};!n&&this.settings.isLive||(i[n||"x-craft-preview"]=Craft.randomString(10)),this.settings.isLive?e(Craft.getUrl(s,i)):this.getPreviewToken().then(function(t){i[Craft.tokenParam]=t,e(Craft.getUrl(s,i))}).catch(t)}.bind(this))},openShareLink:function(t){this.getTokenizedPreviewUrl(t).then(function(t){window.open(t)})},getPreview:function(){return this.preview||(this.preview=new Craft.Preview(this)),this.preview},openPreview:function(){return new Promise(function(t,e){this.ensureIsDraftOrRevision().then(function(){this.getPreview().open(),t()}.bind(this)).catch(e)}.bind(this))},ensureIsDraftOrRevision:function(){return new Promise(function(t,e){this.settings.draftId||this.settings.revisionid?t():this.createDraft().then(t).catch(e)}.bind(this))},serializeForm:function(t){var e=Craft.cp.$primaryForm.serialize();return this.isPreviewActive()&&(e=e.replace("__PREVIEW_FIELDS__=1",this.preview.$editor.serialize())),t&&!this.settings.isUnsavedDraft&&(e=(e=e.replace(/&action=[^&]*/,"")).replace(/&redirect=[^&]*/,"")),e},checkForm:function(t){if(this.settings.draftId){clearTimeout(this.timeout),this.timeout=null;var e=this.serializeForm(!0);!t&&e===this.lastSerializedValue||this.saveDraft(e)}},isPreviewActive:function(){return this.preview&&this.preview.isActive},createDraft:function(){return new Promise(function(t,e){this.saveDraft(this.serializeForm(!0)).then(t).catch(e)}.bind(this))},saveDraft:function(b){return new Promise(function(f,m){if(this.submittingForm)m();else if(this.lastSerializedValue=b,this.saving)this.checkFormAfterUpdate=!0;else{this.saving=!0;var v=this.spinners().removeClass("hidden"),C=this.statusIcons().removeClass("invisible checkmark-icon alert-icon").addClass("hidden");this.$saveMetaBtn&&this.$saveMetaBtn.addClass("active"),this.errors=null;var t=Craft.getActionUrl(this.settings.saveDraftAction);this.saveXhr=Craft.postActionRequest(t,this.prepareData(b),function(t,e){if(v.addClass("hidden"),this.$saveMetaBtn&&this.$saveMetaBtn.removeClass("active"),this.saving=!1,"abort"!==e){if("success"!==e||t.errors)return this.errors=(t?t.errors:null)||[],C.removeClass("hidden checkmark-icon").addClass("alert-icon").attr("title",Craft.t("app","The draft could not be saved.")),void m();t.title&&$("#header h1").text(t.title),t.docTitle&&(document.title=t.docTitle),this.$revisionLabel.text(t.draftName),this.settings.draftName=t.draftName,this.settings.draftNotes=t.draftNotes;var i=this.$revisionBtn.data("menubtn")?this.$revisionBtn.data("menubtn").menu:null,s=!this.settings.draftId;if(s){var n,a=document.location.href.search("#");n=-1!==a?document.location.href.substr(0,a):document.location.href,n+=(n.match(/\?/)?"&":"?")+"draftId="+t.draftId,-1!==a&&(n+=document.location.href.substr(a)),history.replaceState({},"",n);var r=$("#save-btn-container");r.length&&r.replaceWith($("<input/>",{type:"submit",class:"btn submit",value:Craft.t("app","Update {type}",{type:this.settings.elementTypeDisplayName})}));var o=$("#save-draft-btn-container");if(o.add(o.prev(".spacer")).remove(),this.settings.draftId=t.draftId,this.settings.isLive=!1,this.settings.canDeleteDraft=!0,this.previewToken=null,this.initForDraft(),i){i.$options.filter(":not(.site-option)").removeClass("sel");var l=i.$container.find(".revision-group-drafts");if(!l.length){var h=$("<h6/>",{text:Craft.t("app","Drafts")}).insertAfter(i.$container.find(".revision-group-current"));l=$("<ul/>",{class:"padded revision-group-drafts"}).insertAfter(h)}var d=$("<li/>").appendTo(l),c=$("<a/>",{class:"sel",html:'<span class="draft-name"></span> <span class="draft-creator light"></span>'}).appendTo(d);i.addOptions(c),i.selectOption(c);for(var u=i.$options.filter(".site-option[href]"),p=0;p<u.length;p++){var g=u.eq(p);g.attr("href",Craft.getUrl(g.attr("href"),{draftId:t.draftId}))}}}i&&(i.$options.filter(".sel").find(".draft-name").text(t.draftName),i.$options.filter(".sel").find(".draft-creator").text(Craft.t("app","by {creator}",{creator:t.creator}))),t.previewTargets&&JSON.stringify(t.previewTargets)!==JSON.stringify(this.settings.previewTargets)&&this.updatePreviewTargets(t.previewTargets),this.afterUpdate(b),s&&this.trigger("createDraft"),this.$nameTextInput&&this.checkMetaValues(),$.extend(this.duplicatedElements,t.duplicatedElements),f()}}.bind(this))}}.bind(this))},prepareData:function(t){for(var e in this.duplicatedElements)this.duplicatedElements.hasOwnProperty(e)&&(t=t.replace(new RegExp(Craft.escapeRegex(encodeURIComponent("]["+e+"]")),"g"),"]["+this.duplicatedElements[e]+"]"));return this.settings.draftId&&(t+="&draftId="+this.settings.draftId+"&draftName="+encodeURIComponent(this.settings.draftName)+"&draftNotes="+encodeURIComponent(this.settings.draftNotes||"")),t},updatePreviewTargets:function(t){for(var e={},i=0;i<this.settings.previewTargets.length;i++)e[this.settings.previewTargets[i].label]=this.settings.previewTargets[i];for(i=0;i<t.length;i++)e[t[i].label]&&(e[t[i].label].url=t[i].url)},afterUpdate:function(t){Craft.cp.$primaryForm.data("initialSerializedValue",t),this.statusIcons().removeClass("hidden").addClass("checkmark-icon").attr("title",Craft.t("app","The draft has been saved.")),this.trigger("update"),this.checkFormAfterUpdate&&(this.checkFormAfterUpdate=!1,this.timeout||this.checkForm())},showMetaHud:function(){this.metaHud?this.metaHud.show():(this.createMetaHud(),this.onMetaHudShow()),Garnish.isMobileBrowser(!0)||this.$nameTextInput.trigger("focus")},createMetaHud:function(){var t,e,i=$("<div/>");t=$('<div class="field"><div class="heading"><label for="draft-name">'+Craft.t("app","Draft Name")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$nameTextInput=$('<input type="text" class="text fullwidth" id="draft-name"/>').appendTo(e).val(this.settings.draftName),t=$('<div class="field"><div class="heading"><label for="draft-notes">'+Craft.t("app","Notes")+"</label></div></div>").appendTo(i),e=$('<div class="input"/>').appendTo(t),this.$notesTextInput=$('<textarea class="text fullwidth" id="draft-notes" rows="2"/>').appendTo(e).val(this.settings.draftNotes);var s=$('<div class="hud-footer flex flex-center"/>').appendTo(i);if(this.settings.canDeleteDraft)var n=$('<a class="error" role="button">'+Craft.t("app","Delete")+"</a>").appendTo(s);$('<div class="flex-grow"></div>').appendTo(s),this.$saveMetaBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Save")+'"/>').appendTo(s),this.metaHud=new Garnish.HUD(this.$editMetaBtn,i,{onSubmit:this.saveMeta.bind(this)}),new Garnish.NiceText(this.$notesTextInput),this.addListener(this.$notesTextInput,"keydown","onNotesKeydown"),this.addListener(this.$nameTextInput,"textchange","checkMetaValues"),this.addListener(this.$notesTextInput,"textchange","checkMetaValues"),this.metaHud.on("show",this.onMetaHudShow.bind(this)),this.metaHud.on("hide",this.onMetaHudHide.bind(this)),this.metaHud.on("escape",this.onMetaHudEscape.bind(this)),n&&this.addListener(n,"click","deleteDraft")},onMetaHudShow:function(){this.$editMetaBtn.addClass("active")},onMetaHudHide:function(){this.$editMetaBtn.removeClass("active")},onMetaHudEscape:function(){this.$nameTextInput.val(this.settings.draftName),this.$notesTextInput.val(this.settings.draftNotes)},onNotesKeydown:function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.metaHud.submit())},checkMetaValues:function(){return!this.$nameTextInput.val()||this.$nameTextInput.val()===this.settings.draftName&&this.$notesTextInput.val()===this.settings.draftNotes?(this.$saveMetaBtn.addClass("disabled"),!1):(this.$saveMetaBtn.removeClass("disabled"),!0)},shakeMetaHud:function(){Garnish.shake(this.metaHud.$hud)},saveMeta:function(){this.checkMetaValues()?(this.settings.draftName=this.$nameTextInput.val(),this.settings.draftNotes=this.$notesTextInput.val(),this.metaHud.hide(),this.checkForm(!0)):this.shakeMetaHud()},deleteDraft:function(){confirm(Craft.t("app","Are you sure you want to delete this draft?"))&&Craft.postActionRequest(this.settings.deleteDraftAction,{draftId:this.settings.draftId},function(t,e){"success"===e&&(window.location.href=this.settings.cpEditUrl)}.bind(this))},handleFormSubmit:function(t){if(t.preventDefault(),!this.submittingForm&&(t.customTrigger||this.settings.isUnsavedDraft||!this.settings.draftId||this.settings.canUpdateSource)){Craft.cp.$confirmUnloadForms=Craft.cp.$confirmUnloadForms.not(Craft.cp.$primaryForm),this.saving&&this.saveXhr.abort();for(var e,i=$("<form/>",{attr:{"accept-charset":Craft.cp.$primaryForm.attr("accept-charset"),action:Craft.cp.$primaryForm.attr("action"),enctype:Craft.cp.$primaryForm.attr("enctype"),method:Craft.cp.$primaryForm.attr("method"),target:Craft.cp.$primaryForm.attr("target")}}),s=this.prepareData(this.serializeForm(!1)).split("&"),n=0;n<s.length;n++)e=s[n].split("=",2),$("<input/>",{type:"hidden",name:decodeURIComponent(e[0]),value:decodeURIComponent(e[1]||"")}).appendTo(i);t.customTrigger&&t.customTrigger.data("action")||$("<input/>",{type:"hidden",name:"action",value:this.settings.applyDraftAction}).appendTo(i),t.saveShortcut&&Craft.cp.$primaryForm.data("saveshortcut-redirect")||t.customTrigger&&t.customTrigger.data("redirect")||$("<input/>",{type:"hidden",name:"redirect",value:this.settings.hashedRedirectUrl}).appendTo(i),i.appendTo(Garnish.$bod),i.submit(),this.submittingForm=!0}}},{defaults:{elementType:null,sourceId:null,siteId:null,isLive:!1,cpEditUrl:null,draftId:null,revisionId:null,draftName:null,draftNotes:null,canDeleteDraft:!1,canUpdateSource:!1,saveDraftAction:null,deleteDraftAction:null,applyDraftAction:null,enablePreview:!1,previewTargets:[]}}),Craft.DynamicGenerator=Craft.BaseInputGenerator.extend({callback:$.noop,init:function(t,e,i){this.callback=i,this.base(t,e)},generateTargetValue:function(t){return this.callback(t)}}),Craft.EditableTable=Garnish.Base.extend({initialized:!1,id:null,baseName:null,columns:null,sorter:null,biggestId:-1,$table:null,$tbody:null,$addRowBtn:null,rowCount:0,hasMaxRows:!1,hasMinRows:!1,radioCheckboxes:null,init:function(t,e,i,s){if(this.id=t,this.baseName=e,this.columns=i,this.setSettings(s,Craft.EditableTable.defaults),this.radioCheckboxes={},this.$table=$("#"+t),this.$tbody=this.$table.children("tbody"),this.rowCount=this.$tbody.find("tr").length,this.$table.data("editable-table")&&(Garnish.log("Double-instantiating an editable table on an element"),this.$table.data("editable-table").destroy()),this.$table.data("editable-table",this),this.sorter=new Craft.DataTableSorter(this.$table,{helperClass:"editabletablesorthelper",copyDraggeeInputValuesToHelper:!0}),this.isVisible()?this.initialize():setTimeout($.proxy(this,"initializeIfVisible"),500),this.settings.minRows&&this.rowCount<this.settings.minRows)for(var n=this.rowCount;n<this.settings.minRows;n++)this.addRow()},isVisible:function(){return 0<this.$table.height()},initialize:function(){if(this.initialized)return!1;this.initialized=!0,this.removeListener(Garnish.$win,"resize");for(var t=this.$tbody.children(),e=0;e<t.length;e++)this.createRowObj(t[e]);return this.$addRowBtn=this.$table.next(".add"),this.updateAddRowButton(),this.addListener(this.$addRowBtn,"activate","addRow"),!0},initializeIfVisible:function(){this.removeListener(Garnish.$win,"resize"),this.isVisible()?this.initialize():this.addListener(Garnish.$win,"resize","initializeIfVisible")},updateAddRowButton:function(){this.canAddRow()?(this.$addRowBtn.css("opacity","1"),this.$addRowBtn.css("pointer-events","auto")):(this.$addRowBtn.css("opacity","0.2"),this.$addRowBtn.css("pointer-events","none"))},canDeleteRow:function(){return this.rowCount>this.settings.minRows},deleteRow:function(t){this.canDeleteRow()&&(this.sorter.removeItems(t.$tr),t.$tr.remove(),this.rowCount--,this.updateAddRowButton(),this.settings.onDeleteRow(t.$tr),t.destroy())},canAddRow:function(){return!this.settings.staticRows&&(!this.settings.maxRows||this.rowCount<this.settings.maxRows)},addRow:function(t,e){if(this.canAddRow()){var i=this.settings.rowIdPrefix+(this.biggestId+1),s=this.createRow(i,this.columns,this.baseName,$.extend({},this.settings.defaultValues));e?s.prependTo(this.$tbody):s.appendTo(this.$tbody);var n=this.createRowObj(s);return this.sorter.addItems(s),!1!==t&&s.find("input:visible,textarea:visible,select:visible").first().trigger("focus"),this.rowCount++,this.updateAddRowButton(),this.settings.onAddRow(s),n}},createRow:function(t,e,i,s){return Craft.EditableTable.createRow(t,e,i,s)},createRowObj:function(t){return new Craft.EditableTable.Row(this,t)},focusOnPrevRow:function(t,e,i){var s,n=t.prev("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1,!0))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnPrevRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}},focusOnNextRow:function(t,e,i){var s,n=t.next("tr");if((s=n.length?n.data("editable-table-row"):this.addRow(!1))&&s.$tds[e])if($(s.$tds[e]).hasClass("disabled"))n&&this.focusOnNextRow(n,e,i);else{var a=$("textarea,input.text",s.$tds[e]);a.length&&($(i).trigger("blur"),a.trigger("focus"))}}},{textualColTypes:["color","date","email","multiline","number","singleline","template","time","url"],defaults:{rowIdPrefix:"",defaultValues:{},staticRows:!1,minRows:null,maxRows:null,onAddRow:$.noop,onDeleteRow:$.noop},createRow:function(t,e,i,s){var n=$("<tr/>",{"data-id":t});for(var a in e)if(e.hasOwnProperty(a)){var r,o=e[a],l=void 0!==s[a]?s[a]:"";if("heading"===o.type)r=$("<th/>",{scope:"row",class:o.class,html:l});else{var h=i+"["+t+"]["+a+"]",d=Craft.inArray(o.type,Craft.EditableTable.textualColTypes);switch(r=$("<td/>",{class:o.class,width:o.width}),d&&r.addClass("textual"),o.code&&r.addClass("code"),o.type){case"checkbox":Craft.ui.createCheckbox({name:h,value:o.value||"1",checked:!!l}).appendTo(r);break;case"color":Craft.ui.createColorInput({name:h,value:l,small:!0}).appendTo(r);break;case"date":Craft.ui.createDateInput({name:h,value:l}).appendTo(r);break;case"lightswitch":Craft.ui.createLightswitch({name:h,value:o.value||"1",on:!!l,small:!0}).appendTo(r);break;case"select":Craft.ui.createSelect({name:h,options:o.options,value:l||function(){for(var t in o.options)if(o.options.hasOwnProperty(t)&&o.options[t].default)return void 0!==o.options[t].value?o.options[t].value:t;return null}(),class:"small"}).appendTo(r);break;case"time":Craft.ui.createTimeInput({name:h,value:l}).appendTo(r);break;case"email":case"url":Craft.ui.createTextInput({name:h,value:l,type:o.type,placeholder:o.placeholder||null}).appendTo(r);break;default:$("<textarea/>",{name:h,rows:1,val:l,placeholder:o.placeholder}).appendTo(r)}}r.appendTo(n)}return $("<td/>",{class:"thin action"}).append($("<a/>",{class:"move icon",title:Craft.t("app","Reorder")})).appendTo(n),$("<td/>",{class:"thin action"}).append($("<a/>",{class:"delete icon",title:Craft.t("app","Delete")})).appendTo(n),n}}),Craft.EditableTable.Row=Garnish.Base.extend({table:null,id:null,niceTexts:null,$tr:null,$tds:null,tds:null,$textareas:null,$deleteBtn:null,init:function(t,e){this.table=t,this.$tr=$(e),this.$tds=this.$tr.children(),this.tds=[],this.id=this.$tr.attr("data-id"),this.$tr.data("editable-table-row",this);var i=parseInt(this.id.substr(this.table.settings.rowIdPrefix.length));i>this.table.biggestId&&(this.table.biggestId=i),this.$textareas=$(),this.niceTexts=[];var s,n,a,r,o,l={},h=0;for(s in this.table.columns)this.table.columns.hasOwnProperty(s)&&(n=this.table.columns[s],a=this.tds[s]=this.$tds[h],Craft.inArray(n.type,Craft.EditableTable.textualColTypes)?(r=$("textarea, input.text",a),this.$textareas=this.$textareas.add(r),this.addListener(r,"focus","onTextareaFocus"),this.addListener(r,"mousedown","ignoreNextTextareaFocus"),this.niceTexts.push(new Garnish.NiceText(r,{onHeightChange:$.proxy(this,"onTextareaHeightChange")})),this.addListener(r,"keypress",{tdIndex:h,type:n.type},"handleKeypress"),this.addListener(r,"textchange",{type:n.type},"validateValue"),r.trigger("textchange"),l[s]=r):"checkbox"===n.type&&(o=$('input[type="checkbox"]',a),n.radioMode&&(void 0===this.table.radioCheckboxes[s]&&(this.table.radioCheckboxes[s]=[]),this.table.radioCheckboxes[s].push(o[0]),this.addListener(o,"change",{colId:s},"onRadioCheckboxChange")),n.toggle&&this.addListener(o,"change",{colId:s},function(t){this.applyToggleCheckbox(t.data.colId)})),h++);for(s in this.onTextareaHeightChange(),this.table.columns)!this.table.columns.hasOwnProperty(s)||"checkbox"===(n=this.table.columns[s]).type&&n.toggle&&this.applyToggleCheckbox(s);for(s in this.table.columns)!this.table.columns.hasOwnProperty(s)||(n=this.table.columns[s]).autopopulate&&void 0!==l[n.autopopulate]&&!l[s].val()&&new Craft.HandleGenerator(l[s],l[n.autopopulate],{allowNonAlphaStart:!0});var d=this.$tr.children().last().find(".delete");this.addListener(d,"click","deleteRow")},onTextareaFocus:function(t){this.onTextareaHeightChange();var e=$(t.currentTarget);e.data("ignoreNextFocus")?e.data("ignoreNextFocus",!1):setTimeout(function(){Craft.selectFullValue(e)},0)},onRadioCheckboxChange:function(t){if(t.currentTarget.checked)for(var e=0;e<this.table.radioCheckboxes[t.data.colId].length;e++){var i=this.table.radioCheckboxes[t.data.colId][e];i.checked=i===t.currentTarget}},applyToggleCheckbox:function(t){for(var e,i,s=this.table.columns[t],n=$('input[type="checkbox"]',this.tds[t]).prop("checked"),a=0;a<s.toggle.length;a++)e=s.toggle[a],this.table.colum,(i="!"===e[0])&&(e=e.substr(1)),n&&!i||!n&&i?$(this.tds[e]).removeClass("disabled").find("textarea, input").prop("disabled",!1):$(this.tds[e]).addClass("disabled").find("textarea, input").prop("disabled",!0)},ignoreNextTextareaFocus:function(t){$.data(t.currentTarget,"ignoreNextFocus",!0)},handleKeypress:function(t){var e=t.keyCode?t.keyCode:t.charCode,i=Garnish.isCtrlKeyPressed(t);if(e===Garnish.RETURN_KEY&&("multiline"!==t.data.type||i))return t.preventDefault(),void(t.shiftKey?this.table.focusOnPrevRow(this.$tr,t.data.tdIndex,t.currentTarget):this.table.focusOnNextRow(this.$tr,t.data.tdIndex,t.currentTarget));"number"!==t.data.type||i||Craft.inArray(e,Craft.EditableTable.Row.numericKeyCodes)||t.preventDefault()},validateValue:function(t){if("multiline"!==t.data.type){var e;if("number"===t.data.type){var i=t.currentTarget.value.match(/^\s*(-?[\d\\.]*)/);e=null!==i?i[1]:""}else e=t.currentTarget.value.replace(/[\r\n]/g,"");e!==t.currentTarget.value&&(t.currentTarget.value=e)}},onTextareaHeightChange:function(){for(var t=-1,e=0;e<this.niceTexts.length;e++)this.niceTexts[e].height>t&&(t=this.niceTexts[e].height);this.$textareas.css("min-height",t);var i=this.$textareas.filter(":visible").first().parent().height();t<i&&this.$textareas.css("min-height",i)},deleteRow:function(){this.table.deleteRow(this)}},{numericKeyCodes:[9,8,37,38,39,40,45,91,46,190,48,49,50,51,52,53,54,55,56,57]}),Craft.ElementActionTrigger=Garnish.Base.extend({maxLevels:null,newChildUrl:null,$trigger:null,$selectedItems:null,triggerEnabled:!0,init:function(t){this.setSettings(t,Craft.ElementActionTrigger.defaults),this.$trigger=$("#"+t.type.replace(/[\[\]\\]+/g,"-")+"-actiontrigger"),this.settings.activate&&(this.$trigger.data("custom-handler",!0),"FORM"===this.$trigger.prop("nodeName")?this.addListener(this.$trigger,"submit","handleTriggerActivation"):this.addListener(this.$trigger,"click","handleTriggerActivation")),this.updateTrigger(),Craft.elementIndex.on("selectionChange",$.proxy(this,"updateTrigger"))},updateTrigger:function(){0!==Craft.elementIndex.getSelectedElements().length&&(this.validateSelection()?this.enableTrigger():this.disableTrigger())},validateSelection:function(){var t=!0;return this.$selectedItems=Craft.elementIndex.getSelectedElements(),!this.settings.batch&&1<this.$selectedItems.length?t=!1:"function"==typeof this.settings.validateSelection&&(t=this.settings.validateSelection(this.$selectedItems)),t},enableTrigger:function(){this.triggerEnabled||(this.$trigger.removeClass("disabled"),this.triggerEnabled=!0)},disableTrigger:function(){this.triggerEnabled&&(this.$trigger.addClass("disabled"),this.triggerEnabled=!1)},handleTriggerActivation:function(t){t.preventDefault(),t.stopPropagation(),this.triggerEnabled&&this.settings.activate(this.$selectedItems)}},{defaults:{type:null,batch:!0,validateSelection:null,activate:null}}),Craft.ElementThumbLoader=Garnish.Base.extend({queue:null,workers:[],init:function(){this.queue=[];for(var t=0;t<3;t++)this.workers.push(new Craft.ElementThumbLoader.Worker(this))},load:function(t){if(this.queue=this.queue.concat(t.find(".elementthumb").toArray()),this.queue.length)for(var e=0;e<this.workers.length;e++)this.workers[e].active||this.workers[e].loadNext()},destroy:function(){for(var t=0;t<this.workers.length;t++)this.workers[t].destroy();this.base()}}),Craft.ElementThumbLoader.Worker=Garnish.Base.extend({loader:null,active:!1,init:function(t){this.loader=t},loadNext:function(){var t=this.loader.queue.shift();if(void 0!==t){this.active=!0;var e=$(t);if(e.find("img").length)this.loadNext();else{var i=$("<img/>",{sizes:e.attr("data-sizes"),srcset:e.attr("data-srcset"),alt:""});this.addListener(i,"load","loadNext"),i.appendTo(e),picturefill({elements:[i[0]]})}}else this.active=!1}}),Craft.ElevatedSessionForm=Garnish.Base.extend({$form:null,inputs:null,init:function(t,e){if(this.$form=$(t),void 0!==e){this.inputs=[],e=$.makeArray(e);for(var i=0;i<e.length;i++)for(var s=$(e[i]),n=0;n<s.length;n++){var a=s.eq(n);this.inputs.push({input:a,val:Garnish.getInputPostVal(a)})}}this.addListener(this.$form,"submit","handleFormSubmit")},handleFormSubmit:function(t){if(Craft.elevatedSessionManager.fetchingTimeout)t.preventDefault();else{if(this.inputs){for(var e,i=!1,s=0;s<this.inputs.length;s++)if((e=this.inputs[s].input).data("passwordInput")&&(e=e.data("passwordInput").$currentInput),Garnish.getInputPostVal(e)!==this.inputs[s].val){i=!0;break}if(!i)return}t.preventDefault(),Craft.elevatedSessionManager.requireElevatedSession($.proxy(this,"submitForm"))}},submitForm:function(){this.disable(),this.$form.trigger("submit"),this.enable()}}),Craft.ElevatedSessionManager=Garnish.Base.extend({fetchingTimeout:!1,passwordModal:null,$passwordInput:null,$passwordSpinner:null,$submitBtn:null,$errorPara:null,callback:null,requireElevatedSession:function(t){this.callback=t,this.fetchingTimeout=!0,Craft.postActionRequest("users/get-elevated-session-timeout",$.proxy(function(t,e){this.fetchingTimeout=!1,"success"===e&&(!1===t.timeout||t.timeout>=Craft.ElevatedSessionManager.minSafeElevatedSessionTimeout?this.callback():this.showPasswordModal())},this))},showPasswordModal:function(){if(this.passwordModal)this.passwordModal.show();else{var t=$('<form id="elevatedsessionmodal" class="modal secure fitted"/>'),e=$('<div class="body"><p>'+Craft.t("app","Enter your password to continue.")+"</p></div>").appendTo(t),i=$('<div class="inputcontainer">').appendTo(e),s=$('<div class="flex"/>').appendTo(i),n=$('<div class="flex-grow"/>').appendTo(s),a=$("<td/>").appendTo(s),r=$('<div class="passwordwrapper"/>').appendTo(n);this.$passwordInput=$('<input type="password" class="text password fullwidth" placeholder="'+Craft.t("app","Password")+'" autocomplete="current-password"/>').appendTo(r),this.$passwordSpinner=$('<div class="spinner hidden"/>').appendTo(i),this.$submitBtn=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","Submit")+'" />').appendTo(a),this.$errorPara=$('<p class="error"/>').appendTo(e),this.passwordModal=new Garnish.Modal(t,{closeOtherModals:!1,onFadeIn:$.proxy(function(){setTimeout($.proxy(this,"focusPasswordInput"),100)},this),onFadeOut:$.proxy(function(){this.$passwordInput.val("")},this)}),new Craft.PasswordInput(this.$passwordInput,{onToggleInput:$.proxy(function(t){this.$passwordInput=t},this)}),this.addListener(this.$passwordInput,"textchange","validatePassword"),this.addListener(t,"submit","submitPassword")}},focusPasswordInput:function(){Garnish.isMobileBrowser(!0)||this.$passwordInput.trigger("focus")},validatePassword:function(){return 6<=this.$passwordInput.val().length?(this.$submitBtn.removeClass("disabled"),!0):(this.$submitBtn.addClass("disabled"),!1)},submitPassword:function(t){if(t&&t.preventDefault(),this.validatePassword()){this.$passwordSpinner.removeClass("hidden"),this.clearLoginError();var e={currentPassword:this.$passwordInput.val()};Craft.postActionRequest("users/start-elevated-session",e,$.proxy(function(t,e){this.$passwordSpinner.addClass("hidden"),"success"===e?t.success?(this.passwordModal.hide(),this.callback()):(this.showPasswordError(t.message||Craft.t("app","Incorrect password.")),Garnish.shake(this.passwordModal.$container),this.focusPasswordInput()):this.showPasswordError()},this))}},showPasswordError:function(t){null==t&&(t=Craft.t("app","An unknown error occurred.")),this.$errorPara.text(t),this.passwordModal.updateSizeAndPosition()},clearLoginError:function(){this.showPasswordError("")}},{minSafeElevatedSessionTimeout:5}),Craft.elevatedSessionManager=new Craft.ElevatedSessionManager,Craft.EntryIndex=Craft.BaseElementIndex.extend({publishableSections:null,$newEntryBtnGroup:null,$newEntryBtn:null,init:function(t,e,i){this.on("selectSource",$.proxy(this,"updateButton")),this.on("selectSite",$.proxy(this,"updateButton")),this.base(t,e,i)},afterInit:function(){this.publishableSections=[];for(var t=0;t<Craft.publishableSections.length;t++){var e=Craft.publishableSections[t];this.getSourceByKey("section:"+e.uid)&&this.publishableSections.push(e)}this.base()},getDefaultSourceKey:function(){if("index"===this.settings.context&&"undefined"!=typeof defaultSectionHandle){if("singles"===defaultSectionHandle)return"singles";for(var t=0;t<this.$sources.length;t++){var e=$(this.$sources[t]);if(e.data("handle")===defaultSectionHandle)return e.data("key")}}return this.base()},updateButton:function(){if(this.$source){var t,e,i,s;if(t="singles"===this.$source.data("key")?"singles":this.$source.data("handle"),this.publishableSections.length){var n,a;if(this.$newEntryBtnGroup&&this.$newEntryBtnGroup.remove(),t)for(e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].handle===t){n=this.publishableSections[e];break}if(this.$newEntryBtnGroup=$('<div class="btngroup submit"/>'),n?(i=this._getSectionTriggerHref(n),s="index"===this.settings.context?Craft.t("app","New entry"):Craft.t("app","New {section} entry",{section:n.name}),this.$newEntryBtn=$('<a class="btn submit add icon" '+i+">"+Craft.escapeHtml(s)+"</a>").appendTo(this.$newEntryBtnGroup),"index"!==this.settings.context&&this.addListener(this.$newEntryBtn,"click",function(t){this._openCreateEntryModal(t.currentTarget.getAttribute("data-id"))}),1<this.publishableSections.length&&(a=$('<div class="btn submit menubtn"></div>').appendTo(this.$newEntryBtnGroup))):this.$newEntryBtn=a=$('<div class="btn submit add icon menubtn">'+Craft.t("app","New entry")+"</div>").appendTo(this.$newEntryBtnGroup),a){var r='<div class="menu"><ul>';for(e=0;e<this.publishableSections.length;e++){var o=this.publishableSections[e];("index"===this.settings.context&&-1!==$.inArray(this.siteId,o.sites)||"index"!==this.settings.context&&o!==n)&&(i=this._getSectionTriggerHref(o),s="index"===this.settings.context?o.name:Craft.t("app","New {section} entry",{section:o.name}),r+="<li><a "+i+'">'+Craft.escapeHtml(s)+"</a></li>")}$(r+="</ul></div>").appendTo(this.$newEntryBtnGroup);var l=new Garnish.MenuBtn(a);"index"!==this.settings.context&&l.on("optionSelect",$.proxy(function(t){this._openCreateEntryModal(t.option.getAttribute("data-id"))},this))}this.addButton(this.$newEntryBtnGroup)}if("index"===this.settings.context&&"undefined"!=typeof history){var h="entries";t&&(h+="/"+t),history.replaceState({},"",Craft.getUrl(h))}}},_getSectionTriggerHref:function(t){if("index"!==this.settings.context)return'data-id="'+t.id+'"';var e="entries/"+t.handle+"/new";if(params={},this.siteId)for(var i=0;i<Craft.sites.length;i++)Craft.sites[i].id==this.siteId&&(params.site=Craft.sites[i].handle);return'href="'+Craft.getUrl(e,params)+'"'},_openCreateEntryModal:function(t){if(!this.$newEntryBtn.hasClass("loading")){for(var i,e=0;e<this.publishableSections.length;e++)if(this.publishableSections[e].id==t){i=this.publishableSections[e];break}if(i){this.$newEntryBtn.addClass("inactive");var s=this.$newEntryBtn.text();this.$newEntryBtn.text(Craft.t("app","New {section} entry",{section:i.name})),Craft.createElementEditor(this.elementType,{hudTrigger:this.$newEntryBtnGroup,elementType:"craft\\elements\\Entry",siteId:this.siteId,attributes:{sectionId:t,typeId:i.entryTypes[0].id},onBeginLoading:$.proxy(function(){this.$newEntryBtn.addClass("loading")},this),onEndLoading:$.proxy(function(){this.$newEntryBtn.removeClass("loading")},this),onHideHud:$.proxy(function(){this.$newEntryBtn.removeClass("inactive").text(s)},this),onSaveElement:$.proxy(function(t){var e="section:"+i.uid;this.sourceKey!==e&&this.selectSourceByKey(e),this.selectElementAfterUpdate(t.id),this.updateElements()},this)})}}}}),Craft.registerElementIndexClass("craft\\elements\\Entry",Craft.EntryIndex),Craft.FieldLayoutDesigner=Garnish.Base.extend({$container:null,$tabContainer:null,$unusedFieldContainer:null,$newTabBtn:null,$allFields:null,tabGrid:null,unusedFieldGrid:null,tabDrag:null,fieldDrag:null,init:function(t,e){this.$container=$(t),this.setSettings(e,Craft.FieldLayoutDesigner.defaults),this.$tabContainer=this.$container.children(".fld-tabs"),this.$unusedFieldContainer=this.$container.children(".unusedfields"),this.$newTabBtn=this.$container.find("> .newtabbtn-container > .btn"),this.$allFields=this.$unusedFieldContainer.find(".fld-field"),this.tabGrid=new Craft.Grid(this.$tabContainer,Craft.FieldLayoutDesigner.gridSettings),this.unusedFieldGrid=new Craft.Grid(this.$unusedFieldContainer,Craft.FieldLayoutDesigner.gridSettings);for(var i=this.$tabContainer.children(),s=0;s<i.length;s++)this.initTab($(i[s]));this.fieldDrag=new Craft.FieldLayoutDesigner.FieldDrag(this),this.settings.customizableTabs&&(this.tabDrag=new Craft.FieldLayoutDesigner.TabDrag(this),this.addListener(this.$newTabBtn,"activate","addTab"))},initTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);$('<li><a data-action="rename">'+Craft.t("app","Rename")+"</a></li>").appendTo(s),$('<li><a data-action="delete">'+Craft.t("app","Delete")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onTabOptionSelect")})}for(var n=t.children(".fld-tabcontent").children(),a=0;a<n.length;a++)this.initField($(n[a]))},initField:function(t){var e=t.find(".settings"),i=$('<div class="menu" data-align="center"/>').insertAfter(e),s=$("<ul/>").appendTo(i);t.hasClass("fld-required")?$('<li><a data-action="toggle-required">'+Craft.t("app","Make not required")+"</a></li>").appendTo(s):$('<li><a data-action="toggle-required">'+Craft.t("app","Make required")+"</a></li>").appendTo(s),$('<li><a data-action="remove">'+Craft.t("app","Remove")+"</a></li>").appendTo(s),new Garnish.MenuBtn(e,{onOptionSelect:$.proxy(this,"onFieldOptionSelect")})},onTabOptionSelect:function(t){if(this.settings.customizableTabs){var e=$(t),i=e.data("menu").$anchor.parent().parent().parent();switch(e.data("action")){case"rename":this.renameTab(i);break;case"delete":this.deleteTab(i)}}},onFieldOptionSelect:function(t){var e=$(t),i=e.data("menu").$anchor.parent();switch(e.data("action")){case"toggle-required":this.toggleRequiredField(i,e);break;case"remove":this.removeField(i)}},renameTab:function(t){if(this.settings.customizableTabs){var e=t.find(".tabs .tab span"),i=e.text(),s=prompt(Craft.t("app","Give your tab a name."),i);s&&s!==i&&(e.text(s),t.find(".id-input").attr("name",this.getFieldInputName(s)))}},deleteTab:function(t){if(this.settings.customizableTabs){for(var e=t.find(".fld-field"),i=0;i<e.length;i++){var s=$(e[i]).attr("data-id");this.removeFieldById(s)}this.tabGrid.removeItems(t),this.tabDrag.removeItems(t),t.remove()}},toggleRequiredField:function(t,e){t.hasClass("fld-required")?(t.removeClass("fld-required"),t.find(".required-input").remove(),setTimeout(function(){e.text(Craft.t("app","Make required"))},500)):(t.addClass("fld-required"),$('<input class="required-input" type="hidden" name="'+this.settings.requiredFieldInputName+'" value="'+t.data("id")+'">').appendTo(t),setTimeout(function(){e.text(Craft.t("app","Make not required"))},500))},removeField:function(t){var e=t.attr("data-id");t.remove(),this.removeFieldById(e),this.tabGrid.refreshCols(!0)},removeFieldById:function(t){var e=this.$allFields.filter("[data-id="+t+"]:first"),i=e.closest(".fld-tab");e.removeClass("hidden"),i.hasClass("hidden")?(i.removeClass("hidden"),this.unusedFieldGrid.addItems(i),this.settings.customizableTabs&&this.tabDrag.addItems(i)):this.unusedFieldGrid.refreshCols(!0)},addTab:function(){if(this.settings.customizableTabs){var t=$('<div class="fld-tab"><div class="tabs"><div class="tab sel draggable"><span>Tab '+(this.tabGrid.$items.length+1)+'</span><a class="settings icon" title="'+Craft.t("app","Rename")+'"></a></div></div><div class="fld-tabcontent"></div></div>').appendTo(this.$tabContainer);this.tabGrid.addItems(t),this.tabDrag.addItems(t),this.initTab(t)}},getFieldInputName:function(t){return this.settings.fieldInputName.replace(/__TAB_NAME__/g,Craft.encodeUriComponent(t))}},{gridSettings:{itemSelector:".fld-tab:not(.hidden)",minColWidth:240,fillMode:"grid",snapToGrid:30},defaults:{customizableTabs:!0,fieldInputName:"fieldLayout[__TAB_NAME__][]",requiredFieldInputName:"requiredFields[]"}}),Craft.FieldLayoutDesigner.BaseDrag=Garnish.Drag.extend({designer:null,$insertion:null,showingInsertion:!1,$caboose:null,draggingUnusedItem:!1,addToTabGrid:!1,init:function(t,e){this.designer=t;var i=this.designer.$tabContainer.find(this.itemSelector).add(this.designer.$unusedFieldContainer.find(this.itemSelector));this.base(i,e)},onDragStart:function(){this.base(),this.draggingUnusedItem=this.$draggee.hasClass("unused"),this.$insertion=this.getInsertion(),this.addCaboose(),this.$items=$().add(this.$items.add(this.$caboose)),this.addToTabGrid&&this.designer.tabGrid.addItems(this.$caboose),this.draggingUnusedItem?this.showingInsertion=!1:(this.$insertion.insertBefore(this.$draggee),this.$draggee.detach(),this.$items=$().add(this.$items.not(this.$draggee).add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$draggee),this.designer.tabGrid.addItems(this.$insertion))),this.setMidpoints()},addCaboose:$.noop,getItemContainer:$.noop,isItemInTabContainer:function(t){return this.getItemContainer(t)[0]===this.designer.$tabContainer[0]},setMidpoints:function(){for(var t=0;t<this.$items.length;t++){var e=$(this.$items[t]);if(this.isItemInTabContainer(e)){var i=e.offset();e.data("midpoint",{left:i.left+e.outerWidth()/2,top:i.top+e.outerHeight()/2})}}},onDrag:function(){this.draggingUnusedItem&&!Garnish.hitTest(this.mouseX,this.mouseY,this.designer.$tabContainer)?this.showingInsertion&&(this.$insertion.remove(),this.$items=$().add(this.$items.not(this.$insertion)),this.showingInsertion=!1,this.addToTabGrid?this.designer.tabGrid.removeItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints()):(this.onDrag._closestItem=this.getClosestItem(),this.onDrag._closestItem!==this.$insertion[0]&&(this.showingInsertion&&$.inArray(this.$insertion[0],this.$items)<$.inArray(this.onDrag._closestItem,this.$items)&&-1===$.inArray(this.onDrag._closestItem,this.$caboose)?this.$insertion.insertAfter(this.onDrag._closestItem):this.$insertion.insertBefore(this.onDrag._closestItem),this.$items=$().add(this.$items.add(this.$insertion)),this.showingInsertion=!0,this.addToTabGrid?this.designer.tabGrid.addItems(this.$insertion):this.designer.tabGrid.refreshCols(!0),this.setMidpoints())),this.base()},getClosestItem:function(){for(this.getClosestItem._closestItem=null,this.getClosestItem._closestItemMouseDiff=null,this.getClosestItem._i=0;this.getClosestItem._i<this.$items.length;this.getClosestItem._i++)this.getClosestItem._$item=$(this.$items[this.getClosestItem._i]),this.isItemInTabContainer(this.getClosestItem._$item)&&(this.getClosestItem._midpoint=this.getClosestItem._$item.data("midpoint"),this.getClosestItem._mouseDiff=Garnish.getDist(this.getClosestItem._midpoint.left,this.getClosestItem._midpoint.top,this.mouseX,this.mouseY),(null===this.getClosestItem._closestItem||this.getClosestItem._mouseDiff<this.getClosestItem._closestItemMouseDiff)&&(this.getClosestItem._closestItem=this.getClosestItem._$item[0],this.getClosestItem._closestItemMouseDiff=this.getClosestItem._mouseDiff));return this.getClosestItem._closestItem},onDragStop:function(){this.showingInsertion&&(this.$insertion.replaceWith(this.$draggee),this.$items=$().add(this.$items.not(this.$insertion).add(this.$draggee)),this.addToTabGrid&&(this.designer.tabGrid.removeItems(this.$insertion),this.designer.tabGrid.addItems(this.$draggee))),this.$items=this.$items.not(this.$caboose),this.$caboose.remove(),this.addToTabGrid&&this.designer.tabGrid.removeItems(this.$caboose),this.$draggee.css({display:this.draggeeDisplay,visibility:"hidden"}),this.designer.tabGrid.refreshCols(!0),this.designer.unusedFieldGrid.refreshCols(!0),this.returnHelpersToDraggees(),this.base()}}),Craft.FieldLayoutDesigner.TabDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab",addToTabGrid:!0,init:function(t){this.base(t,{handle:".tab"})},addCaboose:function(){this.$caboose=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(this.designer.$tabContainer)},getInsertion:function(){var t=this.$draggee.find(".tab");return $('<div class="fld-tab fld-insertion" style="height: '+this.$draggee.height()+'px;"><div class="tabs"><div class="tab sel draggable" style="width: '+t.width()+"px; height: "+t.height()+'px;"></div></div><div class="fld-tabcontent" style="height: '+this.$draggee.find(".fld-tabcontent").height()+'px;"></div></div>')},getItemContainer:function(t){return t.parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused"),e=t.find(".tab span").text();t.find(".fld-field").removeClass("unused"),t.find(".tabs .tab").append('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');var i=t.find(".fld-field"),s=i.filter(".hidden").remove();(i=i.not(s)).prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>');for(var n=0;n<i.length;n++){var a=$(i[n]),r=this.designer.getFieldInputName(e);a.append('<input class="id-input" type="hidden" name="'+r+'" value="'+a.data("id")+'">')}this.designer.fieldDrag.addItems(i),this.designer.initTab(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),this.$draggee.find(".fld-field").addClass("hidden"),this.$draggee=t,this.addItems(t),this.designer.tabGrid.addItems(t),this.designer.unusedFieldGrid.removeItems(this.$draggee)}this.base()}}),Craft.FieldLayoutDesigner.FieldDrag=Craft.FieldLayoutDesigner.BaseDrag.extend({itemSelector:"> div.fld-tab .fld-field",addCaboose:function(){this.$caboose=$();for(var t=this.designer.$tabContainer.children().children(".fld-tabcontent"),e=0;e<t.length;e++){var i=$('<div class="fld-tab fld-tab-caboose"/>').appendTo(t[e]);this.$caboose=this.$caboose.add(i)}},getInsertion:function(){return $('<div class="fld-field fld-insertion" style="height: '+this.$draggee.height()+'px;"/>')},getItemContainer:function(t){return t.parent().parent().parent()},onDragStop:function(){if(this.draggingUnusedItem&&this.showingInsertion){var t=this.$draggee.clone().removeClass("unused");if(t.prepend('<a class="settings icon" title="'+Craft.t("app","Edit")+'"></a>'),this.designer.initField(t),this.$draggee.css({visibility:"inherit",display:"field"}).addClass("hidden"),0===this.$draggee.siblings(":not(.hidden)").length){var e=this.$draggee.parent().parent();e.addClass("hidden"),this.designer.unusedFieldGrid.removeItems(e)}this.$draggee=t,this.addItems(t)}if(this.showingInsertion){var i=this.$insertion.parent().parent().find(".tab span").text(),s=this.designer.getFieldInputName(i);this.draggingUnusedItem?this.$draggee.append('<input class="id-input" type="hidden" name="'+s+'" value="'+this.$draggee.data("id")+'">'):this.$draggee.find(".id-input").attr("name",s)}this.base()}}),Craft.FieldToggle=Garnish.Base.extend({$toggle:null,targetPrefix:null,targetSelector:null,reverseTargetSelector:null,_$target:null,_$reverseTarget:null,type:null,init:function(t){this.$toggle=$(t),this.$toggle.data("fieldtoggle")&&(Garnish.log("Double-instantiating a field toggle on an element"),this.$toggle.data("fieldtoggle").destroy()),this.$toggle.data("fieldtoggle",this),this.type=this.getType(),"select"===this.type?this.targetPrefix=this.$toggle.attr("data-target-prefix")||"":(this.targetSelector=this.normalizeTargetSelector(this.$toggle.data("target")),this.reverseTargetSelector=this.normalizeTargetSelector(this.$toggle.data("reverse-target"))),this.findTargets(),"link"===this.type?this.addListener(this.$toggle,"click","onToggleChange"):this.addListener(this.$toggle,"change","onToggleChange")},normalizeTargetSelector:function(t){return t&&!t.match(/^[#\.]/)&&(t="#"+t),t},getType:function(){return"INPUT"===this.$toggle.prop("nodeName")&&"checkbox"===this.$toggle.attr("type").toLowerCase()?"checkbox":"SELECT"===this.$toggle.prop("nodeName")?"select":"A"===this.$toggle.prop("nodeName")?"link":"DIV"===this.$toggle.prop("nodeName")&&this.$toggle.hasClass("lightswitch")?"lightswitch":void 0},findTargets:function(){"select"===this.type?this._$target=$(this.normalizeTargetSelector(this.targetPrefix+this.getToggleVal())):(this.targetSelector&&(this._$target=$(this.targetSelector)),this.reverseTargetSelector&&(this._$reverseTarget=$(this.reverseTargetSelector)))},getToggleVal:function(){if("lightswitch"===this.type)return this.$toggle.children("input").val();var t=Garnish.getInputPostVal(this.$toggle);return null===t?null:t.replace(/[\[\]\\]+/g,"-")},onToggleChange:function(){"select"===this.type?(this.hideTarget(this._$target),this.findTargets(),this.showTarget(this._$target)):("link"===this.type?this.onToggleChange._show=this.$toggle.hasClass("collapsed")||!this.$toggle.hasClass("expanded"):this.onToggleChange._show=!!this.getToggleVal(),this.onToggleChange._show?(this.showTarget(this._$target),this.hideTarget(this._$reverseTarget)):(this.hideTarget(this._$target),this.showTarget(this._$reverseTarget)),delete this.onToggleChange._show)},showTarget:function(t){t&&t.length&&(this.showTarget._currentHeight=t.height(),t.removeClass("hidden"),"select"!==this.type&&("link"===this.type&&(this.$toggle.removeClass("collapsed"),this.$toggle.addClass("expanded")),t.height("auto"),this.showTarget._targetHeight=t.height(),t.css({height:this.showTarget._currentHeight,overflow:"hidden"}),t.velocity("stop"),t.velocity({height:this.showTarget._targetHeight},"fast",function(){t.css({height:"",overflow:""})}),delete this.showTarget._targetHeight),delete this.showTarget._currentHeight,Garnish.$win.trigger("resize"))},hideTarget:function(t){t&&t.length&&("select"===this.type?t.addClass("hidden"):("link"===this.type&&(this.$toggle.removeClass("expanded"),this.$toggle.addClass("collapsed")),t.css("overflow","hidden"),t.velocity("stop"),t.velocity({height:0},"fast",function(){t.addClass("hidden")})))}}),Craft.Grid=Garnish.Base.extend({$container:null,$items:null,items:null,totalCols:null,colGutterDrop:null,colPctWidth:null,possibleItemColspans:null,possibleItemPositionsByColspan:null,itemPositions:null,itemColspansByPosition:null,layouts:null,layout:null,itemHeights:null,leftPadding:null,_refreshingCols:!1,_refreshColsAfterRefresh:!1,_forceRefreshColsAfterRefresh:!1,init:function(t,e){this.$container=$(t),this.$container.data("grid")&&(Garnish.log("Double-instantiating a grid on an element"),this.$container.data("grid").destroy()),this.$container.data("grid",this),this.setSettings(e,Craft.Grid.defaults),this.handleContainerHeightProxy=$.proxy(function(){this.refreshCols(!1,!0)},this),this.$items=this.$container.children(this.settings.itemSelector),this.setItems(),this.refreshCols(!0,!1),Garnish.$doc.ready($.proxy(function(){this.refreshCols(!1,!1)},this))},addItems:function(t){this.$items=$().add(this.$items.add(t)),this.setItems(),this.refreshCols(!0,!0)},removeItems:function(t){this.$items=$().add(this.$items.not(t)),this.setItems(),this.refreshCols(!0,!0)},resetItemOrder:function(){this.$items=$().add(this.$items),this.setItems(),this.refreshCols(!0,!0)},setItems:function(){for(this.setItems._={},this.items=[],this.setItems._.i=0;this.setItems._.i<this.$items.length;this.setItems._.i++)this.items.push($(this.$items[this.setItems._.i]));delete this.setItems._},refreshCols:function(t){if(this._refreshingCols)return this._refreshColsAfterRefresh=!0,void(t&&(this._forceRefreshColsAfterRefresh=!0));if(this._refreshingCols=!0,this.items.length)if(this.refreshCols._={},this.refreshCols._.oldHeight=this.$container[0].style.height,this.$container[0].style.height=1,this.refreshCols._.scrollHeight=this.$container[0].scrollHeight,this.$container[0].style.height=this.refreshCols._.oldHeight,0!==this.refreshCols._.scrollHeight)if(this.settings.cols?this.refreshCols._.totalCols=this.settings.cols:(this.refreshCols._.totalCols=Math.floor(this.$container.width()/this.settings.minColWidth),null!==this.totalCols&&this.refreshCols._.totalCols>this.totalCols&&(this.refreshCols._.totalCols=Math.floor((this.$container.width()-20)/this.settings.minColWidth)),this.settings.maxCols&&this.refreshCols._.totalCols>this.settings.maxCols&&(this.refreshCols._.totalCols=this.settings.maxCols)),0===this.refreshCols._.totalCols&&(this.refreshCols._.totalCols=1),!0===t||this.totalCols!==this.refreshCols._.totalCols){if(this.totalCols=this.refreshCols._.totalCols,this.colGutterDrop=this.settings.gutter*(this.totalCols-1)/this.totalCols,this.removeListener(this.$container,"resize"),"grid"===this.settings.fillMode)for(this.refreshCols._.itemIndex=0;this.refreshCols._.itemIndex<this.items.length;){for(this.refreshCols._.tallestItemHeight=-1,this.refreshCols._.colIndex=0,this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.itemHeight=this.items[this.refreshCols._.i].height("auto").height(),this.refreshCols._.itemHeight>this.refreshCols._.tallestItemHeight&&(this.refreshCols._.tallestItemHeight=this.refreshCols._.itemHeight),this.refreshCols._.colIndex++;for(this.settings.snapToGrid&&(this.refreshCols._.remainder=this.refreshCols._.tallestItemHeight%this.settings.snapToGrid,this.refreshCols._.remainder&&(this.refreshCols._.tallestItemHeight+=this.settings.snapToGrid-this.refreshCols._.remainder)),this.refreshCols._.i=this.refreshCols._.itemIndex;this.refreshCols._.i<this.refreshCols._.itemIndex+this.totalCols&&this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.items[this.refreshCols._.i].height(this.refreshCols._.tallestItemHeight);this.refreshCols._.itemIndex+=this.totalCols}else if(this.removeListener(this.$items,"resize"),1===this.totalCols)this.$container.height("auto"),this.$items.show().css({position:"relative",width:"auto",top:0}).css(Craft.left,0);else{for(this.$items.css("position","absolute"),this.colPctWidth=100/this.totalCols,this.layouts=[],this.itemPositions=[],this.itemColspansByPosition=[],this.possibleItemColspans=[],this.possibleItemPositionsByColspan=[],this.itemHeightsByColspan=[],this.refreshCols._.item=0;this.refreshCols._.item<this.items.length;this.refreshCols._.item++)for(this.possibleItemColspans[this.refreshCols._.item]=[],this.possibleItemPositionsByColspan[this.refreshCols._.item]={},this.itemHeightsByColspan[this.refreshCols._.item]={},this.refreshCols._.$item=this.items[this.refreshCols._.item].show(),this.refreshCols._.positionRight="right"===this.refreshCols._.$item.data("position"),this.refreshCols._.positionLeft="left"===this.refreshCols._.$item.data("position"),this.refreshCols._.minColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("min-colspan")?this.refreshCols._.$item.data("min-colspan"):1,this.refreshCols._.maxColspan=this.refreshCols._.$item.data("colspan")?this.refreshCols._.$item.data("colspan"):this.refreshCols._.$item.data("max-colspan")?this.refreshCols._.$item.data("max-colspan"):this.totalCols,this.refreshCols._.minColspan>this.totalCols&&(this.refreshCols._.minColspan=this.totalCols),this.refreshCols._.maxColspan>this.totalCols&&(this.refreshCols._.maxColspan=this.totalCols),this.refreshCols._.colspan=this.refreshCols._.minColspan;this.refreshCols._.colspan<=this.refreshCols._.maxColspan;this.refreshCols._.colspan++)for(this.refreshCols._.$item.css("width",this.getItemWidthCss(this.refreshCols._.colspan)),this.itemHeightsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=this.refreshCols._.$item.outerHeight(),this.possibleItemColspans[this.refreshCols._.item].push(this.refreshCols._.colspan),this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan]=[],this.refreshCols._.positionLeft?(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=0):this.refreshCols._.positionRight?(this.refreshCols._.minPosition=this.totalCols-this.refreshCols._.colspan,this.refreshCols._.maxPosition=this.refreshCols._.minPosition):(this.refreshCols._.minPosition=0,this.refreshCols._.maxPosition=this.totalCols-this.refreshCols._.colspan),this.refreshCols._.position=this.refreshCols._.minPosition;this.refreshCols._.position<=this.refreshCols._.maxPosition;this.refreshCols._.position++)this.possibleItemPositionsByColspan[this.refreshCols._.item][this.refreshCols._.colspan].push(this.refreshCols._.position);for(this.refreshCols._.colHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.totalCols;this.refreshCols._.i++)this.refreshCols._.colHeights.push(0);for(this.createLayouts(0,[],[],this.refreshCols._.colHeights,0),this.refreshCols._.layoutTotalCols=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)for(this.refreshCols._.layoutTotalCols[this.refreshCols._.i]=0,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j]&&this.refreshCols._.layoutTotalCols[this.refreshCols._.i]++;for(this.refreshCols._.highestTotalCols=Math.max.apply(null,this.refreshCols._.layoutTotalCols),this.refreshCols._.i=this.layouts.length-1;0<=this.refreshCols._.i;this.refreshCols._.i--)this.refreshCols._.layoutTotalCols[this.refreshCols._.i]!==this.refreshCols._.highestTotalCols&&this.layouts.splice(this.refreshCols._.i,1);for(this.refreshCols._.layoutHeights=[],this.refreshCols._.i=0;this.refreshCols._.i<this.layouts.length;this.refreshCols._.i++)this.refreshCols._.layoutHeights.push(Math.max.apply(null,this.layouts[this.refreshCols._.i].colHeights));for(this.refreshCols._.shortestHeight=Math.min.apply(null,this.refreshCols._.layoutHeights),this.refreshCols._.shortestLayouts=[],this.refreshCols._.emptySpaces=[],this.refreshCols._.i=0;this.refreshCols._.i<this.refreshCols._.layoutHeights.length;this.refreshCols._.i++)if(this.refreshCols._.layoutHeights[this.refreshCols._.i]===this.refreshCols._.shortestHeight){for(this.refreshCols._.shortestLayouts.push(this.layouts[this.refreshCols._.i]),this.refreshCols._.emptySpace=this.layouts[this.refreshCols._.i].emptySpace,this.refreshCols._.j=0;this.refreshCols._.j<this.totalCols;this.refreshCols._.j++)this.refreshCols._.emptySpace+=this.refreshCols._.shortestHeight-this.layouts[this.refreshCols._.i].colHeights[this.refreshCols._.j];this.refreshCols._.emptySpaces.push(this.refreshCols._.emptySpace)}for(this.layout=this.refreshCols._.shortestLayouts[$.inArray(Math.min.apply(null,this.refreshCols._.emptySpaces),this.refreshCols._.emptySpaces)],this.refreshCols._.i=0;this.refreshCols._.i<this.items.length;this.refreshCols._.i++)this.refreshCols._.css={width:this.getItemWidthCss(this.layout.colspans[this.refreshCols._.i])},this.refreshCols._.css[Craft.left]=this.getItemLeftPosCss(this.layout.positions[this.refreshCols._.i]),this.items[this.refreshCols._.i].css(this.refreshCols._.css);this.isSimpleLayout()?(this.$container.height("auto"),this.$items.css({position:"relative",top:0,"margin-bottom":this.settings.gutter+"px"})):(this.$items.css("position","absolute"),this.positionItems(),this.addListener(this.$items,"resize","onItemResize"))}this.completeRefreshCols(),this.addListener(this.$container,"resize",this.handleContainerHeightProxy),this.onRefreshCols()}else this.completeRefreshCols();else this.completeRefreshCols();else this.completeRefreshCols()},completeRefreshCols:function(){if(void 0!==this.refreshCols._&&delete this.refreshCols._,this._refreshingCols=!1,this._refreshColsAfterRefresh){var t=this._forceRefreshColsAfterRefresh;this._refreshColsAfterRefresh=!1,this._forceRefreshColsAfterRefresh=!1,Garnish.requestAnimationFrame($.proxy(function(){this.refreshCols(t)},this))}},getItemWidth:function(t){return this.colPctWidth*t},getItemWidthCss:function(t){return"calc("+this.getItemWidth(t)+"% - "+this.colGutterDrop+"px)"},getItemWidthInPx:function(t){return this.getItemWidth(t)/100*this.$container.width()-this.colGutterDrop},getItemLeftPosCss:function(t){return"calc(("+this.getItemWidth(1)+"% + "+(this.settings.gutter-this.colGutterDrop)+"px) * "+t+")"},getItemLeftPosInPx:function(t){return(this.getItemWidth(1)/100*this.$container.width()+(this.settings.gutter-this.colGutterDrop))*t},createLayouts:function(t,e,i,s,n){new Craft.Grid.LayoutGenerator(this).createLayouts(t,e,i,s,n)},isSimpleLayout:function(){for(this.isSimpleLayout._={},this.isSimpleLayout._.i=0;this.isSimpleLayout._.i<this.layout.positions.length;this.isSimpleLayout._.i++)if(0!==this.layout.positions[this.isSimpleLayout._.i])return delete this.isSimpleLayout._,!1;return delete this.isSimpleLayout._,!0},positionItems:function(){for(this.positionItems._={},this.positionItems._.colHeights=[],this.positionItems._.i=0;this.positionItems._.i<this.totalCols;this.positionItems._.i++)this.positionItems._.colHeights.push(0);for(this.positionItems._.i=0;this.positionItems._.i<this.items.length;this.positionItems._.i++){for(this.positionItems._.endingCol=this.layout.positions[this.positionItems._.i]+this.layout.colspans[this.positionItems._.i]-1,this.positionItems._.affectedColHeights=[],this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.affectedColHeights.push(this.positionItems._.colHeights[this.positionItems._.col]);for(this.positionItems._.top=Math.max.apply(null,this.positionItems._.affectedColHeights),0<this.positionItems._.top&&(this.positionItems._.top+=this.settings.gutter),this.items[this.positionItems._.i].css("top",this.positionItems._.top),this.positionItems._.col=this.layout.positions[this.positionItems._.i];this.positionItems._.col<=this.positionItems._.endingCol;this.positionItems._.col++)this.positionItems._.colHeights[this.positionItems._.col]=this.positionItems._.top+this.itemHeightsByColspan[this.positionItems._.i][this.layout.colspans[this.positionItems._.i]]}this.$container.height(Math.max.apply(null,this.positionItems._.colHeights)),delete this.positionItems._},onItemResize:function(t){this.onItemResize._={},t.stopPropagation(),this.onItemResize._.item=$.inArray(t.currentTarget,this.$items),-1!==this.onItemResize._.item&&(this.onItemResize._.newHeight=this.items[this.onItemResize._.item].outerHeight(),this.onItemResize._.newHeight!==this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]&&(this.itemHeightsByColspan[this.onItemResize._.item][this.layout.colspans[this.onItemResize._.item]]=this.onItemResize._.newHeight,this.positionItems(!1))),delete this.onItemResize._},onRefreshCols:function(){this.trigger("refreshCols"),this.settings.onRefreshCols()}},{defaults:{itemSelector:".item",cols:null,maxCols:null,minColWidth:320,gutter:14,fillMode:"top",colClass:"col",snapToGrid:null,onRefreshCols:$.noop}}),Craft.Grid.LayoutGenerator=Garnish.Base.extend({grid:null,_:null,init:function(t){this.grid=t},createLayouts:function(t,e,i,s,n){for(this._={},this._.c=0;this._.c<this.grid.possibleItemColspans[t].length;this._.c++){for(this._.colspan=this.grid.possibleItemColspans[t][this._.c],this._.tallestColHeightsByPosition=[],this._.p=0;this._.p<this.grid.possibleItemPositionsByColspan[t][this._.colspan].length;this._.p++){for(this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.colHeightsForPosition=[],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.colHeightsForPosition.push(s[this._.col]);this._.tallestColHeightsByPosition[this._.p]=Math.max.apply(null,this._.colHeightsForPosition)}for(this._.p=$.inArray(Math.min.apply(null,this._.tallestColHeightsByPosition),this._.tallestColHeightsByPosition),this._.position=this.grid.possibleItemPositionsByColspan[t][this._.colspan][this._.p],this._.positions=e.slice(0),this._.colspans=i.slice(0),this._.colHeights=s.slice(0),this._.emptySpace=n,this._.positions.push(this._.position),this._.colspans.push(this._.colspan),this._.tallestColHeight=this._.tallestColHeightsByPosition[this._.p],this._.endingCol=this._.position+this._.colspan-1,this._.col=this._.position;this._.col<=this._.endingCol;this._.col++)this._.emptySpace+=this._.tallestColHeight-this._.colHeights[this._.col],this._.colHeights[this._.col]=this._.tallestColHeight+this.grid.itemHeightsByColspan[t][this._.colspan];t===this.grid.items.length-1?this.grid.layouts.push({positions:this._.positions,colspans:this._.colspans,colHeights:this._.colHeights,emptySpace:this._.emptySpace}):this.grid.createLayouts(t+1,this._.positions,this._.colspans,this._.colHeights,this._.emptySpace)}delete this._}}),Craft.HandleGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){var e=t.replace("/<(.*?)>/g","");e=(e=e.replace(/['"‘’“”\[\]\(\)\{\}:]/g,"")).toLowerCase(),e=Craft.asciiString(e),this.settings.allowNonAlphaStart||(e=e.replace(/^[^a-z]+/,""));var i=Craft.filterArray(e.split(/[^a-z0-9]+/));e="";for(var s=0;s<i.length;s++)e+=0===s?i[s]:i[s].charAt(0).toUpperCase()+i[s].substr(1);return e}}),Craft.ImageUpload=Garnish.Base.extend({$container:null,progressBar:null,uploader:null,init:function(t){this.setSettings(t,Craft.ImageUpload.defaults),this.initImageUpload()},initImageUpload:function(){this.$container=$(this.settings.containerSelector),this.progressBar=new Craft.ProgressBar($('<div class="progress-shade"></div>').appendTo(this.$container));var t={url:Craft.getActionUrl(this.settings.uploadAction),formData:this.settings.postParameters,fileInput:this.$container.find(this.settings.fileInputSelector),paramName:this.settings.uploadParamName};void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t.formData[Craft.csrfTokenName]=Craft.csrfTokenValue),t.events={},t.events.fileuploadstart=$.proxy(this,"_onUploadStart"),t.events.fileuploadprogressall=$.proxy(this,"_onUploadProgress"),t.events.fileuploaddone=$.proxy(this,"_onUploadComplete"),t.events.fileuploadfail=$.proxy(this,"_onUploadError"),this.uploader=new Craft.Uploader(this.$container,t),this.initButtons()},initButtons:function(){this.$container.find(this.settings.uploadButtonSelector).on("click",$.proxy(function(t){this.$container.find(this.settings.fileInputSelector).trigger("click")},this)),this.$container.find(this.settings.deleteButtonSelector).on("click",$.proxy(function(t){confirm(Craft.t("app","Are you sure you want to delete this image?"))&&($(t.currentTarget).parent().append('<div class="blocking-modal"></div>'),Craft.postActionRequest(this.settings.deleteAction,this.settings.postParameters,$.proxy(function(t,e){"success"===e&&this.refreshImage(t)},this)))},this))},refreshImage:function(t){$(this.settings.containerSelector).replaceWith(t.html),this.settings.onAfterRefreshImage(t),this.initImageUpload()},_onUploadStart:function(t){this.progressBar.$progressBar.css({top:Math.round(this.$container.outerHeight()/2)-6}),this.$container.addClass("uploading"),this.progressBar.resetProgressBar(),this.progressBar.showProgressBar()},_onUploadProgress:function(t,e){var i=parseInt(e.loaded/e.total*100,10);this.progressBar.setProgressPercentage(i)},_onUploadComplete:function(t,e){if(e.result.error)alert(e.result.error);else{$(e.result.html);this.refreshImage(e.result)}this.uploader.isLastUpload()&&(this.progressBar.hideProgressBar(),this.$container.removeClass("uploading"))},_onUploadError:function(t,e){e.jqXHR.responseJSON.error&&(alert(e.jqXHR.responseJSON.error),this.$container.removeClass("uploading"),this.progressBar.hideProgressBar(),this.progressBar.resetProgressBar())}},{defaults:{postParameters:{},uploadAction:"",deleteAction:"",fileInputSelector:"",onAfterRefreshImage:$.noop,containerSelector:null,uploadButtonSelector:null,deleteButtonSelector:null,uploadParamName:"files"}}),Craft.InfoIcon=Garnish.Base.extend({$icon:null,hud:null,init:function(t){this.$icon=$(t),this.addListener(this.$icon,"click","showHud")},showHud:function(){this.hud?this.hud.show():this.hud=new Garnish.HUD(this.$icon,this.$icon.html(),{hudClass:"hud info-hud",closeOtherHUDs:!1})}}),Craft.LightSwitch=Garnish.Base.extend({settings:null,$outerContainer:null,$innerContainer:null,$input:null,small:!1,on:null,dragger:null,dragStartMargin:null,init:function(t,e){this.$outerContainer=$(t),this.$outerContainer.data("lightswitch")&&(Garnish.log("Double-instantiating a lightswitch on an element"),this.$outerContainer.data("lightswitch").destroy()),this.$outerContainer.data("lightswitch",this),this.small=this.$outerContainer.hasClass("small"),this.setSettings(e,Craft.LightSwitch.defaults),this.$innerContainer=this.$outerContainer.find(".lightswitch-container:first"),this.$input=this.$outerContainer.find("input:first"),this.$input.prop("disabled")||(this.on=this.$outerContainer.hasClass("on"),this.$outerContainer.attr({role:"checkbox","aria-checked":this.on?"true":"false"}),this.addListener(this.$outerContainer,"mousedown","_onMouseDown"),this.addListener(this.$outerContainer,"keydown","_onKeyDown"),this.dragger=new Garnish.BaseDrag(this.$outerContainer,{axis:Garnish.X_AXIS,ignoreHandleSelector:null,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}))},turnOn:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=0,this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(this.settings.value),this.$outerContainer.addClass("on"),this.$outerContainer.attr("aria-checked","true"),this.on!==(this.on=!0)&&this.onChange()},turnOff:function(){this.$outerContainer.addClass("dragging");var t={};t["margin-"+Craft.left]=this._getOffMargin(),this.$innerContainer.velocity("stop").velocity(t,Craft.LightSwitch.animationDuration,$.proxy(this,"_onSettle")),this.$input.val(""),this.$outerContainer.removeClass("on"),this.$outerContainer.attr("aria-checked","false"),this.on!==(this.on=!1)&&this.onChange()},toggle:function(t){this.on?this.turnOff():this.turnOn()},onChange:function(){this.trigger("change"),this.settings.onChange(),this.$outerContainer.trigger("change")},_onMouseDown:function(){this.addListener(Garnish.$doc,"mouseup","_onMouseUp")},_onMouseUp:function(){this.removeListener(Garnish.$doc,"mouseup"),this.dragger.dragging||this.toggle()},_onKeyDown:function(t){switch(t.keyCode){case Garnish.SPACE_KEY:this.toggle(),t.preventDefault();break;case Garnish.RIGHT_KEY:"ltr"===Craft.orientation?this.turnOn():this.turnOff(),t.preventDefault();break;case Garnish.LEFT_KEY:"ltr"===Craft.orientation?this.turnOff():this.turnOn(),t.preventDefault()}},_getMargin:function(){return parseInt(this.$innerContainer.css("margin-"+Craft.left))},_onDragStart:function(){this.$outerContainer.addClass("dragging"),this.dragStartMargin=this._getMargin()},_onDrag:function(){var t;(t="ltr"===Craft.orientation?this.dragStartMargin+this.dragger.mouseDistX:this.dragStartMargin-this.dragger.mouseDistX)<this._getOffMargin()?t=this._getOffMargin():0<t&&(t=0),this.$innerContainer.css("margin-"+Craft.left,t)},_onDragStop:function(){this._getMargin()>this._getOffMargin()/2?this.turnOn():this.turnOff()},_onSettle:function(){this.$outerContainer.removeClass("dragging")},destroy:function(){this.base(),this.dragger.destroy()},_getOffMargin:function(){return this.small?-9:-11}},{animationDuration:100,defaults:{value:"1",onChange:$.noop}}),Craft.LivePreview=Garnish.Base.extend({$extraFields:null,$trigger:null,$shade:null,$editorContainer:null,$editor:null,$dragHandle:null,$iframeContainer:null,$iframe:null,$fieldPlaceholder:null,previewUrl:null,token:null,basePostData:null,inPreviewMode:!1,fields:null,lastPostData:null,updateIframeInterval:null,loading:!1,checkAgain:!1,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_handleSuccessProxy:null,_handleErrorProxy:null,_forceUpdateIframeProxy:null,_scrollX:null,_scrollY:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.setSettings(t,Craft.LivePreview.defaults),this.settings.previewUrl?this.previewUrl=this.settings.previewUrl:this.previewUrl=Craft.baseSiteUrl.replace(/\/+$/,"")+"/","https:"===document.location.protocol&&(this.previewUrl=this.previewUrl.replace(/^http:/,"https:")),this.basePostData=$.extend({},this.settings.previewParams),this._handleSuccessProxy=$.proxy(this,"handleSuccess"),this._handleErrorProxy=$.proxy(this,"handleError"),this._forceUpdateIframeProxy=$.proxy(this,"forceUpdateIframe"),this.$extraFields=$(this.settings.extraFields),this.$trigger=$(this.settings.trigger),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.LivePreview.defaultEditorWidth),this.addListener(this.$trigger,"activate","toggle"),Craft.cp.on("beforeSaveShortcut",$.proxy(function(){this.inPreviewMode&&this.moveFieldsBack()},this))},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.LivePreview.minEditorWidthInPx&&(t=(e=Craft.LivePreview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},toggle:function(){this.inPreviewMode?this.exit():this.enter()},enter:function(){if(!this.inPreviewMode)if(this.token){if(this.trigger("beforeEnter"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$iframeContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);$("<div/>",{class:"flex-grow"}).appendTo(t);var i=$('<div class="btn submit">'+Craft.t("app","Save")+"</div>").appendTo(t);this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","exit"),this.addListener(i,"click","save")}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)+"px"),this.$iframeContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];for(var s=$(this.settings.fields),n=0;n<s.length;n++){var a=$(s[n]),r=this._getClone(a);this.$fieldPlaceholder.insertAfter(a),a.detach(),this.$fieldPlaceholder.replaceWith(r),a.appendTo(this.$editor),this.fields.push({$field:a,$clone:r})}this.updateIframe()?this._slideInOnIframeLoad=!0:this.slideIn(),Garnish.on(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._forceUpdateIframeProxy),this.inPreviewMode=!0,this.trigger("enter")}else this.createToken()},createToken:function(){Craft.postActionRequest("live-preview/create-token",{previewAction:this.settings.previewAction},$.proxy(function(t,e){"success"===e&&(this.token=t.token,this.enter())},this))},save:function(){Craft.cp.submitPrimaryForm()},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$iframeContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.updateIframeInterval=setInterval($.proxy(this,"updateIframe"),1e3),this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.exit()})},this))},exit:function(){this.inPreviewMode&&(this.trigger("beforeExit"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.updateIframeInterval&&clearInterval(this.updateIframeInterval),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$iframeContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$iframeContainer.hide()},this)),Garnish.off(Craft.BaseElementEditor,"saveElement",this._forceUpdateIframeProxy),this.inPreviewMode=!1,this.trigger("exit"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.LivePreview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$iframeContainer.width(this.getIframeWidth())},updateIframe:function(t){if(t&&(this.lastPostData=null),!this.inPreviewMode)return!1;if(this.loading)return!(this.checkAgain=!0);var e=$.extend(Garnish.getPostData(this.$editor),Garnish.getPostData(this.$extraFields));if(this.lastPostData&&Craft.compare(e,this.lastPostData,!1))return!1;this.lastPostData=e,this.loading=!0;var i=this.$iframe?$(this.$iframe[0].contentWindow.document):null;return this._scrollX=i?i.scrollLeft():0,this._scrollY=i?i.scrollTop():0,$.ajax({url:this.previewUrl+(-1!==this.previewUrl.indexOf("?")?"&":"?")+Craft.tokenParam+"="+this.token,method:"POST",data:$.extend({},e,this.basePostData),headers:{"X-Craft-Token":this.token},xhrFields:{withCredentials:!0},crossDomain:!0,success:this._handleSuccessProxy,error:this._handleErrorProxy}),!0},forceUpdateIframe:function(){return this.updateIframe(!0)},handleSuccess:function(t){var e=t+'<script type="text/javascript">window.scrollTo('+this._scrollX+", "+this._scrollY+");<\/script>",i=$('<iframe class="lp-preview" frameborder="0"/>');this.$iframe?i.insertBefore(this.$iframe):i.appendTo(this.$iframeContainer),this.addListener(i,"load",function(){this.$iframe&&this.$iframe.remove(),this.$iframe=i,this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1),this.removeListener(i,"load")}),Garnish.requestAnimationFrame($.proxy(function(){i[0].contentWindow.document.open(),i[0].contentWindow.document.write(e),i[0].contentWindow.document.close(),this.onResponse()},this))},handleError:function(){this.onResponse()},onResponse:function(){this.loading=!1,this.checkAgain&&(this.checkAgain=!1,this.updateIframe())},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$iframeContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$iframeContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:4,defaults:{trigger:".livepreviewbtn",fields:null,extraFields:null,previewUrl:null,previewAction:null,previewParams:{}}}),Craft.LivePreview.init=function(t){Craft.livePreview=new Craft.LivePreview(t)},Craft.PasswordInput=Garnish.Base.extend({$passwordInput:null,$textInput:null,$currentInput:null,$showPasswordToggle:null,showingPassword:null,init:function(t,e){this.$passwordInput=$(t),this.settings=$.extend({},Craft.PasswordInput.defaults,e),this.$passwordInput.data("passwordInput")&&(Garnish.log("Double-instantiating a password input on an element"),this.$passwordInput.data("passwordInput").destroy()),this.$passwordInput.data("passwordInput",this),this.$showPasswordToggle=$("<a/>").hide(),this.$showPasswordToggle.addClass("password-toggle"),this.$showPasswordToggle.insertAfter(this.$passwordInput),this.addListener(this.$showPasswordToggle,"mousedown","onToggleMouseDown"),this.hidePassword()},setCurrentInput:function(t){this.$currentInput&&(t.addClass("focus"),t.insertAfter(this.$currentInput),this.$currentInput.detach(),t.trigger("focus"),t.removeClass("focus"),t.val(this.$currentInput.val())),this.$currentInput=t,this.addListener(this.$currentInput,"keypress,keyup,change,blur","onInputChange")},updateToggleLabel:function(t){this.$showPasswordToggle.text(t)},showPassword:function(){this.showingPassword||(this.$textInput||(this.$textInput=this.$passwordInput.clone(!0),this.$textInput.attr("type","text")),this.setCurrentInput(this.$textInput),this.updateToggleLabel(Craft.t("app","Hide")),this.showingPassword=!0)},hidePassword:function(){!1!==this.showingPassword&&(this.setCurrentInput(this.$passwordInput),this.updateToggleLabel(Craft.t("app","Show")),this.showingPassword=!1,this.addListener(this.$passwordInput,"keydown","onKeyDown"))},togglePassword:function(){this.showingPassword?this.hidePassword():this.showPassword(),this.settings.onToggleInput(this.$currentInput)},onKeyDown:function(t){t.keyCode===Garnish.ALT_KEY&&this.$currentInput.val()&&(this.showPassword(),this.$showPasswordToggle.hide(),this.addListener(this.$textInput,"keyup","onKeyUp"))},onKeyUp:function(t){t.preventDefault(),t.keyCode===Garnish.ALT_KEY&&(this.hidePassword(),this.$showPasswordToggle.show())},onInputChange:function(){this.$currentInput.val()?this.$showPasswordToggle.show():this.$showPasswordToggle.hide()},onToggleMouseDown:function(t){if(t.preventDefault(),this.$currentInput[0].setSelectionRange){var e=this.$currentInput[0].selectionStart,i=this.$currentInput[0].selectionEnd;this.togglePassword(),this.$currentInput[0].setSelectionRange(e,i)}else this.togglePassword()}},{defaults:{onToggleInput:$.noop}}),Craft.Preview=Garnish.Base.extend({draftEditor:null,$shade:null,$editorContainer:null,$editor:null,$spinner:null,$statusIcon:null,$dragHandle:null,$previewContainer:null,$targetBtn:null,$targetMenu:null,$iframe:null,$tempInput:null,$fieldPlaceholder:null,isActive:!1,activeTarget:0,url:null,fields:null,scrollLeft:0,scrollTop:0,dragger:null,dragStartEditorWidth:null,_slideInOnIframeLoad:!1,_updateIframeProxy:null,_editorWidth:null,_editorWidthInPx:null,init:function(t){this.draftEditor=t,this._updateIframeProxy=$.proxy(this,"updateIframe"),this.$tempInput=$("<input/>",{type:"hidden",name:"__PREVIEW_FIELDS__",value:"1"}),this.$fieldPlaceholder=$("<div/>"),this.editorWidth=Craft.getLocalStorage("LivePreview.editorWidth",Craft.Preview.defaultEditorWidth)},get editorWidth(){return this._editorWidth},get editorWidthInPx(){return this._editorWidthInPx},set editorWidth(t){var e;1<=t?(e=t,t/=Garnish.$win.width()):e=Math.round(t*Garnish.$win.width()),e<Craft.Preview.minEditorWidthInPx&&(t=(e=Craft.Preview.minEditorWidthInPx)/Garnish.$win.width()),this._editorWidth=t,this._editorWidthInPx=e},open:function(){if(!this.isActive){if(this.isActive=!0,this.trigger("beforeOpen"),$(document.activeElement).trigger("blur"),!this.$editor){this.$shade=$("<div/>",{class:"modal-shade dark"}).appendTo(Garnish.$bod),this.$editorContainer=$("<div/>",{class:"lp-editor-container"}).appendTo(Garnish.$bod),this.$previewContainer=$("<div/>",{class:"lp-preview-container"}).appendTo(Garnish.$bod);var t=$("<header/>",{class:"flex"}).appendTo(this.$editorContainer);this.$editor=$("<form/>",{class:"lp-editor"}).appendTo(this.$editorContainer),this.$dragHandle=$("<div/>",{class:"lp-draghandle"}).appendTo(this.$editorContainer);var e=$("<div/>",{class:"btn",text:Craft.t("app","Close Preview")}).appendTo(t);if($("<div/>",{class:"flex-grow"}).appendTo(t),this.$spinner=$("<div/>",{class:"spinner hidden",title:Craft.t("app","Saving")}).appendTo(t),this.$statusIcon=$("<div/>",{class:"invisible"}).appendTo(t),1<this.draftEditor.settings.previewTargets.length){var i=$("<header/>",{class:"flex"}).appendTo(this.$previewContainer);this.$targetBtn=$("<div/>",{class:"btn menubtn",text:this.draftEditor.settings.previewTargets[0].label,role:"btn"}).appendTo(i),this.$targetMenu=$("<div/>",{class:"menu lp-target-menu"}).insertAfter(this.$targetBtn);for(var s,n=$("<ul/>",{class:"padded"}).appendTo(this.$targetMenu),a=0;a<this.draftEditor.settings.previewTargets.length;a++)s=$("<li/>").appendTo(n),$("<a/>",{data:{target:a},text:this.draftEditor.settings.previewTargets[a].label,class:0===a?"sel":null}).appendTo(s);new Garnish.MenuBtn(this.$targetBtn,{onOptionSelect:$.proxy(function(t){this.switchTarget($(t).data("target"))},this)})}this.dragger=new Garnish.BaseDrag(this.$dragHandle,{axis:Garnish.X_AXIS,onDragStart:$.proxy(this,"_onDragStart"),onDrag:$.proxy(this,"_onDrag"),onDragStop:$.proxy(this,"_onDragStop")}),this.addListener(e,"click","close"),this.addListener(this.$statusIcon,"click",function(){this.draftEditor.showStatusHud(this.$statusIcon)}.bind(this))}this.handleWindowResize(),this.addListener(Garnish.$win,"resize","handleWindowResize"),this.$editorContainer.css(Craft.left,-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)+"px"),this.$previewContainer.css(Craft.right,-this.getIframeWidth()),this.fields=[];var r=$("#content .field").not($("#content .field .field"));if(r.length){this.$tempInput.insertBefore(r.get(0));for(a=0;a<r.length;a++){var o=$(r[a]),l=this._getClone(o);this.$fieldPlaceholder.insertAfter(o),o.detach(),this.$fieldPlaceholder.replaceWith(l),o.appendTo(this.$editor),this.fields.push({$field:o,$clone:l})}}this._slideInOnIframeLoad=!0,this.updateIframe(),this.draftEditor.on("update",this._updateIframeProxy),Garnish.on(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.on(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.trigger("open")}},switchTarget:function(t){this.activeTarget=t,this.$targetBtn.text(this.draftEditor.settings.previewTargets[t].label),this.$targetMenu.find("a.sel").removeClass("sel"),this.$targetMenu.find("a").eq(t).addClass("sel"),this.updateIframe(!0)},handleWindowResize:function(){this.editorWidth=this.editorWidth,this.updateWidths()},slideIn:function(){$("html").addClass("noscroll"),this.$shade.velocity("fadeIn"),this.$editorContainer.show().velocity("stop").animateLeft(0,"slow",$.proxy(function(){this.trigger("slideIn"),Garnish.$win.trigger("resize")},this)),this.$previewContainer.show().velocity("stop").animateRight(0,"slow",$.proxy(function(){this.addListener(Garnish.$bod,"keyup",function(t){t.keyCode===Garnish.ESC_KEY&&this.close()})},this))},close:function(){this.isActive&&(this.trigger("beforeClose"),$("html").removeClass("noscroll"),this.removeListener(Garnish.$win,"resize"),this.removeListener(Garnish.$bod,"keyup"),this.$tempInput.detach(),this.moveFieldsBack(),this.$shade.delay(200).velocity("fadeOut"),this.$editorContainer.velocity("stop").animateLeft(-(this.editorWidthInPx+Craft.Preview.dragHandleWidth),"slow",$.proxy(function(){for(var t=0;t<this.fields.length;t++)this.fields[t].$newClone.remove();this.$editorContainer.hide(),this.trigger("slideOut")},this)),this.$previewContainer.velocity("stop").animateRight(-this.getIframeWidth(),"slow",$.proxy(function(){this.$previewContainer.hide()},this)),this.draftEditor.off("update",this._updateIframeProxy),Garnish.off(Craft.BaseElementEditor,"saveElement",this._updateIframeProxy),Garnish.off(Craft.AssetImageEditor,"save",this._updateIframeProxy),this.isActive=!1,this.trigger("close"))},moveFieldsBack:function(){for(var t=0;t<this.fields.length;t++){var e=this.fields[t];e.$newClone=this._getClone(e.$field),this.$fieldPlaceholder.insertAfter(e.$field),e.$field.detach(),this.$fieldPlaceholder.replaceWith(e.$newClone),e.$clone.replaceWith(e.$field)}Garnish.$win.trigger("resize")},getIframeWidth:function(){return Garnish.$win.width()-(this.editorWidthInPx+Craft.Preview.dragHandleWidth)},updateWidths:function(){this.$editorContainer.css("width",this.editorWidthInPx+"px"),this.$previewContainer.width(this.getIframeWidth())},updateIframe:function(n){if(!this.isActive)return!1;n=!0===n;var t=this.draftEditor.settings.previewTargets[this.activeTarget].url;this.draftEditor.getTokenizedPreviewUrl(t,"x-craft-live-preview").then(function(t){var e;if(n)this.scrollLeft=0,this.scrolllTop=0;else if((e=Craft.isSameHost(t))&&this.$iframe&&this.$iframe[0].contentWindow){var i=$(this.$iframe[0].contentWindow.document);this.scrollLeft=i.scrollLeft(),this.scrollTop=i.scrollTop()}var s=$("<iframe/>",{class:"lp-preview",frameborder:0,src:t});!n&&e&&s.on("load",function(){var t=$(s[0].contentWindow.document);t.scrollLeft(this.scrollLeft),t.scrollTop(this.scrollTop)}.bind(this)),this.$iframe?this.$iframe.replaceWith(s):s.appendTo(this.$previewContainer),this.url=t,this.$iframe=s,this.afterUpdateIframe()}.bind(this))},afterUpdateIframe:function(){this.trigger("afterUpdateIframe"),this._slideInOnIframeLoad&&(this.slideIn(),this._slideInOnIframeLoad=!1)},_getClone:function(t){var e=t.clone();return Garnish.copyInputValues(t,e),e.attr("id",""),e.find("[id]").attr("id",""),e.find("[name]").prop("disabled",!0),e},_onDragStart:function(){this.dragStartEditorWidth=this.editorWidthInPx,this.$previewContainer.addClass("dragging")},_onDrag:function(){"ltr"===Craft.orientation?this.editorWidth=this.dragStartEditorWidth+this.dragger.mouseDistX:this.editorWidth=this.dragStartEditorWidth-this.dragger.mouseDistX,this.updateWidths()},_onDragStop:function(){this.$previewContainer.removeClass("dragging"),Craft.setLocalStorage("LivePreview.editorWidth",this.editorWidth)}},{defaultEditorWidth:.33,minEditorWidthInPx:320,dragHandleWidth:2}),Craft.PreviewFileModal=Garnish.Modal.extend({assetId:null,$spinner:null,elementSelect:null,type:null,loaded:null,requestId:0,init:function(t,e,i){if((i=$.extend(this.defaultSettings,i)).onHide=this._onHide.bind(this),Craft.PreviewFileModal.openInstance){var s=Craft.PreviewFileModal.openInstance;return s.assetId!==t&&(s.loadAsset(t,i.startingWidth,i.startingHeight),s.elementSelect=e),this.destroy()}(Craft.PreviewFileModal.openInstance=this).elementSelect=e,this.$container=$('<div id="previewmodal" class="modal loading"/>').appendTo(Garnish.$bod),this.base(this.$container,$.extend({resizable:!0},i)),this.$container&&(this.$container.velocity("stop"),this.$container.show().css("opacity",1),this.$shade.velocity("stop"),this.$shade.show().css("opacity",1)),this.loadAsset(t,i.startingWidth,i.startingHeight)},_onHide:function(){return Craft.PreviewFileModal.openInstance=null,this.elementSelect.focusItem(this.elementSelect.$focusedItem),this.$shade.remove(),this.destroy()},selfDestruct:function(){var t=Craft.PreviewFileModal.openInstance;return t.hide(),t.$shade.remove(),t.destroy(),!(Craft.PreviewFileModal.openInstance=null)},loadAsset:function(t,e,i){this.assetId=t,this.$container.empty(),this.loaded=!1,this.desiredHeight=null,this.desiredWidth=null;var n=.66*Garnish.$win.height(),a=Math.min(n/3*4,Garnish.$win.width()-2*this.settings.minGutter);if(n=a/4*3,e&&i){var s=e/i;a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=Math.min(a/s,Garnish.$win.height()-2*this.settings.minGutter),(a=n*s)>Math.min(e,Garnish.$win.width()-2*this.settings.minGutter)&&(a=Math.min(e,Garnish.$win.width()-2*this.settings.minGutter),n=a/s)}this._resizeContainer(a,n),this.$spinner=$('<div class="spinner centeralign"></div>').appendTo(this.$container);var r=this.$container.height()/2-this.$spinner.height()/2+"px",o=this.$container.width()/2-this.$spinner.width()/2+"px";this.$spinner.css({left:o,top:r,position:"absolute"}),this.requestId++,Craft.postActionRequest("assets/preview-file",{assetId:t,requestId:this.requestId},function(t,e){if("success"===e)if(t.success){if(t.requestId!=this.requestId)return;this.$container.removeClass("loading"),this.$spinner.remove(),this.loaded=!0,this.$container.append(t.modalHtml);var i=this.$container.find(".highlight");if(i.length&&i.hasClass("json")){var s=i.find("code");s.html(JSON.stringify(JSON.parse(s.html()),void 0,4))}i.length?Prism.highlightElement(i.find("code").get(0)):this.$container.find("img").css({width:a,height:n}),this.updateSizeAndPosition()}else alert(t.error),this.hide()}.bind(this))},updateSizeAndPosition:function(){if(this.loaded){var t=this.$container.find("img");if(this.loaded&&t.length){var e=t.data("maxwidth"),i=t.data("maxheight"),s=e/i,n=this.desiredWidth?this.desiredWidth:this.$container.width(),a=(this.desiredHeight?this.desiredHeight:this.$container.height(),Math.min(n,e)),r=Math.round(Math.min(i,a/s));a=Math.round(r*s),t.css({width:a,height:r}),this._resizeContainer(a,r),this.desiredWidth=a,this.desiredHeight=r}if(this.base(),this.loaded&&t.length){var o=Math.round(Math.min(Math.max(t.height()*s),Garnish.$win.width()-2*this.settings.minGutter)),l=Math.round(Math.min(Math.max(o/s),Garnish.$win.height()-2*this.settings.minGutter));(o=Math.round(l*s))>Math.min(o,Garnish.$win.width()-2*this.settings.minGutter)&&(l=(o=Math.min(o,Garnish.$win.width()-2*this.settings.minGutter))/s),this._resizeContainer(o,l),t.css({width:o,height:l})}else this.loaded&&this.$container.find(".highlight").height(this.$container.height()).width(this.$container.width()).css({overflow:"auto"})}},_resizeContainer:function(t,e){this.$container.css({width:t,"min-width":t,"max-width":t,height:e,"min-height":e,"max-height":e,top:(Garnish.$win.height()-e)/2,left:(Garnish.$win.width()-t)/2})}},{defaultSettings:{startingWidth:null,startingHeight:null}}),Craft.ProgressBar=Garnish.Base.extend({$progressBar:null,$innerProgressBar:null,$progressBarStatus:null,_itemCount:0,_processedItemCount:0,_displaySteps:!1,init:function(t,e){e&&(this._displaySteps=!0),this.$progressBar=$('<div class="progressbar pending hidden"/>').appendTo(t),this.$innerProgressBar=$('<div class="progressbar-inner"/>').appendTo(this.$progressBar),this.$progressBarStatus=$('<div class="progressbar-status hidden" />').insertAfter(this.$progressBar),this.resetProgressBar()},resetProgressBar:function(){this.setProgressPercentage(100),this.$progressBar.addClass("pending"),this.setItemCount(1),this.setProcessedItemCount(0),this.$progressBarStatus.html(""),this._displaySteps&&this.$progressBar.addClass("has-status")},hideProgressBar:function(){this.$progressBar.fadeTo("fast",.01,$.proxy(function(){this.$progressBar.addClass("hidden").fadeTo(1,1,$.noop)},this))},showProgressBar:function(){this.$progressBar.removeClass("hidden"),this.$progressBarStatus.removeClass("hidden")},setItemCount:function(t){this._itemCount=t},incrementItemCount:function(t){this._itemCount+=t},setProcessedItemCount:function(t){this._processedItemCount=t},incrementProcessedItemCount:function(t){this._processedItemCount+=t},updateProgressBar:function(){this._itemCount=Math.max(this._itemCount,1);var t=Math.min(100,Math.round(100*this._processedItemCount/this._itemCount));this.setProgressPercentage(t),this._displaySteps&&this.$progressBarStatus.html(this._processedItemCount+" / "+this._itemCount)},setProgressPercentage:function(t,e){0===t?this.$progressBar.addClass("pending"):(this.$progressBar.removeClass("pending"),e?this.$innerProgressBar.velocity("stop").velocity({width:t+"%"},"fast"):this.$innerProgressBar.velocity("stop").width(t+"%"))}}),Craft.PromptHandler=Garnish.Base.extend({modal:null,$modalContainerDiv:null,$prompt:null,$promptApplyToRemainingContainer:null,$promptApplyToRemainingCheckbox:null,$promptApplyToRemainingLabel:null,$pomptChoices:null,_prompts:[],_promptBatchCallback:$.noop,_promptBatchReturnData:[],_promptBatchNum:0,resetPrompts:function(){this._prompts=[],this._promptBatchCallback=$.noop,this._promptBatchReturnData=[],this._promptBatchNum=0},addPrompt:function(t){this._prompts.push(t)},getPromptCount:function(){return this._prompts.length},showBatchPrompts:function(t){this._promptBatchCallback=t,this._promptBatchReturnData=[],this._promptBatchNum=0,this._showNextPromptInBatch()},_showNextPromptInBatch:function(){var t=this._prompts[this._promptBatchNum].prompt,e=this._prompts.length-(this._promptBatchNum+1);this._showPrompt(t.message,t.choices,$.proxy(this,"_handleBatchPromptSelection"),e)},_handleBatchPromptSelection:function(t,e){var i=this._prompts[this._promptBatchNum],s=this._prompts.length-(this._promptBatchNum+1),n=$.extend(i,{choice:t});this._promptBatchReturnData.push(n),s?(this._promptBatchNum++,e?this._handleBatchPromptSelection(t,!0):this._showNextPromptInBatch()):"function"==typeof this._promptBatchCallback&&this._promptBatchCallback(this._promptBatchReturnData)},_showPrompt:function(t,e,i,s){this._promptCallback=i,null===this.modal&&(this.modal=new Garnish.Modal({closeOtherModals:!1})),null===this.$modalContainerDiv&&(this.$modalContainerDiv=$('<div class="modal fitted prompt-modal"></div>').addClass().appendTo(Garnish.$bod)),this.$prompt=$('<div class="body"></div>').appendTo(this.$modalContainerDiv.empty()),this.$promptMessage=$('<p class="prompt-msg"/>').appendTo(this.$prompt),this.$promptChoices=$('<div class="options"></div>').appendTo(this.$prompt),this.$promptApplyToRemainingContainer=$('<label class="assets-applytoremaining"/>').appendTo(this.$prompt).hide(),this.$promptApplyToRemainingCheckbox=$('<input type="checkbox"/>').appendTo(this.$promptApplyToRemainingContainer),this.$promptApplyToRemainingLabel=$("<span/>").appendTo(this.$promptApplyToRemainingContainer),this.$promptButtons=$('<div class="buttons right"/>').appendTo(this.$prompt),this.modal.setContainer(this.$modalContainerDiv),this.$promptMessage.html(t);for(var n=$('<div class="btn">'+Craft.t("app","Cancel")+"</div>").appendTo(this.$promptButtons),a=$('<input type="submit" class="btn submit disabled" value="'+Craft.t("app","OK")+'" />').appendTo(this.$promptButtons),r=0;r<e.length;r++){var o=$('<div><label><input type="radio" name="promptAction" value="'+e[r].value+'"/> '+e[r].title+"</label></div>").appendTo(this.$promptChoices).find("input");this.addListener(o,"click",function(){a.removeClass("disabled")})}this.addListener(a,"activate",function(t){var e=$(t.currentTarget).parents(".modal").find("input[name=promptAction]:checked").val(),i=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice(e,i)}),this.addListener(n,"activate",function(){var t=this.$promptApplyToRemainingCheckbox.prop("checked");this._selectPromptChoice("cancel",t)}),s&&(this.$promptApplyToRemainingContainer.show(),this.$promptApplyToRemainingLabel.html(" "+Craft.t("app","Apply this to the {number} remaining conflicts?",{number:s}))),this.modal.show(),this.modal.removeListener(Garnish.Modal.$shade,"click"),this.addListener(Garnish.Modal.$shade,"click","_cancelPrompt")},_selectPromptChoice:function(t,e){this.$prompt.fadeOut("fast",$.proxy(function(){this.modal.hide(),this._promptCallback(t,e)},this))},_cancelPrompt:function(){this._selectPromptChoice("cancel",!0)}}),Craft.SlideRuleInput=Garnish.Base.extend({$container:null,$options:null,$selectedOption:null,$input:null,value:null,startPositionX:null,init:function(t,e){this.setSettings(e,Craft.SlideRuleInput.defaultSettings),this.value=0,this.graduationsMin=-70,this.graduationsMax=70,this.slideMin=-45,this.slideMax=45,this.$container=$("#"+t),this.$overlay=$('<div class="overlay"></div>').appendTo(this.$container),this.$cursor=$('<div class="cursor"></div>').appendTo(this.$container),this.$graduations=$('<div class="graduations"></div>').appendTo(this.$container),this.$graduationsUl=$("<ul></ul>").appendTo(this.$graduations);for(var i=this.graduationsMin;i<=this.graduationsMax;i++){var s=$('<li class="graduation" data-graduation="'+i+'"><div class="label">'+i+"</div></li>").appendTo(this.$graduationsUl);i%5==0&&s.addClass("main-graduation"),0===i&&s.addClass("selected")}this.$options=this.$container.find(".graduation"),this.addListener(this.$container,"resize",$.proxy(this,"_handleResize")),this.addListener(this.$container,"tapstart",$.proxy(this,"_handleTapStart")),this.addListener(Garnish.$bod,"tapmove",$.proxy(this,"_handleTapMove")),this.addListener(Garnish.$bod,"tapend",$.proxy(this,"_handleTapEnd")),setTimeout($.proxy(function(){this.graduationsCalculatedWidth=10*(this.$options.length-1),this.$graduationsUl.css("left",-this.graduationsCalculatedWidth/2+this.$container.width()/2)},this),50)},_handleResize:function(){var t=this.valueToPosition(this.value);this.$graduationsUl.css("left",t)},_handleTapStart:function(t,e){t.preventDefault(),this.startPositionX=e.position.x,this.startLeft=this.$graduationsUl.position().left,this.dragging=!0,this.onStart()},_handleTapMove:function(t,e){if(this.dragging){t.preventDefault();var i=this.startPositionX-e.position.x,s=this.startLeft-i,n=this.positionToValue(s);this.setValue(n),this.onChange()}},setValue:function(i){var t=this.valueToPosition(i);i<this.slideMin?(i=this.slideMin,t=this.valueToPosition(i)):i>this.slideMax&&(i=this.slideMax,t=this.valueToPosition(i)),this.$graduationsUl.css("left",t),i>=this.slideMin&&i<=this.slideMax&&(this.$options.removeClass("selected"),$.each(this.$options,function(t,e){0<$(e).data("graduation")&&$(e).data("graduation")<=i&&$(e).addClass("selected"),$(e).data("graduation")<0&&$(e).data("graduation")>=i&&$(e).addClass("selected"),0==$(e).data("graduation")&&$(e).addClass("selected")})),this.value=i},_handleTapEnd:function(t){this.dragging&&(t.preventDefault(),this.dragging=!1,this.onEnd())},positionToValue:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return(this.$graduations.width()/2+-1*t)/this.graduationsCalculatedWidth*i-e},valueToPosition:function(t){var e=-1*this.graduationsMin,i=-1*(this.graduationsMin-this.graduationsMax);return-((t+e)*this.graduationsCalculatedWidth/i-this.$graduations.width()/2)},onStart:function(){"function"==typeof this.settings.onChange&&this.settings.onStart(this)},onChange:function(){"function"==typeof this.settings.onChange&&this.settings.onChange(this)},onEnd:function(){"function"==typeof this.settings.onChange&&this.settings.onEnd(this)},defaultSettings:{onStart:$.noop,onChange:$.noop,onEnd:$.noop}}),Craft.SlugGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace(/<(.*?)>/g,"")).replace(/['"‘’“”\[\]\(\)\{\}:]/g,""),Craft.allowUppercaseInSlug||(t=t.toLowerCase()),Craft.limitAutoSlugsToAscii&&(t=Craft.asciiString(t,this.settings.charMap));var e=Craft.filterArray(XRegExp.matchChain(t,[XRegExp("[\\p{L}\\p{N}\\p{M}]+")]));return e.length?e.join(Craft.slugWordSeparator):""}}),Craft.Structure=Garnish.Base.extend({id:null,$container:null,state:null,structureDrag:null,init:function(t,e,i){this.id=t,this.$container=$(e),this.setSettings(i,Craft.Structure.defaults),this.$container.data("structure")&&(Garnish.log("Double-instantiating a structure on an element"),this.$container.data("structure").destroy()),this.$container.data("structure",this),this.state={},this.settings.storageKey&&$.extend(this.state,Craft.getLocalStorage(this.settings.storageKey,{})),void 0===this.state.collapsedElementIds&&(this.state.collapsedElementIds=[]);for(var s=this.$container.find("ul").prev(".row"),n=0;n<s.length;n++){var a=$(s[n]),r=a.parent(),o=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(a);-1!==$.inArray(a.children(".element").data("id"),this.state.collapsedElementIds)&&r.addClass("collapsed"),this.initToggle(o)}this.settings.sortable&&(this.structureDrag=new Craft.StructureDrag(this,this.settings.maxLevels)),this.settings.newChildUrl&&this.initNewChildMenus(this.$container.find(".add"))},initToggle:function(t){t.on("click",$.proxy(function(t){var e=$(t.currentTarget).closest("li"),i=e.children(".row").find(".element:first").data("id"),s=$.inArray(i,this.state.collapsedElementIds);e.hasClass("collapsed")?(e.removeClass("collapsed"),-1!==s&&this.state.collapsedElementIds.splice(s,1)):(e.addClass("collapsed"),-1===s&&this.state.collapsedElementIds.push(i)),this.settings.storageKey&&Craft.setLocalStorage(this.settings.storageKey,this.state)},this))},initNewChildMenus:function(t){this.addListener(t,"click","onNewChildMenuClick")},onNewChildMenuClick:function(t){var e=$(t.currentTarget);if(!e.data("menubtn")){var i=e.parent().children(".element").data("id"),s=Craft.getUrl(this.settings.newChildUrl,"parentId="+i);$('<div class="menu"><ul><li><a href="'+s+'">'+Craft.t("app","New child")+"</a></li></ul></div>").insertAfter(e),new Garnish.MenuBtn(e).showMenu()}},getIndent:function(t){return Craft.Structure.baseIndent+(t-1)*Craft.Structure.nestedIndent},addElement:function(t){var e=$('<li data-level="1"/>').appendTo(this.$container),i=$('<div class="row" style="margin-'+Craft.left+": -"+Craft.Structure.baseIndent+"px; padding-"+Craft.left+": "+Craft.Structure.baseIndent+'px;">').appendTo(e);if(i.append(t),this.settings.sortable&&(i.append('<a class="move icon" title="'+Craft.t("app","Move")+'"></a>'),this.structureDrag.addItems(e)),this.settings.newChildUrl){var s=$('<a class="add icon" title="'+Craft.t("app","New child")+'"></a>').appendTo(i);this.initNewChildMenus(s)}i.css("margin-bottom",-30),i.velocity({"margin-bottom":0},"fast")},removeElement:function(t){var e,i=t.parent().parent();this.settings.sortable&&this.structureDrag.removeItems(i),i.siblings().length||(e=i.parent()),i.css("visibility","hidden").velocity({marginBottom:-i.height()},"fast",$.proxy(function(){i.remove(),void 0!==e&&this._removeUl(e)},this))},_removeUl:function(t){t.siblings(".row").children(".toggle").remove(),t.remove()}},{baseIndent:8,nestedIndent:35,defaults:{storageKey:null,sortable:!1,newChildUrl:null,maxLevels:null}}),Craft.StructureDrag=Garnish.Drag.extend({structure:null,maxLevels:null,draggeeLevel:null,$helperLi:null,$targets:null,draggeeHeight:null,init:function(t,e){this.structure=t,this.maxLevels=e,this.$insertion=$('<li class="draginsertion"/>');var i=this.structure.$container.find("li");this.base(i,{handle:".element:first, .move:first",helper:$.proxy(this,"getHelper")})},getHelper:function(t){this.$helperLi=t;var e=$('<ul class="structure draghelper"/>').append(t);return t.css("padding-"+Craft.left,this.$draggee.css("padding-"+Craft.left)),t.find(".move").removeAttr("title"),e},onDragStart:function(){this.$targets=$(),this.findTargets(this.structure.$container),this.draggeeLevel=0;for(var t=this.$draggee;this.draggeeLevel++,(t=t.find("> ul > li")).length;);this.draggeeHeight=this.$draggee.height(),this.$draggee.velocity({height:0},"fast",$.proxy(function(){this.$draggee.addClass("hidden")},this)),this.base(),this.addListener(Garnish.$doc,"keydown",function(t){t.keyCode===Garnish.ESC_KEY&&this.cancelDrag()})},findTargets:function(t){for(var e=t.children().not(this.$draggee),i=0;i<e.length;i++){var s=$(e[i]);this.$targets=this.$targets.add(s.children(".row")),s.hasClass("collapsed")||this.findTargets(s.children("ul"))}},onDrag:function(){for(this._.$closestTarget&&(this._.$closestTarget.removeClass("draghover"),this.$insertion.remove()),this._.$closestTarget=null,this._.closestTargetPos=null,this._.closestTargetYDiff=null,this._.closestTargetOffset=null,this._.closestTargetHeight=null,this._.i=0;this._.i<this.$targets.length&&(this._.$target=$(this.$targets[this._.i]),this._.targetOffset=this._.$target.offset(),this._.targetHeight=this._.$target.outerHeight(),this._.targetYMidpoint=this._.targetOffset.top+this._.targetHeight/2,this._.targetYDiff=Math.abs(this.mouseY-this._.targetYMidpoint),0===this._.i||this.mouseY>=this._.targetOffset.top+5&&this._.targetYDiff<this._.closestTargetYDiff);this._.i++)this._.$closestTarget=this._.$target,this._.closestTargetPos=this._.i,this._.closestTargetYDiff=this._.targetYDiff,this._.closestTargetOffset=this._.targetOffset,this._.closestTargetHeight=this._.targetHeight;if(this._.$closestTarget)if(0===this._.closestTargetPos&&this.mouseY<this._.closestTargetOffset.top+5)this.$insertion.prependTo(this.structure.$container);else if(this._.$closestTargetLi=this._.$closestTarget.parent(),this._.closestTargetLevel=this._.$closestTargetLi.data("level"),this._.closestTargetPos<this.$targets.length-1?(this._.$nextTargetLi=$(this.$targets[this._.closestTargetPos+1]).parent(),this._.nextTargetLevel=this._.$nextTargetLi.data("level")):(this._.$nextTargetLi=null,this._.nextTargetLevel=null),this._.hoveringBetweenRows=this.mouseY>=this._.closestTargetOffset.top+this._.closestTargetHeight-5,this._.$nextTargetLi&&this._.nextTargetLevel==this._.closestTargetLevel)this._.hoveringBetweenRows?(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel-1)&&this.$insertion.insertAfter(this._.$closestTargetLi):(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover");else if(this._.$nextTargetLi&&this._.nextTargetLevel>this._.closestTargetLevel)(!this.maxLevels||this.maxLevels>=this._.nextTargetLevel+this.draggeeLevel-1)&&(this._.hoveringBetweenRows?this.$insertion.insertBefore(this._.$nextTargetLi):(this._.$closestTarget.addClass("draghover"),this.$insertion.appendTo(this._.$closestTargetLi.children("ul"))));else if(this._.hoveringBetweenRows){for(this._.draggeeX=this.mouseX-this.targetItemMouseDiffX,"rtl"===Craft.orientation&&(this._.draggeeX+=this.$helperLi.width()),this._.$parentLis=this._.$closestTarget.parentsUntil(this.structure.$container,"li"),this._.$closestParentLi=null,this._.closestParentLiXDiff=null,this._.closestParentLevel=null,this._.i=0;this._.i<this._.$parentLis.length;this._.i++)this._.$parentLi=$(this._.$parentLis[this._.i]),this._.parentLiX=this._.$parentLi.offset().left,"rtl"===Craft.orientation&&(this._.parentLiX+=this._.$parentLi.width()),this._.parentLiXDiff=Math.abs(this._.parentLiX-this._.draggeeX),this._.parentLevel=this._.$parentLi.data("level"),(!this.maxLevels||this.maxLevels>=this._.parentLevel+this.draggeeLevel-1)&&(!this._.$closestParentLi||this._.parentLiXDiff<this._.closestParentLiXDiff&&(!this._.$nextTargetLi||this._.parentLevel>=this._.nextTargetLevel))&&(this._.$closestParentLi=this._.$parentLi,this._.closestParentLiXDiff=this._.parentLiXDiff,this._.closestParentLevel=this._.parentLevel);this._.$closestParentLi&&this.$insertion.insertAfter(this._.$closestParentLi)}else(!this.maxLevels||this.maxLevels>=this._.closestTargetLevel+this.draggeeLevel)&&this._.$closestTarget.addClass("draghover")},cancelDrag:function(){this.$insertion.remove(),this._.$closestTarget&&this._.$closestTarget.removeClass("draghover"),this.onMouseUp()},onDragStop:function(){if(this._.$closestTarget&&(this.$insertion.parent().length||this._.$closestTarget.hasClass("draghover"))){var t,e;if(this.$draggee.siblings().length||(t=this.$draggee.parent()),this.$insertion.parent().length){var i=this.$insertion.next().add(this.$insertion.prev());e=-1===$.inArray(this.$draggee[0],i)?(this.$insertion.replaceWith(this.$draggee),!0):(this.$insertion.remove(),!1)}else{var s=this._.$closestTargetLi.children("ul");if(t&&s.length&&s[0]===t[0])e=!1;else{if(s.length)this._.$closestTargetLi.hasClass("collapsed")&&this._.$closestTarget.children(".toggle").trigger("click");else{var n=$('<div class="toggle" title="'+Craft.t("app","Show/hide children")+'"/>').prependTo(this._.$closestTarget);this.structure.initToggle(n),s=$("<ul>").appendTo(this._.$closestTargetLi)}this.$draggee.appendTo(s),e=!0}}if(this._.$closestTarget.removeClass("draghover"),e){t&&this.structure._removeUl(t);var a,r=this.$draggee.parentsUntil(this.structure.$container,"li").length+1;r!=this.$draggee.data("level")&&(1==this.$draggee.data("level")?((a={})["padding-"+Craft.left]=38,this.$helperLi.velocity(a,"fast")):1==r&&((a={})["padding-"+Craft.left]=Craft.Structure.baseIndent,this.$helperLi.velocity(a,"fast")),this.setLevel(this.$draggee,r));var o=this.$draggee.children(".row").children(".element"),l={structureId:this.structure.id,elementId:o.data("id"),siteId:o.data("site-id"),prevId:this.$draggee.prev().children(".row").children(".element").data("id"),parentId:this.$draggee.parent("ul").parent("li").children(".row").children(".element").data("id")};Craft.postActionRequest("structures/move-element",l,function(t,e){"success"===e&&Craft.cp.displayNotice(Craft.t("app","New order saved."))})}}this.$draggee.velocity("stop").removeClass("hidden").velocity({height:this.draggeeHeight},"fast",$.proxy(function(){this.$draggee.css("height","auto")},this)),this.returnHelpersToDraggees(),this.base()},setLevel:function(t,e){t.data("level",e);var i=this.structure.getIndent(e),s={};s["margin-"+Craft.left]="-"+i+"px",s["padding-"+Craft.left]=i+"px",this.$draggee.children(".row").css(s);for(var n=t.children("ul").children(),a=0;a<n.length;a++)this.setLevel($(n[a]),e+1)}}),Craft.StructureTableSorter=Garnish.DragSort.extend({tableView:null,structureId:null,maxLevels:null,_helperMargin:null,_$firstRowCells:null,_$titleHelperCell:null,_titleHelperCellOuterWidth:null,_ancestors:null,_updateAncestorsFrame:null,_updateAncestorsProxy:null,_draggeeLevel:null,_draggeeLevelDelta:null,draggingLastElements:null,_loadingDraggeeLevelDelta:!1,_targetLevel:null,_targetLevelBounds:null,_positionChanged:null,init:function(t,e,i){this.tableView=t,this.structureId=this.tableView.$table.data("structure-id"),this.maxLevels=parseInt(this.tableView.$table.attr("data-max-levels")),i=$.extend({},Craft.StructureTableSorter.defaults,i,{handle:".move",collapseDraggees:!0,singleHelper:!0,helperSpacingY:2,magnetStrength:4,helper:$.proxy(this,"getHelper"),helperLagBase:1.5,axis:Garnish.Y_AXIS}),this.base(e,i)},startDragging:function(){this._helperMargin=Craft.StructureTableSorter.HELPER_MARGIN+(this.tableView.elementIndex.actions?24:0),this.base()},findDraggee:function(){this._draggeeLevel=this._targetLevel=this.$targetItem.data("level"),this._draggeeLevelDelta=0;for(var t=$(this.$targetItem),e=this.$targetItem.next();e.length;){var i=e.data("level");if(i<=this._draggeeLevel)break;var s=i-this._draggeeLevel;s>this._draggeeLevelDelta&&(this._draggeeLevelDelta=s),t=t.add(e),e=e.next()}if(this.draggingLastElements=!e.length,this.maxLevels&&this.draggingLastElements&&this.tableView.getMorePending()){this._loadingDraggeeLevelDelta=!0;var n=this._getAjaxBaseData(this.$targetItem);Craft.postActionRequest("structures/get-element-level-delta",n,$.proxy(function(t,e){"success"===e&&(this._loadingDraggeeLevelDelta=!1,this.dragging&&(this._draggeeLevelDelta=t.delta,this.drag(!1)))},this))}return t},getHelper:function(t){var e=$('<div class="elements datatablesorthelper"/>').appendTo(Garnish.$bod),i=$('<div class="tableview"/>').appendTo(e),s=$('<table class="data"/>').appendTo(i),n=$("<tbody/>").appendTo(s);t.appendTo(n),this._$firstRowCells=this.tableView.$elementContainer.children("tr:first").children();for(var a=t.children(),r=0;r<a.length;r++){var o=$(a[r]);if(o.hasClass("checkbox-cell"))o.remove();else{var l=$(this._$firstRowCells[r]),h=l.width();if(l.width(h),o.width(h),Garnish.hasAttr(l,"data-titlecell")){this._$titleHelperCell=o;var d=parseInt(l.css("padding-"+Craft.left));this._titleHelperCellOuterWidth=h+d-(this.tableView.elementIndex.actions?12:0),o.css("padding-"+Craft.left,Craft.StructureTableSorter.BASE_PADDING)}}}return e},canInsertBefore:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t.prev(),t)},canInsertAfter:function(t){return!this._loadingDraggeeLevelDelta&&!1!==this._getLevelBounds(t,t.next())},onDragStart:function(){this._ancestors=this._getAncestors(this.$targetItem,this.$targetItem.data("level")),this._setTargetLevelBounds(),this.tableView.maybeLoadMore(),this.base()},onDrag:function(){this.base(),this._updateIndent()},onInsertionPointChange:function(){this._setTargetLevelBounds(),this._updateAncestorsBeforeRepaint(),this.base()},onDragStop:function(){if(this._positionChanged=!1,this.base(),this._targetLevel!=this._draggeeLevel){for(var t=this._targetLevel-this._draggeeLevel,e=0;e<this.$draggee.length;e++){var i=$(this.$draggee[e]),s=i.data("level")+t,n=Craft.StructureTableSorter.BASE_PADDING+(this.tableView.elementIndex.actions?7:0)+this._getLevelIndent(s);i.data("level",s),i.find(".element").data("level",s),i.children("[data-titlecell]:first").css("padding-"+Craft.left,n)}this._positionChanged=!0}if(this._positionChanged){for(var a=this._getAjaxBaseData(this.$draggee),r=this.$draggee.first().prev();r.length;){var o=r.data("level");if(o==this._targetLevel){a.prevId=r.data("id");break}if(o<this._targetLevel){a.parentId=r.data("id");var l=r.find("> td > .toggle");if(!l.hasClass("expanded")){l.addClass("expanded");var h=this.tableView._createSpinnerRowAfter(r);this.tableView.elementSelect&&this.tableView.elementSelect.removeItems(this.$targetItem),this.removeItems(this.$targetItem),this.$targetItem.remove(),this.tableView._totalVisible--}break}r=r.prev()}Craft.postActionRequest("structures/move-element",a,$.proxy(function(t,e){if("success"===e){if(!t.success)return Craft.cp.displayError(Craft.t("app","An unknown error occurred.")),void this.tableView.elementIndex.updateElements();Craft.cp.displayNotice(Craft.t("app","New position saved.")),this.onPositionChange(),h&&h.parent().length&&(h.remove(),this.tableView._expandElement(l,!0)),Craft.cp.runQueue()}},this))}},onSortChange:function(){this.tableView.elementSelect&&this.tableView.elementSelect.resetItemOrder(),this._positionChanged=!0,this.base()},onPositionChange:function(){Garnish.requestAnimationFrame($.proxy(function(){this.trigger("positionChange"),this.settings.onPositionChange()},this))},onReturnHelpersToDraggees:function(){if(this._$firstRowCells.css("width",""),this.draggingLastElements&&this.tableView.getMorePending()){this.tableView._totalVisible+=this.newDraggeeIndexes[0]-this.oldDraggeeIndexes[0];var t=this.$draggee.last().nextAll();t.length&&(this.removeItems(t),t.remove(),this.tableView.maybeLoadMore())}this.base()},_getLevelBounds:function(t,e){if(e&&e.length?this._getLevelBounds._minLevel=e.data("level"):this._getLevelBounds._minLevel=1,t&&t.length?this._getLevelBounds._maxLevel=t.data("level")+1:this._getLevelBounds._maxLevel=1,this.maxLevels){if(1!=this._getLevelBounds._minLevel&&this._getLevelBounds._minLevel+this._draggeeLevelDelta>this.maxLevels)return!1;this._getLevelBounds._maxLevel+this._draggeeLevelDelta>this.maxLevels&&(this._getLevelBounds._maxLevel=this.maxLevels-this._draggeeLevelDelta,this._getLevelBounds._maxLevel<this._getLevelBounds._minLevel&&(this._getLevelBounds._maxLevel=this._getLevelBounds._minLevel))}return{min:this._getLevelBounds._minLevel,max:this._getLevelBounds._maxLevel}},_setTargetLevelBounds:function(){this._targetLevelBounds=this._getLevelBounds(this.$draggee.first().prev(),this.$draggee.last().next())},_updateIndent:function(t){this._updateIndent._mouseDist=this.realMouseX-this.mousedownX,"rtl"===Craft.orientation&&(this._updateIndent._mouseDist*=-1),this._updateIndent._indentationDist=Math.round(this._updateIndent._mouseDist/Craft.StructureTableSorter.LEVEL_INDENT),this._updateIndent._targetLevel=this._draggeeLevel+this._updateIndent._indentationDist,this._updateIndent._targetLevel<this._targetLevelBounds.min?(this._updateIndent._indentationDist+=this._targetLevelBounds.min-this._updateIndent._targetLevel,this._updateIndent._targetLevel=this._targetLevelBounds.min):this._updateIndent._targetLevel>this._targetLevelBounds.max&&(this._updateIndent._indentationDist-=this._updateIndent._targetLevel-this._targetLevelBounds.max,this._updateIndent._targetLevel=this._targetLevelBounds.max),this._targetLevel!==(this._targetLevel=this._updateIndent._targetLevel)&&this._updateAncestorsBeforeRepaint(),this._updateIndent._targetLevelMouseDiff=this._updateIndent._mouseDist-this._updateIndent._indentationDist*Craft.StructureTableSorter.LEVEL_INDENT,this._updateIndent._magnetImpact=Math.round(this._updateIndent._targetLevelMouseDiff/15),Math.abs(this._updateIndent._magnetImpact)>Craft.StructureTableSorter.MAX_GIVE&&(this._updateIndent._magnetImpact=(0<this._updateIndent._magnetImpact?1:-1)*Craft.StructureTableSorter.MAX_GIVE),this._updateIndent._closestLevelMagnetIndent=this._getLevelIndent(this._targetLevel)+this._updateIndent._magnetImpact,this.helpers[0].css("margin-"+Craft.left,this._updateIndent._closestLevelMagnetIndent+this._helperMargin),this._$titleHelperCell.width(this._titleHelperCellOuterWidth-(this._updateIndent._closestLevelMagnetIndent+Craft.StructureTableSorter.BASE_PADDING))},_getLevelIndent:function(t){return(t-1)*Craft.StructureTableSorter.LEVEL_INDENT},_getAjaxBaseData:function(t){return{structureId:this.structureId,elementId:t.data("id"),siteId:t.find(".element:first").data("site-id")}},_getAncestors:function(t,e){if(this._getAncestors._ancestors=[],0!=e)for(this._getAncestors._level=e,this._getAncestors._$prevRow=t.prev();this._getAncestors._$prevRow.length&&!(this._getAncestors._$prevRow.data("level")<this._getAncestors._level&&(this._getAncestors._ancestors.unshift(this._getAncestors._$prevRow),this._getAncestors._level=this._getAncestors._$prevRow.data("level"),0==this._getAncestors._level));)this._getAncestors._$prevRow=this._getAncestors._$prevRow.prev();return this._getAncestors._ancestors},_updateAncestorsBeforeRepaint:function(){this._updateAncestorsFrame&&Garnish.cancelAnimationFrame(this._updateAncestorsFrame),this._updateAncestorsProxy||(this._updateAncestorsProxy=$.proxy(this,"_updateAncestors")),this._updateAncestorsFrame=Garnish.requestAnimationFrame(this._updateAncestorsProxy)},_updateAncestors:function(){for(this._updateAncestorsFrame=null,this._updateAncestors._i=0;this._updateAncestors._i<this._ancestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._ancestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")-1),0==this._updateAncestors._$ancestor.data("descendants")&&this._updateAncestors._$ancestor.find("> td > .toggle:first").remove();for(this._updateAncestors._newAncestors=this._getAncestors(this.$targetItem,this._targetLevel),this._updateAncestors._i=0;this._updateAncestors._i<this._updateAncestors._newAncestors.length;this._updateAncestors._i++)this._updateAncestors._$ancestor=this._updateAncestors._newAncestors[this._updateAncestors._i],this._updateAncestors._$ancestor.data("descendants",this._updateAncestors._$ancestor.data("descendants")+1),1==this._updateAncestors._$ancestor.data("descendants")&&$('<span class="toggle expanded" title="'+Craft.t("app","Show/hide children")+'"></span>').insertAfter(this._updateAncestors._$ancestor.find("> td .move:first"));this._ancestors=this._updateAncestors._newAncestors,delete this._updateAncestors._i,delete this._updateAncestors._$ancestor,delete this._updateAncestors._newAncestors}},{BASE_PADDING:36,HELPER_MARGIN:-7,LEVEL_INDENT:44,MAX_GIVE:22,defaults:{onPositionChange:$.noop}}),Craft.TableElementIndexView=Craft.BaseElementIndexView.extend({$table:null,$selectedSortHeader:null,structureTableSort:null,_totalVisiblePostStructureTableDraggee:null,_morePendingPostStructureTableDraggee:!1,getElementContainer:function(){return this.$table=this.$container.find("table:first"),this.$table.children("tbody:first")},afterInit:function(){Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.add(this.$table),Craft.cp.updateResponsiveTables(),this.initTableHeaders(),"index"===this.elementIndex.settings.context&&"structure"===this.elementIndex.getSelectedSortAttribute()&&Garnish.hasAttr(this.$table,"data-structure-id")?this.structureTableSort=new Craft.StructureTableSorter(this,this.getAllElements(),{onSortChange:$.proxy(this,"_onStructureTableSortChange")}):this.structureTableSort=null,"structure"===this.elementIndex.getSelectedSortAttribute()&&this.addListener(this.$elementContainer,"click",function(t){var e=$(t.target);!e.hasClass("toggle")||!1===this._collapseElement(e)&&this._expandElement(e)})},initTableHeaders:function(){for(var t=this.elementIndex.getSelectedSortAttribute(),e=this.$table.children("thead").children().children("[data-attribute]"),i=0;i<e.length;i++){var s=e.eq(i),n=s.attr("data-attribute");if(n===t){this.$selectedSortHeader=s;var a=this.elementIndex.getSelectedSortDirection();s.addClass("ordered "+a).on("click",$.proxy(this,"_handleSelectedSortHeaderClick"))}else{this.elementIndex.getSortAttributeOption(n).length&&s.addClass("orderable").on("click",$.proxy(this,"_handleUnselectedSortHeaderClick"))}}},isVerticalList:function(){return!0},getTotalVisible:function(){return this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee:this._totalVisible},setTotalVisible:function(t){this._isStructureTableDraggingLastElements()?this._totalVisiblePostStructureTableDraggee=t:this._totalVisible=t},getMorePending:function(){return this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee:this._morePending},setMorePending:function(t){this._isStructureTableDraggingLastElements()?this._morePendingPostStructureTableDraggee=t:this._morePending=this._morePendingPostStructureTableDraggee=t},getLoadMoreParams:function(){var t=this.base();return this._isStructureTableDraggingLastElements()&&(t.criteria.positionedAfter=this.structureTableSort.$targetItem.data("id")),t},appendElements:function(t){this.base(t),this.structureTableSort&&this.structureTableSort.addItems(t),Craft.cp.updateResponsiveTables()},destroy:function(){this.$table&&(Craft.cp.$collapsibleTables=Craft.cp.$collapsibleTables.not(this.$table)),this.base()},createElementEditor:function(e){Craft.createElementEditor(e.data("type"),e,{params:{includeTableAttributesForSource:this.elementIndex.sourceKey},onSaveElement:$.proxy(function(t){t.tableAttributes&&this._updateTableAttributes(e,t.tableAttributes)},this),elementIndex:this.elementIndex})},_collapseElement:function(t,e){if(!e&&!t.hasClass("expanded"))return!1;t.removeClass("expanded");for(var i=t.parent().parent(),s=i.data("id"),n=i.data("level"),a=i.next();a.length;){if(!Garnish.hasAttr(a,"data-spinnerrow")){if(a.data("level")<=n)break;this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),this._totalVisible--}var r=a.next();a.remove(),a=r}this.elementIndex.instanceState.collapsedElementIds||(this.elementIndex.instanceState.collapsedElementIds=[]),this.elementIndex.instanceState.collapsedElementIds.push(s),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds),this.maybeLoadMore()},_expandElement:function(t,e){if(!e&&t.hasClass("expanded"))return!1;if(t.addClass("expanded"),this.elementIndex.instanceState.collapsedElementIds){var i=t.parent().parent(),s=i.data("id"),n=$.inArray(s,this.elementIndex.instanceState.collapsedElementIds);if(-1!==n){this.elementIndex.instanceState.collapsedElementIds.splice(n,1),this.elementIndex.setInstanceState("collapsedElementIds",this.elementIndex.instanceState.collapsedElementIds);var r=this._createSpinnerRowAfter(i),a=$.extend(!0,{},this.settings.params);a.criteria.descendantOf=s,Craft.postActionRequest("element-indexes/get-more-elements",a,$.proxy(function(t,e){if(r.parent().length&&"success"===e){var i=$(t.html),s=this._totalVisible+i.length,n=this.settings.batchSize&&i.length===this.settings.batchSize;if(n){var a=r.nextAll();this.elementSelect&&this.elementSelect.removeItems(a),this.structureTableSort&&this.structureTableSort.removeItems(a),a.remove(),s-=a.length}else n=this._morePending;r.replaceWith(i),this.thumbLoader.load(i),(this.elementIndex.actions||this.settings.selectable)&&(this.elementSelect.addItems(i.filter(":not(.disabled)")),this.elementIndex.updateActionTriggers()),this.structureTableSort&&this.structureTableSort.addItems(i),Craft.appendHeadHtml(t.headHtml),Craft.appendFootHtml(t.footHtml),Craft.cp.updateResponsiveTables(),this.setTotalVisible(s),this.setMorePending(n),this.maybeLoadMore()}},this))}}},_createSpinnerRowAfter:function(t){return $('<tr data-spinnerrow><td class="centeralign" colspan="'+t.children().length+'"><div class="spinner"/></td></tr>').insertAfter(t)},_isStructureTableDraggingLastElements:function(){return this.structureTableSort&&this.structureTableSort.dragging&&this.structureTableSort.draggingLastElements},_handleSelectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i="asc"===this.elementIndex.getSelectedSortDirection()?"desc":"asc";this.elementIndex.setSortDirection(i),this._handleSortHeaderClick(t,e)}},_handleUnselectedSortHeaderClick:function(t){var e=$(t.currentTarget);if(!e.hasClass("loading")){var i=e.attr("data-attribute");this.elementIndex.setSortAttribute(i),this._handleSortHeaderClick(t,e)}},_handleSortHeaderClick:function(t,e){this.$selectedSortHeader&&this.$selectedSortHeader.removeClass("ordered asc desc"),e.removeClass("orderable").addClass("ordered loading"),this.elementIndex.storeSortAttributeAndDirection(),this.elementIndex.updateElements(),this.elementIndex.setIndexAvailable()},_updateTableAttributes:function(t,e){var i=t.closest("tr");for(var s in e)e.hasOwnProperty(s)&&i.children('td[data-attr="'+s+'"]:first').html(e[s])}}),Craft.TagSelectInput=Craft.BaseElementSelectInput.extend({searchTimeout:null,searchMenu:null,$container:null,$elementsContainer:null,$elements:null,$addTagInput:null,$spinner:null,_ignoreBlur:!1,init:function(t){if(!$.isPlainObject(t)){for(var e={},i=["id","name","tagGroupId","sourceElementId"],s=0;s<i.length&&void 0!==arguments[s];s++)e[i[s]]=arguments[s];t=e}this.base($.extend({},Craft.TagSelectInput.defaults,t)),this.$addTagInput=this.$container.children(".add").children(".text"),this.$spinner=this.$addTagInput.next(),this.addListener(this.$addTagInput,"textchange",$.proxy(function(){this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout($.proxy(this,"searchForTags"),500)},this)),this.addListener(this.$addTagInput,"keypress",function(t){t.keyCode===Garnish.RETURN_KEY&&(t.preventDefault(),this.searchMenu&&this.selectTag(this.searchMenu.$options[0]))}),this.addListener(this.$addTagInput,"focus",function(){this.searchMenu&&this.searchMenu.show()}),this.addListener(this.$addTagInput,"blur",function(){this._ignoreBlur?this._ignoreBlur=!1:setTimeout($.proxy(function(){this.searchMenu&&this.searchMenu.hide()},this),1)})},getAddElementsBtn:$.noop,getElementSortAxis:function(){return null},searchForTags:function(){if(this.searchMenu&&this.killSearchMenu(),this.$addTagInput.val()){this.$spinner.removeClass("hidden");for(var t=[],e=0;e<this.$elements.length;e++){var i=$(this.$elements[e]).data("id");i&&t.push(i)}this.settings.sourceElementId&&t.push(this.settings.sourceElementId);var r={search:this.$addTagInput.val(),tagGroupId:this.settings.tagGroupId,excludeIds:t};Craft.postActionRequest("tags/search-for-tags",r,$.proxy(function(t,e){if(this.searchMenu&&this.killSearchMenu(),this.$spinner.addClass("hidden"),"success"===e){for(var i,s=$('<div class="menu tagmenu"/>').appendTo(Garnish.$bod),n=$("<ul/>").appendTo(s),a=0;a<t.tags.length;a++)i=$("<li/>").appendTo(n),$('<a data-icon="tag"/>').appendTo(i).text(t.tags[a].title).data("id",t.tags[a].id).addClass(t.tags[a].exclude?"disabled":"");t.exactMatch||(i=$("<li/>").appendTo(n),$('<a data-icon="plus"/>').appendTo(i).text(r.search)),n.find("a:not(.disabled):first").addClass("hover"),this.searchMenu=new Garnish.Menu(s,{attachToElement:this.$addTagInput,onOptionSelect:$.proxy(this,"selectTag")}),this.addListener(s,"mousedown",$.proxy(function(){this._ignoreBlur=!0},this)),this.searchMenu.show()}},this))}else this.$spinner.addClass("hidden")},selectTag:function(t){var e=$(t);if(!e.hasClass("disabled")){var i=e.data("id"),s=e.text(),n=$("<div/>",{class:"element small removable","data-id":i,"data-site-id":this.settings.targetSiteId,"data-label":s,"data-editable":"1"}).appendTo(this.$elementsContainer),a=$("<input/>",{type:"hidden",name:this.settings.name+"[]",value:i}).appendTo(n);$("<a/>",{class:"delete icon",title:Craft.t("app","Remove")}).appendTo(n);var r=$("<div/>",{class:"label"}).appendTo(n);$("<span/>",{class:"title",text:s}).appendTo(r);var o=-(n.outerWidth()+10);this.$addTagInput.css("margin-"+Craft.left,o+"px");var l={};if(l["margin-"+Craft.left]=0,this.$addTagInput.velocity(l,"fast"),this.$elements=this.$elements.add(n),this.addElements(n),this.killSearchMenu(),this.$addTagInput.val(""),this.$addTagInput.trigger("focus"),!i){n.addClass("loading disabled");var h={groupId:this.settings.tagGroupId,title:s};Craft.postActionRequest("tags/create-tag",h,$.proxy(function(t,e){"success"===e&&t.success?(n.attr("data-id",t.id),a.val(t.id),n.removeClass("loading disabled")):(this.removeElement(n),"success"===e&&Craft.cp.displayError(Craft.t("app","An unknown error occurred.")))},this))}}},killSearchMenu:function(){this.searchMenu.hide(),this.searchMenu.destroy(),this.searchMenu=null}},{defaults:{tagGroupId:null}}),Craft.ThumbsElementIndexView=Craft.BaseElementIndexView.extend({getElementContainer:function(){return this.$container.children("ul")}}),Craft.ui={createTextInput:function(t){var e=$("<input/>",{attr:{class:"text",type:t.type||"text",id:t.id,size:t.size,name:t.name,value:t.value,maxlength:t.maxlength,autofocus:this.getAutofocusValue(t.autofocus),autocomplete:void 0!==t.autocomplete&&t.autocomplete?null:"off",disabled:this.getDisabledValue(t.disabled),readonly:t.readonly,title:t.title,placeholder:t.placeholder,step:t.step,min:t.min,max:t.max}});return t.class&&e.addClass(t.class),t.placeholder&&e.addClass("nicetext"),"password"===t.type&&e.addClass("password"),t.disabled&&e.addClass("disabled"),t.size||e.addClass("fullwidth"),t.showCharsLeft&&t.maxlength&&e.attr("data-show-chars-left").css("padding-"+("ltr"===Craft.orientation?"right":"left"),7.2*t.maxlength.toString().length+14+"px"),(t.placeholder||t.showCharsLeft)&&new Garnish.NiceText(e),"password"===t.type?$('<div class="passwordwrapper"/>').append(e):e},createTextField:function(t){return this.createField(this.createTextInput(t),t)},createTextarea:function(t){var e=$("<textarea/>",{class:"text",rows:t.rows||2,cols:t.cols||50,id:t.id,name:t.name,maxlength:t.maxlength,autofocus:t.autofocus&&!Garnish.isMobileBrowser(!0),disabled:!!t.disabled,placeholder:t.placeholder,html:t.value});return t.showCharsLeft&&e.attr("data-show-chars-left",""),t.class&&e.addClass(t.class),t.size||e.addClass("fullwidth"),e},createTextareaField:function(t){return this.createField(this.createTextarea(t),t)},createSelect:function(t){var e=$("<div/>",{class:"select"});t.class&&e.addClass(t.class);var i=$("<select/>",{id:t.id,name:t.name,autofocus:t.autofocus&&Garnish.isMobileBrowser(!0),disabled:t.disabled,"data-target-prefix":t.targetPrefix}).appendTo(e),s=null;for(var n in t.options)if(t.options.hasOwnProperty(n)){var a=t.options[n];if(void 0!==a.optgroup)s=$("<optgroup/>",{label:a.label}).appendTo(i);else{var r=void 0!==a.label?a.label:a,o=void 0!==a.value?a.value:n,l=void 0!==a.disabled&&a.disabled;$("<option/>",{value:o,selected:o==t.value,disabled:l,html:r}).appendTo(s||i)}}return t.toggle&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),e},createSelectField:function(t){return this.createField(this.createSelect(t),t)},createCheckbox:function(t){var e=t.id||"checkbox"+Math.floor(1e9*Math.random()),i=$("<input/>",{type:"checkbox",value:void 0!==t.value?t.value:"1",id:e,class:"checkbox",name:t.name,checked:t.checked?"checked":null,autofocus:this.getAutofocusValue(t.autofocus),disabled:this.getDisabledValue(t.disabled),"data-target":t.toggle,"data-reverse-target":t.reverseToggle});t.class&&i.addClass(t.class),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i));var s=$("<label/>",{for:e,text:t.label});return t.name&&(t.name.length<3||"[]"!==t.name.substr(-2))?$([$("<input/>",{type:"hidden",name:t.name,value:""})[0],i[0],s[0]]):$([i[0],s[0]])},createCheckboxField:function(t){var e=$('<div class="field checkboxfield"/>',{id:t.id?t.id+"-field":null});return t.first&&e.addClass("first"),t.instructions&&e.addClass("has-instructions"),this.createCheckbox(t).appendTo(e),t.instructions&&$('<div class="instructions"/>').text(t.instructions).appendTo(e),e},createCheckboxSelect:function(t){var e,i,s=$('<div class="checkbox-select"/>');t.class&&s.addClass(t.class),t.showAllOption?(e=t.allValue||"*",i=t.values==e,$("<div/>").appendTo(s).append(this.createCheckbox({id:t.id,class:"all",label:"<b>"+(t.allLabel||Craft.t("app","All"))+"</b>",name:t.name,value:e,checked:i,autofocus:t.autofocus}))):i=!1;for(var n=0;n<t.options.length;n++){var a=t.options[n];a.value!=e&&$("<div/>").appendTo(s).append(this.createCheckbox({label:a.label,name:t.name?t.name+"[]":null,value:a.value,checked:i||Craft.inArray(a.value,t.values),disabled:i}))}return new Garnish.CheckboxSelect(s),s},createCheckboxSelectField:function(t){return this.createField(this.createCheckboxSelect(t),t)},createLightswitch:function(t){var e=t.value||"1",i=$("<div/>",{class:"lightswitch",tabindex:"0","data-value":e,id:t.id,"aria-labelledby":t.labelId,"data-target":t.toggle,"data-reverse-target":t.reverseToggle});return t.on&&i.addClass("on"),t.small&&i.addClass("small"),t.disabled&&i.addClass("disabled"),$('<div class="lightswitch-container"><div class="label on"></div><div class="handle"></div><div class="label off"></div></div>').appendTo(i),t.name&&$("<input/>",{type:"hidden",name:t.name,value:t.on?e:"",disabled:t.disabled}).appendTo(i),(t.toggle||t.reverseToggle)&&(i.addClass("fieldtoggle"),new Craft.FieldToggle(i)),i.lightswitch()},createLightswitchField:function(t){return this.createField(this.createLightswitch(t),t)},createColorInput:function(t){var e=t.id||"color"+Math.floor(1e9*Math.random()),i=t.containerId||e+"-container",s=t.name||null,n=t.value||null,a=t.small||!1,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{id:i,class:"flex color-container"}),h=$("<div/>",{class:"color static"+(a?" small":"")}).appendTo(l);$("<div/>",{class:"color-preview",style:t.value?{backgroundColor:t.value}:null}).appendTo(h),this.createTextInput({id:e,name:s,value:n,size:10,class:"color-input",autofocus:r,disabled:o}).appendTo(l);return new Craft.ColorInput(l),l},createColorField:function(t){return this.createField(this.createColorInput(t),t)},createDateInput:function(t){var e=(t.id||"date"+Math.floor(1e9*Math.random()))+"-date",i=t.name||null,s=i?i+"[date]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=n?Craft.formatDate(n):null,r=t.autofocus&&Garnish.isMobileBrowser(!0),o=t.disabled||!1,l=$("<div/>",{class:"datewrapper"}),h=this.createTextInput({id:e,name:s,value:a,placeholder:" ",autocomplete:!1,autofocus:r,disabled:o}).appendTo(l);return $('<div data-icon="date"></div>').appendTo(l),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(l),h.datepicker($.extend({defaultDate:n||new Date},Craft.datepickerOptions)),l},createDateField:function(t){return this.createField(this.createDateInput(t),t)},createTimeInput:function(t){var e=(t.id||"time"+Math.floor(1e9*Math.random()))+"-time",i=t.name||null,s=i?i+"[time]":null,n=t.value&&"function"==typeof t.value.getMonth?t.value:null,a=t.autofocus&&Garnish.isMobileBrowser(!0),r=t.disabled||!1,o=$("<div/>",{class:"timewrapper"}),l=this.createTextInput({id:e,name:s,placeholder:" ",autocomplete:!1,autofocus:a,disabled:r}).appendTo(o);return $('<div data-icon="time"></div>').appendTo(o),i&&$("<input/>",{type:"hidden",name:i+"[timezone]",val:Craft.timezone}).appendTo(o),l.timepicker(Craft.timepickerOptions),n&&l.timepicker("setTime",3600*n.getHours()+60*n.getMinutes()+n.getSeconds()),o},createTimeField:function(t){return this.createField(this.createTimeInput(t),t)},createField:function(t,e){var i=e.label&&"__blank__"!==e.label?e.label:null,s=Craft.isMultiSite&&e.siteId?e.siteId:null,n=$("<div/>",{class:"field",id:e.fieldId||(e.id?e.id+"-field":null)});if(e.first&&n.addClass("first"),i||e.instructions){var a=$('<div class="heading"/>').appendTo(n);if(i){var r=$("<label/>",{id:e.labelId||(e.id?e.id+"-label":null),class:e.required?"required":null,for:e.id,text:i}).appendTo(a);if(s)for(var o=0;o<Craft.sites.length;o++)if(Craft.sites[o].id==s){$('<span class="site"/>').text(Craft.sites[o].name).appendTo(r);break}}e.instructions&&$('<div class="instructions"/>').text(e.instructions).appendTo(a)}return $('<div class="input"/>').append(t).appendTo(n),e.warning&&$('<p class="warning"/>').text(e.warning).appendTo(n),e.errors&&this.addErrorsToField(n,e.errors),n},createErrorList:function(t){var e=$('<ul class="errors"/>');return t&&this.addErrorsToList(e,t),e},addErrorsToList:function(t,e){for(var i=0;i<e.length;i++)$("<li/>").text(e[i]).appendTo(t)},addErrorsToField:function(t,e){if(e){t.addClass("has-errors"),t.children(".input").addClass("errors");var i=t.children("ul.errors");i.length||(i=this.createErrorList().appendTo(t)),this.addErrorsToList(i,e)}},clearErrorsFromField:function(t){t.removeClass("has-errors"),t.children(".input").removeClass("errors"),t.children("ul.errors").remove()},getAutofocusValue:function(t){return t&&!Garnish.isMobileBrowser(!0)?"autofocus":null},getDisabledValue:function(t){return t?"disabled":null}},Craft.Uploader=Garnish.Base.extend({uploader:null,allowedKinds:null,$element:null,settings:null,_rejectedFiles:{},_extensionList:null,_totalFileCounter:0,_validFileCounter:0,init:function(t,e){this._rejectedFiles={size:[],type:[],limit:[]},this.$element=t,this.allowedKinds=null,this._extensionList=null,this._totalFileCounter=0,this._validFileCounter=0;var i=(e=$.extend({},Craft.Uploader.defaults,e)).events;for(var s in delete e.events,e.allowedKinds&&e.allowedKinds.length&&("string"==typeof e.allowedKinds&&(e.allowedKinds=[e.allowedKinds]),this.allowedKinds=e.allowedKinds,delete e.allowedKinds),e.autoUpload=!1,this.uploader=this.$element.fileupload(e),i)i.hasOwnProperty(s)&&this.uploader.on(s,i[s]);this.settings=e,this.uploader.on("fileuploadadd",$.proxy(this,"onFileAdd"))},setParams:function(t){void 0!==Craft.csrfTokenName&&void 0!==Craft.csrfTokenValue&&(t[Craft.csrfTokenName]=Craft.csrfTokenValue),this.uploader.fileupload("option",{formData:t})},getInProgress:function(){return this.uploader.fileupload("active")},isLastUpload:function(){return this.getInProgress()<2},onFileAdd:function(t,s){t.stopPropagation();var n=!1;return this.allowedKinds&&(this._extensionList||this._createExtensionList(),n=!0),s.process().done($.proxy(function(){var t=s.files[0],e=!0;if(n){var i=t.name.match(/\.([a-z0-4_]+)$/i)[1];-1===$.inArray(i.toLowerCase(),this._extensionList)&&(e=!1,this._rejectedFiles.type.push("“"+t.name+"”"))}t.size>this.settings.maxFileSize&&(this._rejectedFiles.size.push("“"+t.name+"”"),e=!1),e&&"function"==typeof this.settings.canAddMoreFiles&&!this.settings.canAddMoreFiles(this._validFileCounter)&&(this._rejectedFiles.limit.push("“"+t.name+"”"),e=!1),e&&(this._validFileCounter++,s.submit()),++this._totalFileCounter===s.originalFiles.length&&(this._totalFileCounter=0,this._validFileCounter=0,this.processErrorMessages())},this)),!0},processErrorMessages:function(){var t;this._rejectedFiles.type.length&&(t=1===this._rejectedFiles.type.length?"The file {files} could not be uploaded. The allowed file kinds are: {kinds}.":"The files {files} could not be uploaded. The allowed file kinds are: {kinds}.",t=Craft.t("app",t,{files:this._rejectedFiles.type.join(", "),kinds:this.allowedKinds.join(", ")}),this._rejectedFiles.type=[],alert(t)),this._rejectedFiles.size.length&&(t=1===this._rejectedFiles.size.length?"The file {files} could not be uploaded, because it exceeds the maximum upload size of {size}.":"The files {files} could not be uploaded, because they exceeded the maximum upload size of {size}.",t=Craft.t("app",t,{files:this._rejectedFiles.size.join(", "),size:this.humanFileSize(Craft.maxUploadSize)}),this._rejectedFiles.size=[],alert(t)),this._rejectedFiles.limit.length&&(t=1===this._rejectedFiles.limit.length?"The file {files} could not be uploaded, because the field limit has been reached.":"The files {files} could not be uploaded, because the field limit has been reached.",t=Craft.t("app",t,{files:this._rejectedFiles.limit.join(", ")}),this._rejectedFiles.limit=[],alert(t))},humanFileSize:function(t){if(t<1024)return t+" B";for(var e=-1;++e,1024<=(t/=1024););return t.toFixed(1)+" "+["kB","MB","GB","TB","PB","EB","ZB","YB"][e]},_createExtensionList:function(){this._extensionList=[];for(var t=0;t<this.allowedKinds.length;t++){var e=this.allowedKinds[t];if(void 0!==Craft.fileKinds[e])for(var i=0;i<Craft.fileKinds[e].extensions.length;i++){var s=Craft.fileKinds[e].extensions[i];this._extensionList.push(s)}}},destroy:function(){this.$element.fileupload("destroy"),this.base()}},{defaults:{dropZone:null,pasteZone:null,fileInput:null,sequentialUploads:!0,maxFileSize:Craft.maxUploadSize,allowedKinds:null,events:{},canAddMoreFiles:null,headers:{Accept:"application/json;q=0.9,*/*;q=0.8"},paramName:"assets-upload"}}),Craft.UriFormatGenerator=Craft.BaseInputGenerator.extend({generateTargetValue:function(t){t=(t=t.replace("/<(.*?)>/g","")).toLowerCase(),t=(t=(t=Craft.asciiString(t)).replace(/^[^a-z]+/,"")).replace(/[^a-z0-9]+$/,"");var e=Craft.filterArray(t.split(/[^a-z0-9]+/)).join("-");return e&&this.settings.suffix&&(e+=this.settings.suffix),e}})}(jQuery);
{"version":3,"sources":["Craft.js"],"names":["$","extend","Craft","navHeight","t","category","message","params","translations","key","hasOwnProperty","replace","formatDate","date","Date","datepicker","datepickerOptions","dateFormat","formatNumber","number","format","d3","formatLocale","d3FormatLocaleDefinition","formatter","escapeHtml","str","text","html","escapeRegex","getText","encodeUriComponent","encodeURIComponent","differences","!","*","'","(",")","chr","re","RegExp","selectFullValue","input","$input","val","setSelectionRange","length","formatInputId","inputName","this","rtrim","getUrl","path","baseUrl","anchor","isPlainObject","aParams","name","value","push","Garnish","isArray","join","trim","url","qpos","indexOf","substr","search","pathMatch","match","pathParam","omitScriptNameInUrls","usePathInfo","scriptName","basePath","endPath","substring","getCpUrl","baseCpUrl","getSiteUrl","baseSiteUrl","getActionUrl","actionUrl","redirectTo","document","location","href","getCsrfInput","csrfTokenName","csrfTokenValue","postActionRequest","action","data","callback","options","headers","X-Registered-Asset-Bundles","Object","keys","registeredAssetBundles","X-Registered-Js-Files","registeredJsFiles","jqXHR","ajax","type","dataType","success","error","textStatus","errorThrown","readyState","cp","displayError","alert","send","_waitingOnAjax","_ajaxQueue","queueActionRequest","undefined","_postNextActionRequestInQueue","args","shift","stringToArray","arr","split","i","expandPostArray","expanded","m","unshift","parentElem","parseInt","compare","obj1","obj2","sortObjectKeys","Array","getObjectKeys","sort","obj","escapeChars","chars","escaped","ltrim","startsWith","filterArray","filtered","inArray","elem","removeFromArray","index","splice","getLast","uppercaseFirst","charAt","toUpperCase","slice","lowercaseFirst","toLowerCase","parseUrl","scheme","host","hostname","port","query","hash","isSameHost","requestUrlInfo","urlInfo","secondsToHumanTimeDuration","seconds","showSeconds","weeks","Math","floor","days","minutes","hours","round","timeComponents","asciiString","charMap","char","asciiStr","asciiCharMap","randomString","result","random","preventOutlineOnMouseFocus","$elem","namespace","on","addClass","trigger","event","keyCode","SHIFT_KEY","CTRL_KEY","CMD_KEY","removeClass","createErrorList","errors","$ul","createElement","$li","appendTo","appendHeadHtml","$existingCss","existingCss","eq","attr","regexp","append","appendFootHtml","$existingJs","src","existingJs","$bod","initUiElements","$container","grid","infoicon","checkboxselect","fieldtoggle","lightswitch","nicetext","pill","formsubmit","menubtn","_elementIndexClasses","_elementSelectorModalClasses","_elementEditorClasses","registerElementIndexClass","elementType","func","registerElementSelectorModalClass","registerElementEditorClass","createElementIndex","settings","BaseElementIndex","createElementSelectorModal","BaseElementSelectorModal","createElementEditor","element","BaseElementEditor","getLocalStorage","defaultValue","systemUid","localStorage","JSON","parse","setLocalStorage","stringify","e","getElementInfo","$element","hasClass","find","id","siteId","label","status","hasThumb","setElementSize","size","otherSize","$oldImg","$newImg","sizes","srcset","replaceWith","picturefill","elements","fn","animateLeft","pos","duration","easing","complete","orientation","velocity","left","right","animateRight","disable","each","removeAttr","enable","itemSelector","cols","maxCols","minColWidth","mode","fillMode","colClass","snapToGrid","Grid","InfoIcon","CheckboxSelect","FieldToggle","settingName","settingValue","setSettings","thisSettings","hasAttr","LightSwitch","NiceText","Pill","ev","$btn","currentTarget","confirm","$anchor","$form","closest","customTrigger","next","menuAnchor","MenuBtn","$doc","ready","Base","elementId","$fieldsContainer","$cancelBtn","$saveBtn","$spinner","$siteSelect","$siteSpinner","hud","init","defaults","loadHud","setElementAttribute","attributes","getBaseData","prevalidate","onBeginLoading","includeSites","isMultiSite","showSiteSwitcher","proxy","showHud","response","onEndLoading","$hudContents","sites","$header","$siteSelectContainer","siteInfo","addListener","add","updateForm","onCreateForm","$footer","$buttonsContainer","updateBody","updateSizeAndPosition","hudTrigger","HUD","bodyClass","closeOtherHUDs","onShow","onHide","onSubmit","$hud","hide","switchSite","newSiteId","reloadForm","$instructions","class","children","requestAnimationFrame","headHtml","footHtml","saveElement","validators","isFunction","call","param","$body","serialize","$title","$a","cpEditUrl","newTitle","closeHud","onSaveElement","shake","onShowHud","onHideHud","runQueue","elementIndex","noop","initialized","instanceState","sourceStates","sourceStatesStorageKey","searchTimeout","sourceSelect","$main","$mainSpinner","isIndexBusy","$sidebar","showingSidebar","sourceKey","sourceViewModes","$source","sourcesByKey","$visibleSources","$customizeSourcesBtn","customizeSourcesModal","$toolbar","$toolbarFlexContainer","toolbarOffset","$search","searching","searchText","trashed","drafts","$clearSearchBtn","$statusMenuBtn","$statusMenuContainer","statusMenu","$siteMenuBtn","siteMenu","$sortMenuBtn","sortMenu","$sortAttributesList","$sortDirectionsList","$scoreSortAttribute","$structureSortAttribute","$elements","$viewModeBtnContainer","viewModeBtns","viewMode","view","_autoSelectElements","$countContainer","page","$exportBtn","actions","actionsHeadHtml","actionsFootHtml","$selectAllContainer","$selectAllCheckbox","showingActionTriggers","_$detachedToolbarItems","_$triggers","getDefaultInstanceState","storageKey","context","parent","hideSidebar","toolbarFixed","isMobileBrowser","$win","$scrollContainer","initSources","menu","$option","$options","filter","first","_setSite","criteria","storedSiteId","$storedSiteOption","startSearching","stopSearching","clearTimeout","setTimeout","RETURN_KEY","preventDefault","updateElementsIfSearchTextChanged","afterInit","selectDefaultSource","setPage","pageNum","updateElements","onAfterInit","getSourceContainer","$sources","$items","_getSourcesInList","Select","multi","allowEmpty","vertical","onSelectionChange","_initSources","getDefaultSourceKey","getSourceByKey","selectSource","refreshSources","removeAllItems","setIndexBusy","refreshSourcesAction","setIndexAvailable","updateFixedToolbar","_scrollTop","scrollTop","width","_makingFixed","css","outerHeight","top","offset","initSource","addItems","initSourceToggle","expandedSources","_expandSource","deinitSourceToggle","$toggle","_getSourceToggle","deinitSource","removeItems","removeListener","removeData","selectedSource","getDefaultExpandedSources","addOptions","prependTo","_updateStructureSortOption","setSortAttribute","detach","setInstanceState","storeInstanceState","getSourceState","source","getSelectedSourceState","setSelecetedSourceState","viewState","storeSortAttributeAndDirection","getSelectedSortAttribute","order","getSelectedSortDirection","max","pageTrigger","history","replaceState","getViewParams","batchSize","limit","disabledElementIds","paginated","_isViewPaginated","collapsedElementIds","preservePagination","destroy","updateElementsAction","totalPages","ceil","count","_updateView","showActionTriggers","height","not","insertAfter","_createTriggers","submitAction","actionClass","actionParams","selectedElementIds","getSelectedElementIds","viewParams","elementAction","elementIds","submitActionsAction","displayNotice","afterAction","onAfterAction","hideActionTriggers","insertBefore","updateActionTriggers","totalSelected","getSelectedElements","getEnabledElements","$selectAllBtn","getSortAttributeOption","attribute","setSortDirection","getSortDirectionOption","dir","getSelectedViewMode","selectItem","updateSidebarMenuLabel","setStoredSortOptionsForSource","remove","getViewModesForSource","sourceViewMode","$viewModeBtn","className","title","icon","selectViewMode","doesSourceHaveViewMode","onSelectSource","selectSourceByKey","sortAttr","sortDir","getDefaultSort","viewModes","force","createView","getViewClass","TableElementIndexView","ThumbsElementIndexView","rememberDisabledElementId","forgetDisabledElementId","enableElements","parents","onEnableElements","disableElements","onDisableElements","getElementById","enableElementsById","ids","makeArray","disableElementsById","selectElementAfterUpdate","addButton","$button","getButtonContainer","isShowingSidebar","buttonContainer","createCustomizeSourcesModal","modal","CustomizeSourcesModal","base","onSelectSite","onUpdateElements","_handleSourceSelectionChange","$selectedItems","_handleActionTriggerSubmit","getPostData","_handleMenuActionTriggerSubmit","option","_handleStatusChange","selectedOption","_handleSiteChange","$firstVisibleSource","selectNewSource","toString","get","$heading","$headings","nextUntil","_handleSortChange","is","_handleSelectionChange","_handleSourceDblClick","_toggleSource","stopPropagation","_handleSourceToggleClick","prev","$firstOption","$list","_getChildSources","siblings","_deinitSources","_collapseSource","$childSources","countLabel","$paginationContainer","$prevBtn","data-icon","$nextBtn","role","tabindex","aria-checked","selectAllElements","deselectAllElements","SPACE_KEY","selectable","multiSelect","checkboxMode","selectElementById","triggers","safeMenuActions","destructiveMenuActions","destructive","$menuTrigger","$menu","$safeList","_createMenuTriggerList","$destructiveList","$div","_showExportHud","$limitField","ui","createTextField","placeholder","min","submitting","isNaN","tokenParam","token","data-action","BaseElementIndexView","$loadingMoreSpinner","$elementContainer","$scroller","thumbLoader","elementSelect","loadingMore","_totalVisible","_morePending","_handleEnableElements","_handleDisableElements","container","getElementContainer","setTotalVisible","setMorePending","ElementThumbLoader","load","isVerticalList","handle","_handleElementEditing","$target","target","prop","isTouchCapable","maybeLoadMore","getAllElements","$selectedElements","selectElement","selectAll","deselectAll","getTotalVisible","totalVisible","getMorePending","morePending","canLoadMore","loadMore","winHeight","innerHeight","winScrollTop","getLoadMoreParams","loadMoreElementsAction","$newElements","appendElements","onAppendElements","newElements","off","BaseElementSelectInput","elementSort","elementEditor","$elementsContainer","$addElementBtn","_initialized","normalizedSettings","arguments","modalStorageKey","sortable","getContainer","getElementsContainer","getAddElementsBtn","initElementSelect","initElementSort","resetElements","getElements","DragSort","$targetItem","getSelectedItems","ignoreHandleSelector","axis","getElementSortAxis","collapseDraggees","magnetStrength","helperLagBase","onSortChange","resetItemOrder","canAddMoreElements","updateAddElementsBtn","enableAddElementsBtn","disableAddElementsBtn","ADD_FX_DURATION","REMOVE_FX_DURATION","show","removeElements","addElements","editable","_handleShowElementEditor","removeElement","onRemoveElements","animateElementAway","animateCss","opacity","outerWidth","showModal","createModal","getModalSettings","closeOtherModals","sources","showSiteMenu","getDisabledElementIds","onSelect","modalSettings","sourceElementId","onModalSelect","slotsLeft","selectElements","updateDisabledElementsInModal","elementInfo","createNewElement","appendElement","animateElementIntoPlace","onSelectElements","clone","prepend","$modalElement","$inputElement","origOffset","destOffset","$helper","position","zIndex","window","draftEditor","checkForm","fieldId","editorSettings","Modal","$selectBtn","$sourceToggles","$tbody","$primaryButtons","$secondaryButtons","$footerSpinner","onFadeIn","_createElementIndex","updateSelectBtnState","enableSelectBtn","disableSelectBtn","enableCancelBtn","disableCancelBtn","showFooterSpinner","hideFooterSpinner","cancel","clearMouseUpTimeout","disableElementsOnSelect","hideOnSelect","info","has","touchData","firstTap","secondTap","resizable","onCancel","hideIndexSidebar","BaseInputGenerator","listening","timeout","startListening","setNewSource","stopListening","removeAllListeners","onSourceTextChange","onTargetTextChange","activeElement","onFormSubmit","updateTarget","sourceVal","targetVal","generateTargetValue","AdminTable","totalItems","sorter","$noItems","$table","$deleteBtns","allowDeleteAll","minItems","noItemsSelector","tableSelector","DataTableSorter","updateUI","addRow","row","maxItems","$row","$deleteBtn","reorderItems","idAttribute","reorderAction","onReorderItems","reorderSuccessMessage","reorderFailMessage","handleDeleteBtnClick","confirmDeleteItem","deleteItem","getItemName","confirmDeleteMessage","getItemId","deleteAction","handleDeleteItemResponse","onDeleteItem","deleteSuccessMessage","deleteFailMessage","nameAttribute","$moveButtons","newItemBtnSelector","AssetEditor","reloadIndex","$imageEditorTrigger","showImageEditor","AssetImageEditor","onSave","bind","allowDegreeFractions","isImagick","$imageTools","$buttons","$replaceBtn","$editorContainer","$straighten","$croppingCanvas","$spinnerCanvas","canvas","image","viewport","focalPoint","croppingCanvas","clipper","croppingRectangle","cropperHandles","cropperGrid","croppingShade","imageStraightenAngle","viewportRotation","originalWidth","originalHeight","imageVerticeCoords","zoomRatio","animationInProgress","currentView","assetId","cacheBust","draggingCropper","scalingCropper","draggingFocal","previousMouseX","previousMouseY","shiftKeyHeld","editorHeight","editorWidth","cropperState","scaleFactor","flipData","focalPointState","croppingConstraint","spinnerInterval","maxImageSize","lastLoadedDimensions","imageIsLoading","renderImage","renderCropper","now","x","y","allowSavingAsNew","saveImage","$shade","getMaxImageSize","browserViewportWidth","documentElement","clientWidth","browserViewportHeight","clientHeight","devicePixelRatio","loadEditor","$tabs","$viewsContainer","$views","innerWidth","_showSpinner","fabric","StaticCanvas","enableRetinaScaling","renderAll","imageUrl","Image","fromURL","imageObject","set","originX","originY","getHeight","getWidth","getScaledImageDimensions","_setFittedImageVerticeCoordinates","_repositionEditorElements","focalState","imageDimensions","offsetX","offsetY","focal","focalData","adjustedX","adjustedY","storeFocalPointState","_createFocalPoint","_createViewport","storeCropperState","_addControlListeners","_handleMouseMove","_handleMouseDown","_handleMouseUp","_hideSpinner","_reloadImage","setSrc","min-width","min-height","previousEditorDimensions","setDimensions","currentScaledDimensions","getZoomToFitRatio","previouslyOccupiedArea","_getBoundingRectangle","_repositionCropper","getZoomToCoverRatio","_repositionImage","_repositionViewport","_repositionFocalPoint","_zoomImage","Rect","fill","globalCompositeOperation","sizeFactor","focalX","focalY","deltaX","deltaY","Group","Circle","radius","strokeWidth","stroke","toggleFocalPoint","dimensions","state","currentWidth","ratio","hasOrientationChanged","imageRatio","rotateImage","flipImage","straighteningInput","SlideRuleInput","onStart","_showGrid","onChange","slider","straighten","onEnd","_hideGrid","_cleanupFocalPointAfterStraighten","onOptionSelect","setCroppingConstraint","enforceCroppingConstraint","_handleTabClick","$tab","showView","enableSlider","disableSlider","disableCropMode","enableCropMode","zoomFactor","degrees","imageZoomRatio","newAngle","angle","scaledImageDimensions","viewportProperties","imageProperties","angleInRadians","PI","newDeltaX","cos","sin","newDeltaY","modifiedDeltaX","modifiedDeltaY","temp","animate","animationDuration","onComplete","cleanAngle","parseFloat","_adjustFocalPointByAngle","_resetFocalPointPosition","editorCenter","setValue","properties","scaleY","scaleX","previousAngle","_adjustEditorElementsOnStraighten","newCenterX","newCenterY","angleDelta","currentZoomRatio","adjustmentRatio","cropperCenterX","cropperCenterY","imageVertices","getImageVerticeCoords","rectangle","_getZoomRatioToFitRectangle","_isCenterInside","object","containingObject","newFocalX","newFocalY","adjustedFocalX","adjustedFocalY","containingVertices","vertex","rectangleVertices","_getRectangleVertices","verticeIndex","arePointsInsideRectangle","edge","_getEdgeCrossed","rectangleCenter","distanceFromVertexToEdge","abs","sqrt","pow","distanceFromCenterToEdge","postData","imageRotation","cropData","zoom","end","scaledWidth","scaledHeight","boundingBox","_getImageBoundingBox","scale","vertScale","horiScale","getCombinedZoomRatio","strokeOptions","gridWidth","gridHeight","xStep","yStep","Line","onFadeOut","cropperData","_showCropper","_editorModeTransition","_hideCropper","targetZoom","inverseZoomFactor","imageOffsetX","imageOffsetY","getContext","start","cW","cH","setInterval","rotation","save","clearRect","translate","rotate","beginPath","moveTo","lineTo","lineWidth","strokeStyle","restore","clearInterval","clipperData","_setupCropperLayer","_redrawCropperElements","backgroundColor","hoverCursor","selection","rectangleRatio","rectWidth","rectHeight","lineOptions","gridOptions","pathGroup","Path","previousImageArea","currentOffset","areaFactor","coordinateSet","a","b","c","d","_isMouseOver","move","_cropperHandleHitTest","pageX","pageY","_handleFocalDrag","_handleCropperDrag","_handleCropperResize","_setMouseCursor","vertices","newX","newY","constraint","previousHeight","previousWidth","topDelta","leftDelta","change","cursor","parentOffset","mouseX","mouseY","lb","rb","tb","bb","topLeft","topRight","bottomRight","zoomMode","topVerticalSegment","bottomVerticalSegment","rightHorizontalSegment","leftHorizontalSegment","verticalOffset","horizontalOffset","_debug","fabricObj","debugger","points","ab","_getVector","bc","scalarAbAb","_getScalarProduct","scalarBcBc","point","ap","bp","scalarAbAp","scalarBcBp","_getVectorMagnitude","vector","_getAngleBetweenVectors","acos","edgePoints","centerPoint","smallestDiff","edgeCrossed","edgeIndex","toCenter","edgeVector","toVertex","diff","box","proportion","AssetIndex","$includeSubfoldersContainer","$includeSubfoldersCheckbox","showingIncludeSubfoldersCheckbox","$uploadButton","$uploadInput","$progressBar","$folders","uploader","promptHandler","progressBar","_uploadTotalFiles","_uploadFileProgress","_uploadedAssetIds","_currentUploaderSettings","_assetDrag","_folderDrag","_expandDropTargetFolderTimeout","_tempExpandedFolders","_fileConflictTemplate","choices","_folderConflictTemplate","_initIndexPageMode","_createFolderContextMenu","_getSourceLevel","updateDropTargets","contextMenu","parentsUntil","onDragStartProxy","onDropTargetChangeProxy","DragDrop","activeDropTargetClass","helperOpacity","helper","$file","_getFileDragHelper","dropTargets","targets","_getFolderUidFromSourceKey","onDragStart","onDropTargetChange","onDragStop","$selected","draggees","$draggeeHelper","$helperSidebar","$helperNav","$helperUl","padding-top","$draggee","padding-right","padding-bottom","padding-left","draggedSourceIds","_onFileDragStop","$activeDropTarget","originatingSource","targetFolderId","originalAssetIds","originalAssetId","_positionProgressBar","resetProgressBar","setItemCount","showProgressBar","parameterArray","folderId","onMoveFinish","responseArray","resetPrompts","conflict","addPrompt","suggestedFilename","prompt","hideProgressBar","performAfterMoveActions","_collapseExtraExpandedFolders","getPromptCount","promptCallback","returnData","newParameterArray","choice","filename","apply","_performBatchRequests","fadeOutHelpers","showBatchPrompts","returnHelpersToDraggees","_onFolderDragStop","folderIds","reverse","parentId","requestId","fileMoveList","newSourceKey","transferList","newFolderId","newFolderUid","merge","_performActualFolderMove","folderDeleteList","moveCallback","counter","_getParentSource","_selectSourceByFolderId","$targetSource","_getSourceByKey","$parentSources","$parentSource","PromptHandler","ProgressBar","fileInput","dropZone","events","fileuploadstart","fileuploadprogressall","fileuploaddone","kind","allowedKinds","Uploader","setParams","$subContainer","checked","marginBottom","includeSubfolders","_onUploadStart","_onUploadProgress","progress","loaded","total","setProgressPercentage","_onUploadComplete","files","doReload","file","isLastUpload","_updateAfterUpload","_uploadFollowup","finalCallback","doFollowup","parameterIndex","followupCallback","incrementProcessedItemCount","updateProgressBar","sourceAssetId","conflictingAssetId","targetFilename","_onUpdateElements","_onKeyDown","_onElementFocus","shiftKey","PreviewFileModal","openInstance","selfDestruct","$focusedItem","_loadPreview","item","startingWidth","startingHeight","_onDragStart","$outerContainer","$innerContainer","_$firstRowCells","$helperCells","$helperCell","$firstRowCell","_onDropTargetChange","$dropTarget","dropTargetFolder","_hasSubfolders","_isExpanded","dropTargetFolderId","$excludedSources","_collapseFolder","_expandFolder","menuOptions","onClick","ContextMenu","menuClass","_createSubfolder","$parentFolder","subfolderName","folderName","_prepareParentForChildren","$subfolder","folderUid","_appendSubfolder","_deleteFolder","$targetFolder","folder","_cleanUpTree","_renameFolder","oldName","newName","$existingChildren","subfolderLabel","folderInserted","$existingChild","before","windowHeight","doRequest","parameters","AssetSelectInput","originalFilename","originalExtension","resetOriginalFilename","_renameHelper","validateElementForm","_attachUploader","defaultFieldLayoutId","formData","canAddMoreFiles","selectUploadedFile","$newElement","margin","slotsTaken","_parseFilename","parts","extension","pop","baseFileName","endPos","selectionStart","selectionEnd","createRange","select","range","collapse","moveEnd","moveStart","$filenameField","ext","oldExt","newExt","AssetSelectorModal","$selectTransformBtn","_selectedTransform","transforms","createSelectTransformButton","$btnGroup","$menuList","MenuButton","allowTransforms","onSelectTransform","transform","selectImagesWithTransform","transformUrls","imageIdsWithMissingUrls","$item","fetchMissingTransformUrls","canSelectImageTransforms","AuthManager","remainingSessionTime","checkRemainingSessionTimer","showLoginModalTimer","decrementLogoutWarningInterval","showingLogoutWarningModal","showingLoginModal","logoutWarningModal","loginModal","$logoutWarningPara","$passwordInput","$passwordSpinner","$loginBtn","$loginErrorPara","submitLoginIfLoggedOut","updateRemainingSessionTime","setCheckRemainingSessionTimer","checkRemainingSessionTime","extendSession","responseJSON","minSafeSessiotTime","showLogoutWarningModal","checkInterval","submitLogin","showLoginModal","hideLogoutWarningModal","hideLoginModal","quickShow","$logoutBtn","$renewSessionBtn","autoShow","hideOnEsc","hideOnShadeClick","shadeClass","updateLogoutWarningMessage","time","decrementLogoutWarning","quick","quickHide","$inputContainer","$inputsFlexContainer","$passwordContainer","$buttonContainer","$passwordWrapper","PasswordInput","onToggleInput","$newPasswordInput","logout","renewSession","validatePassword","login","clearLoginError","loginName","username","password","showLoginError","CategoryIndex","editableGroups","$newCategoryBtnGroup","$newCategoryBtn","editableCategoryGroups","group","uid","defaultGroupHandle","updateButton","selectedSourceHandle","selectedGroup","$menuBtn","_getGroupTriggerHref","_openCreateCategoryModal","getAttribute","menuHtml","menuBtn","uri","primarySiteId","groupId","newCategoryBtnText","groupSourceKey","CategorySelectInput","selectedCategoryIds","categoryIds","branchLimit","selectionLabel","$newElementsContainer","filteredElements","$allCategories","_animateCategoryAway","charts","DataTable","columns","rows","forEach","cellIndex","parseTime","timeParse","Tip","$tip","setContent","setPosition","BaseChart","$chart","chartBaseClass","dataTable","timeFormatLocale","svg","globalSettings","formats","d3Formats","formatLocaleDefinition","timeFormatLocaleDefinition","d3TimeFormatLocaleDefinition","resize","baseSettings","draw","chartClass","onAfterDrawTicks","tickKey","tick","$tickText","numberFormat","percentFormat","currencyFormat","shortDateFormats","day","month","year","bottom","colors","Area","tip","drawingArea","getChartMargin","translateX","translateY","drawTicks","drawAxes","drawChart","drawTipTriggers","getX","xAxis","axisBottom","tickFormat","getXFormatter","ticks","yAxis","getY","axisLeft","getYFormatter","tickValues","getYTickValues","axisRight","showAxis","tickSizeOuter","gridlines","xLineAxis","tickSize","yLineAxis","line","datum","style","area","y0","y1","plots","enter","tips","chartMargin","xAxisTickInterval","node","getTotalLength","tipTriggerWidth","$content","$xValue","$yValue","content","calcLeft","values","yTicksMaxWidth","computedTickWidth","padded","xDomainMin","xDomainMax","xDomain","scaleTime","domain","yDomain","getYMaxValue","scaleLinear","utils","getTimeFormatter","getNumberFormatter","maxValue","getDuration","secondsNum","chartSettings","dataScale","ColorInput","$colorContainer","$colorPreview","$colorInput","createColorInput","handleTextChange","setAttribute","updateColor","_browserSupportsColorInputs","doesBrowserSupportColorInputs","CP","authManager","$nav","$mainContainer","$alerts","$crumbs","$notificationContainer","$primaryForm","$mainContent","$details","$selectedTab","$contentContainer","$edition","$collapsibleTables","fixedHeader","enableQueue","jobInfo","displayedJobInfo","displayedJobInfoUnchanged","trackJobProgressTimeout","jobProgressIcon","checkingForUpdates","forcingRefreshOnUpdatesCheck","checkForUpdatesCallbacks","updateFixedHeader","updateResponsiveTables","$errorNotifications","$otherNotifications","delay","notificationDuration","initAlerts","isCtrlKeyPressed","S_KEY","submitPrimaryForm","initTabs","initConfirmUnloadForms","$confirmUnloadForms","serialized","confirmUnload","livePreview","inPreviewMode","originalEvent","returnValue","_handleInputFocus","_handleInputBlur","saveShortcut","$label","toggleNav","toggleClass","toggleSidebar","tabs","tabWidths","totalWidth","selectTab","tab","deselectTab","_i","_$table","_containerWidth","_check","_isCollapsed","getBoundingClientRect","headerHeight","max-height","fixedheader","displayNotification","$notification","fadedMargin","margin-left","margin-right","display","notificationType","fetchAlerts","displayAlerts","alerts","margin-top","$shunnableAlerts","$link","checkForUpdates","forceRefresh","realCallback","updateUtilitiesBadge","callbacks","updateInfo","$utilitiesLink","$badge","badgeCount","runQueueAutomatically","trackJobProgress","_trackJobProgressInternal","setJobInfo","animateIcon","oldInfo","getDisplayedJobInfo","progressLabel","updateJobIcon","statuses","JOB_STATUS_RESERVED","JOB_STATUS_FAILED","JOB_STATUS_WAITING","j","JobProgressIcon","hideFailMode","setDescription","description","setProgress","showFailMode","JOB_STATUS_DONE","failMode","_canvasSupported","_$bgCanvas","_$staticCanvas","_$hoverCanvas","_$failCanvas","_staticCtx","_hoverCtx","_canvasSize","_arcPos","_arcRadius","_lineWidth","_arcStartPos","_arcEndPos","_arcStartStepSize","_arcEndStepSize","_arcStep","_arcStepTimeout","_arcAnimateCallback","_progressBar","$canvasContainer","_createCanvas","_drawArc","_animateArc","_setArc","$innerProgressBar","toggleHud","toggle","QueueHUD","color","$canvas","ctx","lineCap","startPos","arc","closePath","targetStartPos","targetEndPos","_takeNextArcStep","jobsById","completedJobs","updateViewProxy","updateView","newJobIds","updateStatus","Job","placed","$object","$statusContainer","$descriptionContainer","$progressLabel","$flex","empty","$actionBtn","performErrorAction","$elementIndexSourcesContainer","$sourcesContainer","$sourceSettingsContainer","$newHeadingBtn","$footerBtnContainer","$saveSpinner","$loadingSpinner","sourceSort","updateSourcesOnSave","availableTableAttributes","setContainer","buildModal","addSource","sourceData","$itemLabel","$itemInput","heading","Heading","updateItemLabel","Source","handleNewHeadingBtnClick","scrollContainerToElement","$pendingHeading","$lastSource","$indexSource","getIndexSource","isHeading","appendSource","$extraSources","nextAll","BaseSource","$settingsContainer","isSelected","deselect","createSettings","tableAttributes","firstAttribute","firstKey","firstLabel","$titleColumnCheckbox","createTableColumnOption","$columnCheckboxes","selectedAttributes","createField","instructions","createCheckbox","disabled","$labelField","$labelInput","handleLabelInputChange","deleteHeading","table","$rows","caboose","Y_AXIS","getHelper","$helperRow","helperClass","$cells","DeleteUserModal","userId","$deleteActionRadios","$deleteSpinner","userSelect","_deleting","idParam","redirect","contentSummary","$deleteSubmitBtn","validateDeleteInputs","validates","handleSubmit","DraftEditor","$revisionBtn","$revisionLabel","$statusIcon","$editMetaBtn","metaHud","$nameTextInput","$notesTextInput","$saveMetaBtn","lastSerializedValue","saving","saveXhr","checkFormAfterUpdate","submittingForm","duplicatedElements","preview","previewToken","previewTargets","enablePreview","$shareBtn","openShareLink","createShareMenu","revisionId","serializeForm","draftId","initForDraft","createDraft","canUpdateSource","createEditMetaBtn","statusIcons","showStatusHud","bodyHtml","spinners","getPreviewToken","Promise","resolve","reject","sourceId","getTokenizedPreviewUrl","randoParam","isLive","then","catch","open","getPreview","Preview","openPreview","ensureIsDraftOrRevision","revisionid","removeActionParams","isPreviewActive","$editor","isUnsavedDraft","saveDraft","isActive","$spinners","$statusIcons","saveDraftAction","prepareData","docTitle","draftName","draftNotes","revisionMenu","draftCreated","newHref","anchorPos","$saveBtnContainer","elementTypeDisplayName","$saveDraftBtn","canDeleteDraft","$draftsUl","$draftHeading","$draftLi","$draftA","selectOption","$siteOptions","$siteOption","creator","updatePreviewTargets","afterUpdate","checkMetaValues","oldId","currentTargets","showMetaHud","createMetaHud","onMetaHudShow","$field","$hudBody","$deleteLink","saveMeta","onMetaHudHide","onMetaHudEscape","onNotesKeydown","submit","shakeMetaHud","deleteDraft","deleteDraftAction","handleFormSubmit","abort","chunks","accept-charset","enctype","method","decodeURIComponent","applyDraftAction","hashedRedirectUrl","DynamicGenerator","EditableTable","baseName","biggestId","$addRowBtn","rowCount","hasMaxRows","hasMinRows","radioCheckboxes","log","copyDraggeeInputValuesToHelper","isVisible","initialize","minRows","createRowObj","updateAddRowButton","initializeIfVisible","canAddRow","canDeleteRow","deleteRow","$tr","onDeleteRow","staticRows","maxRows","focus","rowId","rowIdPrefix","createRow","defaultValues","onAddRow","Row","focusOnPrevRow","tdIndex","blurTd","prevRow","$prevTr","$tds","focusOnNextRow","nextRow","$nextTr","textualColTypes","data-id","colId","$cell","col","scope","textual","code","small","createDateInput","createLightswitch","createSelect","default","createTimeInput","createTextInput","niceTexts","tds","$textareas","tr","td","$textarea","$checkbox","textareasByColId","onHeightChange","radioMode","applyToggleCheckbox","onTextareaHeightChange","autopopulate","HandleGenerator","allowNonAlphaStart","last","onTextareaFocus","onRadioCheckboxChange","checkbox","checkboxColId","neg","checkboxCol","colum","ignoreNextTextareaFocus","handleKeypress","charCode","ctrl","numericKeyCodes","validateValue","safeValue","tallestTextareaHeight","tdHeight","ElementActionTrigger","maxLevels","newChildUrl","$trigger","triggerEnabled","activate","updateTrigger","validateSelection","enableTrigger","disableTrigger","valid","batch","handleTriggerActivation","queue","workers","Worker","concat","toArray","active","loadNext","loader","$img","alt","ElevatedSessionForm","inputs","form","$inputs","getInputPostVal","elevatedSessionManager","fetchingTimeout","inputsChanged","$currentInput","requireElevatedSession","submitForm","ElevatedSessionManager","passwordModal","$submitBtn","$errorPara","minSafeElevatedSessionTimeout","showPasswordModal","$passwordModal","focusPasswordInput","submitPassword","currentPassword","showPasswordError","EntryIndex","publishableSections","$newEntryBtnGroup","$newEntryBtn","section","defaultSectionHandle","selectedSection","_getSectionTriggerHref","_openCreateEntryModal","site","sectionId","newEntryBtnText","typeId","entryTypes","sectionSourceKey","FieldLayoutDesigner","$tabContainer","$unusedFieldContainer","$newTabBtn","$allFields","tabGrid","unusedFieldGrid","tabDrag","fieldDrag","gridSettings","initTab","FieldDrag","customizableTabs","TabDrag","$editBtn","$fields","initField","onTabOptionSelect","renameTab","deleteTab","onFieldOptionSelect","toggleRequiredField","removeField","$labelSpan","getFieldInputName","removeFieldById","requiredFieldInputName","refreshCols","$group","addTab","tabName","fieldInputName","BaseDrag","Drag","designer","$insertion","showingInsertion","$caboose","draggingUnusedItem","addToTabGrid","getInsertion","addCaboose","setMidpoints","getItemContainer","isItemInTabContainer","onDrag","hitTest","_closestItem","getClosestItem","_closestItemMouseDiff","_$item","_midpoint","_mouseDiff","getDist","draggeeDisplay","visibility","$hiddenFields","$fieldContainers","targetPrefix","targetSelector","reverseTargetSelector","_$target","_$reverseTarget","getType","normalizeTargetSelector","findTargets","selector","getToggleVal","postVal","onToggleChange","hideTarget","showTarget","_show","_currentHeight","_targetHeight","overflow","items","totalCols","colGutterDrop","colPctWidth","possibleItemColspans","possibleItemPositionsByColspan","itemPositions","itemColspansByPosition","layouts","layout","itemHeights","leftPadding","_refreshingCols","_refreshColsAfterRefresh","_forceRefreshColsAfterRefresh","handleContainerHeightProxy","setItems","_","oldHeight","scrollHeight","gutter","itemIndex","tallestItemHeight","colIndex","itemHeight","remainder","itemHeightsByColspan","positionRight","positionLeft","minColspan","maxColspan","colspan","getItemWidthCss","minPosition","maxPosition","colHeights","createLayouts","layoutTotalCols","highestTotalCols","layoutHeights","shortestHeight","shortestLayouts","emptySpaces","emptySpace","colspans","getItemLeftPosCss","positions","isSimpleLayout","margin-bottom","positionItems","completeRefreshCols","onRefreshCols","getItemWidth","getItemWidthInPx","getItemLeftPosInPx","prevPositions","prevColspans","prevColHeights","prevEmptySpace","LayoutGenerator","endingCol","affectedColHeights","onItemResize","newHeight","tallestColHeightsByPosition","p","colHeightsForPosition","tallestColHeight","words","ImageUpload","initImageUpload","containerSelector","uploadAction","postParameters","fileInputSelector","paramName","uploadParamName","fileuploadfail","initButtons","uploadButtonSelector","deleteButtonSelector","refreshImage","onAfterRefreshImage","_onUploadError","$icon","hudClass","dragger","dragStartMargin","outerContainer","X_AXIS","turnOn","turnOff","_getOffMargin","_onMouseDown","_onMouseUp","dragging","RIGHT_KEY","LEFT_KEY","_getMargin","_onDrag","mouseDistX","_onDragStop","_onSettle","LivePreview","$extraFields","$dragHandle","$iframeContainer","$iframe","$fieldPlaceholder","previewUrl","basePostData","fields","lastPostData","updateIframeInterval","loading","checkAgain","dragStartEditorWidth","_slideInOnIframeLoad","_handleSuccessProxy","_handleErrorProxy","_forceUpdateIframeProxy","_scrollX","_scrollY","_editorWidth","_editorWidthInPx","protocol","previewParams","extraFields","defaultEditorWidth","moveFieldsBack","editorWidthInPx","inPx","minEditorWidthInPx","exit","$editorHeader","$closeBtn","handleWindowResize","dragHandleWidth","getIframeWidth","$clone","_getClone","updateIframe","slideIn","createToken","previewAction","updateWidths","ESC_KEY","$newClone","field","contentWindow","scrollLeft","X-Craft-Token","xhrFields","withCredentials","crossDomain","forceUpdateIframe","handleSuccess","write","close","onResponse","handleError","copyInputValues","$textInput","$showPasswordToggle","showingPassword","passwordInput","hidePassword","setCurrentInput","updateToggleLabel","showPassword","togglePassword","onKeyDown","ALT_KEY","onKeyUp","onInputChange","onToggleMouseDown","$previewContainer","$targetBtn","$targetMenu","$tempInput","activeTarget","_updateIframeProxy","$previewHeader","switchTarget","resetScroll","sameHost","scrolllTop","frameborder","afterUpdateIframe","defaultSettings","_onHide","instance","loadAsset","focusItem","desiredHeight","desiredWidth","containerHeight","containerWidth","minGutter","_resizeContainer","modalHtml","$highlight","Prism","highlightElement","maxWidth","maxHeight","max-width","$progressBarStatus","_itemCount","_processedItemCount","_displaySteps","displaySteps","setProcessedItemCount","fadeTo","incrementItemCount","percentage","$modalContainerDiv","$prompt","$promptApplyToRemainingContainer","$promptApplyToRemainingCheckbox","$promptApplyToRemainingLabel","$pomptChoices","_prompts","_promptBatchCallback","_promptBatchReturnData","_promptBatchNum","_showNextPromptInBatch","remainingInBatch","_showPrompt","_handleBatchPromptSelection","applyToRemaining","choiceData","itemsToGo","_promptCallback","$promptMessage","$promptChoices","$promptButtons","$cancelButton","$radioButton","_selectPromptChoice","fadeOut","_cancelPrompt","$selectedOption","startPositionX","graduationsMin","graduationsMax","slideMin","slideMax","$overlay","$cursor","$graduations","$graduationsUl","graduationsCalculatedWidth","_handleResize","valueToPosition","_handleTapStart","touch","startLeft","_handleTapMove","curX","positionToValue","_handleTapEnd","scaleMin","scaleMax","SlugGenerator","allowUppercaseInSlug","limitAutoSlugsToAscii","XRegExp","matchChain","slugWordSeparator","Structure","structureDrag","$parents","initToggle","StructureDrag","initNewChildMenus","viewStateKey","$addBtns","onNewChildMenuClick","showMenu","getIndent","level","baseIndent","nestedIndent","addElement","$addBtn","$parentUl","_removeUl","structure","draggeeLevel","$helperLi","$targets","draggeeHeight","$level","cancelDrag","$lis","$closestTarget","closestTargetPos","closestTargetYDiff","closestTargetOffset","closestTargetHeight","targetOffset","targetHeight","targetYMidpoint","targetYDiff","$closestTargetLi","closestTargetLevel","$nextTargetLi","nextTargetLevel","hoveringBetweenRows","draggeeX","targetItemMouseDiffX","$parentLis","$closestParentLi","closestParentLiXDiff","closestParentLevel","$parentLi","parentLiX","parentLiXDiff","parentLevel","onMouseUp","$draggeeParent","moved","$closestSiblings","newLevel","setLevel","structureId","prevId","indent","$childLis","StructureTableSorter","tableView","_helperMargin","_$titleHelperCell","_titleHelperCellOuterWidth","_ancestors","_updateAncestorsFrame","_updateAncestorsProxy","_draggeeLevel","_draggeeLevelDelta","draggingLastElements","_loadingDraggeeLevelDelta","_targetLevel","_targetLevelBounds","_positionChanged","singleHelper","helperSpacingY","startDragging","HELPER_MARGIN","findDraggee","$nextRow","nextRowLevel","nextRowLevelDelta","_getAjaxBaseData","delta","drag","padding","BASE_PADDING","canInsertBefore","_getLevelBounds","canInsertAfter","_getAncestors","_setTargetLevelBounds","_updateIndent","onInsertionPointChange","_updateAncestorsBeforeRepaint","levelDiff","_getLevelIndent","$prevRow","prevRowLevel","$spinnerRow","_createSpinnerRowAfter","onPositionChange","_expandElement","onReturnHelpersToDraggees","newDraggeeIndexes","oldDraggeeIndexes","$postDraggeeItems","_minLevel","_maxLevel","forcePositionChange","_mouseDist","realMouseX","mousedownX","_indentationDist","LEVEL_INDENT","_targetLevelMouseDiff","_magnetImpact","MAX_GIVE","_closestLevelMagnetIndent","helpers","targetLevel","_level","_$prevRow","cancelAnimationFrame","_updateAncestors","_$ancestor","_newAncestors","$selectedSortHeader","structureTableSort","_totalVisiblePostStructureTableDraggee","_morePendingPostStructureTableDraggee","initTableHeaders","_collapseElement","selectedSortAttr","$tableHeaders","selectedSortDir","_isStructureTableDraggingLastElements","positionedAfter","includeTableAttributesForSource","_updateTableAttributes","$nextNextRow","descendantOf","$nextRows","_handleSelectedSortHeaderClick","newSortDir","_handleSortHeaderClick","_handleUnselectedSortHeaderClick","TagSelectInput","searchMenu","$addTagInput","_ignoreBlur","selectTag","searchForTags","killSearchMenu","excludeIds","tagGroupId","tags","exclude","exactMatch","Menu","attachToElement","data-site-id","targetSiteId","data-label","data-editable","$titleContainer","config","maxlength","autofocus","getAutofocusValue","autocomplete","getDisabledValue","readonly","step","showCharsLeft","createTextarea","createTextareaField","$select","data-target-prefix","$optgroup","optgroup","optionLabel","optionValue","optionDisabled","selected","createSelectField","data-target","data-reverse-target","reverseToggle","for","createCheckboxField","createCheckboxSelect","allValue","allChecked","showAllOption","allLabel","createCheckboxSelectField","data-value","aria-labelledby","labelId","createLightswitchField","containerId","$colorPreviewContainer","createColorField","getMonth","formattedValue","timezone","defaultDate","createDateField","timepicker","timepickerOptions","getHours","getMinutes","getSeconds","createTimeField","required","warning","addErrorsToField","addErrorsToList","$errors","clearErrorsFromField","_rejectedFiles","_extensionList","_totalFileCounter","_validFileCounter","autoUpload","fileupload","paramObject","getInProgress","onFileAdd","validateExtension","_createExtensionList","process","done","pass","fileExtension","maxFileSize","originalFiles","processErrorMessages","kinds","humanFileSize","maxUploadSize","bytes","u","toFixed","allowedKind","fileKinds","extensions","pasteZone","sequentialUploads","Accept","UriFormatGenerator","uriFormat","suffix","jQuery"],"mappings":"CACA,SAAUA,GAKVA,EAAEC,OAAOC,MACL,CACIC,UAAW,GAUXC,EAAG,SAASC,EAAUC,EAASC,GAQ3B,QAN4C,IAAjCL,MAAMM,aAAaH,SACuB,IAA1CH,MAAMM,aAAaH,GAAUC,KAEpCA,EAAUJ,MAAMM,aAAaH,GAAUC,IAGvCC,EACA,IAAK,IAAIE,KAAOF,EACPA,EAAOG,eAAeD,KAI3BH,EA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aAAc,KACdL,OAAQ,GACRkG,gBAAiB,KACjBp2C,QAAS,CAACupF,OAAW,oCACrB9b,UAAW,mBASvBxzE,MAAMuvF,mBAAqBvvF,MAAMq1B,mBAAmBt1B,OAChD,CACIo2B,oBAAqB,SAASF,GAK1BA,GAHAA,EAAYA,EAAUx1B,QAAQ,aAAc,KAGtBqJ,cAOtBmsB,GADAA,GAHAA,EAAYj2B,MAAMoL,YAAY6qB,IAGRx1B,QAAQ,WAAY,KACpBA,QAAQ,cAAe,IAG7C,IAEI+uF,EAFQxvF,MAAMiJ,YAAYgtB,EAAUruB,MAAM,eAExB/D,KAAK,KAM3B,OAJI2rF,GAAaxsF,KAAK8L,SAAS2gF,SAC3BD,GAAaxsF,KAAK8L,SAAS2gF,QAGxBD,KAhnpBnB,CAonpBGE","file":"Craft.min.js"}
                Craft.cp.displayNotice(Craft.t('app', this.settings.deleteSuccessMessage, {name: name}));
                Craft.cp.displayError(Craft.t('app', this.settings.deleteFailMessage, {name: name}));
            return Craft.escapeHtml($row.attr(this.settings.nameAttribute));