1/*! the-hive */ 2"object"!=typeof JSON&&(JSON={}),!function(){"use strict";function f(t){return t<10?"0"+t:t}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var i,n,o,a,s,r=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),typeof(l="function"==typeof rep?rep.call(e,t,l):l)){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(a=l.length,i=0;i<a;i+=1)s[i]=str(i,l)||"null";o=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+r+"]":"["+s.join(",")+"]"}else{if(rep&&"object"==typeof rep)for(a=rep.length,i=0;i<a;i+=1)"string"==typeof rep[i]&&(o=str(n=rep[i],l))&&s.push(quote(n)+(gap?": ":":")+o);else for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(o=str(n,l))&&s.push(quote(n)+(gap?": ":":")+o);o=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+r+"}":"{"+s.join(",")+"}"}return gap=r,o}}"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,i){var n;if(indent=gap="","number"==typeof i)for(n=0;n<i;n+=1)indent+=" ";else"string"==typeof i&&(indent=i);if(!(rep=e)||"function"==typeof e||"object"==typeof e&&"number"==typeof e.length)return str("",{"":t});throw new Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(t,e){var i,n,o=t[e];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(void 0!==(n=walk(o,i))?o[i]=n:delete o[i]);return reviver.call(t,e,o)}if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(A){"use strict";var m={},M=(m.fileapi=void 0!==A("<input type='file'/>").get(0).files,m.formdata=void 0!==window.FormData,!!A.fn.prop);function i(t){var e=t.data;t.isDefaultPrevented()||(t.preventDefault(),A(t.target).ajaxSubmit(e))}function n(t){var e=t.target,i=A(e);if(!i.is("[type=submit],[type=image]")){var n=i.closest("[type=submit]");if(0===n.length)return;e=n[0]}var o=this;"image"==(o.clk=e).type&&(void 0!==t.offsetX?(o.clk_x=t.offsetX,o.clk_y=t.offsetY):"function"==typeof A.fn.offset?(n=i.offset(),o.clk_x=t.pageX-n.left,o.clk_y=t.pageY-n.top):(o.clk_x=t.pageX-e.offsetLeft,o.clk_y=t.pageY-e.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function D(){var t;A.fn.ajaxSubmit.debug&&(t="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t))}A.fn.attr2=function(){var t;return M&&((t=this.prop.apply(this,arguments))&&t.jquery||"string"==typeof t)?t:this.attr.apply(this,arguments)},A.fn.ajaxSubmit=function(l){if(this.length){var _,I=this,t=("function"==typeof l?l={success:l}:void 0===l&&(l={}),_=l.type||this.attr2("method"),t=(t=(t="string"==typeof(t=l.url||this.attr2("action"))?A.trim(t):"")||window.location.href||"")&&(t.match(/^([^#]+)/)||[])[1],e=/(MSIE|Trident)/.test(navigator.userAgent||"")&&/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",l=A.extend(!0,{url:t,success:A.ajaxSettings.success,type:_||A.ajaxSettings.type,iframeSrc:e},l),{});if(this.trigger("form-pre-serialize",[this,l,t]),t.veto)D("ajaxSubmit: submit vetoed via form-pre-serialize trigger");else if(l.beforeSerialize&&!1===l.beforeSerialize(this,l))D("ajaxSubmit: submit aborted via beforeSerialize callback");else{var e=l.traditional,S=(void 0===e&&(e=A.ajaxSettings.traditional),[]),i=this.formToArray(l.semantic,S);if(l.data&&(l.extraData=l.data,c=A.param(l.data,e)),l.beforeSubmit&&!1===l.beforeSubmit(i,this,l))D("ajaxSubmit: submit aborted via beforeSubmit callback");else if(this.trigger("form-submit-validate",[i,this,l,t]),t.veto)D("ajaxSubmit: submit vetoed via form-submit-validate trigger");else{var n,o,a,t=A.param(i,e),s=(c&&(t=t?t+"&"+c:c),"GET"==l.type.toUpperCase()?(l.url+=(0<=l.url.indexOf("?")?"&":"?")+t,l.data=null):l.data=t,[]);l.resetForm&&s.push(function(){I.resetForm()}),l.clearForm&&s.push(function(){I.clearForm(l.includeHidden)}),!l.dataType&&l.target?(n=l.success||function(){},s.push(function(t){var e=l.replaceTarget?"replaceWith":"html";A(l.target)[e](t).each(n,arguments)}
2)):l.success&&s.push(l.success),l.success=function(t,e,i){for(var n=l.context||this,o=0,a=s.length;o<a;o++)s[o].apply(n,[t,e,i||I,I])},l.error&&(o=l.error,l.error=function(t,e,i){var n=l.context||this;o.apply(n,[t,e,i,I])}),l.complete&&(a=l.complete,l.complete=function(t,e){var i=l.context||this;a.apply(i,[t,e,I])});var r,e=0<A("input[type=file]:enabled",this).filter(function(){return""!==A(this).val()}).length,c="multipart/form-data",t=I.attr("enctype")==c||I.attr("encoding")==c,c=m.fileapi&&m.formdata;D("fileAPI :"+c),!1!==l.iframe&&(l.iframe||(e||t)&&!c)?l.closeKeepAlive?A.get(l.closeKeepAlive,function(){r=p(i)}):r=p(i):r=(e||t)&&c?function(t){for(var i=new FormData,e=0;e<t.length;e++)i.append(t[e].name,t[e].value);if(l.extraData){var n=function(t){var e,i,n=A.param(t,l.traditional).split("&"),o=n.length,a=[];for(e=0;e<o;e++)n[e]=n[e].replace(/\+/g," "),""!==(i=n[e].split("="))[0]&&void 0!==i[1]&&a.push([decodeURIComponent(i[0]),decodeURIComponent(i[1])]);return a}(l.extraData);for(e=0;e<n.length;e++)n[e]&&i.append(n[e][0],n[e][1])}l.data=null;var o=A.extend(!0,{},A.ajaxSettings,l,{contentType:!1,processData:!1,cache:!1,type:_||"POST"});l.uploadProgress&&(o.xhr=function(){var t=A.ajaxSettings.xhr();return t.upload&&t.upload.addEventListener("progress",function(t){var e=0,i=t.loaded||t.position,n=t.total;t.lengthComputable&&(e=Math.ceil(i/n*100)),l.uploadProgress(t,i,n,e)},!1),t});o.data=null;var a=o.beforeSend;return o.beforeSend=function(t,e){l.formData?e.data=l.formData:e.data=i,a&&a.call(this,t,e)},A.ajax(o)}(i):A.ajax(l),I.removeData("jqxhr").data("jqxhr",r);for(var d=0;d<S.length;d++)S[d]=null;this.trigger("form-submit-notify",[this,l])}}}else D("ajaxSubmit: skipping submit process - no element selected");return this;function p(t){var e,i,c,d,a,p,u,h,f,m,g,v,n,b,y,C,w,k,s,$,r=I[0],x=A.Deferred();if(x.abort=function(t){h.abort(t)},t)for(i=0;i<S.length;i++)e=A(S[i]),M?e.prop("disabled",!1):e.removeAttr("disabled");return(c=A.extend(!0,{},A.ajaxSettings,l)).context=c.context||c,a="jqFormIO"+(new Date).getTime(),c.iframeTarget?(n=(p=A(c.iframeTarget)).attr2("name"))?a=n:p.attr2("name",a):(p=A('<iframe name="'+a+'" src="'+c.iframeSrc+'" />')).css({position:"absolute",top:"-1000px",left:"-1000px"}),u=p[0],h={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var e="timeout"===t?"timeout":"aborted";D("aborting upload... "+e),this.aborted=1;try{u.contentWindow.document.execCommand&&u.contentWindow.document.execCommand("Stop")}catch(t){}p.attr("src",c.iframeSrc),h.error=e,c.error&&c.error.call(c.context,h,e,t),d&&A.event.trigger("ajaxError",[h,c,e]),c.complete&&c.complete.call(c.context,h,e)}},(d=c.global)&&0==A.active++&&A.event.trigger("ajaxStart"),d&&A.event.trigger("ajaxSend",[h,c]),c.beforeSend&&!1===c.beforeSend.call(c.context,h,c)?(c.global&&A.active--,x.reject()):h.aborted?x.reject():((t=r.clk)&&(n=t.name)&&!t.disabled&&(c.extraData=c.extraData||{},c.extraData[n]=t.value,"image"==t.type)&&(c.extraData[n+".x"]=r.clk_x,c.extraData[n+".y"]=r.clk_y),g=1,v=2,t=A("meta[name=csrf-token]").attr("content"),(n=A("meta[name=csrf-param]").attr("content"))&&t&&(c.extraData=c.extraData||{},c.extraData[n]=t),c.forceSync?o():setTimeout(o,10),C=50,k=A.parseXML||function(t,e){return window.ActiveXObject?((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e&&e.documentElement&&"parsererror"!=e.documentElement.nodeName?e:null},s=A.parseJSON||function(t){return window.eval("("+t+")")},$=function(t,e,i){var n=t.getResponseHeader("content-type")||"",o="xml"===e||!e&&0<=n.indexOf("xml"),t=o?t.responseXML:t.responseText;return o&&"parsererror"===t.documentElement.nodeName&&A.error&&A.error("parsererror"),"string"==typeof(t=i&&i.dataFilter?i.dataFilter(t,e):t)&&("json"===e||!e&&0<=n.indexOf("json")?t=s(t):("script"===e||!e&&0<=n.indexOf("javascript"))&&A.globalEval(t)),t}),x;function T(e){var i=null;try{e.contentWindow&&(i=e.contentWindow.document)}catch(t){D("cannot get iframe.contentWindow document: "+t)}if(!i)try{i=e.contentDocument||e.document}catch(t){D("cannot get iframe.contentDocument: "+t),i=e.document}return i}function o(){var t=I.attr2("target"),e=I.attr2("action"),i=I.attr("enctype")||I.attr("encoding")||"multipart/form-data";r.setAttribute("target",a),_&&!/post/i.test(_)||r.setAttribute("method","POST"),e!=c.url&&r.setAttribute("action",c.url),c.skipEncodingOverride||_&&!/post/i.test(_)||I.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),c.timeout&&(m=setTimeout(function(){f=!0,E(g)},c.timeout));var n=[];try{if(c.extraData)for(var o in c.extraData)c.extraData.hasOwnProperty(o)&&(A.isPlainObject(c.extraData[o])&&c.extraData[o].hasOwnProperty("name")&&c.extraData[o].hasOwnProperty("value")?n.push(A('<input type="hidden" name="'+c.extraData[o].name+'">').val(c.extraData[o].value).appendTo(r)[0]):n.push(A('<input type="hidden" name="'+o+'">').val(c.extraData[o]).appendTo(r)[0]));c.iframeTarget||p.appendTo("body"),u.attachEvent?u.attachEvent("onload",E):u.addEventListener("load",E,!1),setTimeout(function t(){try{var e=T(u).readyState;D("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(t){D("Server abort: ",t," (",t.name,")"),E(v),m&&clearTimeout(m),m=void 0}},15);try{r.submit()}catch(t){document.createElement("form").submit.apply(r)}}finally{r.setAttribute("action",e),r.setAttribute("enctype",i),t?r.setAttribute("target",t):I.removeAttr("target"),A(n).remove()}}function E(e){if(!h.aborted&&!w)if((y=T(u))||(D("cannot access response document"),e=v),e===g&&h)h.abort("timeout"),x.reject(h,"timeout");else if(e==v&&h)h.abort("server abort"),x.reject(h,"error","server abort");else if(y&&y.location.href!=c.iframeSrc||f){u.detachEvent?u.detachEvent("onload",E):u.removeEventListener("load",E,!1);var i,e="success";try{if(f)throw"timeout";var t="xml"==c.dataType||y.XMLDocument||A.isXMLDoc(y);if(D("isXml="+t),!t&&window.opera&&(null===y.body||!y.body.innerHTML)&&--C)return D("requeing onLoad callback, DOM not available"),void setTimeout(E,250);var n,o,a,s=y.body||y.documentElement,r=(h.responseText=s?s.innerHTML:null,h.responseXML=y.XMLDocument||y,t&&(c.dataType="xml"),h.getResponseHeader=function(t){return{"content-type":c.dataType}[t.toLowerCase()]},s&&(h.status=Number(s.getAttribute("status"))||h.status,h.statusText=s.getAttribute("statusText")||h.statusText),(c.dataType||"").toLowerCase()),l=/(json|script|text)/.test(r);l||c.textarea?(n=y.getElementsByTagName("textarea")[0])?(h.responseText=n.value,h.status=Number(n.getAttribute("status"))||h.status,h.statusText=n.getAttribute("statusText")||h.statusText):l&&(o=y.getElementsByTagName("pre")[0],a=y.getElementsByTagName("body")[0],o?h.responseText=o.textContent||o.innerText:a&&(h.responseText=a.textContent||a.innerText)):"xml"==r&&!h.responseXML&&h.responseText&&(h.responseXML=k(h.responseText));try{b=$(h,r,c)}catch(t){e="parsererror",h.error=i=t||e}}catch(t){D("error caught: ",t),e="error",h.error=i=t||e}h.aborted&&(D("upload aborted"),e=null),"success"===(e=h.status?200<=h.status&&h.status<300||304===h.status?"success":"error":e)?(c.success&&c.success.call(c.context,b,"success",h),x.resolve(h.responseText,"success",h),d&&A.event.trigger("ajaxSuccess",[h,c])):e&&(void 0===i&&(i=h.statusText),c.error&&c.error.call(c.context,h,e,i),x.reject(h,"error",i),d)&&A.event.trigger("ajaxError",[h,c,i]),d&&A.event.trigger("ajaxComplete",[h,c]),d&&!--A.active&&A.event.trigger("ajaxStop"),c.complete&&c.complete.call(c.context,h,e),w=!0,c.timeout&&clearTimeout(m),setTimeout(function(){c.iframeTarget?p.attr("src",c.iframeSrc):p.remove(),h.responseXML=null},100)}}}},A.fn.ajaxForm=function(t){var e;return(t=t||{}).delegation=t.delegation&&A.isFunction(A.fn.on),t.delegation||0!==this.length?t.delegation?(A(document).off("submit.form-plugin",this.selector,i).off("click.form-plugin",this.selector,n).on("submit.form-plugin",this.selector,t,i).on("click.form-plugin",this.selector,t,n),this):this.ajaxFormUnbind().bind("submit.form-plugin",t,i).bind("click.form-plugin",t,n):(e={s:this.selector,c:this.context},!A.isReady&&e.s?(D("DOM not ready, queuing ajaxForm"),A(function(){A(e.s,e.c).ajaxForm(t)})):D("terminating; zero elements found by selector"+(A.isReady?"":" (DOM not ready)")),this)},A.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},A.fn.formToArray=function(t,e){var i=[];if(0!==this.length){var n=this[0],o=this.attr("id"),a=t?n.getElementsByTagName("*"):n.elements;if(a&&!/MSIE [678]/.test(navigator.userAgent)&&(a=A(a).get()),(a=o&&(o=A(':input[form="'+o+'"]').get()).length?(a||[]).concat(o):a)&&a.length){for(var s,r,l,c,d,p,u=0,h=a.length;u<h;u++)if((p=(l=a[u]).name)&&!l.disabled)if(t&&n.clk&&"image"==l.type)n.clk==l&&(i.push({name:p,value:A(l).val(),type:l.type}),i.push({name:p+".x",value:n.clk_x},{name:p+".y",value:n.clk_y}));else if((r=A.fieldValue(l,!0))&&r.constructor==Array)for(e&&e.push(l),s=0,c=r.length;s<c;s++)i.push({name:p,value:r[s]});else if(m.fileapi&&"file"==l.type){e&&e.push(l);var f=l.files;if(f.length)for(s=0;s<f.length;s++)i.push({name:p,value:f[s],type:l.type});else i.push({name:p,value:"",type:l.type})}else null!=r&&(e&&e.push(l),i.push({name:p,value:r,type:l.type,required:l.required}));!t&&n.clk&&(p=(d=(o=A(n.clk))[0]).name)&&!d.disabled&&"image"==d.type&&(i.push({name:p,value:o.val()}),i.push({name:p+".x",value:n.clk_x},{name:p+".y",value:n.clk_y}))}}return i}
2,A.fn.formSerialize=function(t){return A.param(this.formToArray(t))},A.fn.fieldSerialize=function(o){var a=[];return this.each(function(){var t=this.name;if(t){var e=A.fieldValue(this,o);if(e&&e.constructor==Array)for(var i=0,n=e.length;i<n;i++)a.push({name:t,value:e[i]});else null!=e&&a.push({name:this.name,value:e})}}),A.param(a)},A.fn.fieldValue=function(t){for(var e=[],i=0,n=this.length;i<n;i++){var o=this[i],o=A.fieldValue(o,t);null==o||o.constructor==Array&&!o.length||(o.constructor==Array?A.merge(e,o):e.push(o))}return e},A.fieldValue=function(t,e){var i=t.name,n=t.type,o=t.tagName.toLowerCase();if((e=void 0===e?!0:e)&&(!i||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==o&&-1==t.selectedIndex))return null;if("select"!=o)return A(t).val();e=t.selectedIndex;if(e<0)return null;for(var a=[],s=t.options,r="select-one"==n,l=r?e+1:s.length,c=r?e:0;c<l;c++){var d=s[c];if(d.selected){var p=(p=d.value)||(d.attributes&&d.attributes.value&&!d.attributes.value.specified?d.text:d.value);if(r)return p;a.push(p)}}return a},A.fn.clearForm=function(t){return this.each(function(){A("input,select,textarea",this).clearFields(t)})},A.fn.clearFields=A.fn.clearInputs=function(i){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,e=this.tagName.toLowerCase();n.test(t)||"textarea"==e?this.value="":"checkbox"==t||"radio"==t?this.checked=!1:"select"==e?this.selectedIndex=-1:"file"==t?/MSIE/.test(navigator.userAgent)?A(this).replaceWith(A(this).clone(!0)):A(this).val(""):i&&(!0===i&&/hidden/.test(t)||"string"==typeof i&&A(this).is(i))&&(this.value="")})},A.fn.resetForm=function(){return this.each(function(){"function"!=typeof this.reset&&("object"!=typeof this.reset||this.reset.nodeType)||this.reset()})},A.fn.enable=function(t){return void 0===t&&(t=!0),this.each(function(){this.disabled=!t})},A.fn.selected=function(e){return void 0===e&&(e=!0),this.each(function(){var t=this.type;"checkbox"==t||"radio"==t?this.checked=e:"option"==this.tagName.toLowerCase()&&(t=A(this).parent("select"),e&&t[0]&&"select-one"==t[0].type&&t.find("option").selected(!1),this.selected=e)})},A.fn.ajaxSubmit.debug=!1}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(c){var d,p,t=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],e="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],u=Array.prototype.slice;if(c.event.fixHooks)for(var i=t.length;i;)c.event.fixHooks[t[--i]]=c.event.mouseHooks;var h=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=e.length;t;)this.addEventListener(e[--t],n,!1);else this.onmousewheel=n;c.data(this,"mousewheel-line-height",h.getLineHeight(this)),c.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=e.length;t;)this.removeEventListener(e[--t],n,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var t=c(t),e=t["offsetParent"in c.fn?"offsetParent":"parent"]();return e.length||(e=c("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(t){return c(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function n(t){var e,i=t||window.event,n=u.call(arguments,1),o=0,a=0,s=0,r=0,l=0;if((t=c.event.fix(i)).type="mousewheel","detail"in i&&(s=-1*i.detail),"wheelDelta"in i&&(s=i.wheelDelta),"wheelDeltaY"in i&&(s=i.wheelDeltaY),"wheelDeltaX"in i&&(a=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(a=-1*s,s=0),o=0===s?a:s,"deltaY"in i&&(o=s=-1*i.deltaY),"deltaX"in i&&(a=i.deltaX,0===s)&&(o=-1*a),0!==s||0!==a)return 1===i.deltaMode?(o*=e=c.data(this,"mousewheel-line-height"),s*=e,a*=e):2===i.deltaMode&&(o*=e=c.data(this,"mousewheel-page-height"),s*=e,a*=e),e=Math.max(Math.abs(s),Math.abs(a)
2),(!p||e<p)&&m(i,p=e)&&(p/=40),m(i,e)&&(o/=40,a/=40,s/=40),o=Math[1<=o?"floor":"ceil"](o/p),a=Math[1<=a?"floor":"ceil"](a/p),s=Math[1<=s?"floor":"ceil"](s/p),h.settings.normalizeOffset&&this.getBoundingClientRect&&(i=this.getBoundingClientRect(),r=t.clientX-i.left,l=t.clientY-i.top),t.deltaX=a,t.deltaY=s,t.deltaFactor=p,t.offsetX=r,t.offsetY=l,t.deltaMode=0,n.unshift(t,o,a,s),d&&clearTimeout(d),d=setTimeout(f,200),(c.event.dispatch||c.event.handle).apply(this,n)}function f(){p=null}function m(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120==0}c.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})});var Concrete=function(t,e){"use strict";var i=e("html");function a(t,e){return t[e]}function s(t,e,i){var n="get"+(e+="").substr(0,1).toUpperCase()+e.substr(1),o="set"+e.substr(0,1).toUpperCase()+e.substr(1);return void 0===this[n]&&(this[n]=_.partial(a,t,e)),void 0===this[o]&&(this[o]=_.partial(s,t,e)),t[e]=i}return{editMode:null,event:t,createGetterSetters:function(t){var i=this;return i.getAttr=_.partial(a,t),i.setAttr=_.partial(s,t),_(t).each(function(t,e){i.setAttr(e,t)}),!0},forceRefresh:function(){i.hide(0,function(){e(this).show()})},const:{}}}(ConcreteEvent,jQuery),ccm_isBlockError=(!function(n){var t=null;n.fn.liveUpdate=function(t,e){return this.each(function(){new n.liveUpdate(this,t,e)})},n.liveUpdate=function(t,e,i){this.field=n(t),n(t).data("liveUpdate",this),this.list=n("#"+e),this.lutype="blocktypes",void 0!==i&&(this.lutype=i),0<this.list.length&&this.init()},n.liveUpdate.prototype={init:function(){var t=this;this.setupCache(),this.field.parents("form").on("submit.liveupdate",function(){return!1}),this.field.keyup(function(){t.filter()}),t.filter()},filter:function(){if(this.field.val()!=t){if(""==n.trim(this.field.val()))return void("blocktypes"==this.lutype?(this.list.find("li").show(),this.list.find(".ccm-panel-add-block-set").show()):"attributes"==this.lutype?(this.list.find("h5").show(),this.list.find("li").show()):"stacks"==this.lutype?(this.list.children("li").addClass("ccm-stack-available"),this.list.children("li").removeClass("ccm-stack-selected")):"intelligent-search"==this.lutype?this.list.is(":visible")&&this.list.hide():this.list.children("li,div.li").show());"intelligent-search"!=this.lutype||2<this.field.val().length?this.displayResults(this.getScores(this.field.val().toLowerCase())):"intelligent-search"==this.lutype&&this.list.is(":visible")&&this.list.hide()}""==(t=this.field.val())&&"intelligent-search"==this.lutype&&this.list.is(":visible")&&this.list.hide()},setupCache:function(){var e=this,i=(this.cache=[],this.rows=[],this.lutype);this.list.find("li,div.li").each(function(){var t;"blocktypes"==i?e.cache.push(n(this).find("span").html().toLowerCase()):"attributes"==i||"stacks"==i?(t=n(this).find("a,span").html().toLowerCase(),e.cache.push(t)):"fileset"==i?e.cache.push(n(this).find("span[data-label=file-set-name]").html().toLowerCase()):"intelligent-search"==i&&(t=n(this).find("span").html())&&e.cache.push(t.toLowerCase()),e.rows.push(n(this))}),this.cache_length=this.cache.length},displayResults:function(t){var i=this;"blocktypes"==this.lutype?(this.list.find(".ccm-panel-add-block-set").hide(),this.list.find("li,div.li").hide(),n.each(t,function(t,e){i.rows[e[1]].show(),i.rows[e[1]].closest(".ccm-panel-add-block-set").show()})):"attributes"==this.lutype?(this.list.find("h5").hide(),this.list.find("li").hide(),n.each(t,function(t,e){i.rows[e[1]].show()})):"stacks"==this.lutype?(this.list.children("li").removeClass("ccm-stack-available"),this.list.children("li").removeClass("ccm-stack-selected"),this.list.children("li").removeClass("ccm-item-selected"),n.each(t,function(t,e){i.rows[e[1]].addClass("ccm-stack-available")}),this.list.children("li.item-select-list-header").removeClass("ccm-stack-available"),n(this.list.find("li.ccm-stack-available")[0]).addClass("ccm-item-selected")):"intelligent-search"==this.lutype?(this.list.is(":visible")||this.list.fadeIn(160,"easeOutExpo"),this.list.find(".ccm-intelligent-search-results-module-onsite").hide(),this.list.find("li").hide(),n.each(t,function(t,e){$li=i.rows[e[1]],.75<e[0]&&($li.parent().parent().is(":visible")||$li.parent().parent().show(),$li.show())}),this.list.find("li a").removeClass("ccm-intelligent-search-result-selected"),this.list.find("li:visible a:first").addClass("ccm-intelligent-search-result-selected")):(this.list.children("li,div.li").hide(),n.each(t,function(t,e){i.rows[e[1]].show()}))},getScores:function(t){for(var e=[],i=0;i<this.cache_length;i++){var n=this.cache[i].score(t);0<n&&e.push([n,i])}return e.sort(function(t,e){return e[0]-t[0]})}}}(jQuery),!function(l,a,c){"use strict";var i="pep",n={initiate:function(){},start:function(){},drag:function(){},stop:function(){},rest:function(){},moveTo:!1,callIfNotStarted:["stop","rest"],startThreshold:[0,0],grid:[1,1],debug:!1,activeClass:"pep-active",multiplier:1,velocityMultiplier:2.5,shouldPreventDefault:!0,allowDragEventPropagation:!0,stopEvents:"",hardwareAccelerate:!0,useCSSTranslation:!0,disableSelect:!0,cssEaseString:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",cssEaseDuration:1e3,shouldEase:!0,droppable:!1,droppableActiveClass:"pep-dpa",overlapFunction:!1,constrainTo:!1,removeMargins:!0,place:!0,deferPlacement:!1,axis:null,forceNonCSS3Movement:!1,elementsWithInteraction:"input",revert:!1,revertAfter:"stop",revertIf:function(){return!0},ignoreRightClick:!0};function o(t,e){this.name=i,this.el=t,this.$el=l(t),this.options=l.extend({},n,e),this.$document=l(this.$el[0].ownerDocument),this.$body=this.$document.find("body"),this.moveTrigger="MSPointerMove touchmove mousemove",this.startTrigger="MSPointerDown touchstart mousedown",this.stopTrigger="MSPointerUp touchend mouseup",this.startTriggerArray=this.startTrigger.split(" "),this.moveTriggerArray=this.moveTrigger.split(" "),this.stopTriggerArray=this.stopTrigger.split(" "),this.stopEvents=[this.stopTrigger,this.options.stopEvents].join(" "),"window"===this.options.constrainTo?this.$container=this.$document:this.options.constrainTo&&"parent"!==this.options.constrainTo?this.$container=l(this.options.constrainTo):this.$container=this.$el.parent(),this.isPointerEventCompatible()&&this.applyMSDefaults(),this.CSSEaseHash=this.getCSSEaseHash(),this.scale=1,this.started=!1,this.disabled=!1,this.activeDropRegions=[],this.resetVelocityQueue(),this.init()}o.prototype.init=function(){this.options.debug&&this.buildDebugDiv(),this.options.disableSelect&&this.disableSelect(),this.options.place&&!this.options.deferPlacement&&(this.positionParent(),this.placeObject()),this.ev={},this.pos={},this.subscribe()},o.prototype.subscribe=function(){var e=this;this.onStartEvent=function(t){e.handleStart(t)},this.$el.on(this.startTrigger,this.onStartEvent),this.onStartEventOnElementsWithInteraction=function(t){t.stopPropagation()},this.$el.on(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction),this.onStopEvents=function(t){e.handleStop(t)},this.$document.on(this.stopEvents,this.onStopEvents),this.onMoveEvents=function(t){e.moveEvent=t},this.$document.on(this.moveTrigger,this.onMoveEvents)},o.prototype.unsubscribe=function(){this.$el.off(this.startTrigger,this.onStartEvent),this.$el.off(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction),this.$document.off(this.stopEvents,this.onStopEvents),this.$document.off(this.moveTrigger,this.onMoveEvents)},o.prototype.handleStart=function(t){var e=this;!this.isValidMoveEvent(t)||this.disabled||this.options.ignoreRightClick&&3===t.which||(this.isPointerEventCompatible()&&t.preventManipulation&&t.preventManipulation(),t=this.normalizeEvent(t),this.options.place&&this.options.deferPlacement&&(this.positionParent(),this.placeObject()),this.log({type:"event",event:t.type}),this.options.hardwareAccelerate&&!this.hardwareAccelerated&&(this.hardwareAccelerate(),this.hardwareAccelerated=!0),!1!==this.options.initiate.call(this,t,this)&&(clearTimeout(this.restTimeout),this.$el.addClass(this.options.activeClass),this.removeCSSEasing(),this.startX=this.ev.x=t.pep.x,this.startY=this.ev.y=t.pep.y,this.initialPosition=this.initialPosition||this.$el.position(),this.startEvent=this.moveEvent=t,this.active=!0,this.options.shouldPreventDefault&&t.preventDefault(),this.options.allowDragEventPropagation||t.stopPropagation(),function t(){e.active&&(e.handleMove(),e.requestAnimationFrame(t))}()))},o.prototype.handleMove=function(){var t,e,i,n,o;void 0!==this.moveEvent&&(t=this.normalizeEvent(this.moveEvent),n=a.parseInt(t.pep.x/this.options.grid[0])*this.options.grid[0],o=a.parseInt(t.pep.y/this.options.grid[1])*this.options.grid[1],this.addToLIFO({time:t.timeStamp,x:n,y:o}),i=-1<l.inArray(t.type,this.startTriggerArray)?e=0:(e=n-this.ev.x,o-this.ev.y),this.dx=e,this.dy=i,this.ev.x=n,this.ev.y=o,0===e&&0===i?this.log({type:"event",event:"** stopped **"}):(n=Math.abs(this.startX-n),o=Math.abs(this.startY-o),!this.started&&(n>this.options.startThreshold[0]||o>this.options.startThreshold[1])&&(this.started=!0,this.$el.addClass("pep-start"),this.options.start.call(this,this.startEvent,this)),this.options.droppable&&this.calculateActiveDropRegions(),!1===this.options.drag.call(this,t,this)?this.resetVelocityQueue():(this.log({type:"event",event:t.type}),this.log({type:"event-coords",x:this.ev.x,y:this.ev.y}),this.log({type:"velocity"}),this.doMoveTo(e,i))))},o.prototype.doMoveTo=function(t,e){var i,n,o=this.handleConstraint(t,e);"function"==typeof this.options.moveTo?(i=0<=t?"+="+Math.abs(t/this.scale)*this.options.multiplier:"-="+Math.abs(t/this.scale)*this.options.multiplier,n=0<=e?"+="+Math.abs(e/this.scale)*this.options.multiplier:"-="+Math.abs(e/this.scale)*this.options.multiplier,this.options.constrainTo&&(i=!1!==o.x?o.x:i,n=!1!==o.y?o.y:n),"x"===this.options.axis&&(n=o.y),"y"===this.options.axis&&(i=o.x),this.options.moveTo.call(this,i,n)):this.shouldUseCSSTranslation()?(t=t/this.scale*this.options.multiplier,e=e/this.scale*this.options.multiplier,this.options.constrainTo&&(t=!1===o.x?t:0,e=!1===o.y?e:0),"x"===this.options.axis&&(e=0),"y"===this.options.axis&&(t=0),this.moveToUsingTransforms(t,e)):(i=0<=t?"+="+Math.abs(t/this.scale)*this.options.multiplier:"-="+Math.abs(t/this.scale)*this.options.multiplier,n=0<=e?"+="+Math.abs(e/this.scale)*this.options.multiplier:"-="+Math.abs(e/this.scale)*this.options.multiplier,this.options.constrainTo&&(i=!1!==o.x?o.x:i,n=!1!==o.y?o.y:n),"x"===this.options.axis&&(n=o.y),"y"===this.options.axis&&(i=o.x),this.moveTo(i,n))},o.prototype.handleStop=function(t){this.active&&(this.log({type:"event",event:t.type}),this.active=!1,this.$el.removeClass("pep-start").addClass("pep-ease"),this.options.droppable&&this.calculateActiveDropRegions(),(this.started||!this.started&&-1<l.inArray("stop",this.options.callIfNotStarted))&&this.options.stop.call(this,t,this),this.options.shouldEase?this.ease(t,this.started):this.removeActiveClass(),this.options.revert&&("stop"===this.options.revertAfter||!this.options.shouldEase)&&this.options.revertIf&&this.options.revertIf.call(this)&&this.revert(),this.started=!1,this.resetVelocityQueue())},o.prototype.ease=function(t,e){this.$el.position();var i=this.velocity(),n=(this.dt,i.x/this.scale*this.options.multiplier),o=i.y/this.scale*this.options.multiplier,a=this.handleConstraint(n,o,!0),n=(this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash()),0<i.x?"+="+n:"-="+Math.abs(n)),i=0<i.y?"+="+o:"-="+Math.abs(o),o=(this.options.constrainTo&&(n=!1!==a.x?a.x:n,i=!1!==a.y?a.y:i),"x"===this.options.axis&&(i="+=0"),"y"===this.options.axis&&(n="+=0"),!this.cssAnimationsSupported()||this.options.forceNonCSS3Movement),s=("function"==typeof this.options.moveTo?this.options.moveTo.call(this,n,i):this.moveTo(n,i,o),this);this.restTimeout=setTimeout(function(){s.options.droppable&&s.calculateActiveDropRegions(),(e||!e&&-1<l.inArray("rest",s.options.callIfNotStarted))&&s.options.rest.call(s,t,s),s.options.revert&&"ease"===s.options.revertAfter&&s.options.shouldEase&&s.options.revertIf&&s.options.revertIf.call(s)&&s.revert(),s.removeActiveClass()},this.options.cssEaseDuration)},o.prototype.normalizeEvent=function(t){return t.pep={},this.isPointerEventCompatible()||!this.isTouch(t)?t.pageX?(t.pep.x=t.pageX,t.pep.y=t.pageY):(t.pep.x=t.originalEvent.pageX,t.pep.y=t.originalEvent.pageY):(t.pep.x=t.originalEvent.touches[0].pageX,t.pep.y=t.originalEvent.touches[0].pageY),t.pep.type=t.type,t},o.prototype.resetVelocityQueue=function(){this.velocityQueue=new Array(5)}
2,o.prototype.moveTo=function(t,e,i){this.log({type:"delta",x:t,y:e}),i?this.$el.animate({top:e,left:t},0,"easeOutQuad",{queue:!1}):this.$el.stop(!0,!1).css({top:e,left:t})},o.prototype.moveToUsingTransforms=function(t,e){var i=this.matrixToArray(this.matrixString());this.cssX||(this.cssX=this.xTranslation(i)),this.cssY||(this.cssY=this.yTranslation(i)),this.cssX=this.cssX+t,this.cssY=this.cssY+e,this.log({type:"delta",x:t,y:e}),i[4]=this.cssX,i[5]=this.cssY,this.translation=this.arrayToMatrix(i),this.transform(this.translation)},o.prototype.transform=function(t){this.$el.css({"-webkit-transform":t,"-moz-transform":t,"-ms-transform":t,"-o-transform":t,transform:t})},o.prototype.xTranslation=function(t){return t=t||this.matrixToArray(this.matrixString()),parseInt(t[4],10)},o.prototype.yTranslation=function(t){return t=t||this.matrixToArray(this.matrixString()),parseInt(t[5],10)},o.prototype.matrixString=function(){function t(t){return!(!t||"none"===t||t.indexOf("matrix")<0)}var e="matrix(1, 0, 0, 1, 0, 0)";return t(this.$el.css("-webkit-transform"))&&(e=this.$el.css("-webkit-transform")),t(this.$el.css("-moz-transform"))&&(e=this.$el.css("-moz-transform")),t(this.$el.css("-ms-transform"))&&(e=this.$el.css("-ms-transform")),t(this.$el.css("-o-transform"))&&(e=this.$el.css("-o-transform")),e=t(this.$el.css("transform"))?this.$el.css("transform"):e},o.prototype.matrixToArray=function(t){return t.split("(")[1].split(")")[0].split(",")},o.prototype.arrayToMatrix=function(t){return"matrix("+t.join(",")+")"},o.prototype.addToLIFO=function(t){var e=this.velocityQueue;(e=e.slice(1,e.length)).push(t),this.velocityQueue=e},o.prototype.velocity=function(){for(var t=0,e=0,i=0;i<this.velocityQueue.length-1;i++)this.velocityQueue[i]&&(t+=this.velocityQueue[i+1].x-this.velocityQueue[i].x,e+=this.velocityQueue[i+1].y-this.velocityQueue[i].y,this.dt=this.velocityQueue[i+1].time-this.velocityQueue[i].time);return{x:t*this.options.velocityMultiplier,y:e*this.options.velocityMultiplier}},o.prototype.revert=function(){this.shouldUseCSSTranslation()&&this.moveToUsingTransforms(-this.xTranslation(),-this.yTranslation()),this.moveTo(this.initialPosition.left,this.initialPosition.top)},o.prototype.requestAnimationFrame=function(t){return a.requestAnimationFrame&&a.requestAnimationFrame(t)||a.webkitRequestAnimationFrame&&a.webkitRequestAnimationFrame(t)||a.mozRequestAnimationFrame&&a.mozRequestAnimationFrame(t)||a.oRequestAnimationFrame&&a.mozRequestAnimationFrame(t)||a.msRequestAnimationFrame&&a.msRequestAnimationFrame(t)||a.setTimeout(t,1e3/60)},o.prototype.positionParent=function(){this.options.constrainTo&&!this.parentPositioned&&(this.parentPositioned=!0,"parent"===this.options.constrainTo?this.$container.css({position:"relative"}):"window"===this.options.constrainTo&&"#document"!==this.$container.get(0).nodeName&&"static"!==this.$container.css("position")&&this.$container.css({position:"static"}))},o.prototype.placeObject=function(){this.objectPlaced||(this.objectPlaced=!0,this.offset="parent"===this.options.constrainTo||this.hasNonBodyRelative()?this.$el.position():this.$el.offset(),parseInt(this.$el.css("left"),10)&&(this.offset.left=this.$el.css("left")),parseInt(this.$el.css("top"),10)&&(this.offset.top=this.$el.css("top")),this.options.removeMargins&&this.$el.css({margin:0}),this.$el.css({position:"absolute",top:this.offset.top,left:this.offset.left}))},o.prototype.hasNonBodyRelative=function(){return 1<this.$el.parents().filter(function(){var t=l(this);return t.is("body")||"relative"===t.css("position")}).length},o.prototype.setScale=function(t){this.scale=t},o.prototype.setMultiplier=function(t){this.options.multiplier=t},o.prototype.removeCSSEasing=function(){this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash(!0))},o.prototype.disableSelect=function(){this.$el.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"})},o.prototype.removeActiveClass=function(){this.$el.removeClass([this.options.activeClass,"pep-ease"].join(" "))}
2,o.prototype.handleConstraint=function(t,e,i){var n,o,a,s,r=this.$el.position(),r=(this.pos.x=r.left,this.pos.y=r.top,{x:!1,y:!1});return this.log({type:"pos-coords",x:this.pos.x,y:this.pos.y}),l.isArray(this.options.constrainTo)?(this.options.constrainTo[3]!==c&&this.options.constrainTo[1]!==c&&(o=!1===this.options.constrainTo[1]?1/0:this.options.constrainTo[1],a=!1===this.options.constrainTo[3]?-1/0:this.options.constrainTo[3]),!1!==this.options.constrainTo[0]&&!1!==this.options.constrainTo[2]&&(n=!1===this.options.constrainTo[2]?1/0:this.options.constrainTo[2],s=!1===this.options.constrainTo[0]?-1/0:this.options.constrainTo[0]),this.pos.x+t<a&&(r.x=a),this.pos.y+e<s&&(r.y=s)):"string"==typeof this.options.constrainTo&&(s=a=0,o=this.$container.width()-this.$el.outerWidth(),n=this.$container.height()-this.$el.outerHeight(),this.pos.x+t<0&&(r.x=0),this.pos.y+e<0)&&(r.y=0),this.pos.x+t>o&&(r.x=o),this.pos.y+e>n&&(r.y=n),this.shouldUseCSSTranslation()&&i&&(r.x===a&&this.xTranslation()&&(r.x=a-this.xTranslation()),r.x===o&&this.xTranslation()&&(r.x=o-this.xTranslation()),r.y===s&&this.yTranslation()&&(r.y=s-this.yTranslation()),r.y===n)&&this.yTranslation()&&(r.y=n-this.yTranslation()),r},o.prototype.getCSSEaseHash=function(t){var e;if(t=void 0===t?!1:t)e="";else{if(this.CSSEaseHash)return this.CSSEaseHash;e=["all",this.options.cssEaseDuration+"ms",this.options.cssEaseString].join(" ")}return{"-webkit-transition":e,"-moz-transition":e,"-ms-transition":e,"-o-transition":e,transition:e}},o.prototype.calculateActiveDropRegions=function(){var i=this;this.activeDropRegions.length=0,l.each(l(this.options.droppable),function(t,e){e=l(e);i.isOverlapping(e,i.$el)?(e.addClass(i.options.droppableActiveClass),i.activeDropRegions.push(e)):e.removeClass(i.options.droppableActiveClass)})},o.prototype.isOverlapping=function(t,e){return this.options.overlapFunction?this.options.overlapFunction(t,e):(t=t[0].getBoundingClientRect(),e=e[0].getBoundingClientRect(),!(t.right<e.left||t.left>e.right||t.bottom<e.top||t.top>e.bottom))},o.prototype.isTouch=function(t){return-1<t.type.search("touch")},o.prototype.isPointerEventCompatible=function(){return"MSPointerEvent"in a},o.prototype.applyMSDefaults=function(t){this.$el.css({"-ms-touch-action":"none","touch-action":"none","-ms-scroll-chaining":"none","-ms-scroll-limit":"0 0 0 0"})},o.prototype.isValidMoveEvent=function(t){return!this.isTouch(t)||this.isTouch(t)&&t.originalEvent&&t.originalEvent.touches&&1===t.originalEvent.touches.length},o.prototype.shouldUseCSSTranslation=function(){var t;return!this.options.forceNonCSS3Movement&&(void 0!==this.useCSSTranslation?this.useCSSTranslation:(t=!1,t=!(!this.options.useCSSTranslation||"undefined"!=typeof Modernizr&&!Modernizr.csstransforms),this.useCSSTranslation=t))},o.prototype.cssAnimationsSupported=function(){if(void 0!==this.cssAnimationsSupport)return this.cssAnimationsSupport;if("undefined"!=typeof Modernizr&&Modernizr.cssanimations)return this.cssAnimationsSupport=!0;var t=!1,e=document.createElement("div"),i="Webkit Moz O ms Khtml".split(" "),n="";if(!1===(t=e.style.animationName?!0:t))for(var o=0;o<i.length;o++)if(e.style[i[o]+"AnimationName"]!==c){n=i[o],n.toLowerCase(),t=!0;break}return this.cssAnimationsSupport=t},o.prototype.hardwareAccelerate=function(){this.$el.css({"-webkit-perspective":1e3,perspective:1e3,"-webkit-backface-visibility":"hidden","backface-visibility":"hidden"})},o.prototype.getMovementValues=function(){return{ev:this.ev,pos:this.pos,velocity:this.velocity()}},o.prototype.buildDebugDiv=function(){0===l("#pep-debug").length&&(t=l("<div></div>")).attr("id","pep-debug").append("<div style='font-weight:bold; background: red; color: white;'>DEBUG MODE</div>").append("<div id='pep-debug-event'>no event</div>").append("<div id='pep-debug-ev-coords'>event coords: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-pos-coords'>position coords: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-velocity'>velocity: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-delta'>Δ movement: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").css({position:"fixed",bottom:5,right:5,zIndex:99999,textAlign:"right",fontFamily:"Arial, sans",fontSize:10,border:"1px solid #DDD",padding:"3px",background:"white",color:"#333"});var t,e=this;setTimeout(function(){e.debugElements={$event:l("#pep-debug-event"),$velocityX:l("#pep-debug-velocity .pep-x"),$velocityY:l("#pep-debug-velocity .pep-y"),$dX:l("#pep-debug-delta .pep-x"),$dY:l("#pep-debug-delta .pep-y"),$evCoordsX:l("#pep-debug-ev-coords .pep-x"),$evCoordsY:l("#pep-debug-ev-coords .pep-y"),$posCoordsX:l("#pep-debug-pos-coords .pep-x"),$posCoordsY:l("#pep-debug-pos-coords .pep-y")}},0),l("body").append(t)},o.prototype.log=function(t){if(this.options.debug)switch(t.type){case"event":this.debugElements.$event.text(t.event);break;case"pos-coords":this.debugElements.$posCoordsX.text(t.x),this.debugElements.$posCoordsY.text(t.y);break;case"event-coords":this.debugElements.$evCoordsX.text(t.x),this.debugElements.$evCoordsY.text(t.y);break;case"delta":this.debugElements.$dX.text(t.x),this.debugElements.$dY.text(t.y);break;case"velocity":var e=this.velocity();this.debugElements.$velocityX.text(Math.round(e.x)),this.debugElements.$velocityY.text(Math.round(e.y))}},o.prototype.toggle=function(t){this.disabled=void 0===t?!this.disabled:!t}
2,l.extend(l.easing,{easeOutQuad:function(t,e,i,n,o){return-n*(e/=o)*(e-2)+i},easeOutCirc:function(t,e,i,n,o){return n*Math.sqrt(1-(e=e/o-1)*e)+i},easeOutExpo:function(t,e,i,n,o){return e===o?i+n:n*(1-Math.pow(2,-10*e/o))+i}}),l.fn.pep=function(e){return this.each(function(){var t;l.data(this,"plugin_pep")||(t=new o(this,e),l.data(this,"plugin_pep",t),l.pep.peps.push(t))})},l.pep={},l.pep.peps=[],l.pep.toggleAll=function(i){l.each(this.peps,function(t,e){e.toggle(i)})},l.pep.unbind=function(t){var e=t.data("plugin_pep");void 0!==e&&(e.toggle(!1),e.unsubscribe(),t.removeData("plugin_pep"))}}(jQuery,window),ccm_t=function(t){return $("input[name=ccm-string-"+t+"]").val()},ccm_parseJSON=function(t,e){t.error?alert(t.message):e()},ccm_addHeaderItem=function(t,e){var i,n,o,a,s,r,l;l=e,s=-1!==(i=t).indexOf("?"),a=!0,s?(n=["_v","ts"],s=i.substring(0,i.indexOf("?")),r=[],"CSS"===l?r=$("head").children('link[href^="'+s+'?"]'):"JAVASCRIPT"===l&&(r=$('script[src^="'+s+'?"]')),r.length&&(o=new URLSearchParams(i.substring(i.indexOf("?"))),n.forEach(function(t){o.delete(t)}),o.sort(),r.each(function(){var t=$(this).attr("src")||$(this).attr("href"),e=new URLSearchParams(t.substring(t.indexOf("?")));n.forEach(function(t){e.delete(t)}),e.sort(),o.toString()===e.toString()&&(a=!1)}))):"CSS"===l?a=0===$("head").children('link[href*="'+i+'"]').length&&0===$("head").children('link[data-source~="'+i+'"]').length:"JAVASCRIPT"===l&&(a=0===$('script[src*="'+i+'"]').length&&0===$('script[data-source~="'+i+'"]').length),a&&(s=-1!=t.indexOf("?")?"&ts=":"?ts=","CSS"===e?-1!==navigator.userAgent.indexOf("MSIE")?(r=document.createElement("link"),l=document.getElementsByTagName("head")[0],r.type="text/css",r.rel="stylesheet",r.href=t,r.media="screen",l.appendChild(r)):$("head").append('<link rel="stylesheet" media="screen" type="text/css" href="'+t+s+(new Date).getTime()+'" />'):"JAVASCRIPT"===e?$("head").append('<script type="text/javascript" src="'+t+s+(new Date).getTime()+'"><\/script>'):$("head").append(t))},!1),ccm_blockError=!1;function ConcretePanel(e){"use strict";var s=$("html");this.options=e,this.isOpen=!1,this.detail=!1,this.isPinned=!1,this.pinned=function(){return this.isPinned},this.willBePinned=function(){return this.isOpen&&!this.isPinned},this.isPinable=function(){return this.options.pinable},this.getPositionClass=function(){var t;switch(e.position){case"left":t="ccm-panel-left";break;case"right":t="ccm-panel-right"}
2return"slide"===e.transition?t+=" ccm-panel-transition-slide":t+=" ccm-panel-transition-none",t},this.getURL=function(){return this.options.url},this.getCurrentURL=function(){return this.options.currentUrl},this.getIdentifier=function(){return this.options.identifier},this.getDOMID=function(){return"ccm-panel-"+this.options.identifier.replace("/","-")},this.onPanelLoad=function(t){var e=$("a[data-launch-panel="+this.getIdentifier()+"]"),i=(e.attr("aria-expanded",!0),$("#"+this.getDOMID()).show().attr("aria-hidden",!1),this.setupSubPanels(),this.setupPanelDetails(),e.removeClass().addClass("ccm-launch-panel-active"),this);_.defer(function(){Concrete.event.publish("PanelLoad",{panel:i,element:t})})},this.hide=function(i){i=i||$.noop;var n=this;this.closePanelDetail(function(){var t,e=this;$("a[data-launch-panel="+this.getIdentifier()+"]").removeClass().attr("aria-expanded",!1),$("#"+e.getDOMID()).removeClass("ccm-panel-active").hide().attr("aria-hidden",!0),$("#ccm-panel-overlay").queue(function(){$(this).removeClass("ccm-panel-translucent"),$(this).dequeue()}).delay(1e3).hide(0),0<$("#page").length&&void 0!==(t=$("#page").data("ally-handle"))&&(t.disengage(),$("#page").removeData("ally-handle")),s.removeClass(e.getPositionClass()),s.removeClass("ccm-panel-open"),e.isOpen=!1,$(this).dequeue(),i.call(n),setTimeout(function(){Concrete.event.publish("PanelClose",{panel:e})},0)})},this.toggle=function(){window.HiveNotifications.close(),this.isOpen?this.options.pinable?this.isPinned?(this.isPinned=!1,this.hide()):this.isPinned=!0:this.hide():this.show()},this.setupSubPanels=function(){var i=$("#"+this.getDOMID()),n=this;i.find("[data-launch-sub-panel-url]").unbind(".sub").on("click.sub",function(){var t=$("<div />").addClass("ccm-panel-cover").appendTo($(this).closest(".ccm-panel")),e=(n.closePanelDetailImmediately(),$(this).attr("data-launch-sub-panel-url"));return $("<div />",{class:"ccm-panel-content ccm-panel-content-appearing"}).appendTo(i.find(".ccm-panel-content-wrapper")).load(e+"?cID="+CCM_CID,function(){_.delay(function(){t.remove()},250),i.find(".ccm-panel-content-visible").removeClass("ccm-panel-content-visible").addClass("ccm-panel-slide-left"),$(this).removeClass("ccm-panel-content-appearing").addClass("ccm-panel-content-visible"),n.options.currentUrl=e,n.onPanelLoad(this)}),$(this).removeClass("ccm-panel-menu-item-active"),!1}),i.find("[data-panel-navigation=back]").on("click.navigate",function(){return n.goBack(),!1})}
2,this.goBack=function(){var e=$("#"+this.getDOMID());this.closePanelDetailImmediately(),e.queue(function(){var t=e.find(".ccm-panel-content-visible").prev();e.find(".ccm-panel-content-visible").removeClass("ccm-panel-content-visible").addClass("ccm-panel-slide-right"),t.removeClass("ccm-panel-slide-left").addClass("ccm-panel-content-visible"),e.dequeue()}).delay(500).queue(function(){e.find(".ccm-panel-slide-right").remove(),e.dequeue()})},this.showPanelConfirmationMessage=function(t,e,i){for(var n='<div id="ccm-panel-confirmation-'+t+'" class="ccm-ui ccm-panel-confirmation-wrapper"><div class="ccm-panel-confirmation">',o=(n=n+("<p>"+e+'</p><div class="ccm-panel-confirmation-buttons"></div>')+"</div></div>",$(n).appendTo(document.body),$("#ccm-panel-confirmation-"+t)),a=(o.delay(0).queue(function(){$(this).addClass("ccm-panel-confirmation-displayed"),$(this).dequeue()}),[{class:"btn pull-left btn-link",type:"button","data-panel-confirmation-action":"cancel",text:ccmi18n.cancel}]),s=0;s<i.length;s++)a.push(i[s]);$.each(a,function(t,e){o.find(".ccm-panel-confirmation-buttons").append($("<button />",e))}),o.find("button").on("click",function(){o.delay(0).queue(function(){o.removeClass("ccm-panel-confirmation-displayed"),o.addClass("ccm-panel-confirmation-disappearing"),$(this).dequeue()}).delay(350).queue(function(){o.remove()})})},this.closePanelDetail=function(t){t=t||$.noop;var e=this;if(!this.detail)return t.call(e),!1;$("a[data-launch-panel-detail="+this.detail.identifier+"]").removeClass("ccm-panel-menu-item-active");var i=this.detail.transition;return $("div.ccm-panel-detail").queue(function(){$(this).removeClass("ccm-panel-detail-transition-"+i+"-apply"),$(this).dequeue()}).delay(550).queue(function(){$(this).remove(),$(this).dequeue()}),$("div.ccm-page").queue(function(){$(this).removeClass("ccm-panel-detail-transition-"+i+"-apply"),$(this).dequeue()}).delay(550).queue(function(){s.removeClass("ccm-panel-detail-open"),$(this).addClass("ccm-panel-detail-disable-transition"),$(this).dequeue()}).delay(1).queue(function(){$(this).removeClass("ccm-panel-detail-transition-"+i),$(this).dequeue()}).delay(1).queue(function(){$(this).removeClass("ccm-panel-detail-disable-transition"),$(this).dequeue(),t.call(e)}),$("#ccm-panel-detail-form-actions-wrapper .ccm-panel-detail-form-actions").queue(function(){$(this).css("opacity",0),$(this).dequeue(0)}).delay(550).queue(function(){$(this).remove(),$(this).dequeue()}),Concrete.event.publish("PanelCloseDetail",this.detail),this.detail=!1,0<$(".ccm-panel-detail").length?550:void 0},this.closePanelDetailImmediately=function(){if(!this.detail)return!1;s.removeClass("ccm-panel-detail-open"),$(".ccm-panel-detail").remove(),$(".ccm-panel-detail-form-actions").remove(),$(".ccm-page").removeClass().addClass("ccm-page"),Concrete.event.publish("PanelCloseDetail",this.detail),this.detail=!1},this.openPanelDetail=function(t){var e=this,i=$.extend({transition:"none",url:!1,data:""},t),t=i.identifier;e.detail&&e.closePanelDetailImmediately(),e.detail=i;function n(){Concrete.event.publish("PanelOpenDetail",{panel:i,panelObj:e,container:a})}var o=$("<div />",{id:"ccm-panel-detail-"+t,class:"ccm-panel-detail"}).appendTo(document.body),a=$("<div />",{class:"ccm-panel-detail-content"}).appendTo(o);$("div.ccm-page").queue(function(){o.addClass("ccm-panel-detail-transition-"+i.transition),$(this).addClass("ccm-panel-detail-transition-"+i.transition),$(this).dequeue()}).delay(3).queue(function(){o.addClass("ccm-panel-detail-transition-"+i.transition+"-apply"),$(this).addClass("ccm-panel-detail-transition-"+i.transition+"-apply"),$(this).dequeue()}),s.addClass("ccm-panel-detail-open");i.url?a.load(i.url+"?cID="+CCM_CID+i.data,function(){jQuery.fn.dialog.hideLoader(),a.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),a.find("a[data-help-notification-toggle]").concreteHelpLauncher(),e.loadPanelDetailActions(a),_.defer(n)}):(jQuery.fn.dialog.hideLoader(),a.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),a.find("a[data-help-notification-toggle]").concreteHelpLauncher(),e.loadPanelDetailActions(a),_.defer(n))},this.loadPanelDetailActions=function(t){var e=this,i=t.find(".ccm-panel-detail-form-actions");
2i.length&&($(document.body).delay(500).queue(function(){var t=$("#ccm-panel-detail-form-actions-wrapper");t.length||(t=$("<div />",{id:"ccm-panel-detail-form-actions-wrapper",class:"ccm-ui"})).appendTo(document.body),t.html("").append(i),$(this).dequeue()}).delay(5).queue(function(){$("#ccm-panel-detail-form-actions-wrapper .ccm-panel-detail-form-actions").css("opacity",1),$(this).dequeue()}),$("button[data-panel-detail-action=cancel]").on("click",function(){e.closePanelDetail()}),t.find("[data-panel-detail-form]").concreteAjaxForm(),$("button[data-panel-detail-action=submit]").on("click",function(){$("[data-panel-detail-form]").submit()}),ConcreteEvent.subscribe("AjaxFormSubmitSuccess",function(t,e){"reload"==$('[data-panel-detail-form="'+e.form+'"]').data("action-after-save")&&location.reload()}))},this.setupPanelDetails=function(){var o=$("#"+this.getDOMID()),a=this;o.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),o.find("[data-panel-menu=accordion]").each(function(){var i=$(this),n=$(this).find(">nav>span");n.text($(this).find("a[data-panel-accordion-tab-selected=true]").text()),n.unbind(".accordion").on("click.accordion",function(){i.toggleClass("ccm-panel-header-accordion-dropdown-visible")}),$(this).find(">nav ul a").unbind(".accordion").on("click.accordion",function(){var t=(t=a.getCurrentURL())||a.getURL(),e=o.find(".ccm-panel-content");i.removeClass("ccm-panel-header-accordion-dropdown-visible"),n.html($(this).text()),e.load(t+"?cID="+CCM_CID+"&tab="+$(this).attr("data-panel-accordion-tab"),function(){a.onPanelLoad(this)})})}),o.find(".dialog-launch").dialog(),o.find("[data-panel-menu=collapsible-list-group]").each(function(){var t,e=$(this),i=e.find(".list-group-item-collapse-wrapper"),n=e.attr("data-panel-menu-id"),o=e.find(".list-group-item-collapse span");e.find(".list-group-item-collapse").unbind(".clg").on("click.clg",function(){e.hasClass("ccm-panel-list-group-item-expanded")?(o.text(ccmi18n.expand),Concrete.event.publish("PanelCollapsibleListGroupCollapse",n),i.height(0)):(t=i.show().height("").outerHeight(),i.height(0),Concrete.event.publish("PanelCollapsibleListGroupExpand",n),o.text(ccmi18n.collapse),i.height(t)),e.toggleClass("ccm-panel-list-group-item-expanded")})}),o.find("[data-launch-panel-detail]").unbind(".detail").on("click.detail",function(){jQuery.fn.dialog.showLoader(),$(".ccm-panel-menu-item-active").removeClass("ccm-panel-menu-item-active"),$(this).addClass("ccm-panel-menu-item-active");var t={identifier:$(this).attr("data-launch-panel-detail"),target:$(this)};return $(this).attr("data-panel-transition")&&(t.transition=$(this).attr("data-panel-transition")),$(this).attr("data-panel-detail-url")&&(t.url=$(this).data("panel-detail-url")),a.openPanelDetail(t),!1}),a.loadPanelDetailActions(o)},this.show=function(t){t=t||$.noop;function e(){s.addClass("ccm-panel-open"),i.find(".ccm-panel-content-wrapper").html(""),i.addClass("ccm-panel-active ccm-panel-loading"),$("<div/>").addClass("ccm-panel-content ccm-panel-content-visible").appendTo(i.find(".ccm-panel-content-wrapper")).load(n.getURL()+"?cID="+CCM_CID,function(){i.delay(1).queue(function(){$(this).removeClass("ccm-panel-loading").addClass("ccm-panel-loaded"),$(this).dequeue()}),n.onPanelLoad(i),n.isOpen=!0,Concrete.event.publish("PanelOpen",{panel:n,element:this}),n.options.overlay&&ConcretePanelManager.showOverlay(n.options.translucent)}),s.addClass(n.getPositionClass())}var i=$("#"+this.getDOMID()),n=this;this.options.primary&&(t=_(ConcretePanelManager.getPanels()).findWhere({isOpen:!0}))?t.hide(function(){e.call(this)}):e.call(this),$(".ccm-toolbar-mobile-menu-button").removeClass("ccm-mobile-close"),$(".ccm-mobile-menu-overlay").slideUp()}}ccm_addError=function(t){ccm_isBlockError||(ccm_blockError="",ccm_blockError+="<ul>"),ccm_isBlockError=!0,ccm_blockError+="<li>"+t+"</li>"},ccm_resetBlockErrors=function(){ccm_isBlockError=!1,ccm_blockError=""},!function(t,s){"use strict";function i(t){var e=this;t=s.extend({dataType:"json",type:"post",error:function(t){e.error(t,e)},complete:function(){e.complete(e)},skipResponseValidation:!1},t=t||{}),e.options=t,e.execute()}i.prototype={execute:function(){var e=this,t=e.options,i=t.success;
2t.success=function(t){e.success(t,e,i)},e.before(),s.ajax(t)},before:function(t){jQuery.fn.dialog.showLoader()},errorResponseToString:function(t){return i.renderErrorResponse(t,!0)},error:function(t,e){ConcreteEvent.fire("AjaxRequestError",{response:t}),ConcreteAlert.dialog(ccmi18n.error,i.renderErrorResponse(t,!0))},validateResponse:function(t,e){return t.error?(ConcreteEvent.fire("AjaxRequestError",{response:t}),ConcreteAlert.dialog(ccmi18n.error,i.renderJsonError(t),function(){e&&e(!1,t)}),!1):(e&&e(!0,t),!0)},success:function(t,e,i){("json"!=e.options.dataType||e.options.skipResponseValidation||e.validateResponse(t))&&i&&i(t)},complete:function(t){jQuery.fn.dialog.hideLoader()}},i.renderJsonError=function(i,t){if(!i)return"";function n(t,e){return"number"==typeof e&&s.isArray(i.htmlErrorIndexes)&&0<=s.inArray(e,i.htmlErrorIndexes)?t:s("<div/>").text(t).html().replace("/\n/g","<br />")}var o="";if("object"==typeof i.error&&s.inArray(i.error.trace)){for(var e,o=(o='<p class="text-danger"><strong>'+n(i.error.message)+"</strong></p>")+('<p class="text-muted">'+ccmi18n.errorDetails+"</p>")+'<table class="table"><tbody>',a=0;a<i.error.trace.length;a++)e=i.error.trace[a],o+="<tr><td>"+e.file+"("+e.line+"): "+e.class+"->"+e.function+"</td></tr>";o+="</tbody></table>"}else s.isArray(i.errors)&&0<i.errors.length&&"string"==typeof i.errors[0]?s.each(i.errors,function(t,e){o+='<p class="text-danger"><strong>'+n(e,t)+"</strong></p>"}):"string"==typeof i.error&&""!==i.error&&(o='<p class="text-danger" style="word-break: break-all"><strong>'+n(i.error)+"</strong></p>");return o},i.renderErrorResponse=function(t,e){return i.renderJsonError(t.responseJSON,e)||t.responseText},i.validateResponse=i.prototype.validateResponse,i.errorResponseToString=i.prototype.errorResponseToString,s.concreteAjax=function(t){new i(t)},t.ConcreteAjaxRequest=i}(this,jQuery),!function(t,n){"use strict";function o(t,e){var i=this;return(e=n.extend({beforeSubmit:i.before,complete:i.complete,data:{},hasError:!1,error:null,skipResponseValidation:!1},e=e||{})).data||(e.data={}),e.data.__ccm_consider_request_as_xhr="1",i.$form=t,ConcreteAjaxRequest.call(i,e),i.$form}(o.prototype=Object.create(ConcreteAjaxRequest.prototype)).execute=function(){var e=this,t=e.options,i=t.success,n=t.error;e.$form.ajaxForm({type:t.type,data:t.data,url:t.url,dataType:t.dataType,beforeSubmit:function(){t.beforeSubmit(e)},error:function(t){e.error(t,e,n)},success:function(t){e.success(t,e,i)},complete:function(){t.complete(e)}})},o.prototype.error=function(t,e,i){ConcreteAjaxRequest.prototype.error(t,e),i&&i(t)},o.prototype.doFinish=function(t){ConcreteEvent.publish("AjaxFormSubmitSuccess",{response:t,form:this.$form.attr("data-dialog-form")}),t.redirectURL?window.location.href=t.redirectURL:(this.$form.attr("data-dialog-form")&&n.fn.dialog.closeTop(),t.message&&ConcreteAlert.notify({message:t.message,title:t.title}))},o.prototype.success=function(t,e,i){void 0!==t.error&&(e.hasError=t.error),(e.options.skipResponseValidation||e.validateResponse(t))&&(i?i(t):e.doFinish(t))},n.fn.concreteAjaxForm=function(i){return n.each(n(this),function(t,e){new o(n(this),i)})},t.ConcreteAjaxForm=o}(this,jQuery),!function(t,p){"use strict";function n(t,e){return e=p.extend({iframe:!0,task:!1,dragAreaBlockID:!1,dragArea:null,bID:!1},e),(this.options=e).dragAreaBlockID&&t.find("input[name=dragAreaBlockID]").val(e.dragAreaBlockID),ConcreteAjaxForm.call(this,t,e)}(n.prototype=Object.create(ConcreteAjaxForm.prototype)).before=function(t){p(".ui-dialog-buttonpane button, .block-ui .col-buttons button").prop("disabled",!0),ConcreteEvent.fire("EditModeBeforeBlockSubmit",{form:t})},n.prototype.success=function(t,l){var e,c,d,i,n;p(".ui-dialog-buttonpane [disabled], .block-ui .col-buttons [disabled]").prop("disabled",!1),l.validateResponse(t)&&(e=t.cID||CCM_CID,c=new Concrete.getEditMode,i=(d=c.getAreaByID(t.aID)).getEnableGridContainer()?1:0,n=CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",jQuery.fn.dialog.closeTop(),p.get(n,{arHandle:d.getHandle(),cID:e,bID:t.bID,arEnableGridContainer:i,placeholder:""},function(t){var e,i,n,o,a,s=Concrete.getEditMode(),r=d.inEditMode(s);ConcreteToolbar.disableDirectExit(),jQuery.fn.dialog.hideLoader(),"add"==l.options.task?(e=r.getElem(),(i=p(t)).hasClass("ccm-block-edit")||(n=i.find(".ccm-block-edit")).length&&(a=new Concrete.Block(n,s)).setArea(r),a||(a=new Concrete.Block(i,s)).setArea(r),"core_area_layout"===l.options.btHandle?e.children(".ccm-area-block-list").append(i):(n=p(l.options.placeholder)).length?n.replaceWith(i):e.children(".ccm-area-block-list").prepend(i),ConcreteAlert.notify({message:ccmi18n.addBlockMsg,title:ccmi18n.addBlock}),jQuery.fn.dialog.closeAll(),l.options.btSupportsInlineAdd&&(c.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete",{block:a})),ConcreteEvent.fire("EditModeAddBlockComplete",{block:a})):(a=r.getBlockByID(l.options.bID),window.VueInstances&&window.VueInstances[l.options.bID]&&(window.VueInstances[l.options.bID].$destroy(!0),window.VueInstances[l.options.bID]=null,delete window.VueInstances[l.options.bID]),window.Vue3Instances&&Object.keys(window.Vue3Instances).length&&(o=Object.keys(window.Vue3Instances).find(t=>t.endsWith("__"+l.options.bID)),Promise.resolve(window.Vue3Instances[o]).then(t=>{t&&"function"==typeof t.unmount&&(t.unmount(),delete window.Vue3Instances[o])})),s=a.replace(t),ConcreteAlert.notify({message:ccmi18n.updateBlockMsg,title:ccmi18n.updateBlock}),l.options.btSupportsInlineEdit&&(c.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete",{block:s})),ConcreteEvent.fire("EditModeUpdateBlockComplete",{block:s}))}))}
2,n.prototype.error=function(t,e,i){p(".ui-dialog-buttonpane [disabled]").prop("disabled",!1),ConcreteAjaxForm.prototype.error(t,e,i)},p(document).on("dialogclose",".ui-dialog-fullscreen",function(){window.VueInstances&&"block-editor"in window.VueInstances&&(window.VueInstances["block-editor"].$destroy(!0),window.VueInstances["block-editor"]=null,delete window.VueInstances["block-editor"]),window.Vue3Instances&&"block-editor"in window.Vue3Instances&&Promise.resolve(window.Vue3Instances["block-editor"]).then(t=>{var e;t&&"function"==typeof t.unmount&&(t.unmount(),delete window.Vue3Instances["block-editor"],t=document.querySelectorAll('script[src*="-editor/dist/app.js"]'),e=document.querySelectorAll('link[href*="-editor/dist/styles.css"]'),t.forEach(t=>t.remove()),e.forEach(t=>t.remove()))})}),p.fn.concreteAjaxBlockForm=function(i){return p.each(p(this),function(t,e){new n(p(this),i)})},t.ConcreteAjaxBlockForm=n}(this,$),!function(t,e){var i,n;"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self,i=t.Cookies,(n=t.Cookies=e()).noConflict=function(){return t.Cookies=i,n})}(this,function(){"use strict";function s(t){for(var e=1;e<arguments.length;e++){var i,n=arguments[e];for(i in n)"__proto__"!==i&&(t[i]=n[i])}return t}return function e(r,a){function i(t,e,i){if("undefined"!=typeof document){"number"==typeof(i=s({},a,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var n,o="";for(n in i)i[n]&&(o+="; "+n,!0!==i[n])&&(o+="="+i[n].split(";")[0]);return document.cookie=t+"="+r.write(e,t)+o}}return Object.create({set:i,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],i={},n=0;n<e.length;n++){var o=e[n].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(s in i||(i[s]=r.read(a,s)),t===s)break}catch(t){}}return t?i[t]:i}},remove:function(t,e){i(t,"",s({},e,{expires:-1}))},withAttributes:function(t){return e(this.converter,s({},this.attributes,t))},withConverter:function(t){return e(s({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(a)},converter:{value:Object.freeze(r)}})}({read:function(t){return(t='"'===t[0]?t.slice(1,-1):t).replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})});var ConcretePanelManager=function(){"use strict";var n=[];return{getPanels:function(){return n},showOverlay:function(e){$("#ccm-panel-overlay").clearQueue().show(0).delay(100).queue(function(){var t;e?$(this).addClass("ccm-panel-translucent"):$(this).removeClass("ccm-panel-translucent"),0<$("#page").length&&(t=ally.maintain.disabled({context:"#page"}),$("#page").data("ally-handle",t)),$(this).dequeue()})},exitPanelMode:function(t){t=t||$.noop;for(var e=0,i=0;i<n.length;i++)n[i].isOpen&&(e++,n[i].hide(function(){0==--e&&t.call(null)}))},register:function(t){t=new ConcretePanel($.extend({translucent:!0,overlay:!0,position:"left",primary:!0,transition:"slide"},t));n.push(t),$("#"+t.getDOMID()).length||($("<div />",{id:t.getDOMID(),class:"ccm-panel "+t.getPositionClass(),"aria-hidden":!0}).appendTo($(document.body)),$("<div />",{class:"ccm-panel-content-wrapper ccm-ui"}).appendTo($("#"+t.getDOMID()))),$("a[data-launch-panel="+t.getIdentifier()+"]").attr("aria-controls",t.getDOMID())},getByIdentifier:function(t){for(var e=0;e<n.length;e++)if(n[e].getIdentifier()==t)return n[e]}}}(),ccmCustomStyle=($.widget("concrete.dialog",$.ui.dialog,{_allowInteraction:function(t){return!!$(t.target).closest(".ccm-interaction-dialog").length||this._super(t)}}),$.widget.bridge("jqdialog",$.concrete.dialog),jQuery.fn.dialog=function(){if(0<arguments.length)$(this).jqdialog(arguments[0],arguments[1],arguments[2]);else{if(!$(this).is("div"))return $(this).each(function(){$(this).off("click.make-dialog").on("click.make-dialog",function(t){var e=$
2(this).attr("href"),i=$(this).attr("data-dialog-width")||$(this).attr("dialog-width"),n=$(this).attr("data-dialog-height")||$(this).attr("dialog-height"),o=$(this).attr("data-dialog-title")||$(this).attr("dialog-title"),a=$(this).attr("data-dialog-on-open")||$(this).attr("dialog-on-open"),s=$(this).attr("data-dialog-on-destroy")||$(this).attr("dialog-on-destroy"),r=$(this).attr("data-dialog-on-close")||$(this).attr("dialog-on-close"),l=$(this).attr("data-dialog-on-direct-close")||$(this).attr("dialog-on-direct-close"),c=$(this).attr("data-dialog-class");return obj={modal:!0,href:e,width:i,height:n,title:o,onOpen:a,onDestroy:s,onClose:r,onDirectClose:l,dialogClass:c},jQuery.fn.dialog.open(obj),!1})});$(this).jqdialog()}},jQuery.fn.dialog.close=function(t){t++,$("#ccm-dialog-content"+t).jqdialog("close")},jQuery.fn.dialog.open=function(options){var activeMenu,defaults=("undefined"!=typeof ConcreteMenu&&(activeMenu=ConcreteMenuManager.getActiveMenu(),activeMenu)&&activeMenu.hide(),"string"==typeof options.width?"auto"==options.width?w="auto":0<options.width.indexOf("%",0)?(w=options.width.replace("%",""),w=$(window).width()*(w/100),w+=50):w=parseInt(options.width)+50:w=options.width?parseInt(options.width)+50:550,"string"==typeof options.height?"auto"==options.height?h="auto":0<options.height.indexOf("%",0)?(h=options.height.replace("%",""),h=$(window).height()*(h/100),h+=100):h=parseInt(options.height)+100:h=options.height?parseInt(options.height)+100:400,"auto"!==h&&h>$(window).height()&&(h=$(window).height()),options.width=w,options.height=h,{modal:!0,escapeClose:!0,width:w,height:h,resizable:!0,create:function(){$(this).parent().addClass("animated fadeIn")},open:function(){var $dialog=$(this),nd=$(".ui-dialog").length,overlays=(1==nd&&($("body").attr("data-last-overflow",$("body").css("overflow")),$("body").css("overflow","hidden")),$(".ui-widget-overlay").length),$wrapper,z;$(".ui-widget-overlay").each(function(t,e){t+1<overlays&&$(this).css("opacity",0)}),_.defer(function(){jQuery.fn.dialog.activateDialogContents($dialog)}),$dialog.jqdialog("option","resizable")&&($wrapper=$($dialog.parent()),z=parseInt($wrapper.find(".ui-dialog-buttonpane").css("z-index")),$wrapper.find(".ui-resizable-handle").css("z-index",z+1e3)),void 0!==options.onOpen&&("function"==typeof options.onOpen?options.onOpen($dialog):eval(options.onOpen))},beforeClose:function(){1==$(".ui-dialog:visible").length&&$("body").css("overflow",$("body").attr("data-last-overflow"))},close:function(ev,u){options.element||$(this).jqdialog("destroy").remove(),void 0!==options.onClose&&("function"==typeof options.onClose?options.onClose($(this)):eval(options.onClose)),void 0===options.onDirectClose||!ev.handleObj||"keydown"!=ev.handleObj.type&&"click"!=ev.handleObj.type||("function"==typeof options.onDirectClose?options.onDirectClose():eval(options.onDirectClose)),void 0!==options.onDestroy&&("function"==typeof options.onDestroy?options.onDestroy():eval(options.onDestroy));var overlays=$(".ui-widget-overlay").length;$(".ui-widget-overlay").each(function(t,e){t+1<overlays?$(this).css("opacity",0):$(this).css("opacity",1)})}}),finalSettings={autoOpen:!1,data:{}};$.extend(finalSettings,defaults,options),finalSettings.element?($(finalSettings.element).jqdialog(finalSettings).jqdialog(),$(finalSettings.element).jqdialog("open")):(jQuery.fn.dialog.showLoader(),$.ajax({type:"GET",url:finalSettings.href,data:finalSettings.data,success:function(t){jQuery.fn.dialog.hideLoader(),$("<div />").jqdialog(finalSettings).html(t).jqdialog("open")},error:function(t){ConcreteAlert.dialog("Error",t.responseText)},complete:function(){jQuery.fn.dialog.hideLoader()}}))},jQuery.fn.dialog.activateDialogContents=function(t){t.find("button[data-dialog-action=cancel]").on("click",function(){jQuery.fn.dialog.closeTop()}),t.find("[data-dialog-form]").each(function(){$(this).concreteAjaxForm({beforeSubmit:function(){jQuery.fn.dialog.showLoader(),t.parent().find("button[data-dialog-action]").prop("disabled",!0),t.parent().find("button[data-dialog-action=submit]").addClass("is-loading")},complete:function(){t.parent().find("button[data-dialog-action=submit]").removeClass("is-loading"),t.parent().find("button[data-dialog-action]").prop("disabled",!1),jQuery.fn.dialog.hideLoader()}})}),t.find("button[data-dialog-action=submit]").on("click",function(){t.find("[data-dialog-form]").submit()}),0<t.find(".dialog-buttons").length&&(t.jqdialog("option","buttons",[{}]),t.parent().find(".ui-dialog-buttonset").remove(),t.parent().find(".ui-dialog-buttonpane").html(""),t.find(".dialog-buttons").removeClass().appendTo(t.parent().find(".ui-dialog-buttonpane").addClass("ccm-ui"))),t.find(".dialog-launch").dialog(),t.find(".ccm-dialog-close").on("click",function(){t.dialog("close")}),t.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),0<t.find(".dialog-help").length&&t.find(".dialog-help").hide()},jQuery.fn.dialog.getTop=function(){var t=$(".ui-dialog:visible").length;
2return $($(".ui-dialog:visible")[t-1]).find(".ui-dialog-content")},jQuery.fn.dialog.replaceTop=function(t){($dialog=jQuery.fn.dialog.getTop()).html(t),jQuery.fn.dialog.activateDialogContents($dialog)},jQuery.fn.dialog.showLoader=function(t){$("body").addClass("ccm-loading")},jQuery.fn.dialog.hideLoader=function(){$("body").removeClass("ccm-loading")},jQuery.fn.dialog.closeTop=function(){($dialog=jQuery.fn.dialog.getTop()).jqdialog("close")},jQuery.fn.dialog.closeAll=function(){$($(".ui-dialog-content").get().reverse()).jqdialog("close")},!function(t,s){"use strict";t.ConcreteAlert={dialog:function(t,e,i){s('<div id="ccm-popup-alert" class="ccm-ui"><div id="ccm-popup-alert-message" class="alert alert-danger">'+e+"</div></div>").dialog({title:t,modal:!0,onDestroy:i})},info:function(t){t=s.extend({type:"info",icon:"info-circle"},t);return this.notify(t)},error:function(t){t=s.extend({type:"danger",icon:"exclamation-circle"},t);return this.notify(t)},notify:function(t){var e=s.extend({type:"success",icon:"check-circle",title:!1,message:!1,appendTo:!1,delay:2e3,callback:function(){}},t),t="",i=e.appendTo?s(e.appendTo):s(document.body),t=e.title?'<div class="ccm-notification-title">'+e.title+"</div>"+e.message:'<div class="ccm-notification-title">'+e.message+"</div>",n=s('<div id="ccm-notification-hud" class="ccm-ui ccm-notification ccm-notification-'+e.type+'" role="alert"><i class="ccm-notification-icon fa fa-'+e.icon+'"></i><div class="ccm-notification-inner">'+t+"</div></div>").appendTo(i).delay(5).queue(function(){s(this).addClass("animated fadeIn"),s(this).dequeue()}),o=_.once(function(){n.queue(function(){s(this).css("opacity",1),s(this).dequeue()}).delay(1).queue(function(){s(this).addClass("animated bounceOutRight"),s(this).dequeue()}).delay(1e3).queue(function(){s(this).remove(),s(this).dequeue(),e.callback()})}),a=setTimeout(o,e.delay);n.click(function(){o(),clearTimeout(a)})}}}(this,$),!function(t,i){"use strict";function n(t){var e=this;t=t||{},t=i.extend({width:"800",height:"450",title:"Help",href:CCM_DISPATCHER_FILENAME+"/dashboard/home?_ccm_dashboard_external=1",dialogClass:"ccm-dialog-slim ccm-dialog-help-wrapper",onOpen:function(t){e.positionArrows(t)}},t),e.options=t}n.prototype={positionArrows:function(t){t.find(".newsflow-paging-next").addClass("newsflow-paging-appended").appendTo(t.parent()),t.find(".newsflow-paging-previous").addClass("newsflow-paging-appended").appendTo(t.parent())},open:function(){i.fn.dialog.open(this.options)}},n.loadEdition=function(t){var e=new n,t=CCM_TOOLS_PATH+"/newsflow?cID="+t;jQuery.fn.dialog.showLoader(),i.get(t,function(t){i(".newsflow-paging-appended").remove(),jQuery.fn.dialog.replaceTop(t),jQuery.fn.dialog.hideLoader(),$dialog=jQuery.fn.dialog.getTop(),e.positionArrows($dialog)})},t.ConcreteNewsflowDialog=n}(this,$),!function(t,a){"use strict";function n(t,e){var i=this;return e=a.extend({url:!1,data:{}},e=e||{}),i.$element=t,i.options=e,i.initializeEditableFields(),i.initializeClearCommands(),i.$element}n.prototype={getAjaxURL:function(t){var e=this.options.url;return e=t.attr("data-url")?t.attr("data-url"):e},setupXeditableField:function(t){t.editable({ajaxOptions:{dataType:"json"},emptytext:ccmi18n.none,showbuttons:!0,params:this.options.data,url:this.options.url,success:function(t,e){return ConcreteAjaxRequest.validateResponse(t)?{newValue:e}:""},pk:"_x"})},setupXeditableAttributeField:function(t){var e=this;t.editable({ajaxOptions:{dataType:"json"},mode:t.data("editablemode"),emptytext:ccmi18n.none,showbuttons:!0,savenochange:!0,autotext:"never",url:e.options.url,params:function(t){var i=[];return i.push({name:"name",value:t.name}),i.push({name:"pk",value:t.pk}),_.each(e.options.data,function(t,e){i.push("object"==typeof t?{name:t.name,value:t.value}:{name:e,value:t})}),_.each(t.value,function(t){i.push({name:t.name,value:t.value})}),i},success:function(t,e){return ConcreteAjaxRequest.validateResponse(t)?{newValue:t.value}:""},pk:"_x"})},setupImageField:function(e){var i=this,t=e.find(".editable-image-wrapper img");e.find(".editable-image-wrapper input").css("width",t.width()).css("height",t.height()),e.fileupload({url:i.getAjaxURL(e),dataType:"json",formData:i.options.data,start:function(){jQuery.fn.dialog.showLoader()},success:function(t){i.updateImageField(t,e)},error:function(t){ConcreteAlert.dialog("Error",t.responseText)},complete:function(t){jQuery.fn.dialog.hideLoader()}})},updateImageField:function(t,e){ConcreteAjaxRequest.validateResponse(t)&&(e.find(".editable-image-display").html(t.imageHTML).find("img").attr("src",function(t,e){return e+"?"+(new Date).getTime()}),this.setupImageField(e),ConcreteAlert.notify({message:t.message}))},initializeEditableFields:function(){var i=this;i.$element.find("[data-editable-field-type]").each(function(){var t=a(this),e="setup"+t.attr("data-editable-field-type").charAt(0).toUpperCase()+t.attr("data-editable-field-type").slice(1)+"Field";i[e](t)})},initializeClearCommands:function(){var o=this;o.$element.on("click","[data-editable-field-command=clear]",function(){var e=a(this).closest("[data-editable-field-type]"),i="update"+e.attr("data-editable-field-type").charAt(0).toUpperCase()+e.attr("data-editable-field-type").slice(1)+"Field",t=o.options.data,n=(t.task="clear",o.getAjaxURL(e));return new ConcreteAjaxRequest({url:n,data:t,success:function(t){o[i](t,e)}}),!1}),o.$element.on("click","[data-editable-field-command=clear_attribute]",function(){var t=o.options.data,e=o.getAjaxURL(a(this)),i=a(this).attr("data-key-id"),n=[];return _.each(t,function(t,e){n.push("object"==typeof t?{name:t.name,value:t.value}:{name:e,value:t})}),n.push({name:"akID",value:i}),new ConcreteAjaxRequest({url:e,data:n,success:function(t){a("[data-key-id="+i+"][data-editable-field-type=xeditableAttribute]").editable("setValue","")}}),!1})}},a.fn.concreteEditableFieldContainer=function(i){return a.each(a(this),function(t,e){new n(a(this),i)})},t.ConcreteEditableFieldContainer=n}(this,$),ccm_doPageReindexing=function(){$.get(CCM_TOOLS_PATH+"/reindex_pending_pages?ccm_token="+CCM_SECURITY_TOKEN)},!function(t,g){"use strict";function n(t,e){var i=this;
2e=g.extend({handle:"this",menu:!1,highlightClassName:"ccm-menu-highlight",highlightOffset:0,menuContainerClass:!1,menuActiveClass:"ccm-menu-item-active",menuActiveParentClass:"ccm-parent-menu-item-active",menuLauncherHoverClass:"ccm-menu-item-hover",menuLauncherHoverParentClass:"ccm-parent-menu-item-hover",enabled:!0,enableClickProxy:!0,onHide:!1},e=e||{}),i.$element=t,"none"==(i.options=e).handle?i.$launcher=!1:(i.$launcher="this"==e.handle?i.$element:g(e.handle),i.options.enableClickProxy&&i.$launcher.each(function(){g(this).on("mousemove.concreteMenu",function(t){i.hoverProxy(t,g(this))})})),i.$menu=g(e.menu),i.setup(),Concrete.event.on("EditModeBlockDragInitialization",function(){i.hide()})}var v={enabled:!0,$clickProxy:!(n.prototype={setup:function(){var e=this,t=e.options,i=v;t.enableClickProxy?(i.$clickProxy||(i.$clickProxy=g("<div />",{id:"ccm-menu-click-proxy"}),i.$clickProxy.on("mouseout.concreteMenuProxy",function(t){i.hoverMenu.mouseout(t)}),i.$clickProxy.on("mouseover.concreteMenuProxy",function(t){i.hoverMenu.mouseover(t)}),i.$clickProxy.on("click.concreteMenuProxy",function(t){i.hoverMenu.show(t)}),g(document.body).append(i.$clickProxy)),i.$highlighter||(i.$highlighter=g("<div />",{id:"ccm-menu-highlighter"}),g(document.body).append(i.$highlighter))):e.$launcher&&(e.$launcher.on("mouseover.concreteMenu",function(t){e.mouseover(t)}),e.$launcher.on("mouseout.concreteMenu",function(t){e.mouseout(t)}),e.$launcher.on("click.concreteMenu",function(t){e.show(t)})),i.$container||(i.$container=g("<div />",{id:"ccm-popover-menu-container",class:"ccm-ui"}),g(document.body).append(i.$container))},destroy:function(){this.hide(),this.$launcher.each(function(){g(this).off("mousemove.concreteMenu")})},positionAt:function(t,e){if(!e)return!1;var i=e.offset(),i={top:i.top-this.options.highlightOffset,left:i.left-this.options.highlightOffset,width:e.outerWidth()+2*this.options.highlightOffset,height:e.outerHeight()+2*this.options.highlightOffset,"border-top-left-radius":e.css("border-top-left-radius"),"border-top-right-radius":e.css("border-top-right-radius"),"border-bottom-left-radius":e.css("border-bottom-left-radius"),"border-bottom-right-radius":e.css("border-bottom-right-radius")};t.css(i)},hoverProxy:function(t,e){t.stopPropagation();var t=this.options.menuLauncherHoverClass,i=v.$clickProxy;if(!v.enabled||v.activeMenu)return!1;this.positionAt(i,e),i.removeClass().addClass(t),v.hoverMenu=this},mouseover:function(t){var e=this.$launcher,i=this.options;e.addClass(i.menuLauncherHoverClass),e.parents("*").slice(0,3).addClass(i.menuLauncherHoverParentClass)},mouseout:function(t){var e=this.$launcher,i=this.options;e.removeClass(i.menuLauncherHoverClass),e.parents("*").slice(0,3).removeClass(i.menuLauncherHoverParentClass)},setupMenuOptions:function(t){t.find(".dialog-launch").dialog()},show:function(t){var e=this,i="touch"===t.type.substr(0,5).toLowerCase()?t.originalEvent.touches[0]:null,n=v,o=e.options,a=e.$launcher,s=e.$element,r=n.$container,l=n.$highlighter,c=e.$menu.clone(!0,!0),d=(i||t).pageX+2,p=(i||t).pageY+2,u=(i||t).clientX,i=(i||t).clientY;if(n.getActiveMenu()==e)return!1;t.stopPropagation(),o.enableClickProxy&&(l.removeClass(),e.positionAt(l,a),_.defer(function(){l.addClass(o.highlightClassName)})),s.addClass(o.menuActiveClass),s.parents("*").slice(0,3).addClass(o.menuActiveParentClass),e.setupMenuOptions(c),r.html(""),c.appendTo(r),o.menuContainerClass&&r.addClass(o.menuContainerClass),c.css("opacity",0).show();var h=c.width(),f=c.height(),n=g(window).height(),t=g(window).width(),a=h/2-5,s=f/2-5,r=["bottom","top","right","left"],m=r.slice(0),t=(u<h+30&&(r=_(r).without("left")),t<u+h+30&&(r=_(r).without("right")),n<i+f+30&&(r=_(r).without("bottom")),i<f+30&&(r=_(r).without("top")),(t<u+a||u<a)&&(r=_(r).without("top","bottom")),(r=n<i+s||i<s?_(r).without("left","right"):r).shift());switch(c.removeClass(m).addClass(t),d-=2,p-=2,t){case"left":d-=h,p-=f/2;break;case"right":p-=f/2;break;case"top":p-=f,d-=h/2;break;case"bottom":d-=h/2}c.css({top:p,left:d}),_.defer(function(){c.css("opacity",1)}),c.find("a").on("click",function(t){e.hide(t)}),g(document).off(".concreteMenuDisable").on("click.concreteMenuDisable",function(t){e.hide(t)}),ConcreteEvent.subscribe("PanelClose",function(t){e.hide(t)}),e.$menuPointer=c,v.activeMenu=e,ConcreteEvent.publish("ConcreteMenuShow",{menu:e,menuElement:c})},hide:function(t){var e=this,i=v,n={class:"",width:0,height:0,top:0,left:0};t&&t.stopPropagation(),e.$menuPointer&&(e.$menuPointer.css("opacity",0),_.defer(function(){e.$menuPointer.hide()})),_.defer(function(){e.$element.removeClass(e.options.menuActiveClass),e.$element.parents("*").slice(0,3).removeClass(e.options.menuActiveParentClass),e.options.enableClickProxy&&(i.$highlighter.removeClass(),i.$container.removeClass().addClass("ccm-ui").html(""))}),e.options.enableClickProxy&&(i.$clickProxy.css(n),i.$highlighter.css(n)),v.activeMenu=!1,e.options.onHide&&e.options.onHide(e)}}),$highlighter:!1,$container:!1,hoverMenu:!1,activeMenu:!1,reset:function(){this.$clickProxy.css("width",0).css("height",0),this.$container.html("")},enable:function(){this.enabled=!0,this.reset()},disable:function(){this.enabled=!1,this.reset()},getActiveMenu:function(){return this.activeMenu}};g.fn.concreteMenu=function(i){return g.each(g(this),function(t,e){new n(g(this),i)})},t.ConcreteMenu=n,t.ConcreteMenuManager=v}(window,jQuery),String.prototype.score=function(t,e){if(e=e||0,0==t.length)return.9;if(!(t.length>this.length))for(var i=t.length;0<i;i--){var n=t.substring(0,i),o=this.indexOf(n);if(!(o<0)&&!(o+t.length>this.length+e)){var n=this.substring(o+n.length),a=null,a=i>=t.length?"":t.substring(i),a=n.score(a,e+o);if(0<a){var s=this.length-n.length;if(0!=o){var r=0,l=this.charCodeAt(o-1);if(32==l||9==l)for(r=o-2;0<=r;r--)s-=32==(l=this.charCodeAt(r))||9==l?1:.15;else s-=o}return s=(s+=a*n.length)/this.length}}}return 0},!function(t,n){"use strict";t.ConcreteMarketplace={updatesShowMore:function(t){n(t).parent().hide(),n(t).parent().parent().find(".ccm-marketplace-update-changelog").css("max-height","none")},getMoreInformation:function(t){jQuery.fn.dialog.showLoader(),n.concreteAjax({method:"get",url:CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/connect",data:{mpID:t},success:function(t){jQuery.fn.dialog.hideLoader(),t.isConnected?
2window.location.href=t.localURL:window.location.href=CCM_DISPATCHER_FILENAME+"/dashboard/extend/connect"}})},purchaseOrDownload:function(t){var e=t.mpID,i=t.closeTop;t.onComplete||(t.onComplete=function(t,e){jQuery.fn.dialog.closeTop()}),ConcreteEvent.subscribe("MarketplaceRequestComplete",t.onComplete),i&&jQuery.fn.dialog.closeTop(),jQuery.fn.dialog.showLoader(),n.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/connect",{mpID:e},function(t){jQuery.fn.dialog.hideLoader(),t.isConnected?t.purchaseRequired?n.fn.dialog.open({title:ccmi18n.communityCheckout,iframe:!0,href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/marketplace/checkout?mpID="+e,width:"560px",modal:!1,height:"400px"}):n.fn.dialog.open({title:ccmi18n.communityDownload,href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/marketplace/download?mpID="+e,width:500,appendButtons:!0,modal:!1,height:400}):window.location.href=CCM_DISPATCHER_FILENAME+"/dashboard/extend/connect"})}}}(window,jQuery,_),!function(t,s){"use strict";function e(t,e){e=s.extend({result:{},onLoad:!1,onUpdateResults:!1,bulkParameterName:"item"},e=e||{}),this.$element=t,this.$results=t.find("div[data-search-element=results]"),this.$resultsTableBody=this.$results.find("tbody"),this.$resultsTableHead=this.$results.find("thead"),this.$resultsPagination=this.$results.find("div.ccm-search-results-pagination"),this.$menuTemplate=t.find("script[data-template=search-results-menu]"),this.$searchFieldRowTemplate=t.find("script[data-template=search-field-row]"),this.options=e,this._templateSearchForm=_.template(t.find("script[data-template=search-form]").html()),this._templateSearchResultsTableHead=_.template(t.find("script[data-template=search-results-table-head]").html()),this._templateSearchResultsTableBody=_.template(t.find("script[data-template=search-results-table-body]").html()),this._templateSearchResultsPagination=_.template(t.find("script[data-template=search-results-pagination]").html()),this.$menuTemplate.length&&(this._templateSearchResultsMenu=_.template(this.$menuTemplate.html())),this.$searchFieldRowTemplate.length&&(this._templateAdvancedSearchFieldRow=_.template(this.$searchFieldRowTemplate.html())),this.setupSearch(),this.setupCheckboxes(),this.setupBulkActions(),this.setupSort(),this.setupPagination(),this.setupSelect2(),this.setupAdvancedSearch(),this.setupCustomizeColumns(),this.updateResults(e.result),e.onLoad&&e.onLoad(this)}e.prototype.ajaxUpdate=function(t,e,i){var n=this;s.concreteAjax({url:t,data:e,success:function(t){i?i(t):n.updateResults(t)}})},e.prototype.setupSelect2=function(){var t=this.$element.find(".select2-select");t.length&&t.select2()},e.prototype.createMenu=function(t){t.concreteMenu({menu:s("[data-search-menu="+t.attr("data-launch-search-menu")+"]")})},e.prototype.setupMenus=function(t){var i=this;i._templateSearchResultsMenu&&(i.$element.find("[data-search-menu]").remove(),s.each(t.items,function(t,e){i.$results.append(i._templateSearchResultsMenu({item:e}))}),i.$element.find("tbody tr").each(function(){i.createMenu(s(this))}))},e.prototype.setupCustomizeColumns=function(){var a=this;a.$element.on("click","a[data-search-toggle=customize]",function(){var t=s(this).attr("data-search-column-customize-url");return s.fn.dialog.open({width:480,height:400,href:t,modal:!0,title:ccmi18n.customizeSearch,onOpen:function(){var i=s("form[data-dialog-form=search-customize]"),n=i.find("select[data-search-select-default-column]"),o=i.find("ul[data-search-column-list]");s("ul[data-search-column-list]").sortable({cursor:"move",opacity:.5}),i.on("click","input[type=checkbox]",function(){var t=s(this).parent().find("span").html(),e=s(this).attr("id");s(this).prop("checked")?0==i.find("li[data-field-order-column='"+e+"']").length&&(n.append(s("<option>",{value:e,text:t})),n.prop("disabled",!1),o.append('<li data-field-order-column="'+e+'"><input type="hidden" name="column[]" value="'+e+'" />'+t+"</li>")):(o.find("li[data-field-order-column='"+e+"']").remove(),n.find("option[value='"+e+"']").remove(),0==o.find("li").length&&n.prop("disabled",!0))}),ConcreteEvent.unsubscribe("AjaxFormSubmitSuccess.searchCustomize"),ConcreteEvent.subscribe("AjaxFormSubmitSuccess.searchCustomize",function(t,e){"search-customize"===e.form&&a.updateResults(e.response.result)})}}),!1})},e.prototype.updateResults=function(t){var i=this,e=i.options;i.$resultsTableHead.html(i._templateSearchResultsTableHead({columns:t.columns})),i.$resultsTableBody.html(i._templateSearchResultsTableBody({items:t.items})),i.$resultsPagination.html(i._templateSearchResultsPagination({paginationTemplate:t.paginationTemplate})),i.$advancedFields.html(""),s.each(t.fields,function(t,e){i.$advancedFields.append(i._templateAdvancedSearchFieldRow({field:e}))}),i.setupMenus(t),e.onUpdateResults&&e.onUpdateResults(this)},e.prototype.setupAdvancedSearch=function(){var i=this;i.$advancedFields=i.$element.find("div.ccm-search-fields-advanced"),i.$element.on("click","a[data-search-toggle=advanced]",function(){return i.$advancedFields.append(i._templateAdvancedSearchFieldRow()),!1}),i.$element.on("change","select[data-search-field]",function(){var e=s(this).parent().find(".ccm-search-field-content"),t=(e.html(""),s(this).find(":selected").attr("data-search-field-url"));t&&i.ajaxUpdate(t,!1,function(t){_.each(t.assets.css,function(t){ccm_addHeaderItem(t,"CSS")}),_.each(t.assets.javascript,function(t){ccm_addHeaderItem(t,"JAVASCRIPT")}),e.html(t.html)})}),i.$element.on("click","a[data-search-remove=search-field]",function(){return s(this).parent().remove(),!1})},e.prototype.setupSort=function(){var t=this;this.$element.on("click","thead th a",function(){return t.ajaxUpdate(s(this).attr("href")),!1})},e.prototype.refreshResults=function(){this.$element.find("form[data-search-form]").trigger("submit")},e.prototype.setupSearch=function(){var e=this;e.$element.find("[data-search-element=wrapper]").html(e._templateSearchForm()),e.$element.on("submit","form[data-search-form]",function(){var t=s(this).serializeArray();return t.push({name:"submitSearch",value:"1"}),e.ajaxUpdate(s(this).attr("action"),t),!1})}
2,e.prototype.handleSelectedBulkAction=function(t,e,i,n){var o=this,a=[];s.each(n,function(t,e){a.push({name:o.options.bulkParameterName+"[]",value:s(e).val()})}),"dialog"==e&&jQuery.fn.dialog.open({width:i.attr("data-bulk-action-dialog-width"),height:i.attr("data-bulk-action-dialog-height"),modal:!0,href:i.attr("data-bulk-action-url")+"?"+jQuery.param(a),title:i.attr("data-bulk-action-title")}),"ajax"==e&&s.concreteAjax({url:i.attr("data-bulk-action-url"),data:a,success:function(t){t.message&&ConcreteAlert.notify({message:t.message,title:t.title})}}),"progressive"==e&&ccm_triggerProgressiveOperation(i.attr("data-bulk-action-url"),a,i.attr("data-bulk-action-title"),function(){o.refreshResults()}),o.publish("SearchBulkActionSelect",{value:t,option:i,items:n})},e.prototype.publish=function(t,e){ConcreteEvent.publish(t,e,this)},e.prototype.subscribe=function(t,e){ConcreteEvent.subscribe(t,e,this)},e.prototype.setupBulkActions=function(){var n=this;n.$bulkActions=n.$element.find("select[data-bulk-action]"),n.$element.on("change","select[data-bulk-action]",function(){var t=s(this).find("option:selected"),e=t.val(),i=t.attr("data-bulk-action-type");n.handleSelectedBulkAction(e,i,t,n.$element.find("input[data-search-checkbox=indiv
2idual]:checked")),n.$element.find("option").eq(0).prop("selected",!0)})},e.prototype.setupPagination=function(){var t=this;this.$element.on("click","ul.pagination a",function(){return t.ajaxUpdate(s(this).attr("href")),!1})},e.prototype.setupCheckboxes=function(){var t=this;t.$element.on("click","input[data-search-checkbox=select-all]",function(){t.$element.find("input[data-search-checkbox=individual]").prop("checked",s(this).is(":checked")).trigger("change")}),t.$element.on("change","input[data-search-checkbox=individual]",function(){t.$element.find("input[data-search-checkbox=individual]:checked").length?t.$bulkActions.prop("disabled",!1):t.$bulkActions.prop("disabled",!0)})},s.fn.concreteAjaxSearch=function(t){return new e(this,t)},t.ConcreteAjaxSearch=e}(this,$),ccm_triggerProgressiveOperation=function(n,o,e,a,s){jQuery.fn.dialog.showLoader(),$("#ccm-dialog-progress-bar").remove(),$.ajax({url:n,type:"POST",data:o,success:function(t){jQuery.fn.dialog.hideLoader(),$('<div id="ccm-dialog-progress-bar" />').appendTo(document.body).html(t).jqdialog({autoOpen:!1,height:200,width:400,modal:!0,title:e,closeOnEscape:!1,open:function(t,e){$(".ui-dialog-titlebar-close",this.parentNode).hide();var i=$("#ccm-progressive-operation-progress-bar").attr("data-total-items");ccm_doProgressiveOperation(n,o,i,a,s)}}),$("#ccm-dialog-progress-bar").jqdialog("open")}})},ccm_doProgressiveOperation=function(n,o,a,s,r){o.push({name:"process",value:"1"}),o.process=!0,$.ajax({url:n,dataType:"json",type:"POST",data:o,error:function(t,e,i){e="timeout"===e?ccmi18n.requestTimeout:t.responseText,$("#ccm-dialog-progress-bar").dialog("option","height",200),$("#ccm-dialog-progress-bar").dialog("option","closeOnEscape",!0),$("#ccm-progressive-operation-progress-bar").html('<div class="alert alert-error">'+e+"</div>"),$(".ui-dialog-titlebar-close").show()},success:function(t){var e,i;t.error?(e=t.message,$("#ccm-dialog-progress-bar").dialog("option","height",200),$("#ccm-dialog-progress-bar").dialog("option","closeOnEscape",!0),$("#ccm-progressive-operation-progress-bar").html('<div class="alert alert-error">'+e+"</div>"),$(".ui-dialog-titlebar-close").show(),"function"==typeof r&&r(t)):(e=t.totalItems,i=Math.round((a-e)/a*100),$("#ccm-progressive-operation-status").html(1),0<a-e&&$("#ccm-progressive-operation-status").html(a-e),$("#ccm-progressive-operation-progress-bar div.progress-bar").width(i+"%"),0<e?setTimeout(function(){ccm_doProgressiveOperation(n,o,a,s,r)},250):setTimeout(function(){$("#ccm-progressive-operation-progress-bar div.bar").width("0%"),$("#ccm-dialog-progress-bar").dialog("close"),"function"==typeof s&&s(t)},1e3))}})},{tabs:function(t,e){return $(".ccm-styleEditPane").hide(),$("#ccm-styleEditPane-"+e).show(),$(t.parentNode.parentNode).find("li").removeClass("ccm-nav-active"),$(t.parentNode).addClass("ccm-nav-active"),!1},resetAll:function(){return!!confirm(ccmi18n.confirmCssReset)&&(jQuery.fn.dialog.showLoader(),$("#ccm-reset-style").val(1),$("#ccmCustomCssForm").get(0).submit(),!0)},showPresetDeleteIcon:function(){0<$("select[name=cspID]").val()?$("#ccm-style-delete-preset").show():$("#ccm-style-delete-preset").hide()},deletePreset:function(){var t=$("select[name=cspID]").val();if(0<t){if(!confirm(ccmi18n.confirmCssPresetDelete))return!1;t=$("#ccm-custom-style-refresh-action").val()+"&deleteCspID="+t+"&subtask=delete_custom_style_preset";jQuery.fn.dialog.showLoader(),$.get(t,function(t){$("#ccm-custom-style-wrapper").html(t),jQuery.fn.dialog.hideLoader()})}},initForm:function(){0<$("#cspFooterPreset").length&&$("#ccmCustomCssFormTabs input, #ccmCustomCssFormTabs select, #ccmCustomCssFormTabs textarea").bind("change click",function(){$("#cspFooterPreset").show(),$("#cspFooterNoPreset").remove(),$("#ccmCustomCssFormTabs input, #ccmCustomCssFormTabs select").unbind("change click")}),$("input[name=cspPresetAction]").click(function(){"create_new_preset"==$(this).val()&&$(this).prop("checked")?$("input[name=cspName]").attr("disabled",!1).focus():$("input[name=cspName]").val("").attr("disabled",!0)}),ccmCustomStyle.showPresetDeleteIcon(),ccmCustomStyle.lastPresetID=parseInt($("select[name=cspID]").val()),$("select[name=cspID]").change(function(){var t=parseInt($(this).val()),e=parseInt($("input[name=selectedCsrID]").val());if(ccmCustomStyle.lastPresetID==t)return!1;ccmCustomStyle.lastPresetID=t,jQuery.fn.dialog.showLoader(),t=0<t?$("#ccm-custom-style-refresh-action").val()+"&cspID="+t:$("#ccm-custom-style-refresh-action").val()+"&csrID="+e,$.get(t,function(t){$("#ccm-custom-style-wrapper").html(t),jQuery.fn.dialog.hideLoader()})}),$("#ccmCustomCssForm").submit(function(){return 1==$("input[name=cspCreateNew]").prop("checked")&&""==$("input[name=cspName]").val()?($("input[name=cspName]").focus(),alert(ccmi18n.errorCustomStylePresetNoName),!1):(jQuery.fn.dialog.showLoader(),!0)}),parseInt(ccmCustomStyle.lastPresetID)||setTimeout('$("#ccmCustomCssFormTabs input").attr("disabled", false).get(0).focus()',500)},validIdCheck:function(t,e){t=$("#"+t.value);t&&t.get(0)&&t.get(0).id!=e?$("#ccm-styles-invalid-id").css("display","block"):$("#ccm-styles-invalid-id").css("display","none")}}),ConcreteToolbar=(ccm_activateTabBar=function(e){$("#ccm-tab-content-"+e.find("li[class=active] a").attr("data-tab")).show(),e.find("a").unbind().click(function(){e.find("li").removeClass("active"),$(this).parent().addClass("active"),e.find("a").each(function(){$("#ccm-tab-content-"+$(this).attr("data-tab")).hide()});var t=$(this).attr("data-tab");return $("#ccm-tab-content-"+t).show(),!1})},function(){var e,n,t=$("#ccm-toolbar"),o=$("#ccm-nav-intelligent-search"),a=$("#ccm-intelligent-search-results");return o.length&&a.css("right",$(window).width()-o.offset().left-a.width()-1),setupHelpNotifications=function(){$(".ccm-notification .dialog-launch").dialog(),$("a[data-help-notification-toggle]").concreteHelpLauncher(),$("a[data-help-launch-dialog=main]").on("click",function(t){t.preventDefault(),(new ConcreteHelpDialog).open()});var t=ConcreteHelpGuideManager.get();t.getGuideToLaunchOnRefresh()&&ConcreteHelpGuideManager.getGuide(t.getGuideToLaunchOnRefresh()).start()},setupPageAlerts=function(){$(document.body).on("click","a[data-dismiss-alert=page-alert]",function(t){return t.stopPropagation(),$(this).closest(".ccm-notification").queue(function(){$(this).addClass("animated fadeOut"),$(this).dequeue()}).delay(500).queue(function(){$(this).remove(),$(this).dequeue()}),!1});var t=$("#ccm-notification-page-alert-workflow form");t.ajaxForm({dataType:"json",beforeSubmit:function(){jQuery.fn.dialog.showLoader(),t.find("a.btn").addClass("disabled").attr("tabindex","-1"),t.find("button.btn").prop("disabled",!0)},complete:function(){t.find("a.btn").removeClass("disabled").removeAttr("tabindex"),t.find("button.btn").prop("disabled",!1)},success:function(t){t.redirect&&(HiveOverlayManager.createOverlay().show(),window.location.href=t.redirect)}}),$("#ccm-notification-page").show().attr("aria-hidden",!1),$(".ccm-notification-inner-buttons .btn").on("click",function(t){var e=$
2(this);e.addClass("disabled is-loading").attr("tabindex","-1"),e.closest(".ccm-notification").find(".btn").not(e).addClass("disabled").attr("tabindex","-1")})},setupTooltips=function(){0==$("#ccm-tooltip-holder").length&&$("<div />").attr("id","ccm-tooltip-holder").attr("class","ccm-ui").prependTo(document.body),$(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"})},setupPanels=function(){$("<div />",{id:"ccm-panel-overlay"}).appendTo($(document.body)),$("[data-launch-panel] > i").each(function(){$(this).prepend('<span class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></span>')}),$("[data-launch-panel]").off().on("click",function(){var t,e=$(this),i=e.attr("data-launch-panel"),i=ConcretePanelManager.getByIdentifier(i);return i.willBePinned()||e.toggleClass("ccm-launch-panel-loading"),i.isPinable()&&(t=$(e.parent()),(i.willBePinned()||i.pinned())&&t.toggleClass("ccm-toolbar-page-edit-mode-pinned "),i.willBePinned()?(e.attr("data-original-icon-class",e.find("i").attr("class")),e.find("i").removeClass().addClass("fa fa-lock")):e.attr("data-original-icon-class")&&(e.find("i").removeClass().addClass(e.attr("data-original-icon-class")),e.removeAttr("data-original-icon-class"))),i.toggle(),Event.prototype.initEvent?((t=window.document.createEvent("UIEvents")).initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)):window.dispatchEvent(new Event("resize")),!1}).on("keypress",function(t){32==t.which&&$(this).trigger("click")}),$("html").addClass("ccm-panel-ready"),ConcreteEvent.subscribe("PanelOpen",function(t,e){e=e.panel;"page"==e.options.identifier&&$("#"+e.getDOMID()).find("[data-launch-panel-detail='page-composer']").trigger("click"),$("a[data-toolbar-action=check-in]").on("click.close-check-in",function(){return ConcretePanelManager.exitPanelMode(),!1})}),ConcreteEvent.subscribe("PanelClose",function(t){$("a[data-toolbar-action=check-in]").off("click.close-check-in")})},setupIntelligentSearch=function(){o.on("keydown.ccm-intelligent-search",function(i){var t,n,o;13!=i.keyCode&&40!=i.keyCode&&38!=i.keyCode||(i.preventDefault(),i.stopPropagation(),13==i.keyCode&&0<$("a.ccm-intelligent-search-result-selected").length&&((t=$("a.ccm-intelligent-search-result-selected").attr("href"))&&"#"!=t&&"javascript:void(0)"!=t?window.location.href=t:$("a.ccm-intelligent-search-result-selected").trigger("click")),n=$("#ccm-intelligent-search-results li:visible"),40!=i.keyCode&&38!=i.keyCode)||($.each(n,function(t,e){$(e).children("a").hasClass("ccm-intelligent-search-result-selected")&&(io=38==i.keyCode?n[t-1]:n[t+1],o=$(io).find("a"))}),o&&0<o.length&&($("a.ccm-intelligent-search-result-selected").removeClass(),$(o).addClass("ccm-intelligent-search-result-selected")))}),o.liveUpdate("ccm-intelligent-search-results","intelligent-search"),o.on("keyup.ccm-intelligent-search",function(t){doRemoteSearchCall($(this).val())}),o.on("click",function(t){""==this.value&&a.hide()})},setupMobileNav=function(){$(".ccm-toolbar-mobile-menu-button").on("click",function(){$(this).toggleClass("ccm-mobile-close"),$(".ccm-mobile-menu-overlay").slideToggle()}),$(".ccm-mobile-menu-overlay .parent-ul > a").on("click",function(t){$(this).parent("li").hasClass("last-li")||($(this).parent("li").siblings().children("ul").hide(),$(this).parent("li").children("ul").is(":visible"))||($(this).next("ul").show(),t.preventDefault())})},activateIntelligentSearchResults=function(){0==$("#ccm-intelligent-search-results div:visible").length&&$("#ccm-intelligent-search-results").hide(),$("#ccm-intelligent-search-results a").hover(function(){$("a.ccm-intelligent-search-result-selected").removeClass(),$(this).addClass("ccm-intelligent-search-result-selected")},function(){$(this).removeClass("ccm-intelligent-search-result-selected")})},doRemoteSearchCall=function(t){(t=t.trim())&&2<t.length&&t!=e&&(n&&window.clearTimeout(n),e=t,n=window.setTimeout(function(){n=null,$("#ccm-intelligent-search-results-list-marketplace").parent().show(),$("#ccm-intelligent-search-results-list-help").parent().show(),$("#ccm-intelligent-search-results-list-your-site").parent().show(),$("#ccm-intelligent-search-results-list-marketplace").parent().removeClass("ccm-intelligent-search-results-module-loaded"),$("#ccm-intelligent-search-results-list-help").parent().removeClass("ccm-intelligent-search-results-module-loaded"),$("#ccm-intelligent-search-results-list-your-site").parent().removeClass("ccm-intelligent-search-results-module-loaded"),$.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/search",{q:e},function(t){for($("#ccm-intelligent-search-results-list-marketplace").parent().addClass("ccm-intelligent-search-results-module-loaded"),$("#ccm-intelligent-search-results-list-marketplace").html(""),i=0;i<t.length;i++){var e=t[i],n="ConcreteMarketplace.getMoreInformation("+e.mpID+")";$("#ccm-intelligent-search-results-list-marketplace").append('<li><a href="javascript:void(0)" onclick="'+n+'"><img src="'+e.img+'" />'+e.name+"</a></li>")}0==t.length&&$("#ccm-intelligent-search-results-list-marketplace").parent().hide(),0==$(".ccm-intelligent-search-result-selected").length&&($("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),$("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),activateIntelligentSearchResults()}).error(function(){$("#ccm-intelligent-search-results-list-marketplace").parent().hide()}),$.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/backend/get_remote_help",{q:e},function(t){for($("#ccm-intelligent-search-results-list-help").parent().addClass("ccm-intelligent-search-results-module-loaded"),$("#ccm-intelligent-search-results-list-help").html(""),i=0;i<t.length;i++){var e=t[i];$("#ccm-intelligent-search-results-list-help").append('<li><a href="'+e.href+'">'+e.name+"</a></li>")}0==t.length&&$("#ccm-intelligent-search-results-list-help").parent().hide(),0==$(".ccm-intelligent-search-result-selected").length&&($("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),$("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),activateIntelligentSearchResults()}).error(function(){$("#ccm-intelligent-search-results-list-help").parent().hide()}),$.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/backend/intelligent_search",{q:e},function(t){for($("#ccm-intelligent-search-results-list-your-site").parent().addClass("ccm-intelligent-search-results-module-loaded"),$("#ccm-intelligent-search-results-list-your-site").html(""),i=0;i<t.length;i++){var e=t[i];$("#ccm-intelligent-search-results-list-your-site").append('<li><a href="'+e.href+'">'+e.name+"</a></li>")}0==t.length&&$("#ccm-intelligent-search-results-list-your-site").parent().hide(),0==$(".ccm-intelligent-search-result-selected").length&&($("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),$("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),activateIntelligentSearchResults()}).error(function(){$("#ccm-intelligent-search-results-list-your-site").parent().hide()})},500))},{start:function(){0<t.length&&(t.find(".dialog-launch").dialog(),setupIntelligentSearch(),setupPanels(),setupTooltips(),setupPageAlerts(),setupHelpNotifications(),setupMobileNav())},disable:function(){$("#ccm-toolbar-disabled").remove(),$("<div />",{id:"ccm-toolbar-disabled"}).appendTo(document.body),setTimeout(function(){$("#ccm-toolbar-disabled").css("opacity",1)},10)},enable:function(){$("#ccm-toolbar-disabled").remove()},disableDirectExit:function(){var t=$("li.ccm-toolbar-page-edit a");"check-in"!=t.attr("data-launch-panel")&&"check-in"!=t.attr("data-disable-panel")&&(t.attr("title",ccmi18n.saveChanges).find("span").text(ccmi18n.save),t.attr("data-launch-panel","check-in").on("click",function(){return $(this).toggleClass("ccm-launch-panel-active"),ConcretePanelManager.getByIdentifier("check-in").toggle(),!1}),t.attr("role","button").on("keypress",function(t){32==t.which&&$(this).trigger("click")}))}}}()),hiveBootstrapWhitelist;function HiveOverlay(t){"use strict";var e=["blue","grey"],i=(this.options=$.extend({identifier:null,loader:!0,loaderColour:e[0],text:"",translucent:!0,parent:"body"},t),null!==this.options.identifier?this.options.identifier:"hive-overlay-"+Math.random().toString(36).substr(2,5));if(-1===e.indexOf(this.options.loaderColour))throw new Error("Invalid loader color, select one of: "+e.join(", "));if("body"!==this.options.parent&&"relative"!==$(this.options.parent).css("position"))throw new Error("Parent element must have
2CSS position relative");if(1<$(this.options.parent).length)throw new Error("Parent selector must return only one element");this.getIdentifier=function(){return i},this.getElement=function(){var t=$(this.getElementSelector());return t=0===t.length?this.createElement():t},this.getElementSelector=function(){return this.options.parent+" > .hive-overlay"},this.createElement=function(){var t=$('<div class="hive-overlay" data-overlay-id="'+i+'"><div class="hive-overlay-content-container"><div class="hive-overlay-content"><div class="hive-overlay-text"></div><span class="hive-overlay-loader blue"></span></div></div></div>');return t.appendTo(this.options.parent),t},this.show=function(){var t=this;this.getElement().clearQueue().show(0).delay(100).queue(function(){t.options.loader&&$(this).find(".hive-overlay-loader").addClass("loading"),""!==t.options.text&&$(this).find(".hive-overlay-text").html(t.options.text),t.options.translucent?$(this).addClass("hive-overlay-translucent"):$(this).removeClass("hive-overlay-translucent"),$(this).dequeue()})},this.hide=function(){var t=this.getElement();this.options.loader&&t.find(".hive-overlay-loader").removeClass("loading"),t.find(".hive-overlay-text").empty(),t.queue(function(){$(this).removeClass("hive-overlay-translucent"),$(this).dequeue()}).delay(1e3).hide(0)},this.isVisible=function(){return 0!==$(this.getElementSelector()).is(":visible").length}}!function(){function t(t,e){for(var i in e)o.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}function e(t,e){return function(){return t.apply(e,arguments)}}var a,i,o={}.hasOwnProperty;function n(){return n.__super__.constructor.apply(this,arguments)}function s(t){this.options=null!=t?t:{},this.onClickNext=e(this.onClickNext,this),this.onClickClose=e(this.onClickClose,this),this.el=$("<div/>"),this.initialize(t),this._bindClickEvents(),Tourist.Tip.Base._cacheTip(this)}function r(){return r.__super__.constructor.apply(this,arguments)}function l(t){this.options=_.extend({offset:10,tipOffset:10},t),this.el=$($.parseHTML(this.template)),this.hide()}function c(){return this._renderTipBackground=e(this._renderTipBackground,this),c.__super__.constructor.apply(this,arguments)}function d(){return d.__super__.constructor.apply(this,arguments)}function p(t){this.options=null!=t?t:{},this.onChangeCurrentStep=e(this.onChangeCurrentStep,this),this.next=e(this.next,this),this.options=_.extend({tipClass:"Bootstrap"},this.options),this.model=new Tourist.Model({current_step:null}),t=_.extend({model:this.model},this.options.tipOptions),this.view=new Tourist.Tip[this.options.tipClass](t),this.view.bind("click:close",_.bind(this.stop,this,!0)),this.view.bind("click:next",this.next),this.model.bind("change:current_step",this.onChangeCurrentStep)}window.Tourist=window.Tourist||{},Tourist.Model=(i=Backbone.Model,t(n,i),n.prototype._module="Tourist",n),window.Tourist.Tip=window.Tourist.Tip||{},Tourist.Tip.Base=(s.prototype._module="Tourist",_.extend(s.prototype,Backbone.Events),s.prototype.skipButtonTemplate=ccmi18n_tourist.skipButton,s.prototype.nextButtonTemplate=ccmi18n_tourist.nextButton,s.prototype.finalButtonTemplate=ccmi18n_tourist.finalButton,s.prototype.closeButtonTemplate=ccmi18n_tourist.closeButton,s.prototype.okButtonTemplate=ccmi18n_tourist.okButton,s.prototype.actionLabelTemplate=_.template('<h4 class="action-label"><%= label %></h4>'),s.prototype.actionLabels=[ccmi18n_tourist.doThis,ccmi18n_tourist.thenThis,ccmi18n_tourist.nextThis],s.prototype.highlightClass="tour-highlight",s.prototype.template=_.template('<div>\n <div class="tour-container">\n <%= close_button %>\n <%= content %>\n <p class="tour-counter <%= counter_class %>"><%= counter%></p>\n </div>\n <div class="tour-buttons">\n <%= buttons %>\n </div>\n</div>'),s.prototype.destroy=function(){return this.el.remove()},s.prototype.render=function(t){return this.hide(),t&&(this._setTarget(t.target||!1,t),this._setZIndex(""),this._renderContent(t,this._buildContentElement(t)),t.target&&this.show(),t.zIndex)&&this._setZIndex(t.zIndex,t),this},s.prototype.show=function(){},s.prototype.hide=function(){},s.prototype.setTarget=function(t,e){return this._setTarget(t,e)},s.prototype.cleanupCurrentTarget=function(){return this.target&&this.target.removeClass&&this.target.removeClass(this.highlightClass),this.target=null}
2,s.prototype.onClickClose=function(t){return this.trigger("click:close",this,t),!1},s.prototype.onClickNext=function(t){return this.trigger("click:next",this,t),!1},s.prototype._getTipElement=function(){},s.prototype._renderContent=function(t,e){},s.prototype._bindClickEvents=function(){var t=this._getTipElement();return t.on(".tour-close","click",this.onClickClose),t.on(".tour-next","click",this.onClickNext)},s.prototype._setTarget=function(t,e){return this.cleanupCurrentTarget(),t&&e&&e.highlightTarget&&t.addClass(this.highlightClass),this.target=t},s.prototype._setZIndex=function(t){return this._getTipElement().css("z-index",t||"")},s.prototype._buildContentElement=function(t){var e=this._buildButtons(t),t=$($.parseHTML(this.template({content:t.content,buttons:e,close_button:this._buildCloseButton(t),counter:t.final?"":ccmi18n_tourist.stepXofY.replace(/%1\$d/g,t.index+1).replace(/%2\$d/g,t.total),counter_class:t.final?"final":""})));return e||t.find(".tour-buttons").addClass("no-buttons"),this._renderActionLabels(t),t},s.prototype._buildButtons=function(t){var e="";return t.okButton&&(e+=this.okButtonTemplate),t.skipButton&&(e+=this.skipButtonTemplate),t.nextButton&&(e+=t.final?this.finalButtonTemplate:this.nextButtonTemplate),e},s.prototype._buildCloseButton=function(t){return t.closeButton?this.closeButtonTemplate:""},s.prototype._renderActionLabels=function(t){for(var e,i=t.find(".action"),n=0,o=[],a=0,s=i.length;a<s;a++)e=i[a],$($.parseHTML(this.actionLabelTemplate({label:this.actionLabels[n]}))).insertBefore(e),o.push(n++);return o},s._cacheTip=function(t){return Tourist.Tip.Base._cachedTips||(Tourist.Tip.Base._cachedTips=[]),Tourist.Tip.Base._cachedTips.push(t)},s.destroy=function(){var t,e,i;if(Tourist.Tip.Base._cachedTips){for(t=0,e=(i=Tourist.Tip.Base._cachedTips).length;t<e;t++)i[t].destroy();return Tourist.Tip.Base._cachedTips=null}},s),Tourist.Tip.Bootstrap=(i=Tourist.Tip.Base,t(r,i),r.prototype.initialize=function(t){return this.options=_.extend({showEffect:null,hideEffect:null},t),this.tip=new Tourist.Tip.BootstrapTip(this.options)},r.prototype.destroy=function(){return this.tip.destroy(),r.__super__.destroy.call(this)},r.prototype.show=function(){return this.options.showEffect?Tourist.Tip.Bootstrap.effects[this.options.showEffect].call(this,this.tip,this.tip.el):this.tip.show()},r.prototype.hide=function(){return this.options.hideEffect?Tourist.Tip.Bootstrap.effects[this.options.hideEffect].call(this,this.tip,this.tip.el):this.tip.hide()},r.prototype._getTipElement=function(){return this.tip.el},r.prototype._setTarget=function(t,e){return r.__super__._setTarget.call(this,t,e),this.tip.setTarget(t)},r.prototype._renderContent=function(t,e){var i=t.my||"left center",n=t.at||"right center";return this.tip.setContainer(t.container||$("#ccm-tooltip-holder")),this.tip.setContent(e),this.tip.setPosition(t.target||!1,i,n)},r),Tourist.Tip.Bootstrap.effects={slidein:function(t,e){var i,n,o,a,s,r,l={top:80,left:80,right:-80,bottom:-80},t=t.my.split(" ")[0],l=l[t=t||"top"];for("right"===(t="bottom"===t?"top":t)&&(t="left"),a=parseInt(e.css(t)),e.stop(),(i={})[t]=a+l,e.css(i),e.show(),i[t]=a,s=0,r=(o=["easeOutCubic","swing","linear"]).length;s<r&&(n=o[s],!$.easing[n]);s++);return e.animate(i,300,n),null}},Tourist.Tip.BootstrapTip=(l.prototype.template='<div class="popover tourist-popover">\n <div class="arrow"></div>\n <div class="popover-content"></div>\n</div>',l.prototype.FLIP_POSITION={bottom:"top",top:"bottom",left:"right",right:"left"},l.prototype.destroy=function(){return this.el.remove()},l.prototype.show=function(){return this.el.show().addClass("visible")},l.prototype.hide=function(){return this.el.hide().removeClass("visible")},l.prototype.setTarget=function(t){return this.target=t,this._setPosition(this.target,this.my,this.at)},l.prototype.setPosition=function(t,e,i){return this.target=t,this.my=e,this.at=i,this._setPosition(this.target,this.my,this.at)},l.prototype.setContainer=function(t){return t.append(this.el)},l.prototype.setContent=function(t){return this._getContentElement().html(t)},l.prototype._getContentElement=function(){return this.el.find(".popover-content")},l.prototype._getTipElement=function(){return this.el.find(".arrow")}
2,l.prototype._setPosition=function(t,e,i){var n,o,a,s,r;if(null==e&&(e="left center"),null==i&&(i="right center"),t&&(a=(r=e.split(" "))[0],r=r[1],o=this.el.css("display"),this.el.css({top:0,left:0,margin:0,display:"block"}).removeClass("top").removeClass("bottom").removeClass("left").removeClass("right").addClass(this.FLIP_POSITION[a]),t))return a=this._getTipElement().css({left:"",right:"",top:"",bottom:""}),"center"!==r&&(s={left:a[0].offsetWidth/2,right:0,top:a[0].offsetHeight/2,bottom:0},(n={})[r]=s[r]+this.options.tipOffset,n[this.FLIP_POSITION[r]]="auto",a.css(n)),s=this._caculateTargetPosition(i,t),r=this._caculateTipPosition(e,s),a=this._adjustForArrow(e,r),this.el.css(a),this.el.css({display:o})},l.prototype._caculateTargetPosition=function(t,e){return"[object Array]"===Object.prototype.toString.call(e)?{left:e[0],top:e[1]}:(e=this._getTargetBounds(e),t=this._lookupPosition(t,e.width,e.height),{left:e.left+t[0],top:e.top+t[1]})},l.prototype._caculateTipPosition=function(t,e){var i=this.el[0].offsetWidth,n=this.el[0].offsetHeight,t=this._lookupPosition(t,i,n);return{left:e.left-t[0],top:e.top-t[1]}},l.prototype._adjustForArrow=function(t,e){var t=t.split(" "),i=t[0],t=t[1],n=this._getTipElement(),o=n[0].offsetWidth,a=n[0].offsetHeight,s={top:e.top,left:e.left};switch(i){case"top":s.top+=a+this.options.offset;break;case"bottom":s.top-=a+this.options.offset;break;case"left":s.left+=o+this.options.offset;break;case"right":s.left-=o+this.options.offset}switch(t){case"left":s.left-=o/2+this.options.tipOffset;break;case"right":s.left+=o/2+this.options.tipOffset;break;case"top":s.top-=a/2+this.options.tipOffset;break;case"bottom":s.top+=a/2+this.options.tipOffset}return s},l.prototype._lookupPosition=function(t,e,i){var n=e/2,o=i/2;return{"top left":[0,0],"left top":[0,0],"top right":[e,0],"right top":[e,0],"bottom left":[0,i],"left bottom":[0,i],"bottom right":[e,i],"right bottom":[e,i],"top center":[n,0],"left center":[0,o],"right center":[e,o],"bottom center"
2:[n,i]}[t]},l.prototype._getTargetBounds=function(t){var e=t[0],e="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight};return $.extend({},e,t.offset())},l),Tourist.Tip.QTip=(i=Tourist.Tip.Base,t(c,i),c.prototype.QTIP_DEFAULTS={content:{text:" "},show:{ready:!(a={top:80,left:80,right:-80,bottom:-80}),delay:0,effect:function(t){var e,i,n,o=$(this),t=t.options.position.my;return t=t&&t[t.precedance],i=a[t=t||"top"],"right"===(t="bottom"===t?"top":t)&&(t="left"),n=parseInt(o.css(t)),(e={})[t]=n+i,o.css(e),o.show(),e[t]=n,o.animate(e,300,"easeOutCubic"),null},autofocus:!10},hide:{event:null,delay:0,effect:!14},position:{adjust:{method:"shift shift",scroll:!6}},style:{classes:"ui-tour-tip",tip:{height:6,width:14}},events:{},zindex:2e3},c.prototype.initialize=function(t){return t=$.extend(!0,{},this.QTIP_DEFAULTS,t),this.el.qtip(t),this.qtip=this.el.qtip("api"),this.qtip.render()},c.prototype.destroy=function(){return this.qtip&&this.qtip.destroy(),c.__super__.destroy.call(this)},c.prototype.show=function(){return this.qtip.show()},c.prototype.hide=function(){return this.qtip.hide()},c.prototype._getTipElement=function(){return $("#qtip-"+this.qtip.id)},c.prototype._setTarget=function(t,e){return c.__super__._setTarget.call(this,t,e),this.qtip.set("position.target",t||!1)},c.prototype._renderContent=function(t,e){var i=this,n=t.my||"left center",o=t.at||"right center";return this._adjustPlacement(n,o),this.qtip.set("content.text",e),this.qtip.set("position.container",t.container||$("body")),this.qtip.set("position.my",n),this.qtip.set("position.at",o),this.qtip.set("position.viewport",t.viewport||!1),this.qtip.set("position.target",t.target||!1),setTimeout(function(){return i._renderTipBackground(n.split(" ")[0])},10)},c.prototype._adjustPlacement=function(t,e){return 0===t.indexOf("top")?this._adjust(0,10):0===t.indexOf("bottom")?this._adjust(0,-10):0===t.indexOf("right")?this._adjust(-10,0):this._adjust(10,0)},c.prototype._adjust=function(t,e){return this.qtip.set("position.adjust.x",t),this.qtip.set("position.adjust.y",e)},c.prototype._renderTipBackground=function(t){var e=$("#qtip-"+this.qtip.id+" .qtip-tip"),i=e.find(".qtip-tip-bg");return i.length||(i=$("<div/>",{class:"icon icon-tip qtip-tip-bg"}),e.append(i)),i.removeClass("top left right bottom"),i.addClass(t)},c),Tourist.Tip.Simple=(i=Tourist.Tip.Base,t(d,i),d.prototype.initialize=function(t){return $("body").append(this.el)},d.prototype.show=function(){return this.el.show()},d.prototype.hide=function(){return this.el.hide()},d.prototype._getTipElement=function(){return this.el},d.prototype._renderContent=function(t,e){return this.el.html(e)},d),Tourist.Tour=(_.extend(p.prototype,Backbone.Events),p.prototype.start=function(){return this.trigger("start",this),this.next()},p.prototype.stop=function(t){return t?this._showCancelFinalStep():this._stop()},p.prototype.showStep=function(t){var e;return(e=this._teardownCurrentStep()?t:e)<this.options.steps.length&&!isNaN(parseInt(e,10))&&0<=e?this._showStep(this.options.steps[e],e):e===this.options.steps.length?this._showSuccessFinalStep():this._stop()},p.prototype.next=function(){var t=this._teardownCurrentStep(),e=0;return(e=t?t.index+1:e)<this.options.steps.length?this._showStep(this.options.steps[e],e):e===this.options.steps.length?this._showSuccessFinalStep():this._stop()},p.prototype.setStepOptions=function(t){return this.options.stepOptions=t},p.prototype.onChangeCurrentStep=function(t,e){return this.view.render(e)},p.prototype._showCancelFinalStep=function(){return this._showFinalStep(!1)},p.prototype._showSuccessFinalStep=function(){return this._showFinalStep(!0)},p.prototype._teardownCurrentStep=function(){var t=this.model.get("current_step");return this._teardownStep(t),t},p.prototype._stop=function(){return this._teardownCurrentStep(),this.model.set({current_step:null}),this.trigger("stop",this)},p.prototype._showFinalStep=function(t){var e=this._teardownCurrentStep(),t=t?this.options.successStep:this.options.cancelStep;return _.isFunction(t)&&(t.call(this,this,this.options.stepOptions),t=null),!t||e&&e.final?this._stop():(t.final=!0,this._showStep(t,this.options.steps.length))},p.prototype._showStep=function(t,e){if(t)return(t=_.clone(t)).index=e,t.total=this.options.steps.length,t.final||(t.final=this.options.steps.length===e+1&&!this.options.successStep),t=_.extend(t,this._setupStep(t)),this.model.set({current_step:t})},p.prototype._setupStep=function(t){var e,i,n,o;if(!t||!t.setup)return{};if(t.bind)for(i=0,n=(o=t.bind).length;i<n;i++)t[e=o[i]]=_.bind(t[e],t,this,this.options.stepOptions);return t.setup.call(t,this,this.options.stepOptions)||{}},p.prototype._teardownStep=function(t){return t&&t.teardown&&t.teardown.call(t,this,this.options.stepOptions),this.view.cleanupCurrentTarget()},p)}.call(this),!function(t,e){"use strict";function i(t){t=e.extend({width:800,height:400,title:"Help",dialogClass:"ccm-dialog-slim ccm-dialog-help-wrapper"},t=t||{}),this.options=t}i.prototype={open:function(){e("#ccm-dialog-help").length?this.options.element="#ccm-dialog-help":this.options.href=CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/help/introduction",e.fn.dialog.open(this.options)}},t.ConcreteHelpDialog=i}(this,$),!function(t,o){"use strict";function a(t,e){var i=this,n=(e=o.extend({},e=e||{}),i.$element=t,i.options=e,i.options.element||o("div[data-help-notification='"+i.$element.attr("data-help-notification-toggle")+"']"));n.find("a[data-launch-guide]").on("click.concreteHelp",function(t){t.preventDefault(),ConcreteHelpGuideManager.getGuide(o(this).attr("data-launch-guide")).start()}),i.$element.on("click",function(t){t.preventDefault(),o(this).addClass("animated fadeOut"),n.addClass("animated fadeIn").show(),n.on("click","a[data-dismiss=help-single]",function(t){t.preventDefault(),a.close(n)})})}a.close=function(t){if(!(t=t||o("div[data-help-notification]"))||!t.is(":visible"))return!1;var e=o("[data-help-notification-toggle='"+t.attr("data-help-notification")+"']");t.addClass("animated fadeOut"),e.removeClass("fadeOut").addClass("fadeIn"),t.clearQueue().delay(250).queue(function(){o(this).hide(),o(this).removeClass("animated fadeOut"),o(this).dequeue()})},o.fn.concreteHelpLauncher=function(i){return o.each(o(this),function(t,e){new a(o(this),i)})},t.ConcreteHelpLauncher=a}(this,$,_),!function(t,e){"use strict";var i={guides:{},register:function(t,e){this.guides[t]=e},getGuide:function(t){return this.guides[t]},enterToolbarGuideMode:function(){ConcreteHelpLauncher.close(),e(".ccm-dialog-help-wrapper").hide(),this.showOverlay()},showOverlay:function(){e(".ui-widget-overlay").length<1&&e('<div class="ui-widget-overlay"></div>').hide().appendTo("body"),e(".ui-widget-overlay").addClass("animated fadeIn").show(),e("#ccm-toolbar").addClass("ccm-toolbar-tour-guide")},hideOverlay:function(){e(".ui-widget-overlay").addClass("animated fadeOut"),e(".ui-widget-overlay").delay(250).queue(function(){e(this).remove(),e(this).dequeue()}),e("#ccm-toolbar").removeClass("ccm-toolbar-tour-guide")},exitToolbarGuideMode:function(){this.hideOverlay(),e(".ccm-dialog-help-wrapper").length&&e(".ccm-dialog-help-wrapper").show()},launchGuideOnRefresh:function(t){Cookies.set("ConcreteHelpActiveGuide",t,{path:CCM_REL+"/"})},clearGuideToLaunchOnRefresh:function(t){Cookies.remove("ConcreteHelpActiveGuide",{path:CCM_REL+"/"})},getGuideToLaunchOnRefresh:function(){return Cookies.get("ConcreteHelpActiveGuide")},get:function(){return i}};t.ConcreteHelpGuideManager=i}(this,$),!function(t){"use strict";var e=ccmi18n_helpGuides.toolbar,e=[{content:'<p><span class="h5">'+e[0].title+"</span><br/>"+e[0].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=edit-page]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+e[1].title+"</span><br/>"+e[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=page-settings]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+e[2].title+"</span><br/>"+e[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=add-content]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+e[3].title+"</span><br/>"+e[3].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=intelligent-search]"),my:"top center",at:"bottom center"},{content:'<p><span class="h5">'+e[4].title+"</span><br/>"+e[4].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=sitemap]"),my:"top right",at:"bottom center"},{content:'<p><span class="h5">'+e[5].title+"</span><br/>"+e[5].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:t("[data-guide-toolbar-action=dashboard]"),my:"top right",at:"bottom center"}],t=new Tourist.Tour({steps:e,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),t.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode()}),ConcreteHelpGuideManager.register("toolbar",t)}((window,jQuery)),!function(t){"use strict";var e=ccmi18n_helpGuides["change-content"],e=[{content:'<p><span class="h5">'+e[0].title+"</span><br/>"+e[0].text+"</p>",highlightTarget:!1,closeButton:!0,nextButton:!1,target:t("[data-guide-toolbar-action=edit-page]"),my:"top left",at:"bottom center"}],t=new Tourist.Tour({steps:e,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode(),ConcreteHelpGuideManager.launchGuideOnRefresh("change-content-edit-mode")}),t.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode()}),ConcreteHelpGuideManager.register("change-content",t)}((window,jQuery)),!function(i){"use strict";var t=ccmi18n_helpGuides["change-content-edit-mode"],e=i("div.ccm-area:not(.ccm-global-area)").eq(0).find(".ccm-block-edit").eq(0),e=[{content:'<p><span class="h5">'+t[0].title+"</span><br/>"+t[0].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:i("[data-guide-toolbar-action=check-in]"),my:"top left",at:"bottom center",setup:function(t,e){ConcreteHelpGuideManager.clearGuideToLaunchOnRefresh()}},{content:'<p><span class="h5">'+t[1].title+"</span><br/>"+t[1].text+"</p>",highlightTarget:!1,nextButton:!1,closeButton:!0,target:e,my:"top left",at:"bottom center",setup:function(i,t){ConcreteEvent.subscribe("ConcreteMenuShow.changeContentEditModeTour",function(t,e){i.next()})},teardown:function(t,e){ConcreteEvent.unsubscribe("ConcreteMenuShow.changeContentEditModeTour")}},{content:'<p><span class="h5">'+t[2].title+"</span><br/>"+t[2].text+"</p>",closeButton:!0,highlightTarget:!1,nextButton:!0,setup:function(t,e){return{target:i("div#ccm-popover-menu
2-container div.ccm-edit-mode-block-menu").eq(0)}},teardown:function(){var t=ConcreteMenuManager.getActiveMenu();t&&t.hide()},my:"left center",at:"right center"},{content:'<p><span class="h5">'+t[3].title+"</span><br/>"+t[3].text+"</p>",highlightTarget:!0,nextButton:!0,target:i("[data-guide-toolbar-action=check-in]"),my:"top left",at:"bottom center"}],t=new Tourist.Tour({steps:e,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){}),t.on("stop",function(){i(".ccm-dialog-help-wrapper").show()}),ConcreteHelpGuideManager.register("change-content-edit-mode",t)}((window,jQuery)),!function(n){"use strict";var t=ccmi18n_helpGuides["add-page"],t=[{content:'<p><span class="h5">'+t[0].title+"</span><br/>"+t[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:n("[data-guide-toolbar-action=sitemap]"),my:"top right",at:"bottom center",setup:function(i,t){n("a[data-launch-panel=sitemap]").on("click",function(){i.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concreteAddPageTour",function(t,e){setTimeout(function(){"sitemap"==e.panel.getIdentifier()&&i.next()},500)})}},{content:'<p><span class="h5">'+t[1].title+"</span><br/>"+t[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(t,e){return{target:n("ul.ccm-panel-sitemap-list li a").eq(0)}}},{content:'<p><span class="h5">'+t[2].title+"</span><br/>"+t[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(t,e){return{target:n("div#ccm-sitemap-panel-sitemap")}}}],t=new Tourist.Tour({steps:t,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),t.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concreteAddPageTour")}),ConcreteHelpGuideManager.register("add-page",t)}((window,jQuery)),!function(n){"use strict";var t=ccmi18n_helpGuides.personalize,t=[{content:'<p><span class="h5">'+t[0].title+"</span><br/>"+t[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:n("[data-guide-toolbar-action=page-settings]"),my:"top left",at:"bottom center",setup:function(i,t){n("a[data-launch-panel=page]").on("click",function(){i.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concretePersonalizeTour",function(t,e){setTimeout(function(){"page"==e.panel.getIdentifier()&&i.next()},500)})}},{content:'<p><span class="h5">'+t[1].title+"</span><br/>"+t[1].text+"</p>",highlightTarget:!0,nextButton:!1,my:"left center",closeButton:!0,at:"right center",setup:function(i,t){return n("a[data-launch-panel-detail=page-design]").on("click",function(){i.view.tip.hide()}),ConcreteEvent.subscribe("PanelOpenDetail.concretePersonalizeTour",function(t,e){setTimeout(function(){"page-design"==e.panel.identifier&&i.next()},500)}),{target:n("a[data-launch-panel-detail=page-design]").eq(0)}}},{content:'<p><span class="h5">'+t[2].title+"</span><br/>"+t[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"bottom center",at:"top center",setup:function(t,e){return{target:n("span.ccm-page-design-theme-customize")}}}],t=new Tourist.Tour({steps:t,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),t.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concretePersonalizeTour"),ConcreteEvent.unsubscribe("PanelOpenDetail.concretePersonalizeTour")}),ConcreteHelpGuideManager.register("personalize",t)}((window,jQuery)),!function(n){"use strict";var t=ccmi18n_helpGuides.dashboard,t=[{content:'<p><span class="h5">'+t[0].title+"</span><br/>"+t[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:n("[data-guide-toolbar-action=dashboard]"),my:"top right",at:"bottom center",setup:function(i,t){n("a[data-launch-panel=dashboard]").on("click",function(){i.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concreteDashboardTour",function(t,e){setTimeout(function(){"dashboard"==e.panel.getIdentifier()&&i.next()},500)})}},{content:'<p><span class="h5">'+t[1].title+"</span><br/>"+t[1].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(t,e){return{target:n("div#ccm-panel-dashboard ul.nav a[href$=sitemap]").eq(0)}}}],t=new Tourist.Tour({steps:t,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});t.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),t.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concreteDashboardTour")}),ConcreteHelpGuideManager.register("dashboard",t)}((window,jQuery)),!function(i){"use strict";var t=ccmi18n_helpGuides["location-panel"],t=[{content:'<p><span class="h5">'+t[0].title+"</span><br/>"+t[0].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,setup:function(t,e){return{target:i("#ccm-panel-detail-page-location button[name=location]")}},my:"left center",at:"right center"},{content:'<p><span class="h5">'+t[1].title+"</span><br/>"+t[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,setup:function(t,e){return{target:i("#ccm-panel-detail-page-location p.lead").eq(1)}},my:"right center",at:"left center"}],t=new Tourist.Tour({steps:t,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});ConcreteHelpGuideManager.register("location-panel",t)}((window,jQuery)),!function(l,f,p,m){"use strict";var o=f("html");(m.EditMode=function(t){this.init.call(this,t)}).prototype={init:function(t){var h=this,s=(t=f.extend({notify:!1},t=t||{}),m.createGetterSetters.call(h,{dragging:!1,active:!0,nextBlockArea:null,areas:[],selectedCache:[],selectedThreshold:5,dragAreaBlacklist:[]}),h.bindEvent("PanelLoad",function(t,e){h.panelOpened(e.panel,e.element)}),h.bindEvent("PanelClose",function(t,e){"add-block"==e.panel.getIdentifier()&&h.setNextBlockArea(null),o.removeClass("ccm-panel-add-block")}),h.bindEvent("EditModeAddBlockComplete EditModeUpdateBlockComplete",function(t){p.defer(function(){h.scanBlocks()})}),h.bindEvent("EditModeBlockSaveInline",function(t,e){f("#ccm-block-form").submit(),ConcreteEvent.fire("EditModeExitInlineSaved"),ConcreteEvent.fire("EditModeExitInline",{action:"save_inline"})}),h.bindEvent("EditModeBlockEditInline",function(t,e){var i,n=e.block,o=n.getArea(),a=e.action||CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/edit",s=o.getEnableGridContainer()?1:0,r=o.getCustomTemplates(),l=[{name:"cID",value:n.getCID()},{name:"arHandle",value:o.getHandle()},{name:"arGridMaximumColumns",value:e.arGridMaximumColumns},{name:"arEnableGridContainer",value:s},{name:"aID",value:o.getId()},{name:"bID",value:n.getId()}],c=(n.getId(),n.getElem());if(r)for(var d in r)l[l.length]={name:"arCustomTemplates["+d+"]",value:r[d]};if(n.getAttr("menu")&&n.getAttr("menu").destroy(),e.postData)for(i in e.postData)e.postData.hasOwnProperty(i)&&l.push({name:i,value:e.postData[i]});m.event.unbind("EditModeExitInline.editmode"),h.bindEvent("EditModeExitInline.editmode",function(t,e){m.event.unbind(t),t.stopPropagation();var t=CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",i={cID:n.getCID(),arEnableGridContainer:s,bID:n.getId(),arHandle:o.getHandle()};f.fn.dialog.showLoader(),e&&e.action&&"save_inline"===e.action||f.get(t,i,function(t){var e,i=h.getBlockByID(n.getId());i&&(e=i.replace(t),p.defer(function(){ConcreteEvent.fire("EditModeExitInlineComplete",{block:e}),h.destroyInlineEditModeToolbars(),p.defer(function(){h.scanBlocks()})}))})}),ConcreteToolbar.disable(),f("div.ccm-area").addClass("ccm-area-inline-edit-disabled"),n.getElem().addClass("ccm-block-edit-inline-active"),f.ajax({type:"GET",url:a,data:l,success:function(t){t=f(t);c.empty().append(t).find(".ccm-block-edit").addClass("ccm-block-edit-inline-active"),setTimeout(h.loadInlineEditModeToolbars,1,c),f.fn.dialog.hideLoader(),m.event.fire("EditModeInlineEditLoaded",{block:n,element:t})}})}),h.bindEvent("EditModeBlockAddInline",function(t,e){var i,n,o=e.area,a=e.selected,s=e.btID,r=e.cID,l=o.getEnableGridContainer()?1:0,c=[{name:"btask",value:"edit"},{name:"cID",value:r},{name:"arGridMaximumColumns",value:e.arGridMaximumColumns},{name:"arEnableGridContainer",value:l},{name:"arHandle",value:o.getHandle()},{name:"btID",value:s}],r=a?(n=a.getElem(),a.getBlock()):(n=o.getBlockContainer().children().last(
2),e.dragAreaBlock),d=o.getCustomTemplates();if(d)for(var p in d)c[c.length]={name:"arCustomTemplate["+p+"]",value:d[p]};r&&(i=r.getId()),ConcreteMenuManager.disable(),ConcreteToolbar.disable(),jQuery.fn.dialog.closeAll(),f("div.ccm-area").addClass("ccm-area-inline-edit-disabled"),f.fn.dialog.showLoader(),o.getAttr("menu")&&o.getAttr("menu").destroy();var u=!1;h.bindEvent("EditModeExitInlineSaved",function(t){m.event.unbind(t),u=!0;t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()}),h.bindEvent("EditModeExitInline",function(t){m.event.unsubscribe(t),u||(f("#a"+o.getId()+"-bt"+s).remove(),h.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete"),(t=ConcretePanelManager.getByIdentifier("add-block"))&&t.pinned()&&t.show())}),f.ajax({type:"GET",url:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block",data:c,success:function(t){var t=f(t),e=f('<div class="ccm-block-edit-inline-active"></div>');e.attr("id","a"+o.getId()+"-bt"+s).append(t),o.getElem().addClass("ccm-area-edit-inline-active"),n.after(e),f(function(){e.find("#ccm-block-form").concreteAjaxBlockForm({task:"add",btSupportsInlineAdd:!0,dragAreaBlockID:i,dragArea:a,placeholder:"#a"+o.getId()+"-bt"+s})}),setTimeout(h.loadInlineEditModeToolbars,1,e.find("div[data-container=inline-toolbar]"))},complete:function(){f.fn.dialog.hideLoader()}})}),m.event.bind("EditModeBlockAddToClipboard",function(t,e){var i=e.block,n=i.getArea(),e=e.token;ConcreteToolbar.disableDirectExit(),f.ajax({type:"POST",url:CCM_TOOLS_PATH+"/pile_manager",data:"cID="+i.getCID()+"&bID="+i.getId()+"&arHandle="+encodeURIComponent(n.getHandle())+"&btask=add&scrapbookName=userScrapbook&ccm_token="+encodeURIComponent(e),success:function(t){ConcreteAlert.notify({message:ccmi18n.copyBlockToScrapbookMsg,title:ccmi18n.copyBlockToScrapbook})}})}),h.bindEvent("EditModeBlockDelete",function(t,e){var i=e.block;i.delete(e.message),ConcreteEvent.fire("EditModeBlockDeleteComplete",{block:i})}),f(l.document.body),f(l.document)),c=!1;function d(t,e,i,n,o,a,s){var r,l;h.getDragging()&&(o.call()?(c=!0,i=(o=a.call(e))+i,r=p.toArray(arguments),l=t.getDraggerPosition(),a.call(e,i),l[s]-=o-a.call(e),t.renderPosition(),p.defer(function(){d.apply(this,r)},n)):c=!1)}h.bindEvent("EditModeBlockDrag",p.throttle(function(t,e){var i,n,o,a;h.getDragging()&&(i=e.block,n=e.pep,o=h.getAreas(),i instanceof m.Layout&&(o=[p(o).find(function(t){return i.getArea()===t})]),a=p.flatten(p(o).map(function(t){return t.contendingDragAreas(n,i)}),!0),p.defer(function(){m.event.fire("EditModeContenders",a),h.selectContender(n,i,a,e.event)}),c||(d(i,s,2,10,function(){var t=i.getDraggerPosition().y-s.scrollTop();return i.getDragging()&&f(l).height()-t<=100},f.fn.scrollTop,"y"),d(i,s,-2,10,function(){var t=i.getDraggerPosition().y-s.scrollTop();return i.getDragging()&&t<=100},f.fn.scrollTop,"y"),d(i,s,2,10,function(){var t=i.getDraggerPosition().x-s.scrollLeft();return i.getDragging()&&f(l).width()-t<=100},f.fn.scrollLeft,"x"),d(i,s,-2,10,function(){var t=i.getDraggerPosition().x-s.scrollLeft();return i.getDragging()&&t<=100},f.fn.scrollLeft,"x")))},250,{trailing:!1})),h.bindEvent("EditModeBlockDragStop",function(t,e){m.event.fire("EditModeContenders",[]),m.event.fire("EditModeSelectableContender"),f("html").removeClass("ccm-block-dragging"),e.block instanceof m.BlockType||h.scanBlocks()}),h.bindEvent("EditModeBlockMove",function(t,e){var i=e.block,n=e.targetArea,e=e.sourceArea,o={ccm_token:l.CCM_SECURITY_TOKEN,btask:"ajax_do_arrange",area:n.getId(),sourceArea:e.getId(),block:i.getId(),blocks:[]},n=n.inEditMode(n.getEditMode()),a=(p(n.getBlocks()).each(function(t,e){o.blocks.push(t.getId())}),i.bindMenu(),setTimeout(function(){f.fn.dialog.showLoader()},150));f.concreteAjax({url:CCM_DISPATCHER_FILENAME+"/ccm/system/page/arrange_blocks?cID="+i.getCID(),data:o,success:function(t){ConcreteToolbar.disableDirectExit(),f.fn.dialog.hideLoader(),clearTimeout(a)}})}),h.bindEvent("EditModeBlockDragStart",function(){f("html").addClass("ccm-block-dragging"),h.setDragging(!0)}),h.scanBlocks(),m.getEditMode=function(){return h},t.notify&&ConcreteAlert.notify({message:ccmi18n.editModeMsg,title:ccmi18n.editMode})},bindEvent:function(t,e){return m.event.bind(t,e)},reset:function(){p(this.getAreas()).each(function(t){t.destroy()}),this.setAttr("areas",[])},scanBlocks:function(){var e,i=this;i.reset(),f("div.ccm-area").each(function(){var t=f(this);t.parent().hasClass("ccm-block-stack")||((e=new m.Area(t,i)).scanBlocks(),i.addArea(e))}),p.invoke(i.getAreas(),"bindMenu")},panelOpened:function(t,e){var i=this,n=i.getNextBlockArea();return"add-block"!==t.getIdentifier()?null:(o.addClass("ccm-panel-add-block"),f(e).find("input[data-input=search-blocks]").liveUpdate("ccm-panel-add-blocktypes-list","blocktypes"),f(e).find("input[data-input=search-blocks]").focus(),f(e).find("a.ccm-panel-add-block-draggable-block-type").each(function(){var t=f(this),t=f("<a/>").addClass("ccm-panel-add-block-draggable-block-type-dragger").appendTo(t);new m.BlockType(f(this),i,t,n).setPeper(t)}),f(e).find("div.ccm-panel-add-block-stack-item").each(function(){var t=f(this).find("div.stack-name"),e=new m.Stack(f(this),i,t,n);e.setPeper(t),f(this).find("div.block").each(function(){var t=f(this).find("div.block-name");new m.StackBlock(f(this),e,i,t,n).setPeper(t)})}),f(e).find("div.ccm-panel-add-clipboard-block-item").each(function(){var t=f(this);new m.DuplicateBlock(t,i,n)}
2),f(e).find(".ccm-panel-content").mousewheel(function(t){if(t.deltaY&&t.deltaFactor){var t=-1*t.deltaY*t.deltaFactor,e=f(this),t=t||0,i=e.scrollTop(),n=e.get(0).scrollHeight-(e.scrollTop()+e.height())-e.css("paddingTop").replace("px","");if(t)return t<0&&!i||0<t&&!n||e.scrollTop(e.scrollTop()+t),!1}}),t)},getAreaByID:function(t){var e=this.getAreas();return p.findWhere(e,{id:parseInt(t)})},getBlockByID:function(e){var t=this.getAreas(),i=null;return p(t).every(function(t){return!i&&(p(t.getBlocks()).every(function(t){return t.getId()!=e||(i=t,!1)}),!0)}),i},selectContender:function(e,i,t,n){var o,a,s=this;return(t=p(t).filter(function(t){return t.isSelectable(e,i,n)})).length<2?m.event.fire("EditModeSelectableContender",p(t).first()):(o=s.getSelectedCache(),a=s.getDragAreaBlacklist(),s.getSelectedThreshold()!==o.length||p(o).without(p(o).last()).length||(a.push(p(o).last()),s.setDragAreaBlacklist(a),p.delay(function(t){var e=s.getDragAreaBlacklist();s.setDragAreaBlacklist(p(e).without(t))},5e3,p(o).last())),t=p(t).difference(a),a=p(t).min(function(t){return t.centerDistanceToBlock(this)},i),o.push(a),s.setSelectedCache(p(o).last(s.getSelectedThreshold())),m.event.fire("EditModeSelectableContender",a),a)},addArea:function(t){this.getAreas().push(t)},getBlocks:function(){var e=[];return p(this.getAreas()).each(function(t){e.push(t.getBlocks())}),p(e).flatten()},destroyInlineEditModeToolbars:function(){ConcreteMenuManager.enable(),f("div.ccm-area-edit-inline-active").removeClass("ccm-area-edit-inline-active"),f("div.ccm-block-edit-inline-active").remove(),f("div.ccm-area").removeClass("ccm-area-inline-edit-disabled"),f("#ccm-toolbar").css("opacity",1),f("#ccm-inline-toolbar-container").remove(),f(l).unbind("scroll.inline-toolbar"),ConcreteToolbar.enable(),f.fn.dialog.hideLoader()},loadInlineEditModeToolbars:function(t,e){f("#ccm-inline-toolbar-container").remove();var i,n=f("<div />",{id:"ccm-inline-toolbar-container"}).appendTo(document.body),o=(e?(n.append(e),i=n.find(".ccm-inline-toolbar")):(i=t.find(".ccm-inline-toolbar")).appendTo(n),f(l)),e=t.offset(),a=e.left,s=a+parseInt(i.width()),r=(o.width()>i.width()&&(s>o.width()?(s=s-(a+t.width()),i.css("left",a-s)):i.css("left",a)),i.css("opacity",1),i.find(".dialog-launch").dialog(),e.top-n.outerHeight()-5);n.css("top",r).css("opacity",1),o.scrollTop()>r&&(f("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",0),n.addClass("ccm-inline-toolbar-affixed")),o.on("scroll.inline-toolbar",function(){n.toggleClass("ccm-inline-toolbar-affixed",o.scrollTop()>r),o.scrollTop()>r?f("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",0):f("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",1)})}}}(window,jQuery,_,Concrete),!function(o,d,p,u){"use strict";(u.Block=function(t,e,i){this.init.apply(this,p(arguments).toArray())}).prototype={init:function(t,e,i){var n=this;t.data("Concrete.block",n),t.children(".ccm-block-cover").length||d("<div/>").addClass("ccm-block-cover").appendTo(t),u.createGetterSetters.call(n,{id:t.data("block-id"),active:!0,handle:t.data("block-type-handle"),areaId:t.data("area-id"),cID:t.data("cid"),wraps:!!t.data("block-type-wraps"),area:null,elem:t,dragger:null,draggerOffset:{x:0,y:0},draggerPosition:{x:0,y:0},dragging:!1,rotationDeg:0,editMode:e,selected:null,stepIndex:0,peper:i||t.children(".ccm-edit-mode-inline-commands, .ccm-custom-style-container").find('a[data-inline-command="move-block"]'),pepSettings:{}}),n.id=n.getId(),p(n.getPepSettings()).extend({deferPlacement:!0,moveTo:function(){n.dragPosition(this)},initiate:function(t,e){n.pepInitiate.call(n,this,t,e)},drag:function(t,e){n.pepDrag.call(n,this,t,e)},start:function(t,e){n.pepStart.call(n,this,t,e)},stop:function(t,e){n.pepStop.call(n,this,t,e)},place:!1}),n.bindEvent("EditModeSelectableContender",function(t,e){n.getDragging()&&e instanceof u.DragArea?n.setSelected(e):n.getDragging()&&n.setSelected(null)}),n.getPeper().on("click",function(t){return t.preventDefault(),t.stopPropagation(),!1}).pep(n.getPepSettings())},destroy:function(){this.getPeper().off(),d.pep.unbind(this.getPeper()),this.setAttr("active",!1)},bindEvent:function(t,e){return u.EditMode.prototype.bindEvent.apply(this,p(arguments).toArray())},getContainer:function(){for(var t=this.getElem();!t.parent().hasClass("ccm-area-block-list")&&!t.parent().is("[data-area-id]")&&t.parent().length;)t=t.parent();return t},addToDragArea:async function(t){var e,i=this,n=i.getArea(),o=t.getArea();await n.removeBlock(i),i.getContainer().remove(),i.getWraps()?(e=d(o.getBlockTemplate()()),t.getElem().after(e),e.children().length?e.find("div.block").replaceWith(i.getElem()):e.append(i.getElem())):t.getElem().after(i.getElem()),(e=t.getBlock())?t.getArea().addBlock(i,e):t.getArea().addBlockToIndex(i,0),i.getPeper().pep(i.getPepSettings()),i.getEditMode().scanBlocks(),u.event.fire("EditModeBlockMove",{block:i,sourceArea:n,targetArea:o})}
2,handleAddResponse:function(t,e,i,n){var o=this,a=e.getEnableGridContainer()?1:0;if(!t.error)return d.get(CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",{arHandle:t.arHandle,cID:t.cID,bID:t.bID,arEnableGridContainer:a},function(t){i?i.getContainer().after(t):e.getBlockContainer().prepend(t),d.fn.dialog.hideLoader(),p.defer(function(){o.getEditMode().scanBlocks(),o.showSuccessfulAdd(),u.forceRefresh(),n&&n()})}),!0},showSuccessfulAdd:function(){ConcreteAlert.notify({message:ccmi18n.addBlockMsg,title:ccmi18n.addBlock})},delete:function(t){var e=this.getId(),i=this.getArea(),n=i.getBlockByID(e),o=this.getCID(),a=i.getHandle();ConcreteToolbar.disableDirectExit(),i.removeBlock(n),ConcreteAlert.notify({message:ccmi18n.deleteBlockMsg,title:ccmi18n.deleteBlock}),d.ajax({type:"POST",url:CCM_DISPATCHER_FILENAME,data:"cID="+o+"&ccm_token="+CCM_SECURITY_TOKEN+"&isAjax=true&btask=remove&bID="+e+"&arHandle="+encodeURIComponent(a)})},replace:function(t){t=d(t);return this.getContainer().replaceWith(t),this.getArea().scanBlocks(),this.getArea().getBlockByID(this.getId())},getMenuElem:function(){return d("div.ccm-edit-mode-block-menu",this.getElem()).first()},bindMenu:function(){var e=this,t=e.getElem(),i=t.attr("data-block-menu-handle"),n=e.getMenuElem();"none"!==i&&(i={highlightClassName:"ccm-block-highlight",menuActiveClass:"ccm-block-highlight",menu:n},e.getArea()&&e.getArea().getElem().hasClass("ccm-global-area")&&(i.menuActiveClass+=" ccm-global-area-block-highlight",i.highlightClassName+=" ccm-global-area-block-highlight"),e.setAttr("menu",new ConcreteMenu(t,i)),n.find("a[data-menu-action=edit_inline]").off("click.core").on("click.core",function(t){u.event.fire("EditModeBlockEditInline",{block:e,event:t})}),n.find("a[data-menu-action=block_scrapbook]").off("click.core").on("click.core",function(t){u.event.fire("EditModeBlockAddToClipboard",{block:e,event:t,token:d(this).data("token")})}),n.find("a[data-menu-action=delete_block]").off("click.core").on("click.core",function(t){u.event.fire("EditModeBlockDelete",{message:d(this).attr("data-menu-delete-message"),block:e,event:t})}),n.find("a[data-menu-action=block_design]").off("click.core").on("click.core",function(t){t.preventDefault(),u.event.fire("EditModeBlockEditInline",{block:e,event:t,action:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/design"})}))},setArea:function(e){this.setAttr("area",e);var i=this;i.getElem().find("a[data-menu-action=block_dialog]").each(function(){var t=d(this).data("menu-href"),t=(t+=-1!==t.indexOf("?")?"&cID="+i.getCID():"?cID="+i.getCID())+("&arHandle="+encodeURIComponent(e.getHandle())+"&bID="+i.getId());d(this).attr("href",t).dialog()}),i.bindMenu()},getDragger:function(){var t,e=this;return e.getAttr("dragger")||(t=d("<a />").html(e.getElem().data("dragging-avatar")||'<p><img src="/concrete/blocks/content/icon.png"><span>'+ccmi18n.content+"</span></p>").addClass("ccm-block-edit-drag ccm-panel-add-block-draggable-block-type"),e.setAttr("dragger",t.css({width:e.getElem().width(),height:e.getElem().height()}))),e.getAttr("dragger")},transform:function(t,e){t=this.getDragger().css({"-webkit-transform":t,"-moz-transform":t,"-ms-transform":t,"-o-transform":t,transform:t}).get(0);return t.filters&&t.filters["DXImageTransform.Microsoft.Matrix"]&&(e={elements:p(e).groupBy(function(t,e){return Math.floor(e/3)})},t.filters["DXImageTransform.Microsoft.Matrix"].M11=e.elements[0][0],t.filters["DXImageTransform.Microsoft.Matrix"].M12=e.elements[0][1],t.filters["DXImageTransform.Microsoft.Matrix"].M21=e.elements[1][0],t.filters["DXImageTransform.Microsoft.Matrix"].M22=e.elements[1][1],t.style.left=-t.offsetWidth/2+t.clientWidth/2+"px",t.style.top=-t.offsetHeight/2+t.clientHeight/2+"px"),!0},resetTransform:function(){var t=this.getDragger().css({top:0,left:0,"-webkit-transform":"","-moz-transform":"","-ms-transform":"","-o-transform":"",transform:""}).get(0);return t.filters&&(t.filters=[]),this.setDraggerPosition({x:0,y:0}),this.renderPosition()},multiplyMatrices:function(t,e){for(var i=[],n=0;n<t.length;n++){i[n]=[];for(var o=0;o<t[0].length;o++){for(var a=0,s=0;s<t[0].length;s++)a+=t[n][s]*e[s][o];i[n][o]=a}}return i},matrixToCss:function(t){function e(t){return Math.round(t*i)/i}var i=Math.pow(10,4);return t[0]=p(t[0]).map(e),t[1]=p(t[1]).map(e),"matrix("+[t[0][0],t[0][1],t[1][0],t[1][1],t[0][2],t[1][2]].join(",")+")"},endRotation:function(){var e=this,i=e.getRotationDeg(),n=(e.getDragger().animate({rotation:0},{duration:1,step:function(){}}),e.setStepIndex(e.getStepIndex()+1));return e.getDragger().animate({rotation:e.getRotationDeg()},{queue:!1,duration:150,step:function(t){e.getStepIndex()===n&&(e.setRotationDeg(i-t),e.renderPosition())}},"easeOutElastic"),!0},renderPosition:function(){var t=this,e=t.getDraggerPosition().x,i=t.getDraggerPosition().y,n=t.getRotationDeg()*(Math.PI/180),o=p.bind(Math.cos,Math),a=p.bind(Math.sin,Math),e=[[1,0,e],[0,1,i],[0,0,1]],a=n?(i=[[o(n),a(n),0],[-a(n),o(n),0],[0,0,1]],t.multiplyMatrices(e,i)):e;return this.transform(t.matrixToCss(a),a)},dragPosition:function(t){var e=this,t=(e.setRotationDeg(Math.max(-15,Math.min(15,t.velocity().x/15))),e.endRotation(),p.last(t.velocityQueue)),i=e.getDraggerOffset(),n=(t=t||{x:e.getDragger().offset().left,y:e.getDragger().offset().top}).x-i.x,t=t.y-i.y;return e.setDraggerPosition({x:n,y:t}),e.renderPosition(),!0}
2,pepInitiate:function(t,e,i){var n=this;n.resetTransform(),n.setDragging(!0),n.getDragger().hide().appendTo(o.document.body).css(n.getElem().offset()),n.setDraggerOffset({x:(null!=e.clientX?e:e.originalEvent).clientX-n.getElem().offset().left+o.document.body.scrollLeft,y:(null!=e.clientY?e:e.originalEvent).clientY-n.getElem().offset().top+o.document.body.scrollTop}),n.getDragger().fadeIn(250),p.defer(function(){u.event.fire("EditModeBlockDragInitialization",{block:n,pep:i,event:e})})},pepDrag:function(t,e,i){var n=this;p.defer(function(){u.event.fire("EditModeBlockDrag",{block:n,pep:i,event:e})})},pepStart:function(t,e,i){var n=this,o=(n.resetTransform(),n.getElem()),a=(null!=e.pageX?e:e.originalEvent).pageX,s=(null!=e.pageY?e:e.originalEvent).pageY,r={x:o.offset().left,y:o.offset().top},l=(r.x-a)/o.width(),c=(r.y-s)/o.height();n.setDraggerPosition({x:r.x,y:r.y}),n.renderPosition(),n.setDraggerOffset({x:l*o.width()*-1,y:c*o.height()*-1}),n.getDragger().animate({width:90,height:90},{duration:250,step:function(t,e){n.setDraggerOffset({x:l*d(this).width()*-1,y:c*d(this).height()*-1}),n.dragPosition(i)}}),p.defer(function(){u.event.fire("EditModeBlockDragStart",{block:n,pep:i,event:e})})},pepStop:function(t,e,i){var n,o=this;o.getDragger().stop(1),o.getDragger().css({top:0,left:0}),o.dragPosition(i),(n=o.getSelected())&&o.addToDragArea(n),o.animateToElem(),p.defer(function(){u.event.fire("EditModeBlockDragStop",{block:o,pep:i,event:e})})},animateToElem:function(t){var a=this,s=t||a.getElem(),r=a.getDraggerPosition().x,l=a.getDragger().offset().top,c=a.getDragger().width(),d=a.getDragger().height();a.setDragging(!1),a.getDragger().animate({ccm_perc:0},{duration:0,step:function(){}}).animate({ccm_perc:1,opacity:0},{duration:500,step:function(t,e){var i,n,o;"ccm_perc"===e.prop?(e=s.offset().left,i=s.offset().top,n=s.width(),o=s.height(),e=(e-r)*t,i=(i-l)*t,n=(n-c)*t,o=(o-d)*t,a.setDraggerPosition({x:r+e,y:l+i}),a.renderPosition(),a.getDragger().css({width:c+n,height:d+o})):a.getDragger().css({opacity:t})},complete:function(){a.getDragger().remove(),a.setAttr("dragger",null)}})}}}(window,jQuery,_,Concrete),!function(i,n){"use strict";(n.StackDisplay=function(t,e){this.init.apply(this,i(arguments).toArray())}).prototype=i.extend(Object.create(n.Block.prototype),{init:function(t,e){t.children(".ccm-area").children(".ccm-area-block-list").find(".ccm-edit-mode-inline-commands").remove(),n.Block.prototype.init.apply(this,i(arguments).toArray())}})}((window,jQuery,_),Concrete),!function(a,o,s,r){"use strict";(r.Area=function(t,e){this.init.apply(this,s(arguments).toArray())}).prototype={init:function(t,e){var i=this;t.data("Concrete.area",i),r.createGetterSetters.call(i,{id:t.data("area-id"),active:!0,blockTemplate:s(t.children("script[role=area-block-wrapper]").html()).template(),elem:t,totalBlocks:0,enableGridContainer:t.data("area-enable-grid-container"),customTemplates:t.data("area-custom-templates"),handle:t.data("area-handle"),dragAreas:[],blocks:[],editMode:e,maximumBlocks:parseInt(t.data("maximumBlocks"),10),blockTypes:t.data("accepts-block-types").toLowerCase().split(" "),blockContainer:t.children(".ccm-area-block-list")}),i.id=i.getId(),i.setTotalBlocks(0),i.bindEvent("EditModeBlockAddInline.area",function(t,e){e.area===i&&i.setTotalBlocks(i.getTotalBlocks()+1)})},inEditMode:function(t){return t.getAreaByID(this.getId())},destroy:function(){this.getAttr("menu")&&this.getAttr("menu").destroy(),r.event.unbind(".ccm-area-a"+this.getId()),this.reset()},reset:function(){var t=this;s(t.getDragAreas()).each(function(t){t.destroy()}),s(t.getBlocks()).each(function(t){t.destroy()}),t.setBlocks([]),t.setDragAreas([]),t.setTotalBlocks(0)},bindEvent:function(t,e){return r.EditMode.prototype.bindEvent.call(this,t+".ccm-area-a"+this.getId(),e)},scanBlocks:function(){var i,n=this;n.reset(),n.addDragArea(null),o("div.ccm-block-edit[data-area-id="+n.getId()+"]",this.getElem()).each(function(){var t=o(this),e=t.data("block-type-handle");i="core_area_layout"===e?r.Layout:"core_stack_display"===e?r.StackDisplay:r.Block,(i=new i(t,n.getEditMode())).setArea(n),n.addBlock(i)})},getBlockByID:function(t){return s.findWhere(this.getBlocks(),{id:t})},getMenuElem:function(){return o("[data-area-menu=area-menu-a"+this.getId()+"]")},bindMenu:function(){var n=this,t=n.getElem(),e=n.getTotalBlocks(),i=n.getMenuElem(),e=0<e?"#area-menu-footer-"+n.getId():"div[data-area-menu-handle="+n.getId()+"]",e=(n.getAttr("menu")&&n.getAttr("menu").destroy(),{handle:e,highlightClassName:"ccm-area-highlight",menuActiveClass:"ccm-area-highlight",menu:o("[data-area-menu="+t.attr("data-launch-area-menu")+"]")});n.getElem().hasClass("ccm-global-area")&&(e.menuActiveClass+=" ccm-global-area-highlight",e.highlightClassName+=" ccm-global-area-highlight"),n.setAttr("menu",new ConcreteMenu(t,e)),i.find("a[data-menu-action=add-inline]").off("
2click.edit-mode").on("click.edit-mode",function(t){var e=!1;return s.each(n.getBlocks(),function(t){e=t}),r.event.fire("EditModeBlockAddInline",{area:n,cID:CCM_CID,btID:o(this).data("block-type-id"),arGridMaximumColumns:o(this).attr("data-area-grid-maximum-columns"),event:t,dragAreaBlock:e,btHandle:o(this).data("block-type-handle")}),!1}),i.find("a[data-menu-action=edit-container-layout]").off("click.edit-mode").on("click.edit-mode",function(t){var e=o(this),i=parseInt(o(this).attr("data-container-layout-block-id")),n=r.getEditMode(),n=s.findWhere(n.getBlocks(),{id:i});return r.event.fire("EditModeBlockEditInline",{block:n,arGridMaximumColumns:e.attr("data-area-grid-maximum-columns"),event:t}),!1}),i.find("a[data-menu-action=edit-container-layout-style]").off("click.edit-mode").on("click.edit-mode",function(t){t.preventDefault();o(this);var e=parseInt(o(this).attr("data-container-layout-block-id")),i=r.getEditMode(),i=s.findWhere(i.getBlocks(),{id:e});r.event.fire("EditModeBlockEditInline",{block:i,event:t,action:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/design"})}),i.find("a[data-menu-action=area-add-block]").off("click.edit-mode").on("click.edit-mode",function(t){var e=n.getMaximumBlocks();return e<0||e>n.getTotalBlocks()?(n.getEditMode().setNextBlockArea(n),o('[data-launch-panel="add-block"]').click()):ConcreteAlert.error({message:ccmi18n.fullArea}),!1}),n.bindEvent("ConcreteMenuShow",function(t,e){var i;e.menu==n.getAttr("menu")&&(i=n.getMaximumBlocks(),e=e.menu.$menuPointer.find("a[data-menu-action=area-add-block]").parent(),i<0||i>n.getTotalBlocks()?e.show():e.hide())}),i.find("a[data-menu-action=edit-area-design]").off("click.edit-mode").on("click.edit-mode",function(t){t.preventDefault(),ConcreteToolbar.disable(),n.getElem().addClass("ccm-area-inline-edit-disabled");t={arHandle:n.getHandle(),cID:CCM_CID};n.bindEvent("EditModeExitInline",function(t){r.event.unsubscribe(t),n.getEditMode().destroyInlineEditModeToolbars()}),o.ajax({type:"GET",url:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/area/design",data:t,success:function(t){var e=n.getElem();n.getEditMode().loadInlineEditModeToolbars(e,t),o.fn.dialog.hideLoader()}})})},acceptsBlockType:function(t){return s(this.getBlockTypes()).contains(t.toLowerCase())},addBlock:function(t,e){return e?this.addBlockToIndex(t,s(this.getBlocks()).indexOf(e)+1):this.addBlockToIndex(t,this.getBlocks().length)},setTotalBlocks:function(t){this.setAttr("totalBlocks",t),this.getElem().attr("data-total-blocks",t)},addBlockToIndex:function(t,e){var i=this.getTotalBlocks(),n=this.getBlocks(),o=i-e;if(t.setArea(this),this.setTotalBlocks(i+1),0<o){for(var a=[],s=0;s<n.length;s++)e<=s?a[s+1]=n[s]:a[s]=n[s];a[e]=t,this.setBlocks(a)}else this.getBlocks()[e]=t;return this.addDragArea(t),t.getElem().attr("data-area-id",this.getId()),!0},removeBlock:async function(e){var t,i=this,n=i.getTotalBlocks(),o=(i.getElem().removeClass("ccm-parent-menu-item-active"),a.VueInstances&&a.VueInstances[e.getId()]&&(a.VueInstances[e.getId()].$destroy(!0),a.VueInstances[e.getId()]=null,delete a.VueInstances[e.getId()]),a.Vue3Instances&&Object.keys(a.Vue3Instances).length&&(t=Object.keys(a.Vue3Instances).find(t=>t.endsWith("__"+e.getId())))&&(o=await a.Vue3Instances[t])&&"function"==typeof o.unmount&&(o.unmount(),delete a.Vue3Instances[t]),e.getContainer().remove(),i.setBlocks(s(i.getBlocks()).without(e)),i.setTotalBlocks(n-1),s.first(s(i.getDragAreas()).filter(function(t){return t.getBlock()===e})));return o&&(o.getElem().remove(),i.setDragAreas(s(i.getDragAreas()).without(o))),i.getTotalBlocks()||i.bindMenu(),!0},addDragArea:function(t){var e,i,n=this;if(t)e=o('<div class="ccm-area-drag-area"/>'),i=new r.DragArea(e,n,t),t.getContainer().after(e);else{if(n.getDragAreas().length)throw new Error("No block supplied");e=o('<div class="ccm-area-drag-area"/>'),i=new r.DragArea(e,n,t),n.getBlockContainer().prepend(e)}return n.getElem().parent().is("#ccm-stack-container")||(t=s("<span>"+ccmi18n.emptyArea+"</span>").template(),e.html(t({area_handle:n.getElem().data("area-display-name")}))),n.getDragAreas().push(i),i},contendingDragAreas:function(e,i){var t=this,n=t.getMaximumBlocks();return i instanceof r.Stack||"core_stack_display"===i.getHandle()?s(t.getDragAreas()).filter(function(t){return t.isContender(e,i)}):0<n&&t.getBlocks().length>=n||!s(t.getBlockTypes()).contains(i.getHandle())?[]:s(t.getDragAreas()).filter(function(t){return t.isContender(e,i)})}}}(window,jQuery,_,Concrete),!function(n,i,o){"use strict";(o.Layout=function(t,e){this.init.apply(this,i(arguments).toArray())}).prototype=i.extend(Object.create(o.Block.prototype),{init:function(t,e){var i=this;i.bindEvent("EditModeInlineEditLoaded.editmode",function(t,e){e.block===i&&i.bindDrag()}),o.Block.prototype.init.call(i,t,e,n()),t.children(".ccm-block-cover").remove()},bindDrag:function(){var t=n('a[data-layout-command="move-block"]').parent();n.pep.unbind(t),t.pep(this.getPepSettings())},addToDragArea:function(){o.Block.prototype.addToDragArea.apply(this,i.toArray(arguments));var t=n("#ccm-inline-toolbar-container");t.css({top:this.getElem().offset().top-t.outerHeight()-5})}})}((window,jQuery),_,Concrete),!function(o,a){"use strict";
2(a.DragArea=function(t,e,i){this.init.apply(this,o.toArray(arguments))}).prototype={init:function(t,e,i){var n=this;a.createGetterSetters.call(n,{block:i,active:!0,elem:t,area:e,isContender:!1,isSelectable:!1,animationLength:500}),n.bindEvent("EditModeContenders",function(t,e){n.setIsContender(o.contains(e,n))}),n.bindEvent("EditModeSelectableContender",function(t,e){n.setIsSelectable(e===n)})},destroy:function(){this.getElem().remove()},bindEvent:function(t,e){return a.EditMode.prototype.bindEvent.apply(this,o(arguments).toArray())},getActive:function(){return this.getArea().getActive()&&this.getAttr("active")},isSelectable:function(t,e){return t.isOverlapping(e.getDragger(),this.getElem())},setIsSelectable:function(t){var e=this;return t&&!e.getIsSelectable()?(e.getArea().getElem().addClass("ccm-parent-menu-item-active"),e.getElem().addClass("ccm-area-drag-area-selectable")):!t&&e.getIsSelectable()&&(e.getArea().getElem().removeClass("ccm-parent-menu-item-active"),e.getElem().removeClass("ccm-area-drag-area-selectable")),e.setAttr("isSelectable",t),!0},isContender:function(t,e){return o.identity(t),this.getBlock()!==e},setIsContender:function(t){var e=this;return t&&!e.getIsContender()?o.defer(function(){e.getElem().addClass("ccm-area-drag-area-contender")}):!t&&e.getIsContender()&&o.defer(function(){e.getElem().removeClass("ccm-area-drag-area-contender")}),e.setAttr("isContender",t),!0},centerDistanceToBlock:function(t){var t=t.getDragger(),e=t.offset().left+t.width()/2,t=t.offset().top+t.height()/2,i=this.getElem(),n=i.offset().left+i.width()/2,i=i.offset().top+i.height()/2;return Math.sqrt(Math.pow(Math.abs(e-n),2)+Math.pow(Math.abs(t-i),2))}}}((window,jQuery,_),Concrete),!function(g,v,a){"use strict";(a.BlockType=function(t,e,i,n){this.init.apply(this,v(arguments).toArray())}).prototype=v.extend(Object.create(a.Block.prototype),{init:function(t,e,i,n){var o=this;a.Block.prototype.init.apply(o,v(arguments).toArray()),o.setAttr("defaultArea",n||null),n&&(n.getBlockTypes(),n.acceptsBlockType(o.getHandle())?o.handleDefaultArea():o.removeElement())},handleDefaultArea:function(){var e=this;g.pep.unbind(e.getPeper()),e.getPeper().on("click",function(t){return e.handleClick(),!1}).css({cursor:"pointer"})},removeElement:function(){var t=this.getPeper().closest(".ccm-panel-content-inner");this.getPeper().closest("li").remove(),t.children(".ccm-panel-add-block-set").each(function(){g(this).children("ul").children().length||g(this).remove()})},handleClick:function(){var t=this,e=t.getAttr("defaultArea");ConcretePanelManager.exitPanelMode(function(){v.defer(function(){t.addToDragArea(v.last(e.getDragAreas()))})})},pepStart:function(t,e,i){a.Block.prototype.pepStart.call(this,t,e,i),this.setAttr("closedPanel",v(ConcretePanelManager.getPanels()).find(function(t){return t.isOpen})),(t=this.getAttr("closedPanel"))&&t.hide()},pepStop:function(t,e,i){var n,o=this;(n=o.getSelected())?o.addToDragArea(n):(n=o.getAttr("closedPanel"))&&n.show(),v.defer(function(){a.event.fire("EditModeBlockDragStop",{block:o,pep:i,event:e})}),o.getDragger().remove(),o.setAttr("dragger",null)},addToDragArea:function(e){var i=this,t=i.getElem(),n=t.data("btid"),o=t.data("cid"),a=e.getArea(),s=a.getHandle(),r=a.getEnableGridContainer()?1:0,l=0,c=e.getBlock(),d=!!t.data("supports-inline-add"),p=!!t.data("has-add-template");if(c&&(l=c.getId()),jQuery.fn.dialog.closeAll(),p)if(d)ConcreteEvent.fire("EditModeBlockAddInline",{selected:e,area:e.getArea(),cID:o,arEnableGridContainer:r,btID:n,dragAreaBlockID:l});else{var u="";if(f=a.getCustomTemplates())for(var h in f)u+="&arCustomTemplates["+h+"]="+f[h];g.fn.dialog.open({onOpen:function(){g(function(){var t=g('<div style="display:none" />');e.getElem().after(t),g("#ccm-block-form").concreteAjaxBlockForm({task:"add",dragAreaBlockID:l,dragArea:e,placeholder:t})})},onDestroy:function(){var t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()},width:parseInt(t.data("dialog-width"),10),height:parseInt(t.data("dialog-height"),10)+20,title:t.data("dialog-title"),href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block?cID="+o+"&btID="+n+"&arHandle="+encodeURIComponent(s)+u})}else{var f,m={cID:o,arHandle:s,btID:n,mode:"edit",processBlock:1,add:1,ccm_token:CCM_SECURITY_TOKEN,arCustomTemplates:a.getCustomTemplates(),dragAreaBlockID:l};if(f=a.getCustomTemplates())for(var h in f)m[m.length]={name:"arCustomTemplates["+h+"]",value:f[h]};g.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block/submit",m,function(t){g.fn.dialog.showLoader(),ConcreteToolbar.disableDirectExit(),g.get(CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",{arHandle:a.getHandle(),cID:o,bID:t.bID,arEnableGridContainer:r},function(t){c?c.getContainer().after(t):a.getBlockContainer().prepend(t),g.fn.dialog.hideLoader(),v.defer(function(){i.getEditMode().scanBlocks()});t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()})})}}})}((window,jQuery),_,Concrete),!function(r,n,t){"use strict";
2(t.Stack=function(t,e,i){this.init.apply(this,n(arguments).toArray())}).prototype=n.extend(Object.create(t.BlockType.prototype),{removeElement:function(){this.getElem().remove()},addToDragArea:function(t){var e=this,i=e.getElem(),n=t.getArea(),o=n.getHandle(),a=0,s=t.getBlock(),t=(s&&(a=s.getId()),jQuery.fn.dialog.closeAll(),{cID:i.data("cid"),arHandle:o,stID:i.data("sid"),atask:"add_stack",ccm_token:CCM_SECURITY_TOKEN});a&&(t.dragAreaBlockID=a),r.fn.dialog.showLoader(),r.getJSON(CCM_DISPATCHER_FILENAME,t,function(t){e.handleAddResponse(t,n,s)})},showSuccessfulAdd:function(){ConcreteAlert.notify({message:ccmi18n.addBlockStackMsg,title:ccmi18n.addBlockStack})}})}((window,jQuery),_,Concrete),!function(d,n,o){"use strict";(o.DuplicateBlock=function(t,e,i){this.init.apply(this,n.toArray(arguments))}).prototype=n.extend(Object.create(o.BlockType.prototype),{init:function(t,e,i){o.BlockType.prototype.init.call(this,t,e,t.find(".block-content"),i)},handleDefaultArea:function(){var e=this;d.pep.unbind(e.getPeper()),e.getPeper().click(function(t){return e.handleClick(),!1}).css({cursor:"pointer"}).children(".block-name").css({cursor:"pointer"})},removeElement:function(){this.getElem().remove()},addToDragArea:function(t){var i=this,e=i.getElem(),n=e.data("btid"),o=t.getArea(),a=o.getHandle(),s=0,r=e.data("cid"),l=t.getBlock(),t=e.data("pcid"),e=!!e.data("isfeedbacktool"),c=(l&&(s=l.getId()),ConcretePanelManager.exitPanelMode(),jQuery.fn.dialog.closeAll(),jQuery.fn.dialog.showLoader(),{cID:r,arHandle:a,btID:n,mode:"edit",processBlock:1,add:1,btask:"alias_existing_block",pcID:[t],ccm_token:CCM_SECURITY_TOKEN,copyBlock:0});s&&(c.dragAreaBlockID=s),e?(jQuery.fn.dialog.open({href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/copy",height:180,title:"Paste a feedback tool",onDirectClose:function(){var t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()}}),ConcreteEvent.unsubscribe("EditModeAddClipboardFeedbackTool"),ConcreteEvent.subscribe("EditModeAddClipboardFeedbackTool",function(t,e){e.newResultSet&&(c.copyBlock=1),d.getJSON(CCM_DISPATCHER_FILENAME,c,function(t){i.handleAddResponse(t,o,l,function(){ConcreteEvent.fire("EditModeAddClipboardComplete",{block:i});var t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()})})})):d.getJSON(CCM_DISPATCHER_FILENAME,c,function(t){i.handleAddResponse(t,o,l,function(){ConcreteEvent.fire("EditModeAddClipboardComplete",{block:i});var t=ConcretePanelManager.getByIdentifier("add-block");t&&t.pinned()&&t.show()})})}})}((window,jQuery),_,Concrete),!function(l,o,a){"use strict";(a.StackBlock=function(t,e,i,n){this.init.apply(this,o.toArray(arguments))}).prototype=o.extend(Object.create(a.BlockType.prototype),{init:function(t,e,i,n,o){a.BlockType.prototype.init.call(this,t,i,n,o),this.setAttr("stack",e)},removeElement:function(){l.pep.unbind(this.getPeper())},addToDragArea:function(t){var e=this,i=e.getElem(),n=i.data("btid"),o=t.getArea(),a=o.getHandle(),s=0,r=t.getBlock(),t=(r&&(s=r.getId()),ConcretePanelManager.exitPanelMode(),{cID:CCM_CID,bID:i.data("block-id"),arHandle:a,btID:n,mode:"edit",processBlock:1,add:1,btask:"alias_existing_block",pcID:[i.data("cID")],ccm_token:CCM_SECURITY_TOKEN});s&&(t.dragAreaBlockID=s),l.getJSON(CCM_DISPATCHER_FILENAME,t,function(t){e.handleAddResponse(t,o,r)})}})}((window,jQuery),_,Concrete),!function(t,c){"use strict";var s,i,e,n,o={};function r(t){var e=['form[action^="'+CCM_APPLICATION_URL+'/ccm/system/dialogs/page/add_block/"]','form[action^="'+CCM_APPLICATION_URL+'/ccm/system/dialogs/block/edit/"]'];return 0<c(t).find(e.join(",")).length}i18next.loadNamespaces(["form","block_ui"]).then(function(){i='<div id="ccm-popup-alert" class="ccm-ui"><p>'+(n=function(t,e){var i={ns:"block_ui"};return void 0!==e&&(i=Object.assign(i,e)),i18next.t(t,i)})("discardChangesDialog.message")+"</p></div>",o={resizable:!1,height:"auto",width:360,modal:!0,dialogClass:"ui-dialog-plain ui-dialog-warning",title:n("discardChangesDialog.title"),buttons:[{text:n("discardChangesDialog.cancel"),class:"btn btn-default",click:function(){c(this).jqdialog("close"),c(".redactor-toolbar").show()}},{text:n("discardChangesDialog.confirm"),class:"btn btn-warning",click:function(){c(this).jqdialog("close"),e&&r(e)?(s=!1,c(e).jqdialog("close"),e=null):ConcreteEvent.fire("EditModeExitInline",{action:"confirm_close"})}}]}}),c(document).on("dialogopen",".ui-dialog",function(t,e){var i=this,n=c(".ui-dialog-content",i),o=c(".tab-content",n),a=c(".ui-dialog-title",i
2).text().replace(/(^\s+|\s+$)/g,"");a.match("^Add")?0:a.match("^Edit")&&0,r(this)&&(s=!0),o.height(n.height()-(o.siblings(".nav").height()+15)),o.length&&c(".alert:not(#ccm-popup-alert-message)",n).each(function(t,e){o.has(e).length||c(e).removeClass("hidden").remove().clone(!0).prependTo(o)}),c(document).on("keydown",".panel-block-ui :input:not(textarea,.bootstrap-tagsinput input)",function(t){if(13===(t.keyCode||t.which))return!1}),c(i).on("show.bs.tab",'a[data-toggle="tab"], a[data-tab]',function(t){c(t.relatedTarget),c(t.target);c(".tab-content",i).scrollTop(0)})}),c(document).on("dialogresize",".ui-dialog",function(t,e){var i=c(".ui-dialog-content",this),n=c(".tab-content",i);n.height(i.height()-(n.siblings(".nav").height()+15))}),c(document).on("dialogbeforeclose",".ui-dialog",function(t){if(app.config.show_unsaved_changes_dialog&&s&&r(this))return e=t.target,t=i,"true"===c(this).find('form#ccm-block-form input[name="hasUnsavedChanges"]').val()&&(t='<div id="ccm-popup-alert" class="ccm-ui"><p>'+n("unsavedChangesPrompt",{ns:"form"})+"</p></div>"),c(t).jqdialog(o),!1}),window.addEventListener("beforeunload",function(t){app.config.show_unsaved_changes_dialog&&s&&t.preventDefault()}),ConcreteEvent.sub("EditModeBeforeBlockSubmit",function(){s=!1}),ConcreteEvent.sub("EditModeBlockAddInline EditModeBlockEditInline",function(){s=!0}),ConcreteEvent.sub("EditModeExitInline",function(t,e){app.config.show_unsaved_changes_dialog&&(!(0<c(".redactor-toolbar").length)||e&&("save_inline"===e.action||"confirm_close"===e.action)?s=!1:(t.stopPropagation(),t.stopImmediatePropagation(),c(i).jqdialog(o)))});a.prototype={toggleSwitch:function(t){var i=t,t="OFF",e="ON",n=!1;if(void 0===i.attr("name"))return!1;void 0!==i.data("csb-off-text")&&(t=i.data("csb-off-text")),void 0!==i.data("csb-on-text")&&(e=i.data("csb-on-text")),void 0!==i.data("csb-is-disabled")&&(n=i.data("csb-is-disabled")),i.data("csb-panel");function o(t){var e=c('div[data-panel-toggle="'+i.data("csb-panel")+'"]');t&&"show"==t?e.slideDown("fast","easeOutCubic"):e.slideUp("fast","easeOutCubic")}i.bootstrapSwitch({size:"small",offText:t,onText:e,disabled:n,onInit:function(e,t,i){o(i?"show":"hide");var n=c(e).closest(".bootstrap-switch-container");n.attr({role:"checkbox","aria-checked":i,tabindex:"0"}),n.on("keydown",function(t){32===(t.keyCode||t.which)&&(t.preventDefault(),c(e).bootstrapSwitch("toggleState"))})},onSwitchChange:function(t,e){e?(o("show"),i.val("1")):(o("hide"),i.val("0")),c(t.target).closest(".bootstrap-switch-container").attr("aria-checked",e)}})},categoryPicker:function(o){var a=c("div.block-ui"),s=c("ul.sortable-categories",a),r=_(c("script[role='editable-category']",a).remove().html()).template(),l=c("input.editable-category-value",a);s.sortable(),s.disableSelection(),d.call(this,s),null!=o&&c.each(s.find(".category-input"),function(t,e){return p.call(this,c(this),o)}),c(".sp-replacer").attr("tabindex",0),c(".sp-replacer").on("keypress",function(t){13===t.which&&c(this).trigger("click")}),a.find("button.add-sortable-category").click(function(t){var e=l.val().trim();if(e.length){var i={},n=(a.val(""),s.children("li.empty").remove(),0),e=(void 0!==s.children("li")&&(n=s.children("li").length),i=null!=o?{value:e,id:n,color:function(t){if(void 0===t)return!1;for(var e=[],i=0,n=t.length-1;0<=n;n--)for(var o=t[n].length-1;0<=o;o--)e[i]=t[n][o],i++;return e.sort(function(t,e){return Math.random()-.5}),e[0]}.call(this,o)}:{value:e,id:n},c(r(i)));if(e.find("button.delete").click(function(t){window.confirm("Do you want to delete this category?")&&(c(this).closest("li.category-item").remove(),0===s.children().length)&&c("<li class='list-group-item category-item empty'>None</li>").appendTo(editable_categories)}),d.call(this,e),s.prepend(e),null!=o)return p.call(this,e.find(".category-input"),o);e.find(".sp-replacer").attr("tabindex",0),e.find(".sp-replacer").on("keypress",function(t){13===t.which&&c(this).trigger("click")})}return t.preventDefault(),!1})}},t.HiveBlockUI=a;function a(){}function d(t){void 0!==c.fn.editable&&void 0!==t&&(c.fn.editable.defaults.mode="inline",t.find("a").editable({success:function(t,e){void 0!==c(this).data("category-name")&&""!=c(this).data("category-name")&&c(".category-item-"+c(this).data("pk")+' input[name="'+c(this).data("category-name")+'Name[]"]').val(e)}}))}function p(t,e){var i;void 0!==c.fn.spectrum&&void 0!==t&&void 0!==e&&(i=(t=t).val(),t.spectrum({value:i,color:i,preferredFormat:"hex",showPaletteOnly:!0,togglePaletteOnly:!0,togglePaletteMoreText:"more",togglePaletteLessText:"less",palette:e}))}}(this,$),!function(t,o){"use strict";t.ConcreteDashbordPanelBadge={init:function(t){t=t.getDOMID(),t=o("#"+t);0===t.length?console.log("panel not found"):t.find(".badge[data-badge]").each(function(t,e){var i=o(e),n=i.attr("data-badge");o.get(CCM_DISPATCHER_FILENAME+"/ccm/system/panels/dashboard/badge/"+n).done(function(t){void 0!==t.total&&(i.text(t.total),0<t.total)&&i.addClass("badge-notification")}).fail(function(){console.error("Unable to load badge for "+n)})})}}}(this,$),Concrete.event.subscribe("PanelLoad",function(t,e){e.panel&&"dashboard"===e.panel.getIdentifier()&&ConcreteDashbordPanelBadge.init(e.panel)}),!function(t){"use strict";i=[];var i,e={getOverlays:function(){return i},getByIdentifier:function(t){for(var e=0;e<i.length;e++)if(i[e].getIdentifier()==t)return i[e];return null},createOverlay:function(t){t=new HiveOverlay(t=t||{});return i.push(t),t}};t.HiveOverlayManager=e}(this,$),!function(t,i){"use strict";n="hive/files/member/list",a="hive/files/member/file",s=i('#ccm-toolbar .badge[data-badge="notifications"]'),o=i("#ccm-toolbar .ccm-notifications"),r=i("#ccm-toolbar .notifications-dropdown-menu"),e=i("#ccm-toolbar .hive-v2-notifications"),o.on("show.bs.dropdown",function(){c()}),r.on("click.bs.dropdown",function(t){t.stopPropagation()}),r.on("click",".js-delete-file",function(t){t.preventDefault();var t=this.getAttribute("data-id");t&&(t=t,i.ajax({method:"DELETE",url:s.attr("data-url")+"/"+a+"/"+t,dataType:"json",headers:{Authorization:"Bearer "+s.attr("data-token2")}}).done(function(t){c()}))}),o.length&&(c(),function e(){var t={authtoken:s.attr("data-token"),sort:"bucket_id",order:"desc",length:"100"};o.hasClass("open")&&(t["panel-open"]=1),i.ajax({method:"GET",url:s.attr("data-url")+"/"+n,dataType:"json",data:t}
2).done(function(t){t.error?u():(p(t),o.hasClass("open")&&d(t),setTimeout(e,5e3))})}());var n,a,s,o,r,e,l={open:function(){o.addClass("open")},close:function(){o.removeClass("open")},addPending:function(){i("#ccm-toolbar .no-notifications").length&&r.empty(),r.prepend('<li class="dropdown-item loading-item"><div class="loader" style="display:block;" role="status"><span class="sr-only">Loading...</span></div><div class="placeholder-text-container"><div class="placeholder-text line-lg"></div><div class="placeholder-text line-md"></div><div class="placeholder-text line-sm"></div></div></li>')}};function c(){var t={authtoken:s.attr("data-token"),sort:"bucket_id",order:"desc",length:"100"};o.hasClass("open")&&(t["panel-open"]=1),i.ajax({method:"GET",url:s.attr("data-url")+"/"+n,dataType:"json",data:t}).done(function(t){t.error?u():(d(t),p(t))})}function d(t){r.empty(),0<t.result.length?i.each(t.result,function(t,e){var i="<small>"+ccmi18n_hive.notifications.exportInProgress+' - <a href="#" data-id="'+e.bucket_id+'" class="js-delete-file">'+ccmi18n_hive.notifications.cancel+"</a></small>",n='<div class="notification-progress-icon"><div class="loader" style="display:block;" role="status"><span class="sr-only">Loading...</span></div></div>',o="";"ready"===e.bucket_status&&(i="<small>"+ccmi18n_hive.notifications.readyForDownload+' - <a class="notification-download" href="'+s.attr("data-url")+"/"+a+"/"+e.bucket_id+"?authtoken="+s.attr("data-token2")+'" download>'+ccmi18n_hive.notifications.download+"</a></small>",n='<i class="hive-v2-file-report" aria-hidden="true"></i>'),"0"===e.bucket_downloaded&&(o='<div class="new-notification"><span class="notification-circle"></span></div>'),r.append('<li class="dropdown-item">'+n+'<div class="notification-items"><span>'+e.bucket_file_name+"</span>"+i+'</div><div class="notification-cta">'+o+'<a href="#" data-id="'+e.bucket_id+'" class="js-delete-file remove-notification"><i class="fa fa-times" aria-hidden="true"></i></a></div></li>')}):r.append('<li class="dropdown-item no-notifications">'+ccmi18n_hive.notifications.ThereAreNoNotifications+"</li>")}function p(t){s.text(t.details.new_downloads),0<t.details.new_downloads?(s.addClass("badge-notification"),e.addClass("wiggle")):(s.removeClass("badge-notification"),e.removeClass("wiggle"))}function u(){i(".error-notifications").length||(r.empty(),r.append('<li class="dropdown-item error-notifications">'+ccmi18n_hive.notifications.errorOccured+"</li>"))}t.HiveNotifications=l}(this,$),void 0!==$.fn.tooltip&&(hiveBootstrapWhitelist=$.fn.tooltip.Constructor.DEFAULTS.whiteList,hiveBootstrapWhitelist.button=[],hiveBootstrapWhitelist["*"].push("data-src"),hiveBootstrapWhitelist["*"].push("data-index")),!function(){var e=[].slice;!function(r,o){"use strict";var a;(t.prototype._constructor=t).prototype.setPrevOptions=function(){return this.prevOptions=r.extend(!0,{},this.options)},t.prototype.state=function(t,e){return void 0===t?this.options.state:(this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")||((this.$element.is(":radio")?r("[name='"+this.$element.attr("name")+"']"):this.$element).trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",t=!!t).trigger("change.bootstrapSwitch",e)),this.$element)},t.prototype.toggleState=function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)},t.prototype.size=function(t){return void 0===t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this.options.baseClass+"-"+this.options.size),t&&this.$wrapper.addClass(this.options.baseClass+"-"+t),this._width(),this._containerPosition(),this.options.size=t,this.$element)},t.prototype.animate=function(t){return void 0===t?this.options.animate:(t=!!t)===this.options.animate?this.$element:this.toggleAnimate()},t.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this.options.baseClass+"-animate"),this.$element},t.prototype.disabled=function(t){return void 0===t?this.options.disabled:(t=!!t)===this.options.disabled?this.$element:this.toggleDisabled()},t.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this.options.baseClass+"-disabled"),this.$element},t.prototype.readonly=function(t){return void 0===t?this.options.readonly:(t=!!t)===this.options.readonly?this.$element:this.toggleReadonly()},t.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this.options.baseClass+"-readonly"),this.$element},t.prototype.indeterminate=function(t){return void 0===t?this.options.indeterminate:(t=!!t)===this.options.indeterminate?this.$element:this.toggleIndeterminate()},t.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},t.prototype.inverse=function(t){return void 0===t?this.options.inverse:(t=!!t)===this.options.inverse?this.$element:this.toggleInverse()},t.prototype.toggleInverse=function(){var t,e;return this.$wrapper.toggleClass(this.options.baseClass+"-inverse"),e=this.$on.clone(!0),t=this.$off.clone(!0),this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element},t.prototype.onColor=function(t){var e=this.options.onColor;return void 0===t?e:(null!=e&&this.$on.removeClass(this.options.baseClass+"-"+e),this.$on.addClass(this.options.baseClass+"-"+t),this.options.onColor=t,this.$element)},t.prototype.offColor=function(t){var e=this.options.offColor;return void 0===t?e:(null!=e&&this.$off.removeClass(this.options.baseClass+"-"+e),this.$off.addClass(this.options.baseClass+"-"+t),this.options.offColor=t,this.$element)},t.prototype.onText=function(t){return void 0===t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)},t.prototype.offText=function(t){return void 0===t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)},t.prototype.labelText=function(t){return void 0===t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)},t.prototype.handleWidth=function(t){return void 0===t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.labelWidth=function(t){return void 0===t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.baseClass=function(t){return this.options.baseClass},t.prototype.wrapperClass=function(t){return void 0===t?this.options.wrapperClass:(t=t||r.fn.bootstrapSwitch.defaults.wrapperClass,this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)},t.prototype.radioAllOff=function(t){return void 0===t?this.options.radioAllOff:((t=!!t)===this.options.radioAllOff||(this.options.radioAllOff=t),this.$element)},t.prototype.onInit=function(t){return void 0===t?this.options.onInit:(t=t||r.fn.bootstrapSwitch.defaults.onInit,this.options.onInit=t,this.$element)},t.prototype.onSwitchChange=function(t){return void 0===t?this.options.onSwitchChange:(t=t||r.fn.bootstrapSwitch.defaults.onSwitchChange,this.options.onSwitchChange=t,this.$element)},t.prototype.destroy=function(){var t=this.$element.closest("form");return t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},t.prototype._width=function(){var i,n,t=this.$on.add(this.$off);return t.add(this.$label).css("width",""),i="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,t.width(i),this.$label.
2width((n=this,function(t,e){return"auto"!==n.options.labelWidth?n.options.labelWidth:e<i?i:e})),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},t.prototype._containerPosition=function(e,t){return null==e&&(e=this.options.state),this.$container.css("margin-left",(i=this,function(){var t=[0,"-"+i._handleWidth+"px"];return i.options.indeterminate?"-"+i._handleWidth/2+"px":e?i.options.inverse?t[1]:t[0]:i.options.inverse?t[0]:t[1]})),t?setTimeout(function(){return t()},50):void 0;var i},t.prototype._init=function(){var t,e,i,n=function(){return i.setPrevOptions(),i._width(),i._containerPosition(null,function(){return i.options.animate?i.$wrapper.addClass(i.options.baseClass+"-animate"):void 0})};return(i=this).$wrapper.is(":visible")?n():t=o.setInterval((e=this,function(){return e.$wrapper.is(":visible")?(n(),o.clearInterval(t)):void 0}),50)},t.prototype._elementHandlers=function(){return this.$element.on({"setPreviousOptions.bootstrapSwitch":function(t){return s.setPrevOptions()},"previousState.bootstrapSwitch":function(t){return a.options=a.prevOptions,a.options.indeterminate&&a.$wrapper.addClass(a.options.baseClass+"-indeterminate"),a.$element.prop("checked",a.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(t,e){return t.preventDefault(),t.stopImmediatePropagation(),t=o.$element.is(":checked"),o._containerPosition(t),t===o.options.state||(o.options.state=t,o.$wrapper.toggleClass(o.options.baseClass+"-off").toggleClass(o.options.baseClass+"-on"),e)?void 0:(o.$element.is(":radio")&&r("[name='"+o.$element.attr("name")+"']").not(o.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),o.$element.trigger("switchChange.bootstrapSwitch",[t]))},"focus.bootstrapSwitch":function(t){return t.preventDefault(),n.$wrapper.addClass(n.options.baseClass+"-focused")},"blur.bootstrapSwitch":function(t){return t.preventDefault(),i.$wrapper.removeClass(i.options.baseClass+"-focused")},"keydown.bootstrapSwitch":(e=i=n=o=a=s=this,function(t){if(t.which&&!e.options.disabled&&!e.options.readonly)switch(t.which){case 37:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!1);case 39:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!0)}})});var e,i,n,o,a,s},t.prototype._handleHandlers=function(){return this.$on.on("click.bootstrapSwitch",(i=this,function(t){return t.preventDefault(),t.stopPropagation(),i.state(!1),i.$element.trigger("focus.bootstrapSwitch")})),this.$off.on("click.bootstrapSwitch",(e=this,function(t){return t.preventDefault(),t.stopPropagation(),e.state(!0),e.$element.trigger("focus.bootstrapSwitch")}));var e,i},t.prototype._labelHandlers=function(){return this.$label.on({click:function(t){return t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(t){return o._dragStart||o.options.disabled||o.options.readonly?void 0:(t.preventDefault(),t.stopPropagation(),o._dragStart=(t.pageX||t.originalEvent.touches[0].pageX)-parseInt(o.$container.css("margin-left"),10),o.options.animate&&o.$wrapper.removeClass(o.options.baseClass+"-animate"),o.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(t){if(null!=n._dragStart&&(t.preventDefault(),!((t=(t.pageX||t.originalEvent.touches[0].pageX)-n._dragStart)<-n._handleWidth||0<t)))return n._dragEnd=t,n.$container.css("margin-left",n._dragEnd+"px")},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(t){if(i._dragStart)return t.preventDefault(),i.options.animate&&i.$wrapper.addClass(i.options.baseClass+"-animate"),i._dragEnd?(t=i._dragEnd>-i._handleWidth/2,i._dragEnd=!1,i.state(i.options.inverse?!t:t)):i.state(!i.options.state),i._dragStart=!1},"mouseleave.bootstrapSwitch":(e=i=n=o=this,function(t){return e.$label.trigger("mouseup.bootstrapSwitch")})});var e,i,n,o},t.prototype._externalLabelHandler=function(){var e,i=this.$element.closest("label");return i.on("click",(e=this,function(t){return t.preventDefault(),t.stopImmediatePropagation(),t.target===i[0]?e.toggleState():void 0}))},t.prototype._formHandler=function(){var t=this.$element.closest("form");return t.data("bootstrap-switch")?void 0:t.on("reset.bootstrapSwitch",function(){return o.setTimeout(function(){return t.find("input").filter(function(){return r(this).data("bootstrap-switch")}).each(function(){return r(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},t.prototype._getClasses=function(t){var e,i,n,o;if(!r.isArray(t))return[this.options.baseClass+"-"+t];for(i=[],n=0,o=t.length;n<o;n++)e=t[n],i.push(this.options.baseClass+"-"+e);return i},a=t,r.fn.bootstrapSwitch=function(){var i=arguments[0],n=2<=arguments.length?e.call(arguments,1
2):[],o=this;return this.each(function(){var t=r(this),e=t.data("bootstrap-switch");return e||t.data("bootstrap-switch",e=new a(this,i)),"string"==typeof i?o=e[i].apply(e,n):void 0}),o},r.fn.bootstrapSwitch.Constructor=a,r.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}};function t(e,t){var i,n,o;null==t&&(t={}),this.$element=r(e),this.options=r.extend({},r.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},t),this.prevOptions={},this.$wrapper=r("<div>",{class:(o=this,function(){var t=[""+o.options.baseClass].concat(o._getClasses(o.options.wrapperClass));return t.push(o.options.state?o.options.baseClass+"-on":o.options.baseClass+"-off"),null!=o.options.size&&t.push(o.options.baseClass+"-"+o.options.size),o.options.disabled&&t.push(o.options.baseClass+"-disabled"),o.options.readonly&&t.push(o.options.baseClass+"-readonly"),o.options.indeterminate&&t.push(o.options.baseClass+"-indeterminate"),o.options.inverse&&t.push(o.options.baseClass+"-inverse"),o.$element.attr("id")&&t.push(o.options.baseClass+"-id-"+o.$element.attr("id")),t.join(" ")}())}),this.$container=r("<div>",{class:this.options.baseClass+"-container"}),this.$on=r("<span>",{html:this.options.onText,class:this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=r("<span>",{html:this.options.offText,class:this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=r("<span>",{html:this.options.labelText,class:this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",(n=this,function(){return n.options.onInit.apply(e,arguments)})),this.$element.on("switchChange.bootstrapSwitch",(i=this,function(t){return!1===i.options.onSwitchChange.apply(e,arguments)?(i.$element.is(":radio")?r("[name='"+i.$element.attr("name")+"']"):i.$element).trigger("previousState.bootstrapSwitch",!0):void 0})),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}}(window.jQuery,window)}.call(this);var RedactorPlugins,RedactorPlugins=RedactorPlugins||{};!function(n){RedactorPlugins.countlimit=function(){return{init:function(){void 0!==this.opts.callbacks.counter&&this.opts.limiter&&(this.$editor.words=0,this.$editor.characters=0,this.$editor.spaces=0,this.$editor.on("keyup.redactor-plugin-counter",n.proxy(function(t){if(this.countlimit.count(),this.opts.callbacks.counter({words:this.$editor.words,characters:this.$editor.characters,spaces:this.$editor.spaces}),"words"==this.opts.limiter.type&&this.$editor.words>this.opts.limiter.count||"words"!=this.opts.limiter.type&&this.$editor.characters>this.opts.limiter.count)return"function"==typeof this.opts.callbacks.onOver&&this.opts.callbacks.onOver(),!1;"function"==typeof this.opts.callbacks.onSafe&&this.opts.callbacks.onSafe(
2)},this)),this.$editor.on("keydown.redactor-plugin-countlimit",n.proxy(function(t){var e=t.which,t=t.ctrlKey||t.metaKey;if(!(e===this.keyCode.BACKSPACE||e===this.keyCode.DELETE||e===this.keyCode.ESC||e===this.keyCode.SHIFT||37===e||38===e||39===e||40===e||t&&65===e||t&&82===e||t&&116===e))return this.countlimit.count(),!("words"==this.opts.limiter.type&&this.$editor.words>=this.opts.limiter.count||"words"!=this.opts.limiter.type&&this.$editor.characters>=this.opts.limiter.count)&&void 0},this)))},count:function(){var t,e=this.code.get(),i=e.replace(/<\/(.*?)>/gi,""),e=(i=(i=(i=(i=(i=i.replace(/<(.*?)>/gi,"")).replace(/\t/gi,"")).replace(/\n/gi,"")).replace(/\r/gi,"")).replace(/\u200B/g,""),i=n.trim(i),e.replace(/<\/(.*?)>/gi," "));e=(e=(e=(e=(e=e.replace(/<(.*?)>/gi,"")).replace(/\t/gi,"")).replace(/\n/gi," ")).replace(/\r/gi," ")).replace(/\u200B/g,""),e=n.trim(e),""!==i?(e=e.split(/\s+/),t=i.match(/\s/g),this.$editor.words=e?e.length:0,this.$editor.spaces=t?t.length:0,this.$editor.characters=i.length):this.$editor.words=this.$editor.spaces=this.$editor.characters=0},blur:function(){this.countlimit.count(),this.opts.callbacks.counter({words:this.$editor.words,characters:this.$editor.characters,spaces:this.$editor.spaces})}}}}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.