mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update gitattributes and Rebuild bundles
This commit is contained in:
parent
a5754674b7
commit
d4521cbc92
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -1,3 +1,7 @@
|
||||
admin/javascript/src/ export-ignore
|
||||
docs/ export-ignore
|
||||
javascript/src/ export ignore
|
||||
|
||||
# Hide diffs
|
||||
admin/javascript/dist/ -diff
|
||||
javascript/dist/ -diff
|
4
admin/javascript/dist/CMSSecurity.js
vendored
4
admin/javascript/dist/CMSSecurity.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.CMSSecurity', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssCMSSecurity = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/LeftAndMain.Ping.js
vendored
4
admin/javascript/dist/LeftAndMain.Ping.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.LeftAndMain.Ping', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssLeftAndMainPing = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/LeftAndMain.js
vendored
4
admin/javascript/dist/LeftAndMain.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.LeftAndMain', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssLeftAndMain = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.MemberDatetimeOptionsetField', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssMemberDatetimeOptionsetField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/MemberImportForm.js
vendored
4
admin/javascript/dist/MemberImportForm.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.MemberImportForm', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssMemberImportForm = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/ModelAdmin.js
vendored
4
admin/javascript/dist/ModelAdmin.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.ModelAdmin', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssModelAdmin = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/SecurityAdmin.js
vendored
4
admin/javascript/dist/SecurityAdmin.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.SecurityAdmin', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssSecurityAdmin = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
6
admin/javascript/dist/bundle-leftandmain.js
vendored
6
admin/javascript/dist/bundle-leftandmain.js
vendored
@ -1,3 +1,3 @@
|
||||
!function e(t,n,i){function s(o,r){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!r&&l)return l(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return s(n?n:e)},c,c.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){var t=e(".cms-container").find("iframe");t.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset")}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var i,s=this,a=e(".cms-container").find("iframe");i=function(t){var n,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(s).length||n.length||(s.tabs("option","active",!1),a=e(".cms-container").find("iframe"),a.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",i)}),e(document).off("click.ss-ui-action-tabset",i))},e(document).on("click.ss-ui-action-tabset",i),a.length>0&&a.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",i)})},riseUp:function(t,n){var i,s,a,o,r,l,d,c,u;return i=e(this).find(".ui-tabs-panel").outerHeight(),s=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-s,o=e(this).find(".ui-tabs-nav").offset().top,r=n.newPanel,l=n.newTab,o+i>=a&&o-i>0?(this.addClass("rise-up"),null!==l.position()&&(d=-r.outerHeight(),c=r.parents(".south"),c&&(u=l.offset().top-c.offset().top,d-=u),e(r).css("top",d+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(r).css("top","0px")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},{jQuery:"jQuery"}],2:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);a["default"].entwine("ss.tree",function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return e(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},registerDefault:function(){this.register("admin/pages/batchactions/publish",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/unpublish",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/delete",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete?"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/archive",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_ARCHIVE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/restore",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/deletefromlive",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{num:e.length}));return t?e:!1})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(t){var n=this,i=this.getTree(),s=this.getIDs(),a=[],o=e(".cms-content-batchactions-button"),r=this.find(":input[name=Action]").val();null==t&&(t=i);for(var l in s)e(e(i).getNodeByID(l)).addClass("selected").attr("selected","selected");if(!r||-1==r||!o.hasClass("active"))return void e(t).find("li").each(function(){e(this).setEnabled(!0)});e(t).find("li").each(function(){a.push(e(this).data("id")),e(this).addClass("treeloading").setEnabled(!1)});var d=r+"/applicablepages/?csvIDs="+a.join(",");jQuery.getJSON(d,function(i){jQuery(t).find("li").each(function(){e(this).removeClass("treeloading");var t=e(this).data("id");0==t||e.inArray(t,i)>=0?e(this).setEnabled(!0):(e(this).removeClass("selected").setEnabled(!1),e(this).prop("selected",!1))}),n.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(t){var n=this,i=this.getIDs(),s=this.getTree(),a=this.getActions();if(!i||!i.length)return alert(r["default"]._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),t.preventDefault(),!1;var o=this.find(":input[name=Action]").val();if(a[o]&&(i=this.getActions()[o].apply(this,[i])),!i||!i.length)return t.preventDefault(),!1;this.setIDs(i),s.find("li").removeClass("failed");var l=this.find(":submit:first");return l.addClass("loading"),jQuery.ajax({url:o,type:"POST",data:this.serializeArray(),complete:function(e,t){l.removeClass("loading"),s.jstree("refresh",-1),n.setIDs([]),n.find(":input[name=Action]").val("").change();var i=e.getResponseHeader("X-Status");i&&statusMessage(decodeURIComponent(i),"success"==t?"good":"bad")},success:function(t,n){var i,a;if(t.modified){var o=[];for(i in t.modified)a=s.getNodeByID(i),s.jstree("set_text",a,t.modified[i].TreeTitle),o.push(a);e(o).effect("highlight")}if(t.deleted)for(i in t.deleted)a=s.getNodeByID(i),a.length&&s.jstree("delete_node",a);if(t.error)for(i in t.error)a=s.getNodeByID(i),e(a).addClass("failed")},dataType:"json"}),t.preventDefault(),!1}}),e(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var t=e(".cms-tree"),n=e("#Form_BatchActionsForm");this._super(),this.data("active")?(t.addClass("multiple"),t.removeClass("draggable"),n.serializeFromTree()):(t.removeClass("multiple"),t.addClass("draggable")),e("#Form_BatchActionsForm").refreshSelected()}}),e("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(t){var n=e(t.target.form),i=n.find(":submit"),s=e(t.target).val();s&&-1!=s?i.removeAttr("disabled").button("refresh"):i.attr("disabled","disabled").button("refresh"),e("#Form_BatchActionsForm").refreshSelected(),this.trigger("liszt:updated"),this._super(t)}})})},{i18n:"i18n",jQuery:"jQuery"}],3:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,i){var s=i.rslt.obj,a=t.find(":input[name=ID]").val(),o=i.args[2],r=e(".cms-container");if(!o)return!1;if(e(s).hasClass("disabled"))return!1;if(e(s).data("id")!=a){var l=e(s).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(s).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),r.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},{jQuery:"jQuery"}],4:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);window.onbeforeunload=function(e){var t=(0,a["default"])(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")?r["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT"):void 0},a["default"].entwine("ss",function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var t in{action:!0,method:!0,enctype:!0,name:!0}){var n=this.find(":input[name=_form_"+t+"]");n&&(this.attr(t,n.val()),n.remove())}if(this.hasClass("validationerror")){var i=this.find(".message.validation, .message.required").first().closest(".tab");e(".cms-container").clearCurrentTabState(),i.closest(".ss-tabset").tabs("option","active",i.index(".tab"))}this._super()},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed"))return!0;var e=confirm(r["default"]._t("LeftAndMain.CONFIRMUNSAVED"));return e&&this.removeClass("changed"),e},onsubmit:function(e,t){return"_blank"!=this.prop("target")?(t&&this.closest(".cms-container").submitForm(this,t),!1):void 0},validate:function(){var e=!0;return this.trigger("validate",{isValid:e}),e},"from .htmleditor":{oneditorinit:function(t){var n=this,i=e(t.target).closest(".field.htmleditor"),s=i.find("textarea.htmleditor").getEditor().getInstance();s.onClick.add(function(e){n.saveFieldFocus(i.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chzn-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),i=[];if(i.push({id:n,selected:t}),i)try{window.sessionStorage.setItem(n,JSON.stringify(i))}catch(s){if(s.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw s}}},restoreFieldFocus:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t,n,i,s,a,o=this,r="undefined"!=typeof window.sessionStorage&&window.sessionStorage,l=r?window.sessionStorage.getItem(this.attr("id")):null,d=l?JSON.parse(l):!1,c=0!==this.find(".ss-tabset").length;if(r&&d.length>0){if(e.each(d,function(n,i){o.is("#"+i.id)&&(t=e("#"+i.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),i="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),c&&i!==n)return;s=e(t).closest(".togglecomposite"),s.length>0&&s.accordion("activate",s.find(".ui-accordion-header")),a=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),a=e(t).position().top),e(t).focus(),a>e(window).height()/2&&o.find(".cms-content-fields").scrollTop(a)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .Actions input.action[type=submit], .cms-edit-form .Actions button.action").entwine({onclick:function(e){return this.hasClass("gridfield-button-delete")&&!confirm(r["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?(e.preventDefault(),!1):(this.is(":disabled")||this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".cms-edit-form .Actions input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .Actions button.action.ss-ui-action-cancel").entwine({onclick:function(e){History.getStateByIndex(1)?History.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}})})},{i18n:"i18n",jQuery:"jQuery"}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),i=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after('<label class="right" for="'+t+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){i[e?"hide":"show"](),e=!e}),i.hide())}})})},{jQuery:"jQuery"}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},{jQuery:"jQuery"}],7:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].fn.layout.defaults.resize=!1,jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.threeColumnCompressor=function(e,t){function n(e){var t=e+"Size";return function(e){var n=s[t](),i=o[t](),a=r[t](),l=e.insets();return width=n.width+i.width+a.width,height=Math.max(n.height,i.height,a.height),{width:l.left+l.right+width,height:l.top+l.bottom+height}}}if("undefined"==typeof e.menu||"undefined"==typeof e.content||"undefined"==typeof e.preview)throw'Spec is invalid. Please provide "menu", "content" and "preview" elements.';if("undefined"==typeof t.minContentWidth||"undefined"==typeof t.minPreviewWidth||"undefined"==typeof t.mode)throw'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';if("split"!==t.mode&&"content"!==t.mode&&"preview"!==t.mode)throw'Spec is invalid. "mode" should be either "split", "content" or "preview"';var i={options:t},s=a["default"].jLayoutWrap(e.menu),o=a["default"].jLayoutWrap(e.content),r=a["default"].jLayoutWrap(e.preview);return i.layout=function(n){var i=n.bounds(),a=n.insets(),l=a.top,d=i.height-a.bottom,c=a.left,u=i.width-a.right,h=e.menu.width(),f=0,p=0;"preview"===this.options.mode?(f=0,p=u-c-h):"content"===this.options.mode?(f=u-c-h,p=0):(f=(u-c-h)/2,p=u-c-(h+f),f<this.options.minContentWidth?(f=this.options.minContentWidth,p=u-c-(h+f)):p<this.options.minPreviewWidth&&(p=this.options.minPreviewWidth,f=u-c-(h+p)),(f<this.options.minContentWidth||p<this.options.minPreviewWidth)&&(f=u-c-h,p=0));var m={content:e.content.hasClass("column-hidden"),preview:e.preview.hasClass("column-hidden")},g={content:0===f,preview:0===p};return e.content.toggleClass("column-hidden",g.content),e.preview.toggleClass("column-hidden",g.preview),s.bounds({x:c,y:l,height:d-l,width:h}),s.doLayout(),c+=h,o.bounds({x:c,y:l,height:d-l,width:f}),g.content||o.doLayout(),c+=f,r.bounds({x:c,y:l,height:d-l,width:p}),g.preview||r.doLayout(),g.content!==m.content&&e.content.trigger("columnvisibilitychanged"),g.preview!==m.preview&&e.preview.trigger("columnvisibilitychanged"),f+p<t.minContentWidth+t.minPreviewWidth?e.preview.trigger("disable"):e.preview.trigger("enable"),n},i.preferred=n("preferred"),i.minimum=n("minimum"),i.maximum=n("maximum"),i}},{jQuery:"jQuery"}],8:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,i){e(".cms-menu-list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,i)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu-list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu-list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append('<span class="child-flyout-indicator"></span>').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&(n=e.cookie("cms-menu-sticky"),void 0!==n&&null!==n&&(t="true"===n)),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t,n=this.getPersistedCollapsedState(),i=e(".cms-menu").getPersistedStickyState(),s=this.siteTreePresent();return t=void 0===n?s:n!==s&&i?n:s},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu-list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed"))}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu-list li").entwine({toggleFlyout:function(t){var n=e(this);n.children("ul").first().hasClass("collapsed-flyout")&&(t?n.children("ul").find("li").fadeIn("fast"):n.children("ul").find("li").hide())}}),e(".cms-menu-list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu-list .toggle").entwine({onclick:function(e){this.getMenuItem().toggle(),e.preventDefault()}}),e(".cms-menu-list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.open(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){var e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu-list *").entwine({getMenu:function(){return this.parents(".cms-menu-list:first")}}),e(".cms-menu-list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu-list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var i=this.getMenuItem(),s=this.attr("href");n||(s=e("base").attr("href")+s);var a=i.find("li");if(a.length)a.first().find("a").click();else if(!e(".cms-container").loadPanel(s))return!1;i.select()}}}),e(".cms-menu-list li .toggle-children").entwine({onclick:function(e){var t=this.closest("li");return t.toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu-list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({onadd:function(){var t=e(".cms-menu").getPersistedStickyState()?!0:!1;this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&i===!1&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(i),this.toggleCSS(i),this.toggleIndicator(i),this._super()}})})},{jQuery:"jQuery"}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&(n=e.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==n&&null!==n&&(t="true"===n)),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("<div class='cms-panel-toggle south'></div>").append('<a class="toggle-expand" href="#"><span>»</span></a>').append('<a class="toggle-collapse" href="#"><span>«</span></a>'),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var i,s;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),i=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(i),s=this.find(".cms-panel-content-collapsed"),s.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),n!==!1&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){(e||!this.hasClass("collapsed"))&&this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},{jQuery:"jQuery"}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);a["default"].entwine("ss.preview",function(e){e(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(t,n){var i=this,s=this._getNavigatorStates();return n!==!1&&e.each(s,function(e,n){i.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var i=e(".cms-container");if("split"==t)i.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)i.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;i.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return n!==!1&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){var t=this.getSizes();return this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.find(".preview-device-outer").width(t[e].width).height(t[e].height),this.find(".preview-device-inner").width(t[e].width),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();n&&e(".preview-mode-selector").changeVisibleMode(n.mode);var i=this.getCurrentSizeName();return i&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){return this._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+e):void 0},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var t=e("#FontFixStyleElement");return t.length||(t=e('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),t},onadd:function(){var t=this,n=(this.parent(),this.find("iframe"));n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){"interactive"==n[0].readyState&&(t.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){t.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('<div class="cms-preview-overlay ui-widget-overlay-light"></div>'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(i){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var t,n;return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent()}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),
|
||||
this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){var t=e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("data-link"),active:n.is(":radio")?n.is(":checked"):n.is(":selected")}:null});return t},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),i=null;t&&(i=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var s=null;return i[0]?s=i[0].url:t.length?(this.setCurrentStateName(t[0].name),s=t[0].url):this.setCurrentStateName(null),this.is(".column-hidden")?(this.setPendingURL(s),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),s?(this._loadUrl(s),this._unblock()):this._block()),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls"),n=e(".cms-edit-form .cms-navigator");n.length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t=this.find("iframe")[0].contentDocument,n=(e(".cms-container"),e(t).find("meta[name=x-page-id]").attr("content")),i=e(t).find("meta[name=x-cms-edit-link]").attr("content"),s=e(".cms-content");n&&s.find(":input[name=ID]").val()!=n&&window.History.enabled&&e(".cms-container").entwine(".ss").loadPanel(i)}},_adjustIframeForPreview:function(){var e=this.find("iframe")[0];if(e){var t=e.contentDocument;if(t){for(var n=t.getElementsByTagName("A"),i=0;i<n.length;i++){var s=n[i].getAttribute("href");s&&s.match(/^http:\/\//)&&n[i].setAttribute("target","_blank")}var a=t.getElementById("SilverStripeNavigator");a&&(a.style.display="none");var o=t.getElementById("SilverStripeNavigatorMessage");o&&(o.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[t])}}}}),e(".cms-edit-form").entwine({onadd:function(){this._super(),e(".cms-preview")._initialiseFromContent()}}),e(".cms-preview-states").entwine({changeVisibleState:function(e){this.find('input[data-name="'+e+'"]').prop("checked",!0)}}),e(".cms-preview-states .state-name").entwine({onclick:function(t){this.parent().find(".active").removeClass("active"),this.next("label").addClass("active");var n=e(this).attr("data-name");e(".cms-preview").changeState(n)}}),e(".preview-mode-selector").entwine({changeVisibleMode:function(e){this.find("select").val(e).trigger("liszt:updated")._addIcon()}}),e(".preview-mode-selector select").entwine({onchange:function(t){this._super(t),t.preventDefault();var n=e(this).val();e(".cms-preview").changeMode(n)}}),e(".preview-mode-selector .chzn-results li").entwine({onclick:function(t){if(e.browser.msie){t.preventDefault();var n=this.index(),i=this.closest(".preview-mode-selector").find("select option:eq("+n+")").val();e(".cms-preview").changeMode(i)}}}),e(".cms-preview.column-hidden").entwine({onmatch:function(){e("#preview-mode-dropdown-in-content").show(),e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(r["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()},onunmatch:function(){e("#preview-mode-dropdown-in-content").hide(),this._super()}}),e("#preview-mode-dropdown-in-content").entwine({onmatch:function(){e(".cms-preview").is(".column-hidden")?this.show():this.hide(),this._super()},onunmatch:function(){this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function(e){this.find("select").val(e).trigger("liszt:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function(t){t.preventDefault();var n=e(this).val();e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown").entwine({"onliszt:showing_dropdown":function(){this.siblings().find(".chzn-drop").addClass("open")._alignRight()},"onliszt:hiding_dropdown":function(){this.siblings().find(".chzn-drop").removeClass("open")._removeRightAlign()},"onliszt:ready":function(){this._super(),this._addIcon()},_addIcon:function(){var e=this.find(":selected"),t=e.attr("data-icon"),n=this.parent().find(".chzn-container a.chzn-single"),i=n.attr("data-icon");return"undefined"!=typeof i&&n.removeClass(i),n.addClass(t),n.attr("data-icon",t),this}}),e(".preview-selector .chzn-drop").entwine({_alignRight:function(){var t=this;e(this).hide(),setTimeout(function(){e(t).css({left:"auto",right:0}),e(t).show()},100)},_removeRightAlign:function(){e(this).css({right:"auto"})}}),e(".preview-mode-selector .chzn-drop li:last-child").entwine({onmatch:function(){e(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),e(".preview-scroll").entwine({ToolbarSize:53,_redraw:function(){var e=this.getToolbarSize();window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.height()-e;this.height(t)},onmatch:function(){this._redraw(),this._super()},onunmatch:function(){this._super()}}),e(".preview-device-outer").entwine({onclick:function(){this.toggleClass("rotate")}})})},{i18n:"i18n",jQuery:"jQuery"}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,i){n.setIsLoaded(!0),i.inst._set_settings({html_data:{ajax:{url:n.data("urlTree"),data:function(t){var i=n.data("searchparams")||[];return i=e.grep(i,function(e,t){return"ID"!=e.name&&"value"!=e.name}),i.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),i.push({name:"ajax",value:1}),i}}}}),n.updateFromEditForm(),n.css("visibility","visible"),i.inst.hide_checkboxes()}).bind("before.jstree",function(t,i){if("start_drag"==i.func&&(!n.hasClass("draggable")||n.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(i.func,["check_node","uncheck_node"])){var s=e(i.args[0]).parents("li:first"),a=s.find("li:not(.disabled)");if(s.hasClass("disabled")&&0==a)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,i){if(!n.getIsUpdatingTree()){var s=i.rslt.o,a=i.rslt.np,o=(i.inst._get_parent(s),e(a).data("id")||0),r=e(s).data("id"),l=e.map(e(s).siblings().andSelf(),function(t){return e(t).data("id")});e.ajax({url:n.data("urlSavetreenode"),type:"POST",data:{ID:r,ParentID:o,SiblingIDs:l},success:function(){e(".cms-edit-form :input[name=ID]").val()==r&&e(".cms-edit-form :input[name=ParentID]").val(o),n.updateNodesFromServer([r])},statusCode:{403:function(){e.jstree.rollback(i.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=e(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([n])}},getTreeConfig:function(){var t=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(n){var i=e(n.o),s=e(n.np),a=n.ot.get_container()[0]==n.np[0],o=i.getClassname(),r=s.getClassname(),l=t.getHints(),d=[],c=r?r:"Root",u=l&&"undefined"!=typeof l[c]?l[c]:null;u&&i.attr("class").match(/VirtualPage-([^\s]*)/)&&(o=RegExp.$1),u&&(d="undefined"!=typeof u.disallowedChildren?u.disallowedChildren:[]);var h=!(0===i.data("id")||i.hasClass("status-archived")||a&&"inside"!=n.p||s.hasClass("nochildren")||d.length&&-1!=e.inArray(o,d));return h}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,i){var s=this,a=void 0!==n.ParentID?s.getNodeByID(n.ParentID):!1,o=e(t),r={data:""};o.hasClass("jstree-open")?r.state="open":o.hasClass("jstree-closed")&&(r.state="closed"),this.jstree("create_node",a.length?a:-1,"last",r,function(e){for(var t=e.attr("class"),n=0;n<o[0].attributes.length;n++){var s=o[0].attributes[n];e.attr(s.name,s.value)}e.addClass(t).html(o.html()),i(e)})},updateNode:function(t,n,i){var s=e(n),a=t.attr("class"),o=i.NextID?this.getNodeByID(i.NextID):!1,r=i.PrevID?this.getNodeByID(i.PrevID):!1,l=i.ParentID?this.getNodeByID(i.ParentID):!1;e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,s.attr(n))}),a=a.replace(/status-[^\s]*/,"");var d=t.children("ul").detach();t.addClass(a).html(s.html()).append(d),o&&o.length?this.jstree("move_node",t,o,"before"):r&&r.length?this.jstree("move_node",t,r,"after"):this.jstree("move_node",t,l.length?l:-1)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){var n=this,i=!1;this.setIsUpdatingTree(!0),n.jstree("save_selected");var s=function(e){n.getNodeByID(e.data("id")).not(e).remove(),n.jstree("deselect_all"),n.jstree("select_node",e)};n.jstree("open_node",this.getNodeByID(0)),n.jstree("save_opened"),n.jstree("save_selected"),e.ajax({url:e.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(t,a){e.each(t,function(e,t){var a=n.getNodeByID(e);return t?void(a.length?(n.updateNode(a,t.html,t),setTimeout(function(){s(a)},500)):(i=!0,t.ParentID&&!n.find("li[data-id="+t.ParentID+"]").length?n.jstree("load_node",-1,function(){newNode=n.find("li[data-id="+e+"]"),s(newNode)}):n.createNode(t.html,t,function(e){s(e)}))):void n.jstree("delete_node",a)}),i||(n.jstree("deselect_all"),n.jstree("reselect"),n.jstree("reopen"))},complete:function(){n.setIsUpdatingTree(!1)}})}}}),e(".cms-tree.multiple").entwine({onmatch:function(){this._super(),this.jstree("show_checkboxes")},onunmatch:function(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function(){return e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},{jQuery:"jQuery"}],12:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},{jQuery:"jQuery"}],13:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].noConflict(),window.ss=window.ss||{};var windowWidth,windowHeight;window.ss.debounce=function(e,t,n){var i,s,a,o=function(){i=null,n||e.apply(s,a)};return function(){var r=n&&!i;s=this,a=arguments,clearTimeout(i),i=setTimeout(o,t),r&&e.apply(s,a)}},(0,_jQuery2["default"])(window).bind("resize.leftandmain",function(e){var t=function(){(0,_jQuery2["default"])(".cms-container").trigger("windowresize")};if(_jQuery2["default"].browser.msie&&parseInt(_jQuery2["default"].browser.version,10)<9){var n=(0,_jQuery2["default"])(window).width(),i=(0,_jQuery2["default"])(window).height();(n!=windowWidth||i!=windowHeight)&&(windowWidth=n,windowHeight=i,t())}else t()}),_jQuery2["default"].entwine.warningLevel=_jQuery2["default"].entwine.WARN_LEVEL_BESTPRACTISE,_jQuery2["default"].entwine("ss",function($){$(window).on("message",function(e){var t,n=e.originalEvent,i="object"===_typeof(n.data)?n.data:JSON.parse(n.data);if($.path.parseUrl(window.location.href).domain===$.path.parseUrl(n.origin).domain)switch(t=$("undefined"==typeof i.target?window:i.target),i.type){case"event":t.trigger(i.event,i.data);break;case"callback":t[i.callback].call(t,i.data)}});var positionLoadingSpinner=function(){var e=120,t=$(".ss-loading-screen .loading-animation"),n=($(window).height()-t.height())/2;t.css("top",n+e),t.show()},applyChosen=function e(t){if(t.is(":visible")){t.addClass("has-chzn").chosen({allow_single_deselect:!0,disable_search_threshold:20});var n=t.prop("title");n&&t.siblings(".chzn-container").prop("title",n)}else setTimeout(function(){t.show(),e(t)},500)},isSameUrl=function(e,t){var n=$("base").attr("href");e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,n),t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,n);var i=$.path.parseUrl(e),s=$.path.parseUrl(t);return i.pathname.replace(/\/*$/,"")==s.pathname.replace(/\/*$/,"")&&i.search==s.search},ajaxCompleteEvent=window.ss.debounce(function(){$(window).trigger("ajaxComplete")},1e3,!0);$(window).bind("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete(function(e,t,n){if(window.History.enabled){var i,s=t.getResponseHeader("X-ControllerURL"),a=History.getPageUrl().replace(/\/$/,""),o=n.url;null===s||isSameUrl(a,s)&&isSameUrl(o,s)||(i={id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]},window.History.pushState(i,"",s))}var r=t.getResponseHeader("X-Status")?t.getResponseHeader("X-Status"):t.statusText,l=t.getResponseHeader("X-Reauthenticate"),d=t.status<200||t.status>399?"bad":"good",c=["OK"];return l?void $(".cms-container").showLoginDialog():(0!==t.status&&r&&$.inArray(r,c)&&statusMessage(decodeURIComponent(r),d),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('<p class="ss-loading-incompat-warning"><span class="notice">Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.</span></p>').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},fromWindow:{onstatechange:function(e){this.handleStateChange(e)}},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},"from .cms-menu-list li a":{onclick:function(e){var t=$(e.target).attr("href");e.which>1||t==this._tabStateUrl()||this.splitViewMode()}},updateLayoutOptions:function(e){var t=this.getLayoutOptions(),n=!1;for(var i in e)t[i]!==e[i]&&(t[i]=e[i],n=!0);n&&this.redraw()},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function(e){var t=this._findFragments(e||["Content"]),n=t.find(":data(changetracker)").add(t.filter(":data(changetracker)")),i=!0;return n.length?(n.each(function(){$(this).confirmUnsavedChanges()||(i=!1)}),i):!0},loadPanel:function(e,t,n,i,s){n||(n={}),t||(t=""),s||(s=History.getState().url),this.checkCanNavigate(n.pjax?n.pjax.split(","):["Content"])&&(this.saveTabState(),window.History.enabled?($.extend(n,{__forceReferer:s}),i?($.extend(n,{__forceReload:Math.random()}),window.History.replaceState(n,t,e)):window.History.pushState(n,t,e)):window.location=$.path.makeUrlAbsolute(e,$("base").attr("href")))},reloadCurrentPanel:function(){this.loadPanel(window.History.getState().url,null,null,!0)},submitForm:function(e,t,n,i){var s=this;t||(t=this.find(".Actions :submit[name=action_save]")),t||(t=this.find(".Actions :submit:first")),e.trigger("beforesubmitform"),this.trigger("submitform",{form:e,button:t}),$(t).addClass("loading");var a=e.validate();if("undefined"!=typeof a&&!a)return statusMessage("Validation failed.","bad"),$(t).removeClass("loading"),!1;var o=e.serializeArray();return o.push({name:$(t).attr("name"),value:"1"}),o.push({name:"BackURL",value:History.getPageUrl().replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:e.attr("action"),data:o,type:"POST",complete:function(){$(t).removeClass("loading")},success:function(t,i,a){e.removeClass("changed"),n&&n(t,i,a);var r=s.handleAjaxResponse(t,i,a);r&&r.filter("form").trigger("aftersubmitform",{status:i,xhr:a,formData:o})}},i)),!1},LastState:null,PauseState:!1,handleStateChange:function(){if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var e=this,t=window.History,n=t.getState(),i=n.data.pjax||"Content",s={},a=i.split(","),o=this._findFragments(a);this.setStateChangeCount(this.getStateChangeCount()+1);var r=$.browser.msie&&parseInt($.browser.version,10)<9;if(r&&this.getStateChangeCount()>20)return void(document.location.href=n.url);if(!this.checkCanNavigate()){if(t.emulated.pushState)return;var l=this.getLastState();return this.setPauseState(!0),l?t.pushState(l.id,l.title,l.url):t.back(),void this.setPauseState(!1)}if(this.setLastState(n),o.length<a.length&&(i="Content",a=["Content"],o=this._findFragments(a)),this.trigger("beforestatechange",{state:n,element:o}),s["X-Pjax"]=i,"undefined"!=typeof n.data.__forceReferer){var d=n.data.__forceReferer;try{d=decodeURI(d)}catch(c){}finally{s["X-Backurl"]=encodeURI(d)}}o.addClass("loading");var u=$.ajax({headers:s,url:n.url,complete:function(){e.setStateChangeXHR(null),o.removeClass("loading")},success:function(t,i,s){var a=e.handleAjaxResponse(t,i,s,n);e.trigger("afterstatechange",{data:t,status:i,xhr:s,element:a,state:n})}});this.setStateChangeXHR(u)}},loadFragment:function(e,t){var n,i=this,s={},a=$("base").attr("href"),o=this.getFragmentXHR();return"undefined"!=typeof o[t]&&null!==o[t]&&(o[t].abort(),o[t]=null),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,a),s["X-Pjax"]=t,n=$.ajax({headers:s,url:e,success:function(e,t,n){var s=i.handleAjaxResponse(e,t,n,null);i.trigger("afterloadfragment",{data:e,status:t,xhr:n,elements:s})},error:function(e,t,n){i.trigger("loadfragmenterror",{xhr:e,status:t,error:n})},complete:function(){var e=i.getFragmentXHR();"undefined"!=typeof e[t]&&null!==e[t]&&(e[t]=null)}}),o[t]=n,n},handleAjaxResponse:function(e,t,n,i){var s,a,o,r;if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){var l=$("base").attr("href"),d=n.getResponseHeader("X-ControllerURL"),s=$.path.isAbsoluteUrl(d)?d:$.path.makeUrlAbsolute(d,l);return void(document.location.href=s)}if(e){var c=n.getResponseHeader("X-Title");c&&(document.title=decodeURIComponent(c.replace(/\+/g," ")));var u,h={};n.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?h=e:(o=document.createDocumentFragment(),jQuery.clean([e],document,o,[]),r=$(jQuery.merge([],o.childNodes)),a="Content",r.is("form")&&!r.is("[data-pjax-fragment~=Content]")&&(a="CurrentForm"),h[a]=r),this.setRedrawSuppression(!0);try{$.each(h,function(e,t){var n=$("[data-pjax-fragment]").filter(function(){return-1!=$.inArray(e,$(this).data("pjaxFragment").split(" "))}),i=$(t);if(u?u.add(i):u=i,i.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var s=n.attr("style"),a=n.parent(),o="undefined"!=typeof a.data("jlayout"),r=["east","west","center","north","south","column-hidden"],l=n.attr("class"),d=[];l&&(d=$.grep(l.split(" "),function(e){return $.inArray(e,r)>=0})),i.removeClass(r.join(" ")).addClass(d.join(" ")),s&&i.attr("style",s);var c=i.find("style").detach();c.length&&$(document).find("head").append(c),n.replaceWith(i),!a.is(".cms-container")&&o&&a.layout()});var f=u.filter("form");f.hasClass("cms-tabset")&&f.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(i&&"undefined"!=typeof i.data.tabState?i.data.tabState:null),u}},_findFragments:function(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ");for(t in e)if(-1!=$.inArray(e[t],n))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(t,n){var i=$(n).attr("id");i&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:i,selected:$(n).tabs("option","selected")}))}),e){var n="tabs-"+t;try{window.sessionStorage.setItem(n,JSON.stringify(e))}catch(i){if(i.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw i}}}},restoreTabState:function(e){var t=this,n=this._tabStateUrl(),i="undefined"!=typeof window.sessionStorage&&window.sessionStorage,s=i?window.sessionStorage.getItem("tabs-"+n):null,a=s?JSON.parse(s):!1;this.find(".cms-tabset, .ss-tabset").each(function(){var n,i,s=$(this),o=s.attr("id"),r=s.find(".ss-tabs-force-active");s.data("tabs")&&(s.tabs("refresh"),r.length?n=r.index():e&&e[o]?(i=s.find(e[o].tabSelector),i.length&&(n=i.index())):a&&$.each(a,function(e,t){s.is("#"+t.id)&&(n=t.selected)}),null!==n&&(s.tabs("option","active",n),t.trigger("tabstaterestored")))})},clearTabState:function(e){if("undefined"!=typeof window.sessionStorage){var t=window.sessionStorage;if(e)t.removeItem("tabs-"+e);else for(var n=0;n<t.length;n++)t.key(n).match(/^tabs-/)&&t.removeItem(t.key(n))}},clearCurrentTabState:function(){this.clearTabState(this._tabStateUrl())},_tabStateUrl:function(){return History.getState().url.replace(/\?.*/,"").replace(/#.*/,"").replace($("base").attr("href"),"")},showLoginDialog:function(){var e=$("body").data("member-tempid"),t=$(".leftandmain-logindialog"),n="CMSSecurity/login";t.length&&t.remove(),n=$.path.addSearchParams(n,{tempid:e,BackURL:window.location.href}),t=$('<div class="leftandmain-logindialog"></div>'),t.attr("id",(new Date).getTime()),t.data("url",n),$("body").append(t)}}),$(".leftandmain-logindialog").entwine({onmatch:function(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function(){this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},reauthenticate:function(e){"undefined"!=typeof e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),"undefined"!=typeof e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>'),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),i={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,i),e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("<span></span>").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var e="ss-ui-dialog-"+this.getUUID(),t=$("#"+e);t.length||(t=$('<div class="ss-ui-dialog" id="'+e+'" />'),$("body").append(t));var n=this.data("popupclass")?this.data("popupclass"):"";return t.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:n}),!1}}),$(".cms-content .Actions").entwine({onmatch:function(){this.find(".ss-ui-button").click(function(){var e=this.form;e&&(e.clickedButton=this,setTimeout(function(){e.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function(){var e=$(this).parents(".field.date:first"),t=e.data();return t.showcalendar?(t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),$(this).datepicker(t),void this._super()):void this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .fieldholder-small select.dropdown").entwine({onmatch:function(){return this.is(".no-chzn")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chzn chzn-done"),this.siblings(".chzn-container").remove(),applyChosen(this),void this._super())},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .ss-gridfield").entwine({showDetailView:function(e){var t=window.location.search.replace(/^\?/,"");t&&(e=$.path.addSearchParams(e,t)),$(".cms-container").loadPanel(e)}}),$(".cms-search-form").entwine({onsubmit:function(e){var t,n;t=this.find(":input:not(:submit)").filter(function(){var e=$.grep($(this).fieldValue(),function(e){return e});return e.length}),n=this.attr("action"),t.length&&(n=$.path.addSearchParams(n,t.serialize()));var i=this.closest(".cms-container");return i.find(".cms-edit-form").tabs("select",0),i.loadPanel(n,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var t=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("liszt:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,i){e.html(t)}})):this.html(window._panelDeferredCache[t]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var e=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},activate:function(e,t){t.newTab&&t.newTab.find(".cms-panel-link").click();var n=$(this).closest("form").find(".Actions");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}})},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),t[n?"slideDown":"slideUp"]({complete:function(){e.data("collapsed",!n),e.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(e,t){e=jQuery("<div/>").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})},errorMessage=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery"}],14:[function(e,t,n){"use strict";e("../../src/LeftAndMain.Layout.js"),e("../../src/LeftAndMain.js"),e("../../src/LeftAndMain.ActionTabSet.js"),e("../../src/LeftAndMain.Panel.js"),e("../../src/LeftAndMain.Tree.js"),e("../../src/LeftAndMain.Content.js"),e("../../src/LeftAndMain.EditForm.js"),e("../../src/LeftAndMain.Menu.js"),e("../../src/LeftAndMain.Preview.js"),e("../../src/LeftAndMain.BatchActions.js"),e("../../src/LeftAndMain.FieldHelp.js"),e("../../src/LeftAndMain.FieldDescriptionToggle.js"),e("../../src/LeftAndMain.TreeDropdownField.js")},{"../../src/LeftAndMain.ActionTabSet.js":1,"../../src/LeftAndMain.BatchActions.js":2,
|
||||
"../../src/LeftAndMain.Content.js":3,"../../src/LeftAndMain.EditForm.js":4,"../../src/LeftAndMain.FieldDescriptionToggle.js":5,"../../src/LeftAndMain.FieldHelp.js":6,"../../src/LeftAndMain.Layout.js":7,"../../src/LeftAndMain.Menu.js":8,"../../src/LeftAndMain.Panel.js":9,"../../src/LeftAndMain.Preview.js":10,"../../src/LeftAndMain.Tree.js":11,"../../src/LeftAndMain.TreeDropdownField.js":12,"../../src/LeftAndMain.js":13}]},{},[14]);
|
||||
!function e(t,n,i){function s(o,r){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!r&&l)return l(o,!0);if(a)return a(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return s(n?n:e)},c,c.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".ss-tabset.ss-ui-action-tabset").entwine({IgnoreTabState:!0,onadd:function(){this._super(),this.tabs({collapsible:!0,active:!1})},onremove:function(){var t=e(".cms-container").find("iframe");t.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset")}),e(document).off("click.ss-ui-action-tabset"),this._super()},ontabsbeforeactivate:function(e,t){this.riseUp(e,t)},onclick:function(e,t){this.attachCloseHandler(e,t)},attachCloseHandler:function(t,n){var i,s=this,a=e(".cms-container").find("iframe");i=function(t){var n,a;n=e(t.target).closest(".ss-ui-action-tabset .ui-tabs-panel"),e(t.target).closest(s).length||n.length||(s.tabs("option","active",!1),a=e(".cms-container").find("iframe"),a.each(function(t,n){e(n).contents().off("click.ss-ui-action-tabset",i)}),e(document).off("click.ss-ui-action-tabset",i))},e(document).on("click.ss-ui-action-tabset",i),a.length>0&&a.each(function(t,n){e(n).contents().on("click.ss-ui-action-tabset",i)})},riseUp:function(t,n){var i,s,a,o,r,l,d,c,u;return i=e(this).find(".ui-tabs-panel").outerHeight(),s=e(this).find(".ui-tabs-nav").outerHeight(),a=e(window).height()+e(document).scrollTop()-s,o=e(this).find(".ui-tabs-nav").offset().top,r=n.newPanel,l=n.newTab,o+i>=a&&o-i>0?(this.addClass("rise-up"),null!==l.position()&&(d=-r.outerHeight(),c=r.parents(".south"),c&&(u=l.offset().top-c.offset().top,d-=u),e(r).css("top",d+"px"))):(this.removeClass("rise-up"),null!==l.position()&&e(r).css("top","0px")),!1}}),e(".cms-content-actions .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&e(n.newPanel).css("left",n.newTab.position().left+"px")}}),e(".cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(this).closest(".ss-ui-action-tabset").removeClass("tabset-open tabset-open-last")}}),e(".cms-content-fields .ss-tabset.ss-ui-action-tabset").entwine({ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).length>0&&(e(n.newTab).hasClass("last")?(e(n.newPanel).css({left:"auto",right:"0px"}),e(n.newPanel).parent().addClass("tabset-open-last")):(e(n.newPanel).css("left",n.newTab.position().left+"px"),e(n.newTab).hasClass("first")&&(e(n.newPanel).css("left","0px"),e(n.newPanel).parent().addClass("tabset-open"))))}}),e(".cms-tree-view-sidebar .cms-actions-row.ss-tabset.ss-ui-action-tabset").entwine({"from .ui-tabs-nav li":{onhover:function(t){e(t.target).parent().find("li .active").removeClass("active"),e(t.target).find("a").addClass("active")}},ontabsbeforeactivate:function(t,n){this._super(t,n),e(n.newPanel).css({left:"auto",right:"auto"}),e(n.newPanel).length>0&&e(n.newPanel).parent().addClass("tabset-open")}})})},{jQuery:"jQuery"}],2:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);a["default"].entwine("ss.tree",function(e){e("#Form_BatchActionsForm").entwine({Actions:[],getTree:function(){return e(".cms-tree")},fromTree:{oncheck_node:function(e,t){this.serializeFromTree()},onuncheck_node:function(e,t){this.serializeFromTree()}},registerDefault:function(){this.register("admin/pages/batchactions/publish",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_PUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to publish?"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/unpublish",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_UNPUBLISH_PROMPT","You have {num} page(s) selected.\n\nDo you really want to unpublish"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/delete",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_DELETE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete?"),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/archive",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_ARCHIVE_PROMPT","You have {num} page(s) selected.\n\nAre you sure you want to archive these pages?\n\nThese pages and all of their children pages will be unpublished and sent to the archive."),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/restore",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_RESTORE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to restore to stage?\n\nChildren of archived pages will be restored to the root level, unless those pages are also being restored."),{num:e.length}));return t?e:!1}),this.register("admin/pages/batchactions/deletefromlive",function(e){var t=confirm(r["default"].inject(r["default"]._t("CMSMAIN.BATCH_DELETELIVE_PROMPT","You have {num} page(s) selected.\n\nDo you really want to delete these pages from live?"),{num:e.length}));return t?e:!1})},onadd:function(){this.registerDefault(),this._super()},register:function(e,t){this.trigger("register",{type:e,callback:t});var n=this.getActions();n[e]=t,this.setActions(n)},unregister:function(e){this.trigger("unregister",{type:e});var t=this.getActions();t[e]&&delete t[e],this.setActions(t)},refreshSelected:function(t){var n=this,i=this.getTree(),s=this.getIDs(),a=[],o=e(".cms-content-batchactions-button"),r=this.find(":input[name=Action]").val();null==t&&(t=i);for(var l in s)e(e(i).getNodeByID(l)).addClass("selected").attr("selected","selected");if(!r||-1==r||!o.hasClass("active"))return void e(t).find("li").each(function(){e(this).setEnabled(!0)});e(t).find("li").each(function(){a.push(e(this).data("id")),e(this).addClass("treeloading").setEnabled(!1)});var d=e.path.parseUrl(r),c=d.hrefNoSearch+"/applicablepages/";c=e.path.addSearchParams(c,d.search),c=e.path.addSearchParams(c,{csvIDs:a.join(",")}),jQuery.getJSON(c,function(i){jQuery(t).find("li").each(function(){e(this).removeClass("treeloading");var t=e(this).data("id");0==t||e.inArray(t,i)>=0?e(this).setEnabled(!0):(e(this).removeClass("selected").setEnabled(!1),e(this).prop("selected",!1))}),n.serializeFromTree()})},serializeFromTree:function(){var e=this.getTree(),t=e.getSelectedIDs();return this.setIDs(t),!0},setIDs:function(e){this.find(":input[name=csvIDs]").val(e?e.join(","):null)},getIDs:function(){var e=this.find(":input[name=csvIDs]").val();return e?e.split(","):[]},onsubmit:function(t){var n=this,i=this.getIDs(),s=this.getTree(),a=this.getActions();if(!i||!i.length)return alert(r["default"]._t("CMSMAIN.SELECTONEPAGE","Please select at least one page")),t.preventDefault(),!1;var o=this.find(":input[name=Action]").val();if(a[o]&&(i=this.getActions()[o].apply(this,[i])),!i||!i.length)return t.preventDefault(),!1;this.setIDs(i),s.find("li").removeClass("failed");var l=this.find(":submit:first");return l.addClass("loading"),jQuery.ajax({url:o,type:"POST",data:this.serializeArray(),complete:function(e,t){l.removeClass("loading"),s.jstree("refresh",-1),n.setIDs([]),n.find(":input[name=Action]").val("").change();var i=e.getResponseHeader("X-Status");i&&statusMessage(decodeURIComponent(i),"success"==t?"good":"bad")},success:function(t,n){var i,a;if(t.modified){var o=[];for(i in t.modified)a=s.getNodeByID(i),s.jstree("set_text",a,t.modified[i].TreeTitle),o.push(a);e(o).effect("highlight")}if(t.deleted)for(i in t.deleted)a=s.getNodeByID(i),a.length&&s.jstree("delete_node",a);if(t.error)for(i in t.error)a=s.getNodeByID(i),e(a).addClass("failed")},dataType:"json"}),t.preventDefault(),!1}}),e(".cms-content-batchactions-button").entwine({onmatch:function(){this._super(),this.updateTree()},onunmatch:function(){this._super()},onclick:function(e){this.updateTree()},updateTree:function(){var t=e(".cms-tree"),n=e("#Form_BatchActionsForm");this._super(),this.data("active")?(t.addClass("multiple"),t.removeClass("draggable"),n.serializeFromTree()):(t.removeClass("multiple"),t.addClass("draggable")),e("#Form_BatchActionsForm").refreshSelected()}}),e("#Form_BatchActionsForm select[name=Action]").entwine({onchange:function(t){var n=e(t.target.form),i=n.find(":submit"),s=e(t.target).val();s&&-1!=s?i.removeAttr("disabled").button("refresh"):i.attr("disabled","disabled").button("refresh"),e("#Form_BatchActionsForm").refreshSelected(),this.trigger("liszt:updated"),this._super(t)}})})},{i18n:"i18n",jQuery:"jQuery"}],3:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-content").entwine({onadd:function(){this.find(".cms-tabset").redrawTabs(),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw(),this.find(".cms-content-actions").redraw()}}),e(".cms-content .cms-tree").entwine({onadd:function(){var t=this;this._super(),this.bind("select_node.jstree",function(n,i){var s=i.rslt.obj,a=t.find(":input[name=ID]").val(),o=i.args[2],r=e(".cms-container");if(!o)return!1;if(e(s).hasClass("disabled"))return!1;if(e(s).data("id")!=a){var l=e(s).find("a:first").attr("href");l&&"#"!=l?(l=l.split("?")[0],t.jstree("deselect_all"),t.jstree("uncheck_all"),e.path.isExternal(e(s).find("a:first"))&&(l=l=e.path.makeUrlAbsolute(l,e("base").attr("href"))),document.location.search&&(l=e.path.addSearchParams(l,document.location.search.replace(/^\?/,""))),r.loadPanel(l)):t.removeForm()}})}}),e(".cms-content .cms-content-fields").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),e(".cms-content .cms-content-header, .cms-content .cms-content-actions").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.height("auto"),this.height(this.innerHeight()-this.css("padding-top")-this.css("padding-bottom"))}})})},{jQuery:"jQuery"}],4:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);window.onbeforeunload=function(e){var t=(0,a["default"])(".cms-edit-form");return t.trigger("beforesubmitform"),t.is(".changed")?r["default"]._t("LeftAndMain.CONFIRMUNSAVEDSHORT"):void 0},a["default"].entwine("ss",function(e){e(".cms-edit-form").entwine({PlaceholderHtml:"",ChangeTrackerOptions:{ignoreFieldSelector:".no-change-track, .ss-upload :input, .cms-navigator :input"},onadd:function(){this.attr("autocomplete","off"),this._setupChangeTracker();for(var t in{action:!0,method:!0,enctype:!0,name:!0}){var n=this.find(":input[name=_form_"+t+"]");n&&(this.attr(t,n.val()),n.remove())}if(this.hasClass("validationerror")){var i=this.find(".message.validation, .message.required").first().closest(".tab");e(".cms-container").clearCurrentTabState(),i.closest(".ss-tabset").tabs("option","active",i.index(".tab"))}this._super()},onremove:function(){this.changetracker("destroy"),this._super()},onmatch:function(){this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.add(this.find(".cms-tabset")).redrawTabs(),this.find(".cms-content-header").redraw()},_setupChangeTracker:function(){this.changetracker(this.getChangeTrackerOptions())},confirmUnsavedChanges:function(){if(this.trigger("beforesubmitform"),!this.is(".changed"))return!0;var e=confirm(r["default"]._t("LeftAndMain.CONFIRMUNSAVED"));return e&&this.removeClass("changed"),e},onsubmit:function(e,t){return"_blank"!=this.prop("target")?(t&&this.closest(".cms-container").submitForm(this,t),!1):void 0},validate:function(){var e=!0;return this.trigger("validate",{isValid:e}),e},"from .htmleditor":{oneditorinit:function(t){var n=this,i=e(t.target).closest(".field.htmleditor"),s=i.find("textarea.htmleditor").getEditor().getInstance();s.onClick.add(function(e){n.saveFieldFocus(i.attr("id"))})}},"from .cms-edit-form :input:not(:submit)":{onclick:function(t){this.saveFieldFocus(e(t.target).attr("id"))},onfocus:function(t){this.saveFieldFocus(e(t.target).attr("id"))}},"from .cms-edit-form .treedropdown *":{onfocusin:function(t){var n=e(t.target).closest(".field.treedropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-edit-form .dropdown .chzn-container a":{onfocusin:function(t){var n=e(t.target).closest(".field.dropdown");this.saveFieldFocus(n.attr("id"))}},"from .cms-container":{ontabstaterestored:function(e){this.restoreFieldFocus()}},saveFieldFocus:function(t){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var n=e(this).attr("id"),i=[];if(i.push({id:n,selected:t}),i)try{window.sessionStorage.setItem(n,JSON.stringify(i))}catch(s){if(s.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw s}}},restoreFieldFocus:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var t,n,i,s,a,o=this,r="undefined"!=typeof window.sessionStorage&&window.sessionStorage,l=r?window.sessionStorage.getItem(this.attr("id")):null,d=l?JSON.parse(l):!1,c=0!==this.find(".ss-tabset").length;if(r&&d.length>0){if(e.each(d,function(n,i){o.is("#"+i.id)&&(t=e("#"+i.selected))}),e(t).length<1)return void this.focusFirstInput();if(n=e(t).closest(".ss-tabset").find(".ui-tabs-nav .ui-tabs-active .ui-tabs-anchor").attr("id"),i="tab-"+e(t).closest(".ss-tabset .ui-tabs-panel").attr("id"),c&&i!==n)return;s=e(t).closest(".togglecomposite"),s.length>0&&s.accordion("activate",s.find(".ui-accordion-header")),a=e(t).position().top,e(t).is(":visible")||(t="#"+e(t).closest(".field").attr("id"),a=e(t).position().top),e(t).focus(),a>e(window).height()/2&&o.find(".cms-content-fields").scrollTop(a)}else this.focusFirstInput()}},focusFirstInput:function(){this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:first").focus()}}),e(".cms-edit-form .Actions input.action[type=submit], .cms-edit-form .Actions button.action").entwine({onclick:function(e){return this.hasClass("gridfield-button-delete")&&!confirm(r["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?(e.preventDefault(),!1):(this.is(":disabled")||this.parents("form").trigger("submit",[this]),e.preventDefault(),!1)}}),e(".cms-edit-form .Actions input.action[type=submit].ss-ui-action-cancel, .cms-edit-form .Actions button.action.ss-ui-action-cancel").entwine({onclick:function(e){History.getStateByIndex(1)?History.back():this.parents("form").trigger("submit",[this]),e.preventDefault()}}),e(".cms-edit-form .ss-tabset").entwine({onmatch:function(){if(!this.hasClass("ss-ui-action-tabset")){var e=this.find("> ul:first");1==e.children("li").length&&e.hide().parent().addClass("ss-tabset-tabshidden")}this._super()},onunmatch:function(){this._super()}})})},{i18n:"i18n",jQuery:"jQuery"}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-description-toggle").entwine({onadd:function(){var e=!1,t=this.prop("id").substr(0,this.prop("id").indexOf("_Holder")),n=this.find(".cms-description-trigger"),i=this.find(".description");this.hasClass("description-toggle-enabled")||(0===n.length&&(n=this.find(".middleColumn").first().after('<label class="right" for="'+t+'"><a class="cms-description-trigger" href="javascript:void(0)"><span class="btn-icon-information"></span></a></label>').next()),this.addClass("description-toggle-enabled"),n.on("click",function(){i[e?"hide":"show"](),e=!e}),i.hide())}})})},{jQuery:"jQuery"}],6:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms .field.cms-description-tooltip").entwine({onmatch:function(){this._super();var e=this.find(".description");e.length&&(this.attr("title",e.text()).tooltip({content:e.html()}),e.remove())}}),e(".cms .field.cms-description-tooltip :input").entwine({onfocusin:function(e){this.closest(".field").tooltip("open")},onfocusout:function(e){this.closest(".field").tooltip("close")}})})},{jQuery:"jQuery"}],7:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].fn.layout.defaults.resize=!1,jLayout="undefined"==typeof jLayout?{}:jLayout,jLayout.threeColumnCompressor=function(e,t){function n(e){var t=e+"Size";return function(e){var n=s[t](),i=o[t](),a=r[t](),l=e.insets();return width=n.width+i.width+a.width,height=Math.max(n.height,i.height,a.height),{width:l.left+l.right+width,height:l.top+l.bottom+height}}}if("undefined"==typeof e.menu||"undefined"==typeof e.content||"undefined"==typeof e.preview)throw'Spec is invalid. Please provide "menu", "content" and "preview" elements.';if("undefined"==typeof t.minContentWidth||"undefined"==typeof t.minPreviewWidth||"undefined"==typeof t.mode)throw'Spec is invalid. Please provide "minContentWidth", "minPreviewWidth", "mode"';if("split"!==t.mode&&"content"!==t.mode&&"preview"!==t.mode)throw'Spec is invalid. "mode" should be either "split", "content" or "preview"';var i={options:t},s=a["default"].jLayoutWrap(e.menu),o=a["default"].jLayoutWrap(e.content),r=a["default"].jLayoutWrap(e.preview);return i.layout=function(n){var i=n.bounds(),a=n.insets(),l=a.top,d=i.height-a.bottom,c=a.left,u=i.width-a.right,h=e.menu.width(),f=0,p=0;"preview"===this.options.mode?(f=0,p=u-c-h):"content"===this.options.mode?(f=u-c-h,p=0):(f=(u-c-h)/2,p=u-c-(h+f),f<this.options.minContentWidth?(f=this.options.minContentWidth,p=u-c-(h+f)):p<this.options.minPreviewWidth&&(p=this.options.minPreviewWidth,f=u-c-(h+p)),(f<this.options.minContentWidth||p<this.options.minPreviewWidth)&&(f=u-c-h,p=0));var m={content:e.content.hasClass("column-hidden"),preview:e.preview.hasClass("column-hidden")},g={content:0===f,preview:0===p};return e.content.toggleClass("column-hidden",g.content),e.preview.toggleClass("column-hidden",g.preview),s.bounds({x:c,y:l,height:d-l,width:h}),s.doLayout(),c+=h,o.bounds({x:c,y:l,height:d-l,width:f}),g.content||o.doLayout(),c+=f,r.bounds({x:c,y:l,height:d-l,width:p}),g.preview||r.doLayout(),g.content!==m.content&&e.content.trigger("columnvisibilitychanged"),g.preview!==m.preview&&e.preview.trigger("columnvisibilitychanged"),f+p<t.minContentWidth+t.minPreviewWidth?e.preview.trigger("disable"):e.preview.trigger("enable"),n},i.preferred=n("preferred"),i.minimum=n("minimum"),i.maximum=n("maximum"),i}},{jQuery:"jQuery"}],8:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".cms-panel.cms-menu").entwine({togglePanel:function(t,n,i){e(".cms-menu-list").children("li").each(function(){t?e(this).children("ul").each(function(){e(this).removeClass("collapsed-flyout"),e(this).data("collapse")&&(e(this).removeData("collapse"),e(this).addClass("collapse"))}):e(this).children("ul").each(function(){e(this).addClass("collapsed-flyout"),e(this).hasClass("collapse"),e(this).removeClass("collapse"),e(this).data("collapse",!0)})}),this.toggleFlyoutState(t),this._super(t,n,i)},toggleFlyoutState:function(t){if(t)e(".collapsed").find("li").show(),e(".cms-menu-list").find(".child-flyout-indicator").hide();else{e(".collapsed-flyout").find("li").each(function(){e(this).hide()});var n=e(".cms-menu-list ul.collapsed-flyout").parent();0===n.children(".child-flyout-indicator").length&&n.append('<span class="child-flyout-indicator"></span>').fadeIn(),n.children(".child-flyout-indicator").fadeIn()}},siteTreePresent:function(){return e("#cms-content-tools-CMSMain").length>0},getPersistedStickyState:function(){var t,n;return void 0!==e.cookie&&(n=e.cookie("cms-menu-sticky"),void 0!==n&&null!==n&&(t="true"===n)),t},setPersistedStickyState:function(t){void 0!==e.cookie&&e.cookie("cms-menu-sticky",t,{path:"/",expires:31})},getEvaluatedCollapsedState:function(){var t,n=this.getPersistedCollapsedState(),i=e(".cms-menu").getPersistedStickyState(),s=this.siteTreePresent();return t=void 0===n?s:n!==s&&i?n:s},onadd:function(){var t=this;setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0),e(window).on("ajaxComplete",function(e){setTimeout(function(){t.togglePanel(!t.getEvaluatedCollapsedState(),!1,!1)},0)}),this._super()}}),e(".cms-menu-list").entwine({onmatch:function(){this.find("li.current").select(),this.updateItems(),this._super()},onunmatch:function(){this._super()},updateMenuFromResponse:function(e){var t=e.getResponseHeader("X-Controller");if(t){var n=this.find("li#Menu-"+t.replace(/\\/g,"-").replace(/[^a-zA-Z0-9\-_:.]+/,""));n.hasClass("current")||n.select()}this.updateItems()},"from .cms-container":{onafterstatechange:function(e,t){this.updateMenuFromResponse(t.xhr)},onaftersubmitform:function(e,t){this.updateMenuFromResponse(t.xhr)}},"from .cms-edit-form":{onrelodeditform:function(e,t){this.updateMenuFromResponse(t.xmlhttp)}},getContainingPanel:function(){return this.closest(".cms-panel")},fromContainingPanel:{ontoggle:function(t){this.toggleClass("collapsed",e(t.target).hasClass("collapsed"))}},updateItems:function(){var t=this.find("#Menu-CMSMain");t[t.is(".current")?"show":"hide"]();var n=e(".cms-content input[name=ID]").val();n&&this.find("li").each(function(){e.isFunction(e(this).setRecordID)&&e(this).setRecordID(n)})}}),e(".cms-menu-list li").entwine({toggleFlyout:function(t){var n=e(this);n.children("ul").first().hasClass("collapsed-flyout")&&(t?n.children("ul").find("li").fadeIn("fast"):n.children("ul").find("li").hide())}}),e(".cms-menu-list li").hoverIntent(function(){e(this).toggleFlyout(!0)},function(){e(this).toggleFlyout(!1)}),e(".cms-menu-list .toggle").entwine({onclick:function(e){this.getMenuItem().toggle(),e.preventDefault()}}),e(".cms-menu-list li").entwine({onmatch:function(){this.find("ul").length&&this.find("a:first").append('<span class="toggle-children"><span class="toggle-children-icon"></span></span>'),this._super()},onunmatch:function(){this._super()},toggle:function(){this[this.hasClass("opened")?"close":"open"]()},open:function(){var e=this.getMenuItem();e&&e.open(),this.addClass("opened").find("ul").show(),this.find(".toggle-children").addClass("opened")},close:function(){this.removeClass("opened").find("ul").hide(),this.find(".toggle-children").removeClass("opened")},select:function(){var e=this.getMenuItem();if(this.addClass("current").open(),this.siblings().removeClass("current").close(),this.siblings().find("li").removeClass("current"),e){var t=e.siblings();e.addClass("current"),t.removeClass("current").close(),t.find("li").removeClass("current").close()}this.getMenu().updateItems(),this.trigger("select")}}),e(".cms-menu-list *").entwine({getMenu:function(){return this.parents(".cms-menu-list:first")}}),e(".cms-menu-list li *").entwine({getMenuItem:function(){return this.parents("li:first")}}),e(".cms-menu-list li a").entwine({onclick:function(t){var n=e.path.isExternal(this.attr("href"));if(!(t.which>1||n)&&"_blank"!=this.attr("target")){t.preventDefault();var i=this.getMenuItem(),s=this.attr("href");n||(s=e("base").attr("href")+s);var a=i.find("li");if(a.length)a.first().find("a").click();else if(!e(".cms-container").loadPanel(s))return!1;i.select()}}}),e(".cms-menu-list li .toggle-children").entwine({onclick:function(e){var t=this.closest("li");return t.toggle(),!1}}),e(".cms .profile-link").entwine({onclick:function(){return e(".cms-container").loadPanel(this.attr("href")),e(".cms-menu-list li").removeClass("current").close(),!1}}),e(".cms-menu .sticky-toggle").entwine({onadd:function(){var t=e(".cms-menu").getPersistedStickyState()?!0:!1;this.toggleCSS(t),this.toggleIndicator(t),this._super()},toggleCSS:function(e){this[e?"addClass":"removeClass"]("active")},toggleIndicator:function(e){this.next(".sticky-status-indicator").text(e?"fixed":"auto")},onclick:function(){var e=this.closest(".cms-menu"),t=e.getPersistedCollapsedState(),n=e.getPersistedStickyState(),i=void 0===n?!this.hasClass("active"):!n;void 0===t?e.setPersistedCollapsedState(e.hasClass("collapsed")):void 0!==t&&i===!1&&e.clearPersistedCollapsedState(),e.setPersistedStickyState(i),this.toggleCSS(i),this.toggleIndicator(i),this._super()}})})},{jQuery:"jQuery"}],9:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e.entwine.warningLevel=e.entwine.WARN_LEVEL_BESTPRACTISE,e(".cms-panel").entwine({WidthExpanded:null,WidthCollapsed:null,canSetCookie:function(){return void 0!==e.cookie&&void 0!==this.attr("id")},getPersistedCollapsedState:function(){var t,n;return this.canSetCookie()&&(n=e.cookie("cms-panel-collapsed-"+this.attr("id")),void 0!==n&&null!==n&&(t="true"===n)),t},setPersistedCollapsedState:function(t){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),t,{path:"/",expires:31})},clearPersistedCollapsedState:function(){this.canSetCookie()&&e.cookie("cms-panel-collapsed-"+this.attr("id"),"",{path:"/",expires:-1})},getInitialCollapsedState:function(){var e=this.getPersistedCollapsedState();return void 0===e&&(e=this.hasClass("collapsed")),e},onadd:function(){var t,n;if(!this.find(".cms-panel-content").length)throw new Exception('Content panel for ".cms-panel" not found');this.find(".cms-panel-toggle").length||(n=e("<div class='cms-panel-toggle south'></div>").append('<a class="toggle-expand" href="#"><span>»</span></a>').append('<a class="toggle-collapse" href="#"><span>«</span></a>'),this.append(n)),this.setWidthExpanded(this.find(".cms-panel-content").innerWidth()),t=this.find(".cms-panel-content-collapsed"),this.setWidthCollapsed(t.length?t.innerWidth():this.find(".toggle-expand").innerWidth()),this.togglePanel(!this.getInitialCollapsedState(),!0,!1),this._super()},togglePanel:function(e,t,n){var i,s;t||(this.trigger("beforetoggle.sspanel",e),this.trigger(e?"beforeexpand":"beforecollapse")),this.toggleClass("collapsed",!e),i=e?this.getWidthExpanded():this.getWidthCollapsed(),this.width(i),s=this.find(".cms-panel-content-collapsed"),s.length&&(this.find(".cms-panel-content")[e?"show":"hide"](),this.find(".cms-panel-content-collapsed")[e?"hide":"show"]()),n!==!1&&this.setPersistedCollapsedState(!e),this.trigger("toggle",e),this.trigger(e?"expand":"collapse")},expandPanel:function(e){(e||this.hasClass("collapsed"))&&this.togglePanel(!0)},collapsePanel:function(e){(e||!this.hasClass("collapsed"))&&this.togglePanel(!1)}}),e(".cms-panel.collapsed .cms-panel-toggle").entwine({onclick:function(e){this.expandPanel(),e.preventDefault()}}),e(".cms-panel *").entwine({getPanel:function(){return this.parents(".cms-panel:first")}}),e(".cms-panel .toggle-expand").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().expandPanel(),this._super(e)}}),e(".cms-panel .toggle-collapse").entwine({onclick:function(e){e.preventDefault(),e.stopPropagation(),this.getPanel().collapsePanel(),this._super(e)}}),e(".cms-content-tools.collapsed").entwine({onclick:function(e){this.expandPanel(),this._super(e)}})})},{jQuery:"jQuery"}],10:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s),o=e("i18n"),r=i(o);a["default"].entwine("ss.preview",function(e){e(".cms-preview").entwine({AllowedStates:["StageLink","LiveLink","ArchiveLink"],CurrentStateName:null,CurrentSizeName:"auto",IsPreviewEnabled:!1,DefaultMode:"split",Sizes:{auto:{width:"100%",height:"100%"},mobile:{width:"335px",height:"568px"},mobileLandscape:{width:"583px",height:"320px"},tablet:{width:"783px",height:"1024px"},tabletLandscape:{width:"1039px",height:"768px"},desktop:{width:"1024px",height:"800px"}},changeState:function(t,n){var i=this,s=this._getNavigatorStates();return n!==!1&&e.each(s,function(e,n){i.saveState("state",t)}),this.setCurrentStateName(t),this._loadCurrentState(),this.redraw(),this},changeMode:function(t,n){var i=e(".cms-container");if("split"==t)i.entwine(".ss").splitViewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState();else if("content"==t)i.entwine(".ss").contentViewMode(),this.setIsPreviewEnabled(!1);else{if("preview"!=t)throw"Invalid mode: "+t;i.entwine(".ss").previewMode(),this.setIsPreviewEnabled(!0),this._loadCurrentState()}return n!==!1&&this.saveState("mode",t),this.redraw(),this},changeSize:function(e){var t=this.getSizes();return this.setCurrentSizeName(e),this.removeClass("auto desktop tablet mobile").addClass(e),this.find(".preview-device-outer").width(t[e].width).height(t[e].height),this.find(".preview-device-inner").width(t[e].width),this.saveState("size",e),this.redraw(),this},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.getCurrentStateName();t&&this.find(".cms-preview-states").changeVisibleState(t);var n=e(".cms-container").entwine(".ss").getLayoutOptions();n&&e(".preview-mode-selector").changeVisibleMode(n.mode);var i=this.getCurrentSizeName();return i&&this.find(".preview-size-selector").changeVisibleSize(this.getCurrentSizeName()),this},saveState:function(e,t){this._supportsLocalStorage()&&window.localStorage.setItem("cms-preview-state-"+e,t)},loadState:function(e){return this._supportsLocalStorage()?window.localStorage.getItem("cms-preview-state-"+e):void 0},disablePreview:function(){return this.setPendingURL(null),this._loadUrl("about:blank"),this._block(),this.changeMode("content",!1),this.setIsPreviewEnabled(!1),this},enablePreview:function(){return this.getIsPreviewEnabled()||(this.setIsPreviewEnabled(!0),e.browser.msie&&e.browser.version.slice(0,3)<=7?this.changeMode("content"):this.changeMode(this.getDefaultMode(),!1)),this},getOrAppendFontFixStyleElement:function(){var t=e("#FontFixStyleElement");return t.length||(t=e('<style type="text/css" id="FontFixStyleElement" disabled="disabled">:before,:after{content:none !important}</style>').appendTo("head")),t},onadd:function(){var t=this,n=(this.parent(),this.find("iframe"));n.addClass("center"),n.bind("load",function(){t._adjustIframeForPreview(),t._loadCurrentPage(),e(this).removeClass("loading")}),e.browser.msie&&8===parseInt(e.browser.version,10)&&n.bind("readystatechange",function(e){"interactive"==n[0].readyState&&(t.getOrAppendFontFixStyleElement().removeAttr("disabled"),setTimeout(function(){t.getOrAppendFontFixStyleElement().attr("disabled","disabled")},0))}),this.append('<div class="cms-preview-overlay ui-widget-overlay-light"></div>'),this.find(".cms-preview-overlay").hide(),this.disablePreview(),this._super()},_supportsLocalStorage:function(){var e,t,n=new Date;try{return(e=window.localStorage).setItem(n,n),t=e.getItem(n)==n,e.removeItem(n),t&&e}catch(i){console.warn("localStorge is not available due to current browser / system settings.")}},onenable:function(){var t=e(".preview-mode-selector");t.removeClass("split-disabled"),t.find(".disabled-tooltip").hide()},ondisable:function(){var t=e(".preview-mode-selector");t.addClass("split-disabled"),t.find(".disabled-tooltip").show()},_block:function(){return this.addClass("blocked"),this.find(".cms-preview-overlay").show(),this},_unblock:function(){return this.removeClass("blocked"),this.find(".cms-preview-overlay").hide(),this},_initialiseFromContent:function(){var t,n;return e(".cms-previewable").length?(t=this.loadState("mode"),n=this.loadState("size"),this._moveNavigator(),t&&"content"==t||(this.enablePreview(),this._loadCurrentState()),this.redraw(),t&&this.changeMode(t),n&&this.changeSize(n)):this.disablePreview(),this},"from .cms-container":{onafterstatechange:function(e,t){t.xhr.getResponseHeader("X-ControllerURL")||this._initialiseFromContent();
|
||||
}},PendingURL:null,oncolumnvisibilitychanged:function(){var e=this.getPendingURL();e&&!this.is(".column-hidden")&&(this.setPendingURL(null),this._loadUrl(e),this._unblock())},"from .cms-container .cms-edit-form":{onaftersubmitform:function(){this._initialiseFromContent()}},_loadUrl:function(e){return this.find("iframe").addClass("loading").attr("src",e),this},_getNavigatorStates:function(){var t=e.map(this.getAllowedStates(),function(t){var n=e(".cms-preview-states .state-name[data-name="+t+"]");return n.length?{name:t,url:n.attr("data-link"),active:n.is(":radio")?n.is(":checked"):n.is(":selected")}:null});return t},_loadCurrentState:function(){if(!this.getIsPreviewEnabled())return this;var t=this._getNavigatorStates(),n=this.getCurrentStateName(),i=null;t&&(i=e.grep(t,function(e,t){return n===e.name||!n&&e.active}));var s=null;return i[0]?s=i[0].url:t.length?(this.setCurrentStateName(t[0].name),s=t[0].url):this.setCurrentStateName(null),s+=(-1===s.indexOf("?")?"?":"&")+"CMSPreview=1",this.is(".column-hidden")?(this.setPendingURL(s),this._loadUrl("about:blank"),this._block()):(this.setPendingURL(null),s?(this._loadUrl(s),this._unblock()):this._block()),this},_moveNavigator:function(){var t=e(".cms-preview .cms-preview-controls"),n=e(".cms-edit-form .cms-navigator");n.length&&t.length?t.html(e(".cms-edit-form .cms-navigator").detach()):this._block()},_loadCurrentPage:function(){if(this.getIsPreviewEnabled()){var t=this.find("iframe")[0].contentDocument,n=(e(".cms-container"),e(t).find("meta[name=x-page-id]").attr("content")),i=e(t).find("meta[name=x-cms-edit-link]").attr("content"),s=e(".cms-content");n&&s.find(":input[name=ID]").val()!=n&&window.History.enabled&&e(".cms-container").entwine(".ss").loadPanel(i)}},_adjustIframeForPreview:function(){var e=this.find("iframe")[0];if(e){var t=e.contentDocument;if(t){for(var n=t.getElementsByTagName("A"),i=0;i<n.length;i++){var s=n[i].getAttribute("href");s&&s.match(/^http:\/\//)&&n[i].setAttribute("target","_blank")}var a=t.getElementById("SilverStripeNavigator");a&&(a.style.display="none");var o=t.getElementById("SilverStripeNavigatorMessage");o&&(o.style.display="none"),this.trigger("afterIframeAdjustedForPreview",[t])}}}}),e(".cms-edit-form").entwine({onadd:function(){this._super(),e(".cms-preview")._initialiseFromContent()}}),e(".cms-preview-states").entwine({changeVisibleState:function(e){this.find('input[data-name="'+e+'"]').prop("checked",!0)}}),e(".cms-preview-states .state-name").entwine({onclick:function(t){this.parent().find(".active").removeClass("active"),this.next("label").addClass("active");var n=e(this).attr("data-name");e(".cms-preview").changeState(n)}}),e(".preview-mode-selector").entwine({changeVisibleMode:function(e){this.find("select").val(e).trigger("liszt:updated")._addIcon()}}),e(".preview-mode-selector select").entwine({onchange:function(t){this._super(t),t.preventDefault();var n=e(this).val();e(".cms-preview").changeMode(n)}}),e(".preview-mode-selector .chzn-results li").entwine({onclick:function(t){if(e.browser.msie){t.preventDefault();var n=this.index(),i=this.closest(".preview-mode-selector").find("select option:eq("+n+")").val();e(".cms-preview").changeMode(i)}}}),e(".cms-preview.column-hidden").entwine({onmatch:function(){e("#preview-mode-dropdown-in-content").show(),e(".cms-preview .result-selected").hasClass("font-icon-columns")&&statusMessage(r["default"]._t("LeftAndMain.DISABLESPLITVIEW","Screen too small to show site preview in split mode"),"error"),this._super()},onunmatch:function(){e("#preview-mode-dropdown-in-content").hide(),this._super()}}),e("#preview-mode-dropdown-in-content").entwine({onmatch:function(){e(".cms-preview").is(".column-hidden")?this.show():this.hide(),this._super()},onunmatch:function(){this._super()}}),e(".preview-size-selector").entwine({changeVisibleSize:function(e){this.find("select").val(e).trigger("liszt:updated")._addIcon()}}),e(".preview-size-selector select").entwine({onchange:function(t){t.preventDefault();var n=e(this).val();e(".cms-preview").changeSize(n)}}),e(".preview-selector select.preview-dropdown").entwine({"onliszt:showing_dropdown":function(){this.siblings().find(".chzn-drop").addClass("open")._alignRight()},"onliszt:hiding_dropdown":function(){this.siblings().find(".chzn-drop").removeClass("open")._removeRightAlign()},"onliszt:ready":function(){this._super(),this._addIcon()},_addIcon:function(){var e=this.find(":selected"),t=e.attr("data-icon"),n=this.parent().find(".chzn-container a.chzn-single"),i=n.attr("data-icon");return"undefined"!=typeof i&&n.removeClass(i),n.addClass(t),n.attr("data-icon",t),this}}),e(".preview-selector .chzn-drop").entwine({_alignRight:function(){var t=this;e(this).hide(),setTimeout(function(){e(t).css({left:"auto",right:0}),e(t).show()},100)},_removeRightAlign:function(){e(this).css({right:"auto"})}}),e(".preview-mode-selector .chzn-drop li:last-child").entwine({onmatch:function(){e(".preview-mode-selector").hasClass("split-disabled")?this.parent().append('<div class="disabled-tooltip"></div>'):this.parent().append('<div class="disabled-tooltip" style="display: none;"></div>')}}),e(".preview-scroll").entwine({ToolbarSize:53,_redraw:function(){var e=this.getToolbarSize();window.debug&&console.log("redraw",this.attr("class"),this.get(0));var t=this.height()-e;this.height(t)},onmatch:function(){this._redraw(),this._super()},onunmatch:function(){this._super()}}),e(".preview-device-outer").entwine({onclick:function(){this.toggleClass("rotate")}})})},{i18n:"i18n",jQuery:"jQuery"}],11:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss.tree",function(e){e(".cms-tree").entwine({Hints:null,IsUpdatingTree:!1,IsLoaded:!1,onadd:function(){if(this._super(),!e.isNumeric(this.data("jstree_instance_id"))){var t=this.attr("data-hints");t&&this.setHints(e.parseJSON(t));var n=this;this.jstree(this.getTreeConfig()).bind("loaded.jstree",function(t,i){n.setIsLoaded(!0),i.inst._set_settings({html_data:{ajax:{url:n.data("urlTree"),data:function(t){var i=n.data("searchparams")||[];return i=e.grep(i,function(e,t){return"ID"!=e.name&&"value"!=e.name}),i.push({name:"ID",value:e(t).data("id")?e(t).data("id"):0}),i.push({name:"ajax",value:1}),i}}}}),n.updateFromEditForm(),n.css("visibility","visible"),i.inst.hide_checkboxes()}).bind("before.jstree",function(t,i){if("start_drag"==i.func&&(!n.hasClass("draggable")||n.hasClass("multiselect")))return t.stopImmediatePropagation(),!1;if(e.inArray(i.func,["check_node","uncheck_node"])){var s=e(i.args[0]).parents("li:first"),a=s.find("li:not(.disabled)");if(s.hasClass("disabled")&&0==a)return t.stopImmediatePropagation(),!1}}).bind("move_node.jstree",function(t,i){if(!n.getIsUpdatingTree()){var s=i.rslt.o,a=i.rslt.np,o=(i.inst._get_parent(s),e(a).data("id")||0),r=e(s).data("id"),l=e.map(e(s).siblings().andSelf(),function(t){return e(t).data("id")});e.ajax({url:n.data("urlSavetreenode"),type:"POST",data:{ID:r,ParentID:o,SiblingIDs:l},success:function(){e(".cms-edit-form :input[name=ID]").val()==r&&e(".cms-edit-form :input[name=ParentID]").val(o),n.updateNodesFromServer([r])},statusCode:{403:function(){e.jstree.rollback(i.rlbk)}}})}}).bind("select_node.jstree check_node.jstree uncheck_node.jstree",function(t,n){e(document).triggerHandler(t,n)})}},onremove:function(){this.jstree("destroy"),this._super()},"from .cms-container":{onafterstatechange:function(e){this.updateFromEditForm()}},"from .cms-container form":{onaftersubmitform:function(t){var n=e(".cms-edit-form :input[name=ID]").val();this.updateNodesFromServer([n])}},getTreeConfig:function(){var t=this;return{core:{initially_open:["record-0"],animation:0,html_titles:!0},html_data:{},ui:{select_limit:1,initially_select:[this.find(".current").attr("id")]},crrm:{move:{check_move:function(n){var i=e(n.o),s=e(n.np),a=n.ot.get_container()[0]==n.np[0],o=i.getClassname(),r=s.getClassname(),l=t.getHints(),d=[],c=r?r:"Root",u=l&&"undefined"!=typeof l[c]?l[c]:null;u&&i.attr("class").match(/VirtualPage-([^\s]*)/)&&(o=RegExp.$1),u&&(d="undefined"!=typeof u.disallowedChildren?u.disallowedChildren:[]);var h=!(0===i.data("id")||i.hasClass("status-archived")||a&&"inside"!=n.p||s.hasClass("nochildren")||d.length&&-1!=e.inArray(o,d));return h}}},dnd:{drop_target:!1,drag_target:!1},checkbox:{two_state:!0},themes:{theme:"apple",url:e("body").data("frameworkpath")+"/thirdparty/jstree/themes/apple/style.css"},plugins:["html_data","ui","dnd","crrm","themes","checkbox"]}},search:function(e,t){e?this.data("searchparams",e):this.removeData("searchparams"),this.jstree("refresh",-1,t)},getNodeByID:function(e){return this.find("*[data-id="+e+"]")},createNode:function(t,n,i){var s=this,a=void 0!==n.ParentID?s.getNodeByID(n.ParentID):!1,o=e(t),r={data:""};o.hasClass("jstree-open")?r.state="open":o.hasClass("jstree-closed")&&(r.state="closed"),this.jstree("create_node",a.length?a:-1,"last",r,function(e){for(var t=e.attr("class"),n=0;n<o[0].attributes.length;n++){var s=o[0].attributes[n];e.attr(s.name,s.value)}e.addClass(t).html(o.html()),i(e)})},updateNode:function(t,n,i){var s=e(n),a=t.attr("class"),o=i.NextID?this.getNodeByID(i.NextID):!1,r=i.PrevID?this.getNodeByID(i.PrevID):!1,l=i.ParentID?this.getNodeByID(i.ParentID):!1;e.each(["id","style","class","data-pagetype"],function(e,n){t.attr(n,s.attr(n))}),a=a.replace(/status-[^\s]*/,"");var d=t.children("ul").detach();t.addClass(a).html(s.html()).append(d),o&&o.length?this.jstree("move_node",t,o,"before"):r&&r.length?this.jstree("move_node",t,r,"after"):this.jstree("move_node",t,l.length?l:-1)},updateFromEditForm:function(){var t,n=e(".cms-edit-form :input[name=ID]").val();n?(t=this.getNodeByID(n),t.length?(this.jstree("deselect_all"),this.jstree("select_node",t)):this.updateNodesFromServer([n])):this.jstree("deselect_all")},updateNodesFromServer:function(t){if(!this.getIsUpdatingTree()&&this.getIsLoaded()){var n=this,i=!1;this.setIsUpdatingTree(!0),n.jstree("save_selected");var s=function(e){n.getNodeByID(e.data("id")).not(e).remove(),n.jstree("deselect_all"),n.jstree("select_node",e)};n.jstree("open_node",this.getNodeByID(0)),n.jstree("save_opened"),n.jstree("save_selected"),e.ajax({url:e.path.addSearchParams(this.data("urlUpdatetreenodes"),"ids="+t.join(",")),dataType:"json",success:function(t,a){e.each(t,function(e,t){var a=n.getNodeByID(e);return t?void(a.length?(n.updateNode(a,t.html,t),setTimeout(function(){s(a)},500)):(i=!0,t.ParentID&&!n.find("li[data-id="+t.ParentID+"]").length?n.jstree("load_node",-1,function(){newNode=n.find("li[data-id="+e+"]"),s(newNode)}):n.createNode(t.html,t,function(e){s(e)}))):void n.jstree("delete_node",a)}),i||(n.jstree("deselect_all"),n.jstree("reselect"),n.jstree("reopen"))},complete:function(){n.setIsUpdatingTree(!1)}})}}}),e(".cms-tree.multiple").entwine({onmatch:function(){this._super(),this.jstree("show_checkboxes")},onunmatch:function(){this._super(),this.jstree("uncheck_all"),this.jstree("hide_checkboxes")},getSelectedIDs:function(){return e(this).jstree("get_checked").not(".disabled").map(function(){return e(this).data("id")}).get()}}),e(".cms-tree li").entwine({setEnabled:function(e){this.toggleClass("disabled",!e)},getClassname:function(){var e=this.attr("class").match(/class-([^\s]*)/i);return e?e[1]:""},getID:function(){return this.data("id")}})})},{jQuery:"jQuery"}],12:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=i(s);a["default"].entwine("ss",function(e){e(".TreeDropdownField").entwine({"from .cms-container form":{onaftersubmitform:function(e){this.find(".tree-holder").empty(),this._super()}}})})},{jQuery:"jQuery"}],13:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery);_jQuery2["default"].noConflict(),window.ss=window.ss||{};var windowWidth,windowHeight;window.ss.debounce=function(e,t,n){var i,s,a,o=function(){i=null,n||e.apply(s,a)};return function(){var r=n&&!i;s=this,a=arguments,clearTimeout(i),i=setTimeout(o,t),r&&e.apply(s,a)}},(0,_jQuery2["default"])(window).bind("resize.leftandmain",function(e){var t=function(){(0,_jQuery2["default"])(".cms-container").trigger("windowresize")};if(_jQuery2["default"].browser.msie&&parseInt(_jQuery2["default"].browser.version,10)<9){var n=(0,_jQuery2["default"])(window).width(),i=(0,_jQuery2["default"])(window).height();(n!=windowWidth||i!=windowHeight)&&(windowWidth=n,windowHeight=i,t())}else t()}),_jQuery2["default"].entwine.warningLevel=_jQuery2["default"].entwine.WARN_LEVEL_BESTPRACTISE,_jQuery2["default"].entwine("ss",function($){$(window).on("message",function(e){var t,n=e.originalEvent,i="object"===_typeof(n.data)?n.data:JSON.parse(n.data);if($.path.parseUrl(window.location.href).domain===$.path.parseUrl(n.origin).domain)switch(t=$("undefined"==typeof i.target?window:i.target),i.type){case"event":t.trigger(i.event,i.data);break;case"callback":t[i.callback].call(t,i.data)}});var positionLoadingSpinner=function(){var e=120,t=$(".ss-loading-screen .loading-animation"),n=($(window).height()-t.height())/2;t.css("top",n+e),t.show()},applyChosen=function e(t){if(t.is(":visible")){t.addClass("has-chzn").chosen({allow_single_deselect:!0,disable_search_threshold:20});var n=t.prop("title");n&&t.siblings(".chzn-container").prop("title",n)}else setTimeout(function(){t.show(),e(t)},500)},isSameUrl=function(e,t){var n=$("base").attr("href");e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,n),t=$.path.isAbsoluteUrl(t)?t:$.path.makeUrlAbsolute(t,n);var i=$.path.parseUrl(e),s=$.path.parseUrl(t);return i.pathname.replace(/\/*$/,"")==s.pathname.replace(/\/*$/,"")&&i.search==s.search},ajaxCompleteEvent=window.ss.debounce(function(){$(window).trigger("ajaxComplete")},1e3,!0);$(window).bind("resize",positionLoadingSpinner).trigger("resize"),$(document).ajaxComplete(function(e,t,n){if(window.History.enabled){var i,s=t.getResponseHeader("X-ControllerURL"),a=History.getPageUrl().replace(/\/$/,""),o=n.url;null===s||isSameUrl(a,s)&&isSameUrl(o,s)||(i={id:(new Date).getTime()+String(Math.random()).replace(/\D/g,""),pjax:t.getResponseHeader("X-Pjax")?t.getResponseHeader("X-Pjax"):n.headers["X-Pjax"]},window.History.pushState(i,"",s))}var r=t.getResponseHeader("X-Status")?t.getResponseHeader("X-Status"):t.statusText,l=t.getResponseHeader("X-Reauthenticate"),d=t.status<200||t.status>399?"bad":"good",c=["OK"];return l?void $(".cms-container").showLoginDialog():(0!==t.status&&r&&$.inArray(r,c)&&statusMessage(decodeURIComponent(r),d),void ajaxCompleteEvent(this))}),$(".cms-container").entwine({StateChangeXHR:null,FragmentXHR:{},StateChangeCount:0,LayoutOptions:{minContentWidth:940,minPreviewWidth:400,mode:"content"},onadd:function(){return $.browser.msie&&parseInt($.browser.version,10)<8?($(".ss-loading-screen").append('<p class="ss-loading-incompat-warning"><span class="notice">Your browser is not compatible with the CMS interface. Please use Internet Explorer 8+, Google Chrome or Mozilla Firefox.</span></p>').css("z-index",$(".ss-loading-screen").css("z-index")+1),$(".loading-animation").remove(),void this._super()):(this.redraw(),$(".ss-loading-screen").hide(),$("body").removeClass("loading"),$(window).unbind("resize",positionLoadingSpinner),this.restoreTabState(),void this._super())},fromWindow:{onstatechange:function(e){this.handleStateChange(e)}},onwindowresize:function(){this.redraw()},"from .cms-panel":{ontoggle:function(){this.redraw()}},"from .cms-container":{onaftersubmitform:function(){this.redraw()}},"from .cms-menu-list li a":{onclick:function(e){var t=$(e.target).attr("href");e.which>1||t==this._tabStateUrl()||this.splitViewMode()}},updateLayoutOptions:function(e){var t=this.getLayoutOptions(),n=!1;for(var i in e)t[i]!==e[i]&&(t[i]=e[i],n=!0);n&&this.redraw()},splitViewMode:function(){this.updateLayoutOptions({mode:"split"})},contentViewMode:function(){this.updateLayoutOptions({mode:"content"})},previewMode:function(){this.updateLayoutOptions({mode:"preview"})},RedrawSuppression:!1,redraw:function(){this.getRedrawSuppression()||(window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.data("jlayout",jLayout.threeColumnCompressor({menu:this.children(".cms-menu"),content:this.children(".cms-content"),preview:this.children(".cms-preview")},this.getLayoutOptions())),this.layout(),this.find(".cms-panel-layout").redraw(),this.find(".cms-content-fields[data-layout-type]").redraw(),this.find(".cms-edit-form[data-layout-type]").redraw(),this.find(".cms-preview").redraw(),this.find(".cms-content").redraw())},checkCanNavigate:function(e){var t=this._findFragments(e||["Content"]),n=t.find(":data(changetracker)").add(t.filter(":data(changetracker)")),i=!0;return n.length?(n.each(function(){$(this).confirmUnsavedChanges()||(i=!1)}),i):!0},loadPanel:function(e,t,n,i,s){n||(n={}),t||(t=""),s||(s=History.getState().url),this.checkCanNavigate(n.pjax?n.pjax.split(","):["Content"])&&(this.saveTabState(),window.History.enabled?($.extend(n,{__forceReferer:s}),i?($.extend(n,{__forceReload:Math.random()}),window.History.replaceState(n,t,e)):window.History.pushState(n,t,e)):window.location=$.path.makeUrlAbsolute(e,$("base").attr("href")))},reloadCurrentPanel:function(){this.loadPanel(window.History.getState().url,null,null,!0)},submitForm:function(e,t,n,i){var s=this;t||(t=this.find(".Actions :submit[name=action_save]")),t||(t=this.find(".Actions :submit:first")),e.trigger("beforesubmitform"),this.trigger("submitform",{form:e,button:t}),$(t).addClass("loading");var a=e.validate();if("undefined"!=typeof a&&!a)return statusMessage("Validation failed.","bad"),$(t).removeClass("loading"),!1;var o=e.serializeArray();return o.push({name:$(t).attr("name"),value:"1"}),o.push({name:"BackURL",value:History.getPageUrl().replace(/\/$/,"")}),this.saveTabState(),jQuery.ajax(jQuery.extend({headers:{"X-Pjax":"CurrentForm,Breadcrumbs"},url:e.attr("action"),data:o,type:"POST",complete:function(){$(t).removeClass("loading")},success:function(t,i,a){e.removeClass("changed"),n&&n(t,i,a);var r=s.handleAjaxResponse(t,i,a);r&&r.filter("form").trigger("aftersubmitform",{status:i,xhr:a,formData:o})}},i)),!1},LastState:null,PauseState:!1,handleStateChange:function(){if(!this.getPauseState()){this.getStateChangeXHR()&&this.getStateChangeXHR().abort();var e=this,t=window.History,n=t.getState(),i=n.data.pjax||"Content",s={},a=i.split(","),o=this._findFragments(a);this.setStateChangeCount(this.getStateChangeCount()+1);var r=$.browser.msie&&parseInt($.browser.version,10)<9;if(r&&this.getStateChangeCount()>20)return void(document.location.href=n.url);if(!this.checkCanNavigate()){if(t.emulated.pushState)return;var l=this.getLastState();return this.setPauseState(!0),l?t.pushState(l.id,l.title,l.url):t.back(),void this.setPauseState(!1)}if(this.setLastState(n),o.length<a.length&&(i="Content",a=["Content"],o=this._findFragments(a)),this.trigger("beforestatechange",{state:n,element:o}),s["X-Pjax"]=i,"undefined"!=typeof n.data.__forceReferer){var d=n.data.__forceReferer;try{d=decodeURI(d)}catch(c){}finally{s["X-Backurl"]=encodeURI(d)}}o.addClass("loading");var u=$.ajax({headers:s,url:n.url,complete:function(){e.setStateChangeXHR(null),o.removeClass("loading")},success:function(t,i,s){var a=e.handleAjaxResponse(t,i,s,n);e.trigger("afterstatechange",{data:t,status:i,xhr:s,element:a,state:n})}});this.setStateChangeXHR(u)}},loadFragment:function(e,t){var n,i=this,s={},a=$("base").attr("href"),o=this.getFragmentXHR();return"undefined"!=typeof o[t]&&null!==o[t]&&(o[t].abort(),o[t]=null),e=$.path.isAbsoluteUrl(e)?e:$.path.makeUrlAbsolute(e,a),s["X-Pjax"]=t,n=$.ajax({headers:s,url:e,success:function(e,t,n){var s=i.handleAjaxResponse(e,t,n,null);i.trigger("afterloadfragment",{data:e,status:t,xhr:n,elements:s})},error:function(e,t,n){i.trigger("loadfragmenterror",{xhr:e,status:t,error:n})},complete:function(){var e=i.getFragmentXHR();"undefined"!=typeof e[t]&&null!==e[t]&&(e[t]=null)}}),o[t]=n,n},handleAjaxResponse:function(e,t,n,i){var s,a,o,r;if(n.getResponseHeader("X-Reload")&&n.getResponseHeader("X-ControllerURL")){var l=$("base").attr("href"),d=n.getResponseHeader("X-ControllerURL"),s=$.path.isAbsoluteUrl(d)?d:$.path.makeUrlAbsolute(d,l);return void(document.location.href=s)}if(e){var c=n.getResponseHeader("X-Title");c&&(document.title=decodeURIComponent(c.replace(/\+/g," ")));var u,h={};n.getResponseHeader("Content-Type").match(/^((text)|(application))\/json[ \t]*;?/i)?h=e:(o=document.createDocumentFragment(),jQuery.clean([e],document,o,[]),r=$(jQuery.merge([],o.childNodes)),a="Content",r.is("form")&&!r.is("[data-pjax-fragment~=Content]")&&(a="CurrentForm"),h[a]=r),this.setRedrawSuppression(!0);try{$.each(h,function(e,t){var n=$("[data-pjax-fragment]").filter(function(){return-1!=$.inArray(e,$(this).data("pjaxFragment").split(" "))}),i=$(t);if(u?u.add(i):u=i,i.find(".cms-container").length)throw'Content loaded via ajax is not allowed to contain tags matching the ".cms-container" selector to avoid infinite loops';var s=n.attr("style"),a=n.parent(),o="undefined"!=typeof a.data("jlayout"),r=["east","west","center","north","south","column-hidden"],l=n.attr("class"),d=[];l&&(d=$.grep(l.split(" "),function(e){return $.inArray(e,r)>=0})),i.removeClass(r.join(" ")).addClass(d.join(" ")),s&&i.attr("style",s);var c=i.find("style").detach();c.length&&$(document).find("head").append(c),n.replaceWith(i),!a.is(".cms-container")&&o&&a.layout()});var f=u.filter("form");f.hasClass("cms-tabset")&&f.removeClass("cms-tabset").addClass("cms-tabset")}finally{this.setRedrawSuppression(!1)}return this.redraw(),this.restoreTabState(i&&"undefined"!=typeof i.data.tabState?i.data.tabState:null),u}},_findFragments:function(e){return $("[data-pjax-fragment]").filter(function(){var t,n=$(this).data("pjaxFragment").split(" ");for(t in e)if(-1!=$.inArray(e[t],n))return!0;return!1})},refresh:function(){$(window).trigger("statechange"),$(this).redraw()},saveTabState:function(){if("undefined"!=typeof window.sessionStorage&&null!==window.sessionStorage){var e=[],t=this._tabStateUrl();if(this.find(".cms-tabset,.ss-tabset").each(function(t,n){var i=$(n).attr("id");i&&$(n).data("tabs")&&($(n).data("ignoreTabState")||$(n).getIgnoreTabState()||e.push({id:i,selected:$(n).tabs("option","selected")}))}),e){var n="tabs-"+t;try{window.sessionStorage.setItem(n,JSON.stringify(e))}catch(i){if(i.code===DOMException.QUOTA_EXCEEDED_ERR&&0===window.sessionStorage.length)return;throw i}}}},restoreTabState:function(e){var t=this,n=this._tabStateUrl(),i="undefined"!=typeof window.sessionStorage&&window.sessionStorage,s=i?window.sessionStorage.getItem("tabs-"+n):null,a=s?JSON.parse(s):!1;this.find(".cms-tabset, .ss-tabset").each(function(){var n,i,s=$(this),o=s.attr("id"),r=s.find(".ss-tabs-force-active");s.data("tabs")&&(s.tabs("refresh"),r.length?n=r.index():e&&e[o]?(i=s.find(e[o].tabSelector),i.length&&(n=i.index())):a&&$.each(a,function(e,t){s.is("#"+t.id)&&(n=t.selected)}),null!==n&&(s.tabs("option","active",n),t.trigger("tabstaterestored")))})},clearTabState:function(e){if("undefined"!=typeof window.sessionStorage){var t=window.sessionStorage;if(e)t.removeItem("tabs-"+e);else for(var n=0;n<t.length;n++)t.key(n).match(/^tabs-/)&&t.removeItem(t.key(n))}},clearCurrentTabState:function(){this.clearTabState(this._tabStateUrl())},_tabStateUrl:function(){return History.getState().url.replace(/\?.*/,"").replace(/#.*/,"").replace($("base").attr("href"),"")},showLoginDialog:function(){var e=$("body").data("member-tempid"),t=$(".leftandmain-logindialog"),n="CMSSecurity/login";t.length&&t.remove(),n=$.path.addSearchParams(n,{tempid:e,BackURL:window.location.href}),t=$('<div class="leftandmain-logindialog"></div>'),t.attr("id",(new Date).getTime()),t.data("url",n),$("body").append(t)}}),$(".leftandmain-logindialog").entwine({onmatch:function(){this._super(),this.ssdialog({iframeUrl:this.data("url"),dialogClass:"leftandmain-logindialog-dialog",autoOpen:!0,minWidth:500,maxWidth:500,minHeight:370,maxHeight:400,closeOnEscape:!1,open:function(){$(".ui-widget-overlay").addClass("leftandmain-logindialog-overlay")},close:function(){$(".ui-widget-overlay").removeClass("leftandmain-logindialog-overlay")}})},onunmatch:function(){this._super()},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},reauthenticate:function(e){"undefined"!=typeof e.SecurityID&&$(":input[name=SecurityID]").val(e.SecurityID),"undefined"!=typeof e.TempID&&$("body").data("member-tempid",e.TempID),this.close()}}),$("form.loading,.cms-content.loading,.cms-content-fields.loading,.cms-content-view.loading").entwine({onmatch:function(){this.append('<div class="cms-content-loading-overlay ui-widget-overlay-light"></div><div class="cms-content-loading-spinner"></div>'),this._super()},onunmatch:function(){this.find(".cms-content-loading-overlay,.cms-content-loading-spinner").remove(),this._super()}}),$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({onadd:function(){this.addClass("ss-ui-button"),this.data("button")||this.button(),this._super()},onremove:function(){this.data("button")&&this.button("destroy"),this._super()}}),$(".cms .cms-panel-link").entwine({onclick:function(e){if($(this).hasClass("external-link"))return void e.stopPropagation();var t=this.attr("href"),n=t&&!t.match(/^#/)?t:this.data("href"),i={pjax:this.data("pjaxTarget")};$(".cms-container").loadPanel(n,null,i),e.preventDefault()}}),$(".cms .ss-ui-button-ajax").entwine({onclick:function onclick(e){$(this).removeClass("ui-button-text-only"),$(this).addClass("ss-ui-button-loading ui-button-text-icons");var loading=$(this).find(".ss-ui-loading-icon");loading.length<1&&(loading=$("<span></span>").addClass("ss-ui-loading-icon ui-button-icon-primary ui-icon"),$(this).prepend(loading)),loading.show();var href=this.attr("href"),url=href?href:this.data("href");jQuery.ajax({url:url,complete:function complete(xmlhttp,status){var msg=xmlhttp.getResponseHeader("X-Status")?xmlhttp.getResponseHeader("X-Status"):xmlhttp.responseText;try{"undefined"!=typeof msg&&null!==msg&&eval(msg)}catch(e){}loading.hide(),$(".cms-container").refresh(),$(this).removeClass("ss-ui-button-loading ui-button-text-icons"),$(this).addClass("ui-button-text-only")},dataType:"html"}),e.preventDefault()}}),$(".cms .ss-ui-dialog-link").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(){this._super();var e="ss-ui-dialog-"+this.getUUID(),t=$("#"+e);t.length||(t=$('<div class="ss-ui-dialog" id="'+e+'" />'),$("body").append(t));var n=this.data("popupclass")?this.data("popupclass"):"";return t.ssdialog({iframeUrl:this.attr("href"),autoOpen:!0,dialogExtraClass:n}),!1}}),$(".cms-content .Actions").entwine({onmatch:function(){this.find(".ss-ui-button").click(function(){var e=this.form;e&&(e.clickedButton=this,setTimeout(function(){e.clickedButton=null},10))}),this.redraw(),this._super()},onunmatch:function(){this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0)),this.contents().filter(function(){return 3==this.nodeType&&!/\S/.test(this.nodeValue)}).remove(),this.find(".ss-ui-button").each(function(){$(this).data("button")||$(this).button()}),this.find(".ss-ui-buttonset").buttonset()}}),$(".cms .field.date input.text").entwine({onmatch:function(){var e=$(this).parents(".field.date:first"),t=e.data();return t.showcalendar?(t.showOn="button",t.locale&&$.datepicker.regional[t.locale]&&(t=$.extend(t,$.datepicker.regional[t.locale],{})),$(this).datepicker(t),void this._super()):void this._super()},onunmatch:function(){this._super()}}),$(".cms .field.dropdown select, .cms .field select[multiple], .fieldholder-small select.dropdown").entwine({onmatch:function(){return this.is(".no-chzn")?void this._super():(this.data("placeholder")||this.data("placeholder"," "),this.removeClass("has-chzn chzn-done"),this.siblings(".chzn-container").remove(),applyChosen(this),void this._super())},onunmatch:function(){this._super()}}),$(".cms-panel-layout").entwine({redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0))}}),$(".cms .ss-gridfield").entwine({showDetailView:function(e){var t=window.location.search.replace(/^\?/,"");t&&(e=$.path.addSearchParams(e,t)),$(".cms-container").loadPanel(e)}}),$(".cms-search-form").entwine({onsubmit:function(e){var t,n;t=this.find(":input:not(:submit)").filter(function(){var e=$.grep($(this).fieldValue(),function(e){return e});return e.length}),n=this.attr("action"),t.length&&(n=$.path.addSearchParams(n,t.serialize()));var i=this.closest(".cms-container");return i.find(".cms-edit-form").tabs("select",0),i.loadPanel(n,"",{},!0),!1}}),$(".cms-search-form button[type=reset], .cms-search-form input[type=reset]").entwine({onclick:function(e){e.preventDefault();var t=$(this).parents("form");t.clearForm(),t.find(".dropdown select").prop("selectedIndex",0).trigger("liszt:updated"),t.submit()}}),window._panelDeferredCache={},$(".cms-panel-deferred").entwine({onadd:function(){this._super(),this.redraw()},onremove:function(){window.debug&&console.log("saving",this.data("url"),this),this.data("deferredNoCache")||(window._panelDeferredCache[this.data("url")]=this.html()),this._super()},redraw:function(){window.debug&&console.log("redraw",this.attr("class"),this.get(0));var e=this,t=this.data("url");if(!t)throw'Elements of class .cms-panel-deferred need a "data-url" attribute';this._super(),this.children().length||(this.data("deferredNoCache")||"undefined"==typeof window._panelDeferredCache[t]?(this.addClass("loading"),$.ajax({url:t,complete:function(){e.removeClass("loading")},success:function(t,n,i){e.html(t)}})):this.html(window._panelDeferredCache[t]))}}),$(".cms-tabset").entwine({onadd:function(){this.redrawTabs(),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks();var e=(this.attr("id"),this.find("ul:first .ui-tabs-active"));this.data("uiTabs")||this.tabs({active:-1!=e.index()?e.index():0,beforeLoad:function(e,t){return!1},activate:function(e,t){t.newTab&&t.newTab.find(".cms-panel-link").click();var n=$(this).closest("form").find(".Actions");$(t.newTab).closest("li").hasClass("readonly")?n.fadeOut():n.show()}})},rewriteHashlinks:function(){$(this).find("ul a").each(function(){if($(this).attr("href")){var e=$(this).attr("href").match(/#.*/);e&&$(this).attr("href",document.location.href.replace(/#.*/,"")+e[0])}})}}),$("#filters-button").entwine({onmatch:function(){this._super(),this.data("collapsed",!0),this.data("animating",!1)},onunmatch:function(){this._super()},showHide:function(){var e=this,t=$(".cms-content-filters").first(),n=this.data("collapsed");this.data("animating")||(this.toggleClass("active"),this.data("animating",!0),t[n?"slideDown":"slideUp"]({complete:function(){e.data("collapsed",!n),e.data("animating",!1)}}))},onclick:function(){this.showHide()}})});var statusMessage=function(e,t){e=jQuery("<div/>").text(e).html(),jQuery.noticeAdd({text:e,type:t,stayTime:5e3,inEffect:{left:"0",opacity:"show"}})},errorMessage=function(e){jQuery.noticeAdd({text:e,type:"error",stayTime:5e3,inEffect:{left:"0",opacity:"show"}})}},{jQuery:"jQuery"}],14:[function(e,t,n){"use strict";e("../../src/LeftAndMain.Layout.js"),e("../../src/LeftAndMain.js"),e("../../src/LeftAndMain.ActionTabSet.js"),e("../../src/LeftAndMain.Panel.js"),e("../../src/LeftAndMain.Tree.js"),e("../../src/LeftAndMain.Content.js"),e("../../src/LeftAndMain.EditForm.js"),e("../../src/LeftAndMain.Menu.js"),e("../../src/LeftAndMain.Preview.js"),e("../../src/LeftAndMain.BatchActions.js"),e("../../src/LeftAndMain.FieldHelp.js"),
|
||||
e("../../src/LeftAndMain.FieldDescriptionToggle.js"),e("../../src/LeftAndMain.TreeDropdownField.js")},{"../../src/LeftAndMain.ActionTabSet.js":1,"../../src/LeftAndMain.BatchActions.js":2,"../../src/LeftAndMain.Content.js":3,"../../src/LeftAndMain.EditForm.js":4,"../../src/LeftAndMain.FieldDescriptionToggle.js":5,"../../src/LeftAndMain.FieldHelp.js":6,"../../src/LeftAndMain.Layout.js":7,"../../src/LeftAndMain.Menu.js":8,"../../src/LeftAndMain.Panel.js":9,"../../src/LeftAndMain.Preview.js":10,"../../src/LeftAndMain.Tree.js":11,"../../src/LeftAndMain.TreeDropdownField.js":12,"../../src/LeftAndMain.js":13}]},{},[14]);
|
2
admin/javascript/dist/bundle-lib.js
vendored
2
admin/javascript/dist/bundle-lib.js
vendored
@ -1,4 +1,4 @@
|
||||
require=function e(t,i,n){function s(r,o){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!o&&l)return l(r,!0);if(a)return a(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[r]={exports:{}};t[r][0].call(c.exports,function(e){var i=t[r][1][e];return s(i?i:e)},c,c.exports,e,t,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,i){"use strict";e("../../../../thirdparty/jquery/jquery.js"),e("../../../../thirdparty/jquery-ondemand/jquery.ondemand.js"),e("../../src/sspath.js"),e("../../../../thirdparty/jquery-ui/jquery-ui.js"),e("../../../../thirdparty/json-js/json2.js"),e("../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),e("../../../../thirdparty/jquery-cookie/jquery.cookie.js"),e("../../../../thirdparty/jquery-query/jquery.query.js"),e("../../../../thirdparty/jquery-form/jquery.form.js"),e("../../../thirdparty/jquery-notice/jquery.notice.js"),e("../../../thirdparty/jsizes/lib/jquery.sizes.js"),e("../../../thirdparty/jlayout/lib/jlayout.border.js"),e("../../../thirdparty/jlayout/lib/jquery.jlayout.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.html4.js"),e("../../../../thirdparty/jstree/jquery.jstree.js"),e("../../../thirdparty/chosen/chosen/chosen.jquery.js"),e("../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js"),e("../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js"),e("../../../../javascript/src/TreeDropdownField.js"),e("../../../../javascript/src/DateField.js"),e("../../../../javascript/src/HtmlEditorField.js"),e("../../../../javascript/src/TabSet.js"),e("../../src/ssui.core.js"),e("../../../../javascript/src/GridField.js")},{"../../../../javascript/src/DateField.js":13,"../../../../javascript/src/GridField.js":14,"../../../../javascript/src/HtmlEditorField.js":15,"../../../../javascript/src/TabSet.js":16,"../../../../javascript/src/TreeDropdownField.js":17,"../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js":18,"../../../../thirdparty/jquery-cookie/jquery.cookie.js":19,"../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js":20,"../../../../thirdparty/jquery-form/jquery.form.js":21,"../../../../thirdparty/jquery-ondemand/jquery.ondemand.js":22,"../../../../thirdparty/jquery-query/jquery.query.js":23,"../../../../thirdparty/jquery-ui/jquery-ui.js":24,"../../../../thirdparty/jquery/jquery.js":25,"../../../../thirdparty/json-js/json2.js":26,"../../../../thirdparty/jstree/jquery.jstree.js":27,"../../../thirdparty/chosen/chosen/chosen.jquery.js":4,"../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js":5,"../../../thirdparty/history-js/scripts/uncompressed/history.html4.js":6,"../../../thirdparty/history-js/scripts/uncompressed/history.js":7,"../../../thirdparty/jlayout/lib/jlayout.border.js":8,"../../../thirdparty/jlayout/lib/jquery.jlayout.js":9,"../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js":10,"../../../thirdparty/jquery-notice/jquery.notice.js":11,"../../../thirdparty/jsizes/lib/jquery.sizes.js":12,"../../src/sspath.js":2,"../../src/ssui.core.js":3}],2:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s),r=((0,a["default"])(window),(0,a["default"])("html"),(0,a["default"])("head"),{urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===a["default"].type(e))return e;var t=r.urlParseRE.exec(e||"")||[];return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var i=t?t.split("/"):[],n=e.split("/"),s=0;s<n.length;s++){var a=n[s];switch(a){case".":break;case"..":i.length&&i.pop();break;default:i.push(a)}}return"/"+i.join("/")},isSameDomain:function(e,t){return r.parseUrl(e).domain===r.parseUrl(t).domain},isRelativeUrl:function(e){return""===r.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==r.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!r.isRelativeUrl(e))return e;var i=r.parseUrl(e),n=r.parseUrl(t),s=i.protocol||n.protocol,a=i.protocol?i.doubleSlash:i.doubleSlash||n.doubleSlash,o=i.authority||n.authority,l=""!==i.pathname,h=r.makePathAbsolute(i.pathname||n.filename,n.pathname),c=i.search||!l&&n.search||"",d=i.hash;return s+a+o+h+c+d},addSearchParams:function(e,t){var i=r.parseUrl(e),t="string"==typeof t?r.convertSearchToArray(t):t,n=a["default"].extend(r.convertSearchToArray(i.search),t);return i.hrefNoSearch+"?"+a["default"].param(n)+(i.hash||"")},getSearchParams:function(e){var t=r.parseUrl(e);return r.convertSearchToArray(t.search)},convertSearchToArray:function(e){var t,i,n={},e=e.replace(/^\?/,""),s=e?e.split("&"):[];for(t=0;t<s.length;t++)i=s[t].split("="),n[i[0]]=i[1];return n},convertUrlToDataUrl:function(e){var t=r.parseUrl(e);return r.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):r.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function(e){return void 0===e&&(e=location.hash),r.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(e){var t="&"+a["default"].mobile.subPageUrlKey;return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(document.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return r.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function(e){var t=r.parseUrl(e);return t.protocol&&t.domain!==document.domain?!0:!1},hasProtocol:function(e){return/^(:?\w+:)/.test(e)}});a["default"].path=r},{jQuery:"jQuery"}],3:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s);a["default"].widget("ssui.button",a["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,this.refresh())},_refreshAlternate:function(){this._trigger("beforerefreshalternate"),(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate?(this.element.find(".ui-button-icon-primary").hide(),this.element.find(".ui-button-text").hide(),this.element.find(".ui-button-icon-alternate").show(),this.element.find(".ui-button-text-alternate").show()):(this.element.find(".ui-button-icon-primary").show(),this.element.find(".ui-button-text").show(),this.element.find(".ui-button-icon-alternate").hide(),this.element.find(".ui-button-text-alternate").hide()),this._trigger("afterrefreshalternate"))},_resetButton:function(){var e=this.element.data("icon-primary"),t=this.element.data("icon-secondary");e||(e=this.element.data("icon")),e&&(this.options.icons.primary="btn-icon-"+e),t&&(this.options.icons.secondary="btn-icon-"+t),a["default"].ui.button.prototype._resetButton.call(this),this.options.alternate.text||(this.options.alternate.text=this.element.data("text-alternate")),this.options.alternate.icon||(this.options.alternate.icon=this.element.data("icon-alternate")),this.options.showingAlternate||(this.options.showingAlternate=this.element.hasClass("ss-ui-alternate")),this.options.alternate.icon&&this.buttonElement.append("<span class='ui-button-icon-alternate ui-button-icon-primary ui-icon btn-icon-"+this.options.alternate.icon+"'></span>"),this.options.alternate.text&&this.buttonElement.append("<span class='ui-button-text-alternate ui-button-text'>"+this.options.alternate.text+"</span>"),this._refreshAlternate()},refresh:function(){a["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),a["default"].ui.button.prototype.destroy.call(this)}}),a["default"].widget("ssui.ssdialog",a["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){a["default"].ui.dialog.prototype._create.call(this);var e=this,t=(0,a["default"])('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');t.bind("load",function(i){"about:blank"!=(0,a["default"])(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){a["default"].ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,a["default"])(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){a["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,a["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function(){var e,t,i={},n=this.element.children("iframe");this.options.widthRatio&&(e=(0,a["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&e<this.options.minWidth?i.width=this.options.minWidth:this.options.maxWidth&&e>this.options.maxWidth?i.width=this.options.maxWidth:i.width=e),this.options.heightRatio&&(t=(0,a["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&t<this.options.minHeight?i.height=this.options.minHeight:this.options.maxHeight&&t>this.options.maxHeight?i.height=this.options.maxHeight:i.height=t),jQuery.isEmptyObject(i)||(this._setOptions(i),n.attr("width",i.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),n.attr("height",i.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),a["default"].widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",i=a["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var n=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var s=(0,a["default"])('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){s.addClass("ui-state-hover")},function(){s.removeClass("ui-state-hover")}).focus(function(){s.addClass("ui-state-focus")}).blur(function(){s.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(n);(this.uiDialogTitlebarCloseText=(0,a["default"])("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(s)}(0,a["default"])("<span/>").addClass("ui-dialog-title").attr("id",i).html(t).prependTo(n);n.find("*").add(n).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),a["default"].extend(a["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})},{jQuery:"jQuery"}],4:[function(e,t,i){(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.name="SelectParser",e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,i,n,s,a,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),a=e.childNodes,r=[],n=0,s=a.length;s>n;n++)i=a[n],r.push(this.add_option(i,t,e.disabled));return r},e.prototype.add_option=function(e,t,i){return"OPTION"===e.nodeName.toUpperCase()?(""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:i===!0?i:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},e}(),e.select_to_array=function(t){var i,n,s,a,r;for(n=new e,r=t.childNodes,s=0,a=r.length;a>s;s++)i=r[s],n.add_node(i);return n.parsed},this.SelectParser=e}).call(window),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=null!=t?t:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.set_default_text(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.name="AbstractChosen",e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},e.prototype.result_add_option=function(e){var t,i;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),i=""!==e.style.cssText?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+i+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,i;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=Math.floor(Math.random()*e.length),t=e.substring(i,i+1)},e}(),t.AbstractChosen=e}.call(window),function(){var e,t,i,n,s={}.hasOwnProperty,a=function(e,t){function i(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};n=this,e=jQuery,e.fn.extend({chosen:function(i){return e.browser.msie&&("6.0"===e.browser.version||"7.0"===e.browser.version&&7===document.documentMode)?this:this.each(function(n){var s;return s=e(this),s.hasClass("chzn-done")?void 0:s.data("chosen",new t(this,i))})}}),t=function(t){function s(){return s.__super__.constructor.apply(this,arguments)}return a(s,t),s.prototype.name="Chosen",s.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},s.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},s.prototype.set_up_html=function(){var t,n,s,a,r;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,t=e("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+(this.options.width||this.f_width)+"px;"}),this.is_multiple?t.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):t.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(t),this.container=e("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),a=this.rise_up(this.container,this.dropdown),n=a?-this.container.find(".chzn-drop").height():this.container.height(),s=this.container.width()-i(this.dropdown),this.dropdown.css({width:s+"px",top:n+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),r=s-i(this.search_container)-i(this.search_field),this.search_field.css({width:r+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},s.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},s.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},s.prototype.container_mousedown=function(t){var i;return this.is_disabled?void 0:(i=null!=t?e(t.target).hasClass("search-choice-close"):!1,t&&"mousedown"===t.type&&!this.results_showing&&t.stopPropagation(),this.pending_destroy_click||i?this.pending_destroy_click=!1:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()))},s.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},s.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},s.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},s.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},s.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},s.prototype.results_build=function(){var e,t,i,s,a;for(this.parsing=!0,this.results_data=n.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",a=this.results_data,i=0,s=a.length;s>i;i++)t=a[i],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},s.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},s.prototype.result_do_highlight=function(e){var t,i,n,s,a;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),a=this.search_results.scrollTop(),s=n+a,i=this.result_highlight.position().top+this.search_results.scrollTop(),t=i+this.result_highlight.outerHeight(),t>=s)return this.search_results.scrollTop(t-n>0?t-n:0);if(a>i)return this.search_results.scrollTop(i)}},s.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},s.prototype.results_show=function(){var e,t,n;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),t=this.container.width()-i(this.dropdown),n=this.rise_up(this.container,this.dropdown),e=n?-this.container.find(".chzn-drop").height():this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.css("width",t-i(this.search_container)-i(this.search_field)+"px"),this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},s.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},s.prototype.set_tab_index=function(e){var t;return this.form_field_jq.attr("tabindex")?(t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)):void 0},s.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},s.prototype.search_results_mouseup=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i.length?(this.result_highlight=i,this.result_select(t),this.search_field.focus()):void 0},s.prototype.search_results_mouseover=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i?this.result_do_highlight(i):void 0},s.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},s.prototype.choices_click=function(t){return t.preventDefault(),!this.active_field||e(t.target).hasClass("search-choice")||this.results_showing?void 0:this.results_show()},s.prototype.choice_build=function(t){var i,n,s,a=this;return i=this.container_id+"_c_"+t.array_index,this.choices+=1,n=t.disabled?'<li class="search-choice search-choice-disabled" id="'+i+'"><span>'+t.html+"</span></li>":'<li class="search-choice" id="'+i+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(n),s=e("#"+i).find("a").first(),s.click(function(e){return a.choice_destroy_link_click(e)})},s.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},s.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove()):void 0},s.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},s.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},s.prototype.result_select=function(e){var t,i,n,s;return this.result_highlight?(t=this.result_highlight,i=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),s=i.substr(i.lastIndexOf("_")+1),n=this.results_data[s],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.is_multiple?this.choice_build(n):(this.selected_item.find("span").first().text(n.text),this.allow_single_deselect&&this.single_deselect_control_build()),e.metaKey&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()):void 0},s.prototype.result_activate=function(e){return e.addClass("active-result")},s.prototype.result_deactivate=function(e){return e.removeClass("active-result")},s.prototype.result_deselect=function(t){var i,n;return n=this.results_data[t],this.form_field.options[n.options_index].disabled?!1:(n.selected=!1,this.form_field.options[n.options_index].selected=!1,i=e("#"+this.container_id+"_o_"+t),i.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[n.options_index].value}),this.search_field_scale(),!0)},s.prototype.single_deselect_control_build=function(){return this.allow_single_deselect&&this.selected_item.find("abbr").length<1?this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'):void 0},s.prototype.winnow_results=function(){var t,i,n,s,a,r,o,l,h,c,d,u,p,f,g,m,v,_;for(this.no_results_clear(),h=0,c=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),r=this.search_contains?"":"^",a=new RegExp(r+c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),_=this.results_data,f=0,m=_.length;m>f;f++)if(i=_[f],!i.disabled&&!i.empty)if(i.group)e("#"+i.dom_id).css("display","none");else if(!this.is_multiple||!i.selected){if(t=!1,l=i.dom_id,o=e("#"+l),a.test(i.html))t=!0,h+=1;else if((i.html.indexOf(" ")>=0||0===i.html.indexOf("["))&&(s=i.html.replace(/\[|\]/g,"").split(" "),s.length))for(g=0,v=s.length;v>g;g++)n=s[g],a.test(n)&&(t=!0,h+=1);t?(c.length?(d=i.html.search(p),u=i.html.substr(0,d+c.length)+"</em>"+i.html.substr(d+c.length),u=u.substr(0,d)+"<em>"+u.substr(d)):u=i.html,o.html(u),this.result_activate(o),null!=i.group_array_index&&e("#"+this.results_data[i.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&l===this.result_highlight.attr("id")&&this.result_clear_highlight(),
|
||||
require=function e(t,i,n){function s(r,o){if(!i[r]){if(!t[r]){var l="function"==typeof require&&require;if(!o&&l)return l(r,!0);if(a)return a(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[r]={exports:{}};t[r][0].call(c.exports,function(e){var i=t[r][1][e];return s(i?i:e)},c,c.exports,e,t,i,n)}return i[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,i){"use strict";e("../../../../thirdparty/jquery/jquery.js"),e("../../../../thirdparty/jquery-ondemand/jquery.ondemand.js"),e("../../src/sspath.js"),e("../../../../thirdparty/jquery-ui/jquery-ui.js"),e("../../../../thirdparty/json-js/json2.js"),e("../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js"),e("../../../../thirdparty/jquery-cookie/jquery.cookie.js"),e("../../../../thirdparty/jquery-query/jquery.query.js"),e("../../../../thirdparty/jquery-form/jquery.form.js"),e("../../../thirdparty/jquery-notice/jquery.notice.js"),e("../../../thirdparty/jsizes/lib/jquery.sizes.js"),e("../../../thirdparty/jlayout/lib/jlayout.border.js"),e("../../../thirdparty/jlayout/lib/jquery.jlayout.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js"),e("../../../thirdparty/history-js/scripts/uncompressed/history.html4.js"),e("../../../../thirdparty/jstree/jquery.jstree.js"),e("../../../thirdparty/chosen/chosen/chosen.jquery.js"),e("../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js"),e("../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js"),e("../../../../javascript/src/TreeDropdownField.js"),e("../../../../javascript/src/DateField.js"),e("../../../../javascript/src/HtmlEditorField.js"),e("../../../../javascript/src/TabSet.js"),e("../../src/ssui.core.js"),e("../../../../javascript/src/GridField.js")},{"../../../../javascript/src/DateField.js":13,"../../../../javascript/src/GridField.js":14,"../../../../javascript/src/HtmlEditorField.js":15,"../../../../javascript/src/TabSet.js":16,"../../../../javascript/src/TreeDropdownField.js":17,"../../../../thirdparty/jquery-changetracker/lib/jquery.changetracker.js":18,"../../../../thirdparty/jquery-cookie/jquery.cookie.js":19,"../../../../thirdparty/jquery-entwine/dist/jquery.entwine-dist.js":20,"../../../../thirdparty/jquery-form/jquery.form.js":21,"../../../../thirdparty/jquery-ondemand/jquery.ondemand.js":22,"../../../../thirdparty/jquery-query/jquery.query.js":23,"../../../../thirdparty/jquery-ui/jquery-ui.js":24,"../../../../thirdparty/jquery/jquery.js":25,"../../../../thirdparty/json-js/json2.js":26,"../../../../thirdparty/jstree/jquery.jstree.js":27,"../../../thirdparty/chosen/chosen/chosen.jquery.js":4,"../../../thirdparty/history-js/scripts/uncompressed/history.adapter.jquery.js":5,"../../../thirdparty/history-js/scripts/uncompressed/history.html4.js":6,"../../../thirdparty/history-js/scripts/uncompressed/history.js":7,"../../../thirdparty/jlayout/lib/jlayout.border.js":8,"../../../thirdparty/jlayout/lib/jquery.jlayout.js":9,"../../../thirdparty/jquery-hoverIntent/jquery.hoverIntent.js":10,"../../../thirdparty/jquery-notice/jquery.notice.js":11,"../../../thirdparty/jsizes/lib/jquery.sizes.js":12,"../../src/sspath.js":2,"../../src/ssui.core.js":3}],2:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s),r=((0,a["default"])(window),(0,a["default"])("html"),(0,a["default"])("head"),{urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(e){if("object"===a["default"].type(e))return e;var t=r.urlParseRE.exec(e||"")||[];return{href:t[0]||"",hrefNoHash:t[1]||"",hrefNoSearch:t[2]||"",domain:t[3]||"",protocol:t[4]||"",doubleSlash:t[5]||"",authority:t[6]||"",username:t[8]||"",password:t[9]||"",host:t[10]||"",hostname:t[11]||"",port:t[12]||"",pathname:t[13]||"",directory:t[14]||"",filename:t[15]||"",search:t[16]||"",hash:t[17]||""}},makePathAbsolute:function(e,t){if(e&&"/"===e.charAt(0))return e;e=e||"",t=t?t.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";for(var i=t?t.split("/"):[],n=e.split("/"),s=0;s<n.length;s++){var a=n[s];switch(a){case".":break;case"..":i.length&&i.pop();break;default:i.push(a)}}return"/"+i.join("/")},isSameDomain:function(e,t){return r.parseUrl(e).domain===r.parseUrl(t).domain},isRelativeUrl:function(e){return""===r.parseUrl(e).protocol},isAbsoluteUrl:function(e){return""!==r.parseUrl(e).protocol},makeUrlAbsolute:function(e,t){if(!r.isRelativeUrl(e))return e;var i=r.parseUrl(e),n=r.parseUrl(t),s=i.protocol||n.protocol,a=i.protocol?i.doubleSlash:i.doubleSlash||n.doubleSlash,o=i.authority||n.authority,l=""!==i.pathname,h=r.makePathAbsolute(i.pathname||n.filename,n.pathname),c=i.search||!l&&n.search||"",d=i.hash;return s+a+o+h+c+d},addSearchParams:function(e,t){var i=r.parseUrl(e),t="string"==typeof t?r.convertSearchToArray(t):t,n=a["default"].extend(r.convertSearchToArray(i.search),t);return i.hrefNoSearch+"?"+a["default"].param(n)+(i.hash||"")},getSearchParams:function(e){var t=r.parseUrl(e);return r.convertSearchToArray(t.search)},convertSearchToArray:function(e){var t,i,n={},e=e.replace(/^\?/,""),s=e?e.split("&"):[];for(t=0;t<s.length;t++)i=s[t].split("="),n[i[0]]=i[1];return n},convertUrlToDataUrl:function(e){var t=r.parseUrl(e);return r.isEmbeddedPage(t)?t.hash.split(dialogHashKey)[0].replace(/^#/,""):r.isSameDomain(t,document)?t.hrefNoHash.replace(document.domain,""):e},get:function(e){return void 0===e&&(e=location.hash),r.stripHash(e).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(e){var t="&"+a["default"].mobile.subPageUrlKey;return e&&e.split(t)[0].split(dialogHashKey)[0]},set:function(e){location.hash=e},isPath:function(e){return/\//.test(e)},clean:function(e){return e.replace(document.domain,"")},stripHash:function(e){return e.replace(/^#/,"")},cleanHash:function(e){return r.stripHash(e.replace(/\?.*$/,"").replace(dialogHashKey,""))},isExternal:function(e){var t=r.parseUrl(e);return t.protocol&&t.domain!==document.domain?!0:!1},hasProtocol:function(e){return/^(:?\w+:)/.test(e)}});a["default"].path=r},{jQuery:"jQuery"}],3:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("jQuery"),a=n(s);a["default"].widget("ssui.button",a["default"].ui.button,{options:{alternate:{icon:null,text:null},showingAlternate:!1},toggleAlternate:function(){this._trigger("ontogglealternate")!==!1&&(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate=!this.options.showingAlternate,this.refresh())},_refreshAlternate:function(){this._trigger("beforerefreshalternate"),(this.options.alternate.icon||this.options.alternate.text)&&(this.options.showingAlternate?(this.element.find(".ui-button-icon-primary").hide(),this.element.find(".ui-button-text").hide(),this.element.find(".ui-button-icon-alternate").show(),this.element.find(".ui-button-text-alternate").show()):(this.element.find(".ui-button-icon-primary").show(),this.element.find(".ui-button-text").show(),this.element.find(".ui-button-icon-alternate").hide(),this.element.find(".ui-button-text-alternate").hide()),this._trigger("afterrefreshalternate"))},_resetButton:function(){var e=this.element.data("icon-primary"),t=this.element.data("icon-secondary");e||(e=this.element.data("icon")),e&&(this.options.icons.primary="btn-icon-"+e),t&&(this.options.icons.secondary="btn-icon-"+t),a["default"].ui.button.prototype._resetButton.call(this),this.options.alternate.text||(this.options.alternate.text=this.element.data("text-alternate")),this.options.alternate.icon||(this.options.alternate.icon=this.element.data("icon-alternate")),this.options.showingAlternate||(this.options.showingAlternate=this.element.hasClass("ss-ui-alternate")),this.options.alternate.icon&&this.buttonElement.append("<span class='ui-button-icon-alternate ui-button-icon-primary ui-icon btn-icon-"+this.options.alternate.icon+"'></span>"),this.options.alternate.text&&this.buttonElement.append("<span class='ui-button-text-alternate ui-button-text'>"+this.options.alternate.text+"</span>"),this._refreshAlternate()},refresh:function(){a["default"].ui.button.prototype.refresh.call(this),this._refreshAlternate()},destroy:function(){this.element.find(".ui-button-text-alternate").remove(),this.element.find(".ui-button-icon-alternate").remove(),a["default"].ui.button.prototype.destroy.call(this)}}),a["default"].widget("ssui.ssdialog",a["default"].ui.dialog,{options:{iframeUrl:"",reloadOnOpen:!0,dialogExtraClass:"",modal:!0,bgiframe:!0,autoOpen:!1,autoPosition:!0,minWidth:500,maxWidth:800,minHeight:300,maxHeight:700,widthRatio:.8,heightRatio:.8,resizable:!1},_create:function(){a["default"].ui.dialog.prototype._create.call(this);var e=this,t=(0,a["default"])('<iframe marginWidth="0" marginHeight="0" frameBorder="0" scrolling="auto"></iframe>');t.bind("load",function(i){"about:blank"!=(0,a["default"])(this).attr("src")&&(t.addClass("loaded").show(),e._resizeIframe(),e.uiDialog.removeClass("loading"))}).hide(),this.options.dialogExtraClass&&this.uiDialog.addClass(this.options.dialogExtraClass),this.element.append(t),this.options.iframeUrl&&this.element.css("overflow","hidden")},open:function(){a["default"].ui.dialog.prototype.open.call(this);var e=this,t=this.element.children("iframe");!this.options.iframeUrl||t.hasClass("loaded")&&!this.options.reloadOnOpen||(t.hide(),t.attr("src",this.options.iframeUrl),this.uiDialog.addClass("loading")),(0,a["default"])(window).bind("resize.ssdialog",function(){e._resizeIframe()})},close:function(){a["default"].ui.dialog.prototype.close.call(this),this.uiDialog.unbind("resize.ssdialog"),(0,a["default"])(window).unbind("resize.ssdialog")},_resizeIframe:function(){var e,t,i={},n=this.element.children("iframe");this.options.widthRatio&&(e=(0,a["default"])(window).width()*this.options.widthRatio,this.options.minWidth&&e<this.options.minWidth?i.width=this.options.minWidth:this.options.maxWidth&&e>this.options.maxWidth?i.width=this.options.maxWidth:i.width=e),this.options.heightRatio&&(t=(0,a["default"])(window).height()*this.options.heightRatio,this.options.minHeight&&t<this.options.minHeight?i.height=this.options.minHeight:this.options.maxHeight&&t>this.options.maxHeight?i.height=this.options.maxHeight:i.height=t),jQuery.isEmptyObject(i)||(this._setOptions(i),n.attr("width",i.width-parseFloat(this.element.css("paddingLeft"))-parseFloat(this.element.css("paddingRight"))),n.attr("height",i.height-parseFloat(this.element.css("paddingTop"))-parseFloat(this.element.css("paddingBottom"))),this.options.autoPosition&&this._setOption("position",this.options.position))}}),a["default"].widget("ssui.titlebar",{_create:function(){this.originalTitle=this.element.attr("title");var e=this.options,t=e.title||this.originalTitle||" ",i=a["default"].ui.dialog.getTitleId(this.element);this.element.parent().addClass("ui-dialog");var n=this.element.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix");if(e.closeButton){var s=(0,a["default"])('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){s.addClass("ui-state-hover")},function(){s.removeClass("ui-state-hover")}).focus(function(){s.addClass("ui-state-focus")}).blur(function(){s.removeClass("ui-state-focus")}).mousedown(function(e){e.stopPropagation()}).appendTo(n);(this.uiDialogTitlebarCloseText=(0,a["default"])("<span/>")).addClass("ui-icon ui-icon-closethick").text(e.closeText).appendTo(s)}(0,a["default"])("<span/>").addClass("ui-dialog-title").attr("id",i).html(t).prependTo(n);n.find("*").add(n).disableSelection()},destroy:function(){this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),this.originalTitle&&this.element.attr("title",this.originalTitle)}}),a["default"].extend(a["default"].ssui.titlebar,{version:"0.0.1",options:{title:"",closeButton:!1,closeText:"close"},uuid:0,getTitleId:function(e){return"ui-dialog-title-"+(e.attr("id")||++this.uuid)}})},{jQuery:"jQuery"}],4:[function(e,t,i){(function(){var e;e=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.name="SelectParser",e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,i,n,s,a,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,children:0,disabled:e.disabled}),a=e.childNodes,r=[],n=0,s=a.length;s>n;n++)i=a[n],r.push(this.add_option(i,t,e.disabled));return r},e.prototype.add_option=function(e,t,i){return"OPTION"===e.nodeName.toUpperCase()?(e.text.match(/^\s*$/g)?this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}):(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,selected:e.selected,disabled:i===!0?i:e.disabled,group_array_index:t,classes:e.className,style:e.style.cssText})),this.options_index+=1):void 0},e}(),e.select_to_array=function(t){var i,n,s,a,r;for(n=new e,r=t.childNodes,s=0,a=r.length;a>s;s++)i=r[s],n.add_node(i);return n.parsed},this.SelectParser=e}).call(window),function(){var e,t;t=this,e=function(){function e(e,t){this.form_field=e,this.options=null!=t?t:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.set_default_text(),this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return e.prototype.name="AbstractChosen",e.prototype.set_default_values=function(){var e=this;return this.click_test_action=function(t){return e.test_active_click(t)},this.activate_action=function(t){return e.activate_field(t)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&this.form_field.options[0].text.match(/^\s*$/g)?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.search_contains=this.options.search_contains||!1,this.choices=0,this.single_backstroke_delete=this.options.single_backstroke_delete||!1,this.max_selected_options=this.options.max_selected_options||1/0},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||"Select Some Options":this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||"Select an Option",this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||"No results match"},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(e){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},e.prototype.result_add_option=function(e){var t,i;return e.disabled?"":(e.dom_id=this.container_id+"_o_"+e.array_index,t=e.selected&&this.is_multiple?[]:["active-result"],e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),i=""!==e.style.cssText?' style="'+e.style+'"':"",'<li id="'+e.dom_id+'" class="'+t.join(" ")+'"'+i+">"+e.html+"</li>")},e.prototype.results_update_field=function(){return this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.keyup_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),t){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},e.prototype.generate_field_id=function(){var e;return e=this.generate_random_id(),this.form_field.id=e,e},e.prototype.generate_random_char=function(){var e,t,i;return e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=Math.floor(Math.random()*e.length),t=e.substring(i,i+1)},e}(),t.AbstractChosen=e}.call(window),function(){var e,t,i,n,s={}.hasOwnProperty,a=function(e,t){function i(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};n=this,e=jQuery,e.fn.extend({chosen:function(i){return e.browser.msie&&("6.0"===e.browser.version||"7.0"===e.browser.version&&7===document.documentMode)?this:this.each(function(n){var s;return s=e(this),s.hasClass("chzn-done")?void 0:s.data("chosen",new t(this,i))})}}),t=function(t){function s(){return s.__super__.constructor.apply(this,arguments)}return a(s,t),s.prototype.name="Chosen",s.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_value=this.form_field_jq.val(),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},s.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},s.prototype.set_up_html=function(){var t,n,s,a,r;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,t=e("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+(this.options.width||this.f_width)+"px;"}),this.is_multiple?t.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):t.html('<a href="javascript:void(0)" class="chzn-single chzn-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(t),this.container=e("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),a=this.rise_up(this.container,this.dropdown),n=a?-this.container.find(".chzn-drop").height():this.container.height(),s=this.container.width()-i(this.dropdown),this.dropdown.css({width:s+"px",top:n+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),r=s-i(this.search_container)-i(this.search_field),this.search_field.css({width:r+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},s.prototype.register_observers=function(){var e=this;return this.container.mousedown(function(t){return e.container_mousedown(t)}),this.container.mouseup(function(t){return e.container_mouseup(t)}),this.container.mouseenter(function(t){return e.mouse_enter(t)}),this.container.mouseleave(function(t){return e.mouse_leave(t)}),this.search_results.mouseup(function(t){return e.search_results_mouseup(t)}),this.search_results.mouseover(function(t){return e.search_results_mouseover(t)}),this.search_results.mouseout(function(t){return e.search_results_mouseout(t)}),this.form_field_jq.bind("liszt:updated",function(t){return e.results_update_field(t)}),this.form_field_jq.bind("liszt:activate",function(t){return e.activate_field(t)}),this.form_field_jq.bind("liszt:open",function(t){return e.container_mousedown(t)}),this.search_field.blur(function(t){return e.input_blur(t)}),this.search_field.keyup(function(t){return e.keyup_checker(t)}),this.search_field.keydown(function(t){return e.keydown_checker(t)}),this.search_field.focus(function(t){return e.input_focus(t)}),this.is_multiple?this.search_choices.click(function(t){return e.choices_click(t)}):this.container.click(function(e){return e.preventDefault()})},s.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field()):(this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus",this.activate_action))},s.prototype.container_mousedown=function(t){var i;return this.is_disabled?void 0:(i=null!=t?e(t.target).hasClass("search-choice-close"):!1,t&&"mousedown"===t.type&&!this.results_showing&&t.stopPropagation(),this.pending_destroy_click||i?this.pending_destroy_click=!1:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chzn-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(document).click(this.click_test_action),this.results_show()),this.activate_field()))},s.prototype.container_mouseup=function(e){return"ABBR"!==e.target.nodeName||this.is_disabled?void 0:this.results_reset(e)},s.prototype.blur_test=function(e){return!this.active_field&&this.container.hasClass("chzn-container-active")?this.close_field():void 0},s.prototype.close_field=function(){return e(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},s.prototype.activate_field=function(){return this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},s.prototype.test_active_click=function(t){return e(t.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},s.prototype.results_build=function(){var e,t,i,s,a;for(this.parsing=!0,this.results_data=n.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.addClass("chzn-default").find("span").text(this.default_text),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),e="",a=this.results_data,i=0,s=a.length;s>i;i++)t=a[i],t.group?e+=this.result_add_group(t):t.empty||(e+=this.result_add_option(t),t.selected&&this.is_multiple?this.choice_build(t):t.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(t.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(e),this.parsing=!1},s.prototype.result_add_group=function(t){return t.disabled?"":(t.dom_id=this.container_id+"_g_"+t.array_index,'<li id="'+t.dom_id+'" class="group-result">'+e("<div />").text(t.label).html()+"</li>")},s.prototype.result_do_highlight=function(e){var t,i,n,s,a;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),n=parseInt(this.search_results.css("maxHeight"),10),a=this.search_results.scrollTop(),s=n+a,i=this.result_highlight.position().top+this.search_results.scrollTop(),t=i+this.result_highlight.outerHeight(),t>=s)return this.search_results.scrollTop(t-n>0?t-n:0);if(a>i)return this.search_results.scrollTop(i)}},s.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},s.prototype.results_show=function(){var e,t,n;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),t=this.container.width()-i(this.dropdown),n=this.rise_up(this.container,this.dropdown),e=n?-this.container.find(".chzn-drop").height():this.is_multiple?this.container.height():this.container.height()-1,this.form_field_jq.trigger("liszt:showing_dropdown",{chosen:this}),this.dropdown.css({top:e+"px",left:0}),this.results_showing=!0,this.search_field.css("width",t-i(this.search_container)-i(this.search_field)+"px"),this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},s.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.form_field_jq.trigger("liszt:hiding_dropdown",{chosen:this}),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},s.prototype.set_tab_index=function(e){var t;return this.form_field_jq.attr("tabindex")?(t=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.search_field.attr("tabindex",t)):void 0},s.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},s.prototype.search_results_mouseup=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i.length?(this.result_highlight=i,this.result_select(t),this.search_field.focus()):void 0},s.prototype.search_results_mouseover=function(t){var i;return i=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first(),i?this.result_do_highlight(i):void 0},s.prototype.search_results_mouseout=function(t){return e(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},s.prototype.choices_click=function(t){return t.preventDefault(),!this.active_field||e(t.target).hasClass("search-choice")||this.results_showing?void 0:this.results_show()},s.prototype.choice_build=function(t){var i,n,s,a=this;return i=this.container_id+"_c_"+t.array_index,this.choices+=1,n=t.disabled?'<li class="search-choice search-choice-disabled" id="'+i+'"><span>'+t.html+"</span></li>":'<li class="search-choice" id="'+i+'"><span>'+t.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+t.array_index+'"></a></li>',this.search_container.before(n),s=e("#"+i).find("a").first(),s.click(function(e){return a.choice_destroy_link_click(e)})},s.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),this.is_disabled?t.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(e(t.target)))},s.prototype.choice_destroy=function(e){return this.result_deselect(e.attr("rel"))?(this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),e.parents("li").first().remove()):void 0},s.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},s.prototype.results_reset_cleanup=function(){return this.current_value=this.form_field_jq.val(),this.selected_item.find("abbr").remove()},s.prototype.result_select=function(e){var t,i,n,s;return this.result_highlight?(t=this.result_highlight,i=t.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(t):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=t,this.selected_item.removeClass("chzn-default")),t.addClass("result-selected"),s=i.substr(i.lastIndexOf("_")+1),n=this.results_data[s],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.is_multiple?this.choice_build(n):(this.selected_item.find("span").first().text(n.text),this.allow_single_deselect&&this.single_deselect_control_build()),e.metaKey&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field_jq.val()!==this.current_value)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_value=this.form_field_jq.val(),this.search_field_scale()):void 0},s.prototype.result_activate=function(e){return e.addClass("active-result")},s.prototype.result_deactivate=function(e){return e.removeClass("active-result")},s.prototype.result_deselect=function(t){var i,n;return n=this.results_data[t],this.form_field.options[n.options_index].disabled?!1:(n.selected=!1,this.form_field.options[n.options_index].selected=!1,i=e("#"+this.container_id+"_o_"+t),i.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[n.options_index].value}),this.search_field_scale(),!0)},s.prototype.single_deselect_control_build=function(){return this.allow_single_deselect&&this.selected_item.find("abbr").length<1?this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'):void 0},s.prototype.winnow_results=function(){var t,i,n,s,a,r,o,l,h,c,d,u,p,f,g,m,v,_;for(this.no_results_clear(),h=0,c=this.search_field.val()===this.default_text?"":e("<div/>").text(e.trim(this.search_field.val())).html(),r=this.search_contains?"":"^",a=new RegExp(r+c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),p=new RegExp(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),_=this.results_data,f=0,m=_.length;m>f;f++)if(i=_[f],!i.disabled&&!i.empty)if(i.group)e("#"+i.dom_id).css("display","none");else if(!this.is_multiple||!i.selected){if(t=!1,l=i.dom_id,o=e("#"+l),a.test(i.html))t=!0,h+=1;else if((i.html.indexOf(" ")>=0||0===i.html.indexOf("["))&&(s=i.html.replace(/\[|\]/g,"").split(" "),s.length))for(g=0,v=s.length;v>g;g++)n=s[g],a.test(n)&&(t=!0,h+=1);t?(c.length?(d=i.html.search(p),u=i.html.substr(0,d+c.length)+"</em>"+i.html.substr(d+c.length),u=u.substr(0,d)+"<em>"+u.substr(d)):u=i.html,o.html(u),this.result_activate(o),null!=i.group_array_index&&e("#"+this.results_data[i.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&l===this.result_highlight.attr("id")&&this.result_clear_highlight(),
|
||||
this.result_deactivate(o))}return 1>h&&c.length?this.no_results(c):this.winnow_results_set_highlight()},s.prototype.winnow_results_clear=function(){var t,i,n,s,a;for(this.search_field.val(""),i=this.search_results.find("li"),a=[],n=0,s=i.length;s>n;n++)t=i[n],t=e(t),t.hasClass("group-result")?a.push(t.css("display","auto")):this.is_multiple&&t.hasClass("result-selected")?a.push(void 0):a.push(this.result_activate(t));return a},s.prototype.winnow_results_set_highlight=function(){var e,t;return this.result_highlight||(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),e=t.length?t.first():this.search_results.find(".active-result").first(),null==e)?void 0:this.result_do_highlight(e)},s.prototype.no_results=function(t){var i;return i=e('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),i.find("span").first().html(t),this.search_results.append(i)},s.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},s.prototype.keydown_arrow=function(){var t,i;return this.result_highlight?this.results_showing&&(i=this.result_highlight.nextAll("li.active-result").first(),i&&this.result_do_highlight(i)):(t=this.search_results.find("li.active-result").first(),t&&this.result_do_highlight(e(t))),this.results_showing?void 0:this.results_show()},s.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result"),e.length?this.result_do_highlight(e.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},s.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last(),e.length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},s.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},s.prototype.keydown_checker=function(e){var t,i;switch(t=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),8!==t&&this.pending_backstroke&&this.clear_backstroke(),t){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},s.prototype.search_field_scale=function(){var t,i,n,s,a,r,o,l,h,c;if(this.is_multiple){for(n=0,l=0,r="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],h=0,c=o.length;c>h;h++)a=o[h],r+=a+":"+this.search_field.css(a)+";";return i=e("<div />",{style:r}),i.text(this.search_field.val()),e("body").append(i),l=i.width()+25,i.remove(),l>this.f_width-10&&(l=this.f_width-10),this.search_field.css({width:l+"px"}),s=this.rise_up(this.container,this.dropdown),t=s?-this.container.find(".chzn-drop").height():this.container.height(),this.dropdown.css({top:t+"px"})}},s.prototype.generate_random_id=function(){var t;for(t="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();e("#"+t).length>0;)t+=this.generate_random_char();return t},s.prototype.rise_up=function(t,i){var n,s,a,r;return r=t.find("a.chzn-single"),r.length>0?(a=e(window).height()+e(document).scrollTop()-t.find("a").innerHeight(),s=r.offset().top,n=i.innerHeight(),s+n>a&&s-n>0?(t.addClass("chzn-with-rise"),!0):(t.removeClass("chzn-with-rise"),!1)):!1},s}(AbstractChosen),i=function(e){var t;return t=e.outerWidth()-e.width()},n.get_side_border_padding=i}.call(window)},{}],5:[function(e,t,i){!function(e,t){"use strict";var i=e.History=e.History||{},n=e.jQuery;if("undefined"!=typeof i.Adapter)throw new Error("History.js Adapter has already been loaded...");i.Adapter={bind:function(e,t,i){n(e).bind(t,i)},trigger:function(e,t,i){n(e).trigger(t,i)},extractEventData:function(e,i,n){var s=i&&i.originalEvent&&i.originalEvent[e]||n&&n[e]||t;return s},onDomLoad:function(e){n(e)}},"undefined"!=typeof i.init&&i.init()}(window)},{}],6:[function(e,t,i){!function(e,t){"use strict";var i=e.document,n=e.setTimeout||n,s=e.clearTimeout||s,a=e.setInterval||a,r=e.History=e.History||{};if("undefined"!=typeof r.initHtml4)throw new Error("History.js HTML4 Support has already been loaded...");r.initHtml4=function(){return"undefined"!=typeof r.initHtml4.initialized?!1:(r.initHtml4.initialized=!0,r.enabled=!0,r.savedHashes=[],r.isLastHash=function(e){var t,i=r.getHashByIndex();return t=e===i},r.isHashEqual=function(e,t){return e=encodeURIComponent(e).replace(/%25/g,"%"),t=encodeURIComponent(t).replace(/%25/g,"%"),e===t},r.saveHash=function(e){return r.isLastHash(e)?!1:(r.savedHashes.push(e),!0)},r.getHashByIndex=function(e){var t=null;return t="undefined"==typeof e?r.savedHashes[r.savedHashes.length-1]:0>e?r.savedHashes[r.savedHashes.length+e]:r.savedHashes[e]},r.discardedHashes={},r.discardedStates={},r.discardState=function(e,t,i){var n,s=r.getHashByState(e);return n={discardedState:e,backState:i,forwardState:t},r.discardedStates[s]=n,!0},r.discardHash=function(e,t,i){var n={discardedHash:e,backState:i,forwardState:t};return r.discardedHashes[e]=n,!0},r.discardedState=function(e){var t,i=r.getHashByState(e);return t=r.discardedStates[i]||!1},r.discardedHash=function(e){var t=r.discardedHashes[e]||!1;return t},r.recycleState=function(e){var t=r.getHashByState(e);return r.discardedState(e)&&delete r.discardedStates[t],!0},r.emulated.hashChange&&(r.hashChangeInit=function(){r.checkerFunction=null;var t,n,s,o,l="",h=Boolean(r.getHash());return r.isInternetExplorer()?(t="historyjs-iframe",n=i.createElement("iframe"),n.setAttribute("id",t),n.setAttribute("src","#"),n.style.display="none",i.body.appendChild(n),n.contentWindow.document.open(),n.contentWindow.document.close(),s="",o=!1,r.checkerFunction=function(){if(o)return!1;o=!0;var t=r.getHash(),i=r.getHash(n.contentWindow.document.location);return t!==l?(l=t,i!==t&&(s=i=t,n.contentWindow.document.open(),n.contentWindow.document.close(),n.contentWindow.document.location.hash=r.escapeHash(t)),r.Adapter.trigger(e,"hashchange")):i!==s&&(s=i,h&&""===i?r.back():r.setHash(i,!1)),o=!1,!0}):r.checkerFunction=function(){var t=r.getHash()||"";return t!==l&&(l=t,r.Adapter.trigger(e,"hashchange")),!0},r.intervalList.push(a(r.checkerFunction,r.options.hashChangeInterval)),!0},r.Adapter.onDomLoad(r.hashChangeInit)),r.emulated.pushState&&(r.onHashChange=function(t){var i,n=t&&t.newURL||r.getLocationHref(),s=r.getHashByUrl(n),a=null,o=null;return r.isLastHash(s)?(r.busy(!1),!1):(r.doubleCheckComplete(),r.saveHash(s),s&&r.isTraditionalAnchor(s)?(r.Adapter.trigger(e,"anchorchange"),r.busy(!1),!1):(a=r.extractState(r.getFullUrl(s||r.getLocationHref()),!0),r.isLastSavedState(a)?(r.busy(!1),!1):(o=r.getHashByState(a),(i=r.discardedState(a))?(r.getHashByIndex(-2)===r.getHashByState(i.forwardState)?r.back(!1):r.forward(!1),!1):(r.pushState(a.data,a.title,encodeURI(a.url),!1),!0))))},r.Adapter.bind(e,"hashchange",r.onHashChange),r.pushState=function(t,i,n,s){if(n=encodeURI(n).replace(/%25/g,"%"),r.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(s!==!1&&r.busy())return r.pushQueue({scope:r,callback:r.pushState,args:arguments,queue:s}),!1;r.busy(!0);var a=r.createStateObject(t,i,n),o=r.getHashByState(a),l=r.getState(!1),h=r.getHashByState(l),c=r.getHash(),d=r.expectedStateId==a.id;return r.storeState(a),r.expectedStateId=a.id,r.recycleState(a),r.setTitle(a),o===h?(r.busy(!1),!1):(r.saveState(a),d||r.Adapter.trigger(e,"statechange"),r.isHashEqual(o,c)||r.isHashEqual(o,r.getShortUrl(r.getLocationHref()))||r.setHash(o,!1),r.busy(!1),!0)},r.replaceState=function(t,i,n,s){if(n=encodeURI(n).replace(/%25/g,"%"),r.getHashByUrl(n))throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).");if(s!==!1&&r.busy())return r.pushQueue({scope:r,callback:r.replaceState,args:arguments,queue:s}),!1;r.busy(!0);var a=r.createStateObject(t,i,n),o=r.getHashByState(a),l=r.getState(!1),h=r.getHashByState(l),c=r.getStateByIndex(-2);return r.discardState(l,a,c),o===h?(r.storeState(a),r.expectedStateId=a.id,r.recycleState(a),r.setTitle(a),r.saveState(a),r.Adapter.trigger(e,"statechange"),r.busy(!1)):r.pushState(a.data,a.title,a.url,!1),!0}),void(r.emulated.pushState&&r.getHash()&&!r.emulated.hashChange&&r.Adapter.onDomLoad(function(){r.Adapter.trigger(e,"hashchange")})))},"undefined"!=typeof r.init&&r.init()}(window)},{}],7:[function(e,t,i){!function(e,t){"use strict";var i=e.console||t,n=e.document,s=e.navigator,a=e.sessionStorage||!1,r=e.setTimeout,o=e.clearTimeout,l=e.setInterval,h=e.clearInterval,c=e.JSON,d=e.alert,u=e.History=e.History||{},p=e.history;try{a.setItem("TEST","1"),a.removeItem("TEST")}catch(f){a=!1}if(c.stringify=c.stringify||c.encode,c.parse=c.parse||c.decode,"undefined"!=typeof u.init)throw new Error("History.js Core has already been loaded...");u.init=function(e){return"undefined"==typeof u.Adapter?!1:("undefined"!=typeof u.initCore&&u.initCore(),"undefined"!=typeof u.initHtml4&&u.initHtml4(),!0)},u.initCore=function(f){if("undefined"!=typeof u.initCore.initialized)return!1;if(u.initCore.initialized=!0,u.options=u.options||{},u.options.hashChangeInterval=u.options.hashChangeInterval||100,u.options.safariPollInterval=u.options.safariPollInterval||500,u.options.doubleCheckInterval=u.options.doubleCheckInterval||500,u.options.disableSuid=u.options.disableSuid||!1,u.options.storeInterval=u.options.storeInterval||1e3,u.options.busyDelay=u.options.busyDelay||250,u.options.debug=u.options.debug||!1,u.options.initialTitle=u.options.initialTitle||n.title,u.options.html4Mode=u.options.html4Mode||!1,u.options.delayInit=u.options.delayInit||!1,u.intervalList=[],u.clearAllIntervals=function(){var e,t=u.intervalList;if("undefined"!=typeof t&&null!==t){for(e=0;e<t.length;e++)h(t[e]);u.intervalList=null}},u.debug=function(){u.options.debug&&u.log.apply(u,arguments)},u.log=function(){var e,t,s,a,r,o=!("undefined"==typeof i||"undefined"==typeof i.log||"undefined"==typeof i.log.apply),l=n.getElementById("log");for(o?(a=Array.prototype.slice.call(arguments),e=a.shift(),"undefined"!=typeof i.debug?i.debug.apply(i,[e,a]):i.log.apply(i,[e,a])):e="\n"+arguments[0]+"\n",t=1,s=arguments.length;s>t;++t){if(r=arguments[t],"object"==typeof r&&"undefined"!=typeof c)try{r=c.stringify(r)}catch(h){}e+="\n"+r+"\n"}return l?(l.value+=e+"\n-----\n",l.scrollTop=l.scrollHeight-l.clientHeight):o||d(e),!0},u.getInternetExplorerMajorVersion=function(){var e=u.getInternetExplorerMajorVersion.cached="undefined"!=typeof u.getInternetExplorerMajorVersion.cached?u.getInternetExplorerMajorVersion.cached:function(){for(var e=3,t=n.createElement("div"),i=t.getElementsByTagName("i");(t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&i[0];);return e>4?e:!1}();return e},u.isInternetExplorer=function(){var e=u.isInternetExplorer.cached="undefined"!=typeof u.isInternetExplorer.cached?u.isInternetExplorer.cached:Boolean(u.getInternetExplorerMajorVersion());return e},u.options.html4Mode?u.emulated={pushState:!0,hashChange:!0}:u.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!(/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(s.userAgent)||/AppleWebKit\/5([0-2]|3[0-2])/i.test(s.userAgent))),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in n)||u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<8)},u.enabled=!u.emulated.pushState,u.bugs={setHash:Boolean(!u.emulated.pushState&&"Apple Computer, Inc."===s.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(s.userAgent)),safariPoll:Boolean(!u.emulated.pushState&&"Apple Computer, Inc."===s.vendor&&/AppleWebKit\/5([0-2]|3[0-3])/.test(s.userAgent)),ieDoubleCheck:Boolean(u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(u.isInternetExplorer()&&u.getInternetExplorerMajorVersion()<7)},u.isEmptyObject=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},u.cloneObject=function(e){var t,i;return e?(t=c.stringify(e),i=c.parse(t)):i={},i},u.getRootUrl=function(){var e=n.location.protocol+"//"+(n.location.hostname||n.location.host);return n.location.port&&(e+=":"+n.location.port),e+="/"},u.getBaseHref=function(){var e=n.getElementsByTagName("base"),t=null,i="";return 1===e.length&&(t=e[0],i=t.href.replace(/[^\/]+$/,"")),i=i.replace(/\/+$/,""),i&&(i+="/"),i},u.getBaseUrl=function(){var e=u.getBaseHref()||u.getBasePageUrl()||u.getRootUrl();return e},u.getPageUrl=function(){var e,t=u.getState(!1,!1),i=(t||{}).url||u.getLocationHref();return e=i.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,i){return/\./.test(e)?e:e+"/"})},u.getBasePageUrl=function(){var e=u.getLocationHref().replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,i){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},u.getFullUrl=function(e,t){var i=e,n=e.substring(0,1);return t="undefined"==typeof t?!0:t,/[a-z]+\:\/\//.test(e)||(i="/"===n?u.getRootUrl()+e.replace(/^\/+/,""):"#"===n?u.getPageUrl().replace(/#.*/,"")+e:"?"===n?u.getPageUrl().replace(/[\?#].*/,"")+e:t?u.getBaseUrl()+e.replace(/^(\.\/)+/,""):u.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),i.replace(/\#$/,"")},u.getShortUrl=function(e){var t=e,i=u.getBaseUrl(),n=u.getRootUrl();return u.emulated.pushState&&(t=t.replace(i,"")),t=t.replace(n,"/"),u.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,"")},u.getLocationHref=function(e){return e=e||n,e.URL===e.location.href?e.location.href:e.location.href===decodeURIComponent(e.URL)?e.URL:e.location.hash&&decodeURIComponent(e.location.href.replace(/^[^#]+/,""))===e.location.hash?e.location.href:-1==e.URL.indexOf("#")&&-1!=e.location.href.indexOf("#")?e.location.href:e.URL||e.location.href},u.store={},u.idToState=u.idToState||{},u.stateToId=u.stateToId||{},u.urlToId=u.urlToId||{},u.storedStates=u.storedStates||[],u.savedStates=u.savedStates||[],u.normalizeStore=function(){u.store.idToState=u.store.idToState||{},u.store.urlToId=u.store.urlToId||{},u.store.stateToId=u.store.stateToId||{}},u.getState=function(e,t){"undefined"==typeof e&&(e=!0),"undefined"==typeof t&&(t=!0);var i=u.getLastSavedState();return!i&&t&&(i=u.createStateObject()),e&&(i=u.cloneObject(i),i.url=i.cleanUrl||i.url),i},u.getIdByState=function(e){var t,i=u.extractId(e.url);if(!i)if(t=u.getStateString(e),"undefined"!=typeof u.stateToId[t])i=u.stateToId[t];else if("undefined"!=typeof u.store.stateToId[t])i=u.store.stateToId[t];else{for(;;)if(i=(new Date).getTime()+String(Math.random()).replace(/\D/g,""),"undefined"==typeof u.idToState[i]&&"undefined"==typeof u.store.idToState[i])break;u.stateToId[t]=i,u.idToState[i]=e}return i},u.normalizeState=function(e){var t,i;return e&&"object"==typeof e||(e={}),"undefined"!=typeof e.normalized?e:(e.data&&"object"==typeof e.data||(e.data={}),t={},t.normalized=!0,t.title=e.title||"",t.url=u.getFullUrl(e.url?decodeURIComponent(e.url):u.getLocationHref()),t.hash=u.getShortUrl(t.url),t.data=u.cloneObject(e.data),t.id=u.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,i=!u.isEmptyObject(t.data),(t.title||i)&&u.options.disableSuid!==!0&&(t.hash=u.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id),t.hashedUrl=u.getFullUrl(t.hash),(u.emulated.pushState||u.bugs.safariPoll)&&u.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t)},u.createStateObject=function(e,t,i){var n={data:e,title:t,url:i};return n=u.normalizeState(n)},u.getStateById=function(e){e=String(e);var i=u.idToState[e]||u.store.idToState[e]||t;return i},u.getStateString=function(e){var t,i,n;return t=u.normalizeState(e),i={data:t.data,title:e.title,url:e.url},n=c.stringify(i)},u.getStateId=function(e){var t,i;return t=u.normalizeState(e),i=t.id},u.getHashByState=function(e){var t,i;return t=u.normalizeState(e),i=t.hash},u.extractId=function(e){var t,i,n,s;return s=-1!=e.indexOf("#")?e.split("#")[0]:e,i=/(.*)\&_suid=([0-9]+)$/.exec(s),n=i?i[1]||e:e,t=i?String(i[2]||""):"",t||!1},u.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},u.extractState=function(e,t){var i,n,s=null;return t=t||!1,i=u.extractId(e),i&&(s=u.getStateById(i)),s||(n=u.getFullUrl(e),i=u.getIdByUrl(n)||!1,i&&(s=u.getStateById(i)),s||!t||u.isTraditionalAnchor(e)||(s=u.createStateObject(null,null,n))),s},u.getIdByUrl=function(e){var i=u.urlToId[e]||u.store.urlToId[e]||t;return i},u.getLastSavedState=function(){return u.savedStates[u.savedStates.length-1]||t},u.getLastStoredState=function(){return u.storedStates[u.storedStates.length-1]||t},u.hasUrlDuplicate=function(e){var t,i=!1;return t=u.extractState(e.url),i=t&&t.id!==e.id},u.storeState=function(e){return u.urlToId[e.url]=e.id,u.storedStates.push(u.cloneObject(e)),e},u.isLastSavedState=function(e){var t,i,n,s=!1;return u.savedStates.length&&(t=e.id,i=u.getLastSavedState(),n=i.id,s=t===n),s},u.saveState=function(e){return u.isLastSavedState(e)?!1:(u.savedStates.push(u.cloneObject(e)),!0)},u.getStateByIndex=function(e){var t=null;return t="undefined"==typeof e?u.savedStates[u.savedStates.length-1]:0>e?u.savedStates[u.savedStates.length+e]:u.savedStates[e]},u.getCurrentIndex=function(){var e=null;return e=u.savedStates.length<1?0:u.savedStates.length-1},u.getHash=function(e){var t,i=u.getLocationHref(e);return t=u.getHashByUrl(i)},u.unescapeHash=function(e){var t=u.normalizeHash(e);return t=decodeURIComponent(t)},u.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},u.setHash=function(e,t){var i,s;return t!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.setHash,args:arguments,queue:t}),!1):(u.busy(!0),i=u.extractState(e,!0),i&&!u.emulated.pushState?u.pushState(i.data,i.title,i.url,!1):u.getHash()!==e&&(u.bugs.setHash?(s=u.getPageUrl(),u.pushState(null,null,s+"#"+e,!1)):n.location.hash=e),u)},u.escapeHash=function(t){var i=u.normalizeHash(t);return i=e.encodeURIComponent(i),u.bugs.hashEscape||(i=i.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),i},u.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=u.unescapeHash(t)},u.setTitle=function(e){var t,i=e.title;i||(t=u.getStateByIndex(0),t&&t.url===e.url&&(i=t.title||u.options.initialTitle));try{n.getElementsByTagName("title")[0].innerHTML=i.replace("<","<").replace(">",">").replace(" & "," & ")}catch(s){}return n.title=i,u},u.queues=[],u.busy=function(e){if("undefined"!=typeof e?u.busy.flag=e:"undefined"==typeof u.busy.flag&&(u.busy.flag=!1),!u.busy.flag){o(u.busy.timeout);var t=function(){var e,i,n;if(!u.busy.flag)for(e=u.queues.length-1;e>=0;--e)i=u.queues[e],0!==i.length&&(n=i.shift(),u.fireQueueItem(n),u.busy.timeout=r(t,u.options.busyDelay))};u.busy.timeout=r(t,u.options.busyDelay)}return u.busy.flag},u.busy.flag=!1,u.fireQueueItem=function(e){return e.callback.apply(e.scope||u,e.args||[])},u.pushQueue=function(e){return u.queues[e.queue||0]=u.queues[e.queue||0]||[],u.queues[e.queue||0].push(e),u},u.queue=function(e,t){return"function"==typeof e&&(e={callback:e}),"undefined"!=typeof t&&(e.queue=t),u.busy()?u.pushQueue(e):u.fireQueueItem(e),u},u.clearQueue=function(){return u.busy.flag=!1,u.queues=[],u},u.stateChanged=!1,u.doubleChecker=!1,u.doubleCheckComplete=function(){return u.stateChanged=!0,u.doubleCheckClear(),u},u.doubleCheckClear=function(){return u.doubleChecker&&(o(u.doubleChecker),u.doubleChecker=!1),u},u.doubleCheck=function(e){return u.stateChanged=!1,u.doubleCheckClear(),u.bugs.ieDoubleCheck&&(u.doubleChecker=r(function(){return u.doubleCheckClear(),u.stateChanged||e(),!0},u.options.doubleCheckInterval)),u},u.safariStatePoll=function(){var t,i=u.extractState(u.getLocationHref());if(!u.isLastSavedState(i))return t=i,t||(t=u.createStateObject()),u.Adapter.trigger(e,"popstate"),u},u.back=function(e){return e!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.back,args:arguments,queue:e}),!1):(u.busy(!0),u.doubleCheck(function(){u.back(!1)}),p.go(-1),!0)},u.forward=function(e){return e!==!1&&u.busy()?(u.pushQueue({scope:u,callback:u.forward,args:arguments,queue:e}),!1):(u.busy(!0),u.doubleCheck(function(){u.forward(!1)}),p.go(1),!0)},u.go=function(e,t){var i;if(e>0)for(i=1;e>=i;++i)u.forward(t);else{if(!(0>e))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(i=-1;i>=e;--i)u.back(t)}return u},u.emulated.pushState){var g=function(){};u.pushState=u.pushState||g,u.replaceState=u.replaceState||g}else u.onPopState=function(t,i){var n,s,a=!1,r=!1;return u.doubleCheckComplete(),(n=u.getHash())?(s=u.extractState(n||u.getLocationHref(),!0),s?u.replaceState(s.data,s.title,s.url,!1):(u.Adapter.trigger(e,"anchorchange"),u.busy(!1)),u.expectedStateId=!1,!1):(a=u.Adapter.extractEventData("state",t,i)||!1,r=a?u.getStateById(a):u.expectedStateId?u.getStateById(u.expectedStateId):u.extractState(u.getLocationHref()),r||(r=u.createStateObject(null,null,u.getLocationHref())),u.expectedStateId=!1,u.isLastSavedState(r)?(u.busy(!1),!1):(u.storeState(r),u.saveState(r),u.setTitle(r),u.Adapter.trigger(e,"statechange"),u.busy(!1),!0))},u.Adapter.bind(e,"popstate",u.onPopState),u.pushState=function(t,i,n,s){if(u.getHashByUrl(n)&&u.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&u.busy())return u.pushQueue({scope:u,callback:u.pushState,args:arguments,queue:s}),!1;u.busy(!0);var a=u.createStateObject(t,i,n);return u.isLastSavedState(a)?u.busy(!1):(u.storeState(a),u.expectedStateId=a.id,p.pushState(a.id,a.title,a.url),u.Adapter.trigger(e,"popstate")),!0},u.replaceState=function(t,i,n,s){if(u.getHashByUrl(n)&&u.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&u.busy())return u.pushQueue({scope:u,callback:u.replaceState,args:arguments,queue:s}),!1;u.busy(!0);var a=u.createStateObject(t,i,n);return u.isLastSavedState(a)?u.busy(!1):(u.storeState(a),u.expectedStateId=a.id,p.replaceState(a.id,a.title,a.url),u.Adapter.trigger(e,"popstate")),!0};if(a){try{u.store=c.parse(a.getItem("History.store"))||{}}catch(m){u.store={}}u.normalizeStore()}else u.store={},u.normalizeStore();u.Adapter.bind(e,"unload",u.clearAllIntervals),u.saveState(u.storeState(u.extractState(u.getLocationHref(),!0))),a&&(u.onUnload=function(){var e,t,i;try{e=c.parse(a.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in u.idToState)u.idToState.hasOwnProperty(t)&&(e.idToState[t]=u.idToState[t]);for(t in u.urlToId)u.urlToId.hasOwnProperty(t)&&(e.urlToId[t]=u.urlToId[t]);for(t in u.stateToId)u.stateToId.hasOwnProperty(t)&&(e.stateToId[t]=u.stateToId[t]);u.store=e,u.normalizeStore(),i=c.stringify(e);try{a.setItem("History.store",i)}catch(s){if(!/QUOTA_EXCEEDED_ERR/.test(s.message))throw s;a.removeItem("History.store"),a.setItem("History.store",i)}},u.intervalList.push(l(u.onUnload,u.options.storeInterval)),u.Adapter.bind(e,"beforeunload",u.onUnload),u.Adapter.bind(e,"unload",u.onUnload)),u.emulated.pushState||(u.bugs.safariPoll&&u.intervalList.push(l(u.safariStatePoll,u.options.safariPollInterval)),("Apple Computer, Inc."===s.vendor||"Mozilla"===(s.appCodeName||""))&&(u.Adapter.bind(e,"hashchange",function(){u.Adapter.trigger(e,"popstate")}),u.getHash()&&u.Adapter.onDomLoad(function(){u.Adapter.trigger(e,"hashchange")})))},u.options&&u.options.delayInit||u.init()}(window)},{}],8:[function(e,t,i){!function(){window.jLayout="undefined"==typeof window.jLayout?{}:window.jLayout,jLayout.border=function(e){function t(e){return function(t){var n,h=t.insets(),c=0,d=0;return s&&s.isVisible()&&(n=s[e+"Size"](),c+=n.width+i.hgap,d=n.height),a&&a.isVisible()&&(n=a[e+"Size"](),c+=n.width+i.hgap,d=Math.max(n.height,d)),l&&l.isVisible()&&(n=l[e+"Size"](),c+=n.width,d=Math.max(n.height,d)),r&&r.isVisible()&&(n=r[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),o&&o.isVisible()&&(n=o[e+"Size"](),c=Math.max(n.width,c),d+=n.height+i.vgap),{width:c+h.left+h.right,height:d+h.top+h.bottom}}}var i={},n={},s=e.east,a=e.west,r=e.north,o=e.south,l=e.center;return i.hgap=e.hgap||0,i.vgap=e.vgap||0,n.items=function(){var e=[];return s&&e.push(s),a&&e.push(a),r&&e.push(r),o&&e.push(o),l&&e.push(l),e},n.layout=function(e){var t,n=e.bounds(),h=e.insets(),c=h.top,d=n.height-h.bottom,u=h.left,p=n.width-h.right;return r&&r.isVisible()&&(t=r.preferredSize(),r.bounds({x:u,y:c,width:p-u,height:t.height}),r.doLayout(),c+=t.height+i.vgap),o&&o.isVisible()&&(t=o.preferredSize(),o.bounds({x:u,y:d-t.height,width:p-u,height:t.height}),o.doLayout(),d-=t.height+i.vgap),s&&s.isVisible()&&(t=s.preferredSize(),s.bounds({x:p-t.width,y:c,width:t.width,height:d-c}),s.doLayout(),p-=t.width+i.hgap),a&&a.isVisible()&&(t=a.preferredSize(),a.bounds({x:u,y:c,width:t.width,height:d-c}),a.doLayout(),u+=t.width+i.hgap),l&&l.isVisible()&&(l.bounds({x:u,y:c,width:p-u,height:d-c}),l.doLayout()),e},n.preferred=t("preferred"),n.minimum=t("minimum"),n.maximum=t("maximum"),n}}()},{}],9:[function(e,t,i){var n=window.jQuery,s=window.jLayout;n&&s&&!function(e){var t=e.jLayoutWrap=function(t,i){var n={};return n.item=t,e.each(["min","max"],function(e,i){n[i+"imumSize"]=function(e){var s=t.data("jlayout");return s?s[i+"imum"](n):t[i+"Size"](e)}}),e.extend(n,{doLayout:function(){var e=t.data("jlayout");e?e.layout(n):t.is("[data-layout-type]")&&t.layout({resize:!1}),t.css({position:"absolute"})},isVisible:function(){return t.isVisible()},insets:function(){var e=t.padding(),i=t.border();return{top:e.top,bottom:e.bottom+i.bottom+i.top,left:e.left,right:e.right+i.right+i.left}},bounds:function(e){var i={};return e?("number"==typeof e.x&&(i.left=e.x),"number"==typeof e.y&&(i.top=e.y),"number"==typeof e.width&&(i.width=e.width-(t.outerWidth(!0)-t.width()),i.width=i.width>=0?i.width:0),"number"==typeof e.height&&(i.height=e.height-(t.outerHeight(!0)-t.height()),i.height=i.height>=0?i.height:0),t.css(i),t):(i=t.position(),{x:i.left,y:i.top,width:t.outerWidth(!1),height:t.outerHeight(!1)})},preferredSize:function(){var e,s,a=t.margin(),r={width:0,height:0},o=t.data("jlayout");return o&&i?(r=o.preferred(n),e=n.minimumSize(),s=n.maximumSize(),r.width+=a.left+a.right,r.height+=a.top+a.bottom,r.width<e.width||r.height<e.height?(r.width=Math.max(r.width,e.width),r.height=Math.max(r.height,e.height)):(r.width>s.width||r.height>s.height)&&(r.width=Math.min(r.width,s.width),r.height=Math.min(r.height,s.height))):(r=n.bounds(),r.width+=a.left+a.right,r.height+=a.top+a.bottom),r}}),n};e.fn.layout=function(i){var n=e.extend({},e.fn.layout.defaults,i);return e.each(this,function(){var i=e(this),a=e.metadata&&i.metadata().layout?e.extend(n,i.metadata().layout):n,a=i.data("layoutType")?e.extend(a,{type:i.data("layoutType")}):a,r=t(i,a.resize);"border"===a.type&&"undefined"!=typeof s.border?(e.each(["north","south","west","east","center"],function(e,n){i.children().hasClass(n)&&(a[n]=t(i.children("."+n+":first")))}),i.data("jlayout",s.border(a))):"grid"===a.type&&"undefined"!=typeof s.grid?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.grid(a))):"flexGrid"===a.type&&"undefined"!=typeof s.flexGrid?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.flexGrid(a))):"column"===a.type&&"undefined"!=typeof s.column?(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.column(a))):"flow"===a.type&&"undefined"!=typeof s.flow&&(a.items=[],i.children().each(function(i){e(this).hasClass("ui-resizable-handle")||(a.items[i]=t(e(this)))}),i.data("jlayout",s.flow(a))),a.resize&&r.bounds(r.preferredSize()),r.doLayout(),i.css({position:"relative"}),void 0!==e.ui&&i.addClass("ui-widget")})},e.fn.layout.defaults={resize:!0,type:"grid"}}(n)},{}],10:[function(e,t,i){!function(e){e.fn.hoverIntent=function(t,i){var n={sensitivity:7,interval:100,timeout:350};n=e.extend(n,i?{over:t,out:i}:t);var s,a,r,o,l=function(e){s=e.pageX,a=e.pageY},h=function(t,i){return i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(r-s)+Math.abs(o-a)<n.sensitivity?(e(i).unbind("mousemove",l),i.hoverIntent_s=1,n.over.apply(i,[t])):(r=s,o=a,i.hoverIntent_t=setTimeout(function(){h(t,i)},n.interval),void 0)},c=function(e,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,n.out.apply(t,[e])},d=function(t){var i=jQuery.extend({},t),s=this;s.hoverIntent_t&&(s.hoverIntent_t=clearTimeout(s.hoverIntent_t)),"mouseenter"==t.type?(r=i.pageX,o=i.pageY,e(s).bind("mousemove",l),1!=s.hoverIntent_s&&(s.hoverIntent_t=setTimeout(function(){h(i,s)},n.interval))):(e(s).unbind("mousemove",l),1==s.hoverIntent_s&&(s.hoverIntent_t=setTimeout(function(){c(i,s)},n.timeout)))};return this.bind("mouseenter",d).bind("mouseleave",d)}}(jQuery)},{}],11:[function(e,t,i){!function(e){e.extend({noticeAdd:function(t){var t,i,n,s,a,r={inEffect:{opacity:"show"},inEffectDuration:600,stayTime:3e3,text:"",stay:!1,type:"notice"},o=!1;t=e.extend({},r,t),i=e(".notice-wrap").length?e(".notice-wrap"):e("<div></div>").addClass("notice-wrap").appendTo("body"),n=e("<div></div>").addClass("notice-item-wrapper"),s=e("<div></div>").hide().addClass("notice-item "+t.type).appendTo(i).html("<p>"+t.text+"</p>").animate(t.inEffect,t.inEffectDuration).wrap(n),a=e("<div></div>").addClass("notice-item-close").prependTo(s).html("x").click(function(){e.noticeRemove(s)}),s.hover(function(){o=!0},function(){o=!1}),t.stay||setTimeout(function(){var t=setInterval(function(){o||(e.noticeRemove(s),clearInterval(t))},1e3)},t.stayTime)},noticeRemove:function(e){e.animate({opacity:"0"},600,function(){e.parent().animate({height:"0px"},300,function(){e.parent().remove()})})}})}(jQuery)},{}],12:[function(e,t,i){!function(e){"use strict";var t=function(e){return parseInt(e,10)||0};e.each(["min","max"],function(i,n){e.fn[n+"Size"]=function(e){var i,s;return e?(void 0!==e.width&&this.css(n+"-width",e.width),void 0!==e.height&&this.css(n+"-height",e.height),this):(i=this.css(n+"-width"),s=this.css(n+"-height"),{width:"max"===n&&(void 0===i||"none"===i||-1===t(i))&&Number.MAX_VALUE||t(i),height:"max"===n&&(void 0===s||"none"===s||-1===t(s))&&Number.MAX_VALUE||t(s)})}}),e.fn.isVisible=function(){return this.is(":visible")},e.each(["border","margin","padding"],function(i,n){e.fn[n]=function(e){return e?(void 0!==e.top&&this.css(n+"-top"+("border"===n?"-width":""),e.top),void 0!==e.bottom&&this.css(n+"-bottom"+("border"===n?"-width":""),e.bottom),void 0!==e.left&&this.css(n+"-left"+("border"===n?"-width":""),e.left),void 0!==e.right&&this.css(n+"-right"+("border"===n?"-width":""),e.right),this):{top:t(this.css(n+"-top"+("border"===n?"-width":""))),bottom:t(this.css(n+"-bottom"+("border"===n?"-width":""))),left:t(this.css(n+"-left"+("border"===n?"-width":""))),right:t(this.css(n+"-right"+("border"===n?"-width":"")))}}})}(jQuery)},{}],13:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s);a["default"].fn.extend({ssDatepicker:function(e){return(0,a["default"])(this).each(function(){if(!(0,a["default"])(this).data("datepicker")){(0,a["default"])(this).siblings("button").addClass("ui-icon ui-icon-calendar");var t=((0,a["default"])(this).parents(".field.date:first"),a["default"].extend(e||{},(0,a["default"])(this).data(),(0,a["default"])(this).data("jqueryuiconfig"),{}));t.showcalendar&&(t.locale&&a["default"].datepicker.regional[t.locale]&&(t=a["default"].extend(t,a["default"].datepicker.regional[t.locale],{})),
|
||||
t.min&&(t.minDate=a["default"].datepicker.parseDate("yy-mm-dd",t.min)),t.max&&(t.maxDate=a["default"].datepicker.parseDate("yy-mm-dd",t.max)),t.dateFormat=t.jquerydateformat,(0,a["default"])(this).datepicker(t))}})}}),(0,a["default"])(document).on("click",".field.date input.text,input.text.date",function(){(0,a["default"])(this).ssDatepicker(),(0,a["default"])(this).data("datepicker")&&(0,a["default"])(this).datepicker("show")})},{"./jQuery":"jQuery"}],14:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){e(".ss-gridfield").entwine({reload:function(t,i){var n=this,s=this.closest("form"),a=this.find(":input:focus").attr("name"),r=s.find(":input").serializeArray();t||(t={}),t.data||(t.data=[]),t.data=t.data.concat(r),window.location.search&&(t.data=window.location.search.replace(/^\?/,"")+"&"+e.param(t.data)),window.history&&window.history.pushState||window.location.hash&&-1!=window.location.hash.indexOf("?")&&(t.data=window.location.hash.substring(window.location.hash.indexOf("?")+1)+"&"+e.param(t.data)),s.addClass("loading"),e.ajax(e.extend({},{headers:{"X-Pjax":"CurrentField"},type:"POST",url:this.data("url"),dataType:"html",success:function(r){if(n.empty().append(e(r).children()),a&&n.find(':input[name="'+a+'"]').focus(),n.find(".filter-header").length){var o;"show"==t.data[0].filter?(o='<span class="non-sortable"></span>',n.addClass("show-filter").find(".filter-header").show()):(o='<button type="button" name="showFilter" class="ss-gridfield-button-filter trigger"></button>',n.removeClass("show-filter").find(".filter-header").hide()),n.find(".sortable-header th:last").html(o)}s.removeClass("loading"),i&&i.apply(this,arguments),n.trigger("reload",n)},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION")),s.removeClass("loading")}},t))},showDetailView:function(e){window.location.href=e},getItems:function(){return this.find(".ss-gridfield-item")},setState:function(e,t){var i=this.getState();i[e]=t,this.find(':input[name="'+this.data("name")+'[GridState]"]').val(JSON.stringify(i))},getState:function(){return JSON.parse(this.find(':input[name="'+this.data("name")+'[GridState]"]').val())}}),e(".ss-gridfield *").entwine({getGridField:function(){return this.closest(".ss-gridfield")}}),e(".ss-gridfield :button[name=showFilter]").entwine({onclick:function(t){e(".filter-header").show("slow").find(":input:first").focus(),this.closest(".ss-gridfield").addClass("show-filter"),this.parent().html('<span class="non-sortable"></span>'),t.preventDefault()}}),e(".ss-gridfield .ss-gridfield-item").entwine({onclick:function(t){if(e(t.target).closest(".action").length)return this._super(t),!1;var i=this.find(".edit-link");i.length&&this.getGridField().showDetailView(i.prop("href"))},onmouseover:function(){this.find(".edit-link").length&&this.css("cursor","pointer")},onmouseout:function(){this.css("cursor","default")}}),e(".ss-gridfield .action").entwine({onclick:function(e){var t="show";return this.button("option","disabled")?void e.preventDefault():((this.hasClass("ss-gridfield-button-close")||!this.closest(".ss-gridfield").hasClass("show-filter"))&&(t="hidden"),this.getGridField().reload({data:[{name:this.attr("name"),value:this.val(),filter:t}]}),void e.preventDefault())}}),e(".ss-gridfield .add-existing-autocompleter").entwine({onbuttoncreate:function(){var e=this;this.toggleDisabled(),this.find('input[type="text"]').on("keyup",function(){e.toggleDisabled()})},onunmatch:function(){this.find('input[type="text"]').off("keyup")},toggleDisabled:function(){var e=this.find(".ss-ui-button"),t=this.find('input[type="text"]'),i=""!==t.val(),n=e.is(":disabled");(i&&n||!i&&!n)&&e.button("option","disabled",!n)}}),e(".ss-gridfield .col-buttons .action.gridfield-button-delete, .cms-edit-form .Actions button.action.action-delete").entwine({onclick:function(e){return confirm(o["default"]._t("TABLEFIELD.DELETECONFIRMMESSAGE"))?void this._super(e):(e.preventDefault(),!1)}}),e(".ss-gridfield .action.gridfield-button-print").entwine({UUID:null,onmatch:function(){this._super(),this.setUUID((new Date).getTime())},onunmatch:function(){this._super()},onclick:function(t){var i=this.closest(":button"),n=this.getGridField(),s=this.closest("form"),a=s.find(":input.gridstate").serialize();a+="&"+encodeURIComponent(i.attr("name"))+"="+encodeURIComponent(i.val()),window.location.search&&(a=window.location.search.replace(/^\?/,"")+"&"+a);var r=-1==n.data("url").indexOf("?")?"?":"&",o=e.path.makeUrlAbsolute(n.data("url")+r+a,e("base").attr("href"));window.open(o);return!1}}),e(".ss-gridfield-print-iframe").entwine({onmatch:function(){this._super(),this.hide().bind("load",function(){this.focus();var e=this.contentWindow||this;e.print()})},onunmatch:function(){this._super()}}),e(".ss-gridfield .action.no-ajax").entwine({onclick:function(t){var i=this.closest(":button"),n=this.getGridField(),s=this.closest("form"),a=s.find(":input.gridstate").serialize();a+="&"+encodeURIComponent(i.attr("name"))+"="+encodeURIComponent(i.val()),window.location.search&&(a=window.location.search.replace(/^\?/,"")+"&"+a);var r=-1==n.data("url").indexOf("?")?"?":"&";return window.location.href=e.path.makeUrlAbsolute(n.data("url")+r+a,e("base").attr("href")),!1}}),e(".ss-gridfield .action-detail").entwine({onclick:function(){return this.getGridField().showDetailView(e(this).prop("href")),!1}}),e(".ss-gridfield[data-selectable]").entwine({getSelectedItems:function(){return this.find(".ss-gridfield-item.ui-selected")},getSelectedIDs:function(){return e.map(this.getSelectedItems(),function(t){return e(t).data("id")})}}),e(".ss-gridfield[data-selectable] .ss-gridfield-items").entwine({onadd:function(){this._super(),this.selectable()},onremove:function(){this._super(),this.data("selectable")&&this.selectable("destroy")}}),e(".ss-gridfield .filter-header :input").entwine({onmatch:function(){var e=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),t=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");this.val()&&(e.addClass("filtered"),t.addClass("filtered")),this._super()},onunmatch:function(){this._super()},onkeydown:function(e){if(!this.closest(".ss-gridfield-button-reset").length){var t=this.closest(".fieldgroup").find(".ss-gridfield-button-filter"),i=this.closest(".fieldgroup").find(".ss-gridfield-button-reset");if("13"==e.keyCode){var n=this.closest(".filter-header").find(".ss-gridfield-button-filter"),s="show";return(this.hasClass("ss-gridfield-button-close")||!this.closest(".ss-gridfield").hasClass("show-filter"))&&(s="hidden"),this.getGridField().reload({data:[{name:n.attr("name"),value:n.val(),filter:s}]}),!1}t.addClass("hover-alike"),i.addClass("hover-alike")}}}),e(".ss-gridfield .relation-search").entwine({onfocusin:function(t){this.autocomplete({source:function(t,i){var n=e(this.element);e(this.element).closest("form");e.ajax({headers:{"X-Pjax":"Partial"},type:"GET",url:e(n).data("searchUrl"),data:encodeURIComponent(n.attr("name"))+"="+encodeURIComponent(n.val()),success:function(e){i(JSON.parse(e))},error:function(e){alert(o["default"]._t("GRIDFIELD.ERRORINTRANSACTION","An error occured while fetching data from the server\n Please try again later."))}})},select:function(t,i){e(this).closest(".ss-gridfield").find("#action_gridfield_relationfind").replaceWith('<input type="hidden" name="relationID" value="'+i.item.id+'" id="relationID"/>');var n=e(this).closest(".ss-gridfield").find("#action_gridfield_relationadd");n.data("button")?n.button("enable"):n.removeAttr("disabled")}})}}),e(".ss-gridfield .pagination-page-number input").entwine({onkeydown:function(t){if(13==t.keyCode){var i=parseInt(e(this).val(),10),n=e(this).getGridField();return n.setState("GridFieldPaginator",{currentPage:i}),n.reload(),!1}}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],15:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _jQuery=require("./jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_i18n=require("./i18n"),_i18n2=_interopRequireDefault(_i18n),ss="undefined"!=typeof window.ss?window.ss:{};ss.editorWrappers={},ss.editorWrappers.tinyMCE=function(){var instance;return{init:function(e){ss.editorWrappers.tinyMCE.initialized||(tinyMCE.init(e),ss.editorWrappers.tinyMCE.initialized=!0)},getInstance:function(){return this.instance},onopen:function(){},onclose:function(){},save:function(){tinyMCE.triggerSave()},create:function(e,t){this.instance=new tinymce.Editor(e,t),this.instance.onInit.add(function(e){if(!ss.editorWrappers.tinyMCE.patched){var t=tinymce.themes.AdvancedTheme.prototype.destroy;tinymce.themes.AdvancedTheme.prototype.destroy=function(){t.apply(this,arguments),this.statusKeyboardNavigation&&(this.statusKeyboardNavigation.destroy(),this.statusKeyboardNavigation=null)},ss.editorWrappers.tinyMCE.patched=!0}if(jQuery(e.getElement()).trigger("editorinit"),e.settings.update_interval){var i;jQuery(e.getBody()).on("focus",function(){i=setInterval(function(){var t=jQuery(e.getElement());e.isDirty()&&t.val(e.getContent({format:"raw",no_events:1}))},e.settings.update_interval)}),jQuery(e.getBody()).on("blur",function(){clearInterval(i)})}}),this.instance.onChange.add(function(e,t){e.save(),jQuery(e.getElement()).trigger("change")}),this.instance.render()},repaint:function(){tinyMCE.execCommand("mceRepaint")},isDirty:function(){return this.getInstance().isDirty()},getContent:function(){return this.getInstance().getContent()},getDOM:function(){return this.getInstance().dom},getContainer:function(){return this.getInstance().getContainer()},getSelectedNode:function(){return this.getInstance().selection.getNode()},selectNode:function(e){this.getInstance().selection.select(e)},setContent:function(e,t){this.getInstance().execCommand("mceSetContent",!1,e,t)},insertContent:function(e,t){this.getInstance().execCommand("mceInsertContent",!1,e,t)},replaceContent:function(e,t){this.getInstance().execCommand("mceReplaceContent",!1,e,t)},insertLink:function(e,t){this.getInstance().execCommand("mceInsertLink",!1,e,t)},removeLink:function(){this.getInstance().execCommand("unlink",!1)},cleanLink:function cleanLink(href,node){var cb=tinyMCE.settings.urlconverter_callback;return cb&&(href=eval(cb+"(href, node, true);")),href.match(new RegExp("^"+tinyMCE.settings.document_base_url+"(.*)$"))&&(href=RegExp.$1),href.match(/^javascript:\s*mctmp/)&&(href=""),href},createBookmark:function(){return this.getInstance().selection.getBookmark()},moveToBookmark:function(e){this.getInstance().selection.moveToBookmark(e),this.getInstance().focus()},blur:function(){this.getInstance().selection.collapse()},addUndo:function(){this.getInstance().undoManager.add()}}},ss.editorWrappers["default"]=ss.editorWrappers.tinyMCE,_jQuery2["default"].entwine("ss",function(e){e("textarea.htmleditor").entwine({Editor:null,onadd:function(){var e=this.data("editor")||"default",t=ss.editorWrappers[e]();this.setEditor(t),"undefined"!=typeof ssTinyMceConfig&&this.redraw(),this._super()},onremove:function(){var t=tinyMCE.get(this.attr("id"));if(t){try{t.remove()}catch(i){}try{t.destroy()}catch(i){}this.next(".mceEditor").remove(),e.each(jQuery.cache,function(){var t=this.handle&&this.handle.elem;if(t){var i=t;try{for(;i&&1==i.nodeType;)i=i.parentNode}catch(n){}i||e(t).unbind().remove()}})}this._super()},getContainingForm:function(){return this.closest("form")},fromWindow:{onload:function(){this.redraw()}},redraw:function(){var e=ssTinyMceConfig[this.data("config")],t=this.getEditor();t.init(e),t.create(this.attr("id"),e),this._super()},"from .cms-edit-form":{onbeforesubmitform:function(e){this.getEditor().save(),this._super()}},oneditorinit:function(){var t=e(this.getEditor().getInstance().getContainer());setTimeout(function(){t.show()},10)},"from .cms-container":{onbeforestatechange:function(){this.css("visibility","hidden");var e=this.getEditor(),t=e&&e.getInstance()?e.getContainer():null;t&&t.length&&t.remove()}},isChanged:function(){var e=this.getEditor();return e&&e.getInstance()&&e.isDirty()},resetChanged:function(){this.getEditor();if("undefined"!=typeof tinyMCE){var e=tinyMCE.getInstanceById(this.attr("id"));e&&(e.startContent=tinymce.trim(e.getContent({format:"raw",no_events:1})))}},openLinkDialog:function(){this.openDialog("link")},openMediaDialog:function(){this.openDialog("media")},openDialog:function(t){var i=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},n=this,s=e("#cms-editor-dialogs").data("url"+i(t)+"form"),a=e(".htmleditorfield-"+t+"dialog");a.length?(a.getForm().setElement(this),a.open()):(a=e('<div class="htmleditorfield-dialog htmleditorfield-'+t+'dialog loading">'),e("body").append(a),e.ajax({url:s,complete:function(){a.removeClass("loading")},success:function(e){a.html(e),a.getForm().setElement(n),a.trigger("ssdialogopen")}}))}}),e(".htmleditorfield-dialog").entwine({onadd:function(){this.is(".ui-dialog-content")||this.ssdialog({autoOpen:!0,buttons:{insert:{text:_i18n2["default"]._t("HtmlEditorField.INSERT","Insert"),"data-icon":"accept","class":"ss-ui-action-constructive media-insert",click:function(){e(this).find("form").submit()}}}}),this._super()},getForm:function(){return this.find("form")},open:function(){this.ssdialog("open")},close:function(){this.ssdialog("close")},toggle:function(e){this.is(":visible")?this.close():this.open()},onscroll:function(){this.animate({scrollTop:this.find("form").height()},500)}}),e("form.htmleditorfield-form").entwine({Selection:null,Bookmark:null,Element:null,setSelection:function(t){return this._super(e(t))},onadd:function(){var e=this.find(":header:first");this.getDialog().attr("title",e.text()),this._super()},onremove:function(){this.setSelection(null),this.setBookmark(null),this.setElement(null),this._super()},getDialog:function(){return this.closest(".htmleditorfield-dialog")},fromDialog:{onssdialogopen:function(){var e=this.getEditor();e.onopen(),this.setSelection(e.getSelectedNode()),this.setBookmark(e.createBookmark()),e.blur(),this.find(':input:not(:submit)[data-skip-autofocus!="true"]').filter(":visible:enabled").eq(0).focus(),this.redraw(),this.updateFromEditor()},onssdialogclose:function(){var e=this.getEditor();e.onclose(),e.moveToBookmark(this.getBookmark()),this.setSelection(null),this.setBookmark(null),this.resetFields()}},getEditor:function(){return this.getElement().getEditor()},modifySelection:function(e){var t=this.getEditor();t.moveToBookmark(this.getBookmark()),e.call(this,t),this.setSelection(t.getSelectedNode()),this.setBookmark(t.createBookmark()),t.blur()},updateFromEditor:function(){},redraw:function(){},resetFields:function(){this.find(".tree-holder").empty()}}),e("form.htmleditorfield-linkform").entwine({onsubmit:function(e){return this.insertLink(),this.getDialog().close(),!1},resetFields:function(){this._super(),this[0].reset()},redraw:function(){this._super();var e=this.find(":input[name=LinkType]:checked").val();this.addAnchorSelector(),this.resetFileField(),this.find("div.content .field").hide(),this.find('.field[id$="LinkType"]').show(),this.find('.field[id$="'+e+'_Holder"]').show(),("internal"==e||"anchor"==e)&&this.find('.field[id$="Anchor_Holder"]').show(),"email"==e?this.find('.field[id$="Subject_Holder"]').show():this.find('.field[id$="TargetBlank_Holder"]').show(),"anchor"==e&&this.find('.field[id$="AnchorSelector_Holder"]').show(),this.find('.field[id$="Description_Holder"]').show()},getLinkAttributes:function(){var e,t=null,i=this.find(":input[name=Subject]").val(),n=this.find(":input[name=Anchor]").val();switch(this.find(":input[name=TargetBlank]").is(":checked")&&(t="_blank"),this.find(":input[name=LinkType]:checked").val()){case"internal":e="[sitetree_link,id="+this.find(":input[name=internal]").val()+"]",n&&(e+="#"+n);break;case"anchor":e="#"+n;break;case"file":e="[file_link,id="+this.find(".ss-uploadfield .ss-uploadfield-item").attr("data-fileid")+"]",t="_blank";break;case"email":e="mailto:"+this.find(":input[name=email]").val(),i&&(e+="?subject="+encodeURIComponent(i)),t=null;break;default:e=this.find(":input[name=external]").val(),-1==e.indexOf("://")&&(e="http://"+e)}return{href:e,target:t,title:this.find(":input[name=Description]").val()}},insertLink:function(){this.modifySelection(function(e){e.insertLink(this.getLinkAttributes())})},removeLink:function(){this.modifySelection(function(e){e.removeLink()}),this.resetFileField(),this.close()},resetFileField:function(){var e=this.find('.ss-uploadfield[id$="file_Holder"]'),t=e.data("fileupload"),i=e.find(".ss-uploadfield-item[data-fileid]");i.length&&(t._trigger("destroy",null,{context:i}),e.find(".ss-uploadfield-addfile").removeClass("borderTop"))},addAnchorSelector:function(){if(!this.find(":input[name=AnchorSelector]").length){var t=this,i=e('<select id="Form_EditorToolbarLinkForm_AnchorSelector" name="AnchorSelector"></select>');this.find(":input[name=Anchor]").parent().append(i),this.updateAnchorSelector(),i.change(function(i){t.find(':input[name="Anchor"]').val(e(this).val())})}},getAnchors:function(){var t=this.find(":input[name=LinkType]:checked").val(),i=e.Deferred();switch(t){case"anchor":var n=[],s=this.getEditor();if(s){var a=s.getContent().match(/\s+(name|id)\s*=\s*(["'])([^\2\s>]*?)\2|\s+(name|id)\s*=\s*([^"']+)[\s +>]/gim);if(a&&a.length)for(var r=0;r<a.length;r++){var o=-1==a[r].indexOf("id=")?7:5;n.push(a[r].substr(o).replace(/"$/,""))}}i.resolve(n);break;case"internal":var l=this.find(":input[name=internal]").val();l?e.ajax({url:e.path.addSearchParams(this.attr("action").replace("LinkForm","getanchors"),{PageID:parseInt(l)}),success:function(t,n,s){i.resolve(e.parseJSON(t))},error:function(e,t){i.reject(e.responseText)}}):i.resolve([]);break;default:i.reject(_i18n2["default"]._t("HtmlEditorField.ANCHORSNOTSUPPORTED","Anchors are not supported for this link type."))}return i.promise()},updateAnchorSelector:function(){var t=this.find(":input[name=AnchorSelector]"),i=this.getAnchors();t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.LOOKINGFORANCHORS","Looking for anchors...")+"</option>")),i.done(function(i){if(t.empty(),t.append(e('<option value="" selected="1">'+_i18n2["default"]._t("HtmlEditorField.SelectAnchor")+"</option>")),i)for(var n=0;n<i.length;n++)t.append(e('<option value="'+i[n]+'">'+i[n]+"</option>"))}).fail(function(i){t.empty(),t.append(e('<option value="" selected="1">'+i+"</option>"))}),e.browser.msie&&t.hide().show()},updateFromEditor:function(){var e,t=/<\S[^><]*>/g,i=this.getCurrentLink();if(i)for(e in i){var n=this.find(":input[name="+e+"]"),s=i[e];"string"==typeof s&&(s=s.replace(t,"")),n.is(":checkbox")?n.prop("checked",s).change():n.is(":radio")?n.val([s]).change():"file"==e?(n=this.find(':input[name="'+e+'[Uploads][]"]'),n=n.parents(".ss-uploadfield"),function a(e,t){e.getConfig()?e.attachFiles([t]):setTimeout(function(){a(e,t)},50)}(n,s)):n.val(s).change()}},getCurrentLink:function(){var e=this.getSelection(),t="",i="",n="",s="insert",a="",r=null;return e.length&&(r=e.is("a")?e:e=e.parents("a:first")),r&&r.length&&this.modifySelection(function(e){e.selectNode(r[0])}),r.attr("href")||(r=null),r&&(t=r.attr("href"),i=r.attr("target"),n=r.attr("title"),a=r.attr("class"),t=this.getEditor().cleanLink(t,r),s="update"),t.match(/^mailto:(.*)$/)?{LinkType:"email",email:RegExp.$1,Description:n}:t.match(/^(assets\/.*)$/)||t.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)?{LinkType:"file",file:RegExp.$1,Description:n,TargetBlank:i?!0:!1}:t.match(/^#(.*)$/)?{LinkType:"anchor",Anchor:RegExp.$1,Description:n,TargetBlank:i?!0:!1}:t.match(/^\[sitetree_link(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/i)?{LinkType:"internal",internal:RegExp.$1,Anchor:RegExp.$2?RegExp.$2.substr(1):"",Description:n,TargetBlank:i?!0:!1}:t?{LinkType:"external",external:t,Description:n,TargetBlank:i?!0:!1}:null}}),e("form.htmleditorfield-linkform input[name=LinkType]").entwine({onclick:function(e){this.parents("form:first").redraw(),this._super()},onchange:function(){this.parents("form:first").redraw();var e=this.parent().find(":checked").val();("anchor"===e||"internal"===e)&&this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform input[name=internal]").entwine({onvalueupdated:function(){this.parents("form.htmleditorfield-linkform").updateAnchorSelector(),this._super()}}),e("form.htmleditorfield-linkform :submit[name=action_remove]").entwine({onclick:function(e){return this.parents("form:first").removeLink(),this._super(),!1}}),e("form.htmleditorfield-mediaform").entwine({toggleCloseButton:function(){var e=Boolean(this.find(".ss-htmleditorfield-file").length);this.find(".overview .action-delete")[e?"hide":"show"]()},onsubmit:function(){return this.modifySelection(function(t){this.find(".ss-htmleditorfield-file").each(function(){e(this).insertHTML(t)}),t.repaint()}),this.getDialog().close(),!1},updateFromEditor:function(){var e=this,t=this.getSelection();t.is("img")&&this.showFileView(t.data("url")||t.attr("src")).done(function(i){i.updateFromNode(t),e.toggleCloseButton(),e.redraw()}),this.redraw()},redraw:function(t){this._super();var i=this.getSelection(),n=Boolean(this.find(".ss-htmleditorfield-file").length),s=i.is("img"),a=this.hasClass("insertingURL"),r=this.find(".header-edit");r[n?"show":"hide"](),this.closest("ui-dialog").find("ui-dialog-buttonpane .media-insert").button(n?"enable":"disable").toggleClass("ui-state-disabled",!n),this.find(".htmleditorfield-default-panel")[s||a?"hide":"show"](),this.find(".htmleditorfield-web-panel")[s||!a?"hide":"show"]();var o=this.find(".htmleditorfield-mediaform-heading.insert");s?o.hide():a?(o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTURL")).prepend('<button class="back-button font-icon-left-open no-text" title="'+_i18n2["default"]._t("HtmlEditorField.BACK")+'"></button>'),this.find(".htmleditorfield-web-panel input.remoteurl").focus()):o.show().text(_i18n2["default"]._t("HtmlEditorField.INSERTFROM")).find(".back-button").remove(),this.find(".htmleditorfield-mediaform-heading.update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-actions")[s?"hide":"show"](),this.find(".ss-uploadfield-item-name")[s?"hide":"show"](),this.find(".ss-uploadfield-item-preview")[s?"hide":"show"](),this.find(".Actions .media-update")[s?"show":"hide"](),this.find(".ss-uploadfield-item-editform").toggleEditForm(s),this.find(".htmleditorfield-from-cms .field.treedropdown").css("left",e(".htmleditorfield-mediaform-heading:visible").outerWidth()),this.closest(".ui-dialog").addClass("ss-uploadfield-dropzone"),this.closest(".ui-dialog").find(".ui-dialog-buttonpane .media-insert .ui-button-text").text([s?_i18n2["default"]._t("HtmlEditorField.UPDATE","Update"):_i18n2["default"]._t("HtmlEditorField.INSERT","Insert")])},resetFields:function(){this.find(".ss-htmleditorfield-file").remove(),this.find(".ss-gridfield-items .ui-selected").removeClass("ui-selected"),this.find("li.ss-uploadfield-item").remove(),this.redraw(),this._super()},getFileView:function(e){return this.find(".ss-htmleditorfield-file[data-id="+e+"]")},showFileView:function(t){var i=this,n=Number(t)==t?{ID:t}:{FileURL:t},s=e('<div class="ss-htmleditorfield-file loading" />');this.find(".content-edit").prepend(s);var a=e.Deferred();return e.ajax({url:e.path.addSearchParams(this.attr("action").replace(/MediaForm/,"viewfile"),n),success:function(t,n,r){var o=e(t).filter(".ss-htmleditorfield-file");s.replaceWith(o),i.redraw(),a.resolve(o)},error:function(){s.remove(),a.reject()}}),a.promise()}}),e("form.htmleditorfield-mediaform div.ss-upload .upload-url").entwine({onclick:function(){var e=this.closest("form");e.addClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .htmleditorfield-mediaform-heading .back-button").entwine({onclick:function(){var e=this.closest("form");e.removeClass("insertingURL"),e.redraw()}}),e("form.htmleditorfield-mediaform .ss-gridfield-items").entwine({onselectableselected:function(t,i){var n=this.closest("form"),s=e(i.selected);s.is(".ss-gridfield-item")&&(n.closest("form").showFileView(s.data("id")),n.redraw(),n.parent().trigger("scroll"))},onselectableunselected:function(t,i){var n=this.closest("form"),s=e(i.unselected);s.is(".ss-gridfield-item")&&(n.getFileView(s.data("id")).remove(),n.redraw())}}),e("form.htmleditorfield-form.htmleditorfield-mediaform div.ss-assetuploadfield").entwine({onfileuploadstop:function(t){var i=this.closest("form"),n=[];i.find("div.content-edit").find("div.ss-htmleditorfield-file").each(function(){n.push(e(this).data("id"))});var s=e(".ss-uploadfield-files",this).children(".ss-uploadfield-item");s.each(function(){var t=e(this).data("fileid");t&&-1==e.inArray(t,n)&&(e(this).remove(),i.showFileView(t))}),i.parent().trigger("scroll"),i.redraw()}}),e("form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl").entwine({onadd:function(){this._super(),this.validate()},onkeyup:function(){this.validate()},onchange:function(){this.validate()},getAddButton:function(){return this.closest(".CompositeField").find("button.add-url")},validate:function(){var t=this.val(),i=t;return t=e.trim(t),t=t.replace(/^https?:\/\//i,""),i!==t&&this.val(t),this.getAddButton().button(t?"enable":"disable"),!!t}}),e("form.htmleditorfield-form.htmleditorfield-mediaform .add-url").entwine({getURLField:function(){return this.closest(".CompositeField").find("input.remoteurl")},onclick:function(e){var t=this.getURLField(),i=this.closest(".CompositeField"),n=this.closest("form");return t.validate()&&(i.addClass("loading"),n.showFileView("http://"+t.val()).done(function(){i.removeClass("loading"),n.parent().trigger("scroll")}),n.redraw()),!1}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file").entwine({getAttributes:function(){},getExtraData:function(){},getHTML:function(){return e("<div>").append(e("<a/>").attr({href:this.data("url")}).text(this.find(".name").text())).html()},insertHTML:function(e){e.replaceContent(this.getHTML())},updateFromNode:function(e){},updateDimensions:function(e,t,i){var n,s=this.find(":input[name=Width]"),a=this.find(":input[name=Height]"),r=s.val(),o=a.val();r&&o&&(e?(n=a.getOrigVal()/s.getOrigVal(),"Width"==e?(t&&r>t&&(r=t),o=Math.floor(r*n)):"Height"==e&&(i&&o>i&&(o=i),r=Math.ceil(o/n))):(t&&r>t&&(r=t),i&&o>i&&(o=i)),s.val(r),a.val(o))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.image").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),alt:this.find(":input[name=AltText]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,title:this.find(":input[name=Title]").val(),"class":this.find(":input[name=CSSClass]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){return{CaptionText:this.find(":input[name=CaptionText]").val()}},getHTML:function(){},insertHTML:function(t){var i=this.closest("form"),n=i.getSelection();t||(t=i.getEditor());var s=this.getAttributes(),a=this.getExtraData(),r=n&&n.is("img")?n:null;r&&r.parent().is(".captionImage")&&(r=r.parent());var o=n&&n.is("img")?n:e("<img />");o.attr(s);var l=o.parent(".captionImage"),h=l.find(".caption");a.CaptionText?(l.length||(l=e("<div></div>")),l.attr("class","captionImage "+s["class"]).css("width",s.width),h.length||(h=e('<p class="caption"></p>').appendTo(l)),h.attr("class","caption "+s["class"]).text(a.CaptionText)):l=h=null;var c=l?l:o;r&&r.not(c).length&&r.replaceWith(c),l&&l.prepend(o),r||(t.repaint(),t.insertContent(e("<div />").append(c).html(),{skip_undo:1})),t.addUndo(),t.repaint()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.attr("class")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=CaptionText]").val(e.siblings(".caption:first").text()),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.flash").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(":input[name=URL]").val(),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"data-fileid":this.find(":input[name=FileID]").val()}},getHTML:function(){var t=this.getAttributes(),i=tinyMCE.activeEditor.plugins.media.dataToImg({type:"flash",width:t.width,height:t.height,params:{src:t.src},video:{sources:[]}});return e("<div />").append(i).html()},updateFromNode:function(e){}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file.embed").entwine({getAttributes:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{src:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,"class":this.find(":input[name=CSSClass]").val(),alt:this.find(":input[name=AltText]").val(),title:this.find(":input[name=Title]").val(),"data-fileid":this.find(":input[name=FileID]").val()}},getExtraData:function(){var e=this.find(":input[name=Width]").val(),t=this.find(":input[name=Height]").val();return{CaptionText:this.find(":input[name=CaptionText]").val(),Url:this.find(":input[name=URL]").val(),thumbnail:this.find(".thumbnail-preview").attr("src"),width:e?parseInt(e,10):null,height:t?parseInt(t,10):null,cssclass:this.find(":input[name=CSSClass]").val()}},getHTML:function(){var t,i=this.getAttributes(),n=this.getExtraData(),s=e("<img />").attr(i).addClass("ss-htmleditorfield-file embed");return e.each(n,function(e,t){s.attr("data-"+e,t)}),t=n.CaptionText?e('<div style="width: '+i.width+'px;" class="captionImage '+i["class"]+'"><p class="caption">'+n.CaptionText+"</p></div>").prepend(s):s,e("<div />").append(t).html()},updateFromNode:function(e){this.find(":input[name=AltText]").val(e.attr("alt")),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=Width]").val(e.width()),this.find(":input[name=Height]").val(e.height()),this.find(":input[name=Title]").val(e.attr("title")),this.find(":input[name=CSSClass]").val(e.data("cssclass")),this.find(":input[name=FileID]").val(e.data("fileid"))}}),e("form.htmleditorfield-mediaform .ss-htmleditorfield-file .dimensions :input").entwine({OrigVal:null,onmatch:function(){this._super(),this.setOrigVal(parseInt(this.val(),10))},onunmatch:function(){this._super()},onfocusout:function(e){this.closest(".ss-htmleditorfield-file").updateDimensions(this.attr("name"))}}),e("form.htmleditorfield-mediaform .ss-uploadfield-item .ss-uploadfield-item-cancel").entwine({onclick:function(e){var t=this.closest("form"),i=this.closest("ss-uploadfield-item");t.find(".ss-gridfield-item[data-id="+i.data("id")+"]").removeClass("ui-selected"),this.closest(".ss-uploadfield-item").remove(),t.redraw(),e.preventDefault()}}),e("div.ss-assetuploadfield .ss-uploadfield-item-edit, div.ss-assetuploadfield .ss-uploadfield-item-name").entwine({getEditForm:function(){return this.closest(".ss-uploadfield-item").find(".ss-uploadfield-item-editform")},fromEditForm:{onchange:function(t){var i=e(t.target);i.removeClass("edited"),i.addClass("edited")}},onclick:function(e){var t=this.getEditForm();return this.closest(".ss-uploadfield-item").hasClass("ss-htmleditorfield-file")?(t.parent("ss-uploadfield-item").removeClass("ui-state-warning"),t.toggleEditForm(),e.preventDefault(),!1):void this._super(e)}}),e("div.ss-assetuploadfield .ss-uploadfield-item-editform").entwine({toggleEditForm:function(e){var t=this.prev(".ss-uploadfield-item-info"),i=t.find(".ss-uploadfield-item-status"),n="";e===!0||e!==!1&&0===this.height()?(n=_i18n2["default"]._t("UploadField.Editing","Editing ..."),this.height("auto"),t.find(".toggle-details-icon").addClass("opened"),i.removeClass("ui-state-success-text").removeClass("ui-state-warning-text")):(this.height(0),
|
||||
t.find(".toggle-details-icon").removeClass("opened"),this.hasClass("edited")?(n=_i18n2["default"]._t("UploadField.CHANGESSAVED","Changes Made"),this.removeClass("edited"),i.addClass("ui-state-success-text")):(n=_i18n2["default"]._t("UploadField.NOCHANGES","No Changes"),i.addClass("ui-state-success-text"))),i.attr("title",n).text(n)}}),e('form.htmleditorfield-mediaform .field[id$="ParentID_Holder"] .TreeDropdownField').entwine({onadd:function(){this._super();var e=this;this.bind("change",function(){var t=e.closest("form").find(".ss-gridfield");t.setState("ParentID",e.getValue()),t.reload()})}})}),window.sapphiremce_cleanup=function(e,t){return"get_from_editor"==e&&(t=t.replace(/<[a-z0-9]+:imagedata[^>]+src="?([^> "]+)"?[^>]*>/gi,'<img src="$1">'),t=t.replace(new RegExp("<(!--)([^>]*)(--)>","g"),""),t=t.replace(/([ \f\r\t\n\'\"])class=mso[a-z0-9]+[^ >]+/gi,"$1"),t=t.replace(/([ \f\r\t\n\'\"]class=")mso[a-z0-9]+[^ ">]+ /gi,"$1"),t=t.replace(/([ \f\r\t\n\'\"])class="mso[a-z0-9]+[^">]+"/gi,"$1"),t=t.replace(/([ \f\r\t\n\'\"])on[a-z]+=[^ >]+/gi,"$1"),t=t.replace(/ >/gi,">"),t=t.replace(/<(\/[A-Za-z0-9]+)[ \f\r\t\n]+[^>]*>/gi,"<$1>")),"get_from_editor_dom"==e&&jQuery(t).find("img").each(function(){this.onresizestart=null,this.onresizeend=null,this.removeAttribute("onresizestart"),this.removeAttribute("onresizeend")}),t}},{"./i18n":"i18n","./jQuery":"jQuery"}],16:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s);a["default"].entwine("ss",function(e){e(".ss-tabset").entwine({IgnoreTabState:!1,onadd:function(){var e=window.location.hash;this.redrawTabs(),""!==e&&this.openTabFromURL(e),this._super()},onremove:function(){this.data("tabs")&&this.tabs("destroy"),this._super()},redrawTabs:function(){this.rewriteHashlinks(),this.tabs()},openTabFromURL:function(t){var i;e.each(this.find(".cms-panel-link"),function(){return-1!==this.href.indexOf(t)&&1===e(t).length?(i=e(this),!1):void 0}),void 0!==i&&e(window).one("ajaxComplete",function(){i.click()})},rewriteHashlinks:function(){e(this).find("ul a").each(function(){if(e(this).attr("href")){var t=e(this).attr("href").match(/#.*/);t&&e(this).attr("href",document.location.href.replace(/#.*/,"")+t[0])}})}})})},{"./jQuery":"jQuery"}],17:[function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var s=e("./jQuery"),a=n(s),r=e("./i18n"),o=n(r);a["default"].entwine("ss",function(e){var t,i;e(window).bind("resize.treedropdownfield",function(){var n=function(){e(".TreeDropdownField").closePanel()};if(e.browser.msie&&parseInt(e.browser.version,10)<9){var s=e(window).width(),a=e(window).height();(s!=t||a!=i)&&(t=s,i=a,n())}else n()});var n={openlink:o["default"]._t("TreeDropdownField.OpenLink"),fieldTitle:"("+o["default"]._t("TreeDropdownField.FieldTitle")+")",searchFieldTitle:"("+o["default"]._t("TreeDropdownField.SearchFieldTitle")+")"},s=function(t){e(t.target).parents(".TreeDropdownField").length||e(".TreeDropdownField").closePanel()};e(".TreeDropdownField").entwine({CurrentXhr:null,onadd:function(){this.append('<span class="treedropdownfield-title"></span><div class="treedropdownfield-toggle-panel-link"><a href="#" class="ui-icon ui-icon-triangle-1-s"></a></div><div class="treedropdownfield-panel"><div class="tree-holder"></div></div>');var e=n.openLink;e&&this.find("treedropdownfield-toggle-panel-link a").attr("title",e),this.data("title")&&this.setTitle(this.data("title")),this.getPanel().hide(),this._super()},getPanel:function(){return this.find(".treedropdownfield-panel")},openPanel:function(){e(".TreeDropdownField").closePanel(),e("body").bind("click",s);var t=this.getPanel(),i=this.find(".tree-holder");t.css("width",this.width()),t.show();var n=this.find(".treedropdownfield-toggle-panel-link");n.addClass("treedropdownfield-open-tree"),this.addClass("treedropdownfield-open-tree"),n.find("a").removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-n"),i.is(":empty")&&!t.hasClass("loading")?this.loadTree(null,this._riseUp):this._riseUp(),this.trigger("panelshow")},_riseUp:function(){var t,i,n,s=this,a=this.getPanel(),r=this.find(".treedropdownfield-toggle-panel-link"),o=r.innerHeight();r.length>0&&(n=e(window).height()+e(document).scrollTop()-r.innerHeight(),i=r.offset().top,t=a.innerHeight(),i+t>n&&i-t>0?(s.addClass("treedropdownfield-with-rise"),o=-a.outerHeight()):s.removeClass("treedropdownfield-with-rise")),a.css({top:o+"px"})},closePanel:function(){jQuery("body").unbind("click",s);var e=this.find(".treedropdownfield-toggle-panel-link");e.removeClass("treedropdownfield-open-tree"),this.removeClass("treedropdownfield-open-tree treedropdownfield-with-rise"),e.find("a").removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s"),this.getPanel().hide(),this.trigger("panelhide")},togglePanel:function(){this[this.getPanel().is(":visible")?"closePanel":"openPanel"]()},setTitle:function(e){e=e||this.data("title")||n.fieldTitle,this.find(".treedropdownfield-title").html(e),this.data("title",e)},getTitle:function(){return this.find(".treedropdownfield-title").text()},updateTitle:function(){var e=this,t=e.find(".tree-holder"),i=this.getValue(),n=function(){var i=e.getValue();if(i){var n=t.find('*[data-id="'+i+'"]'),s=n.children("a").find("span.jstree_pageicon")?n.children("a").find("span.item").html():null;s||(s=n.length>0?t.jstree("get_text",n[0]):null),s&&(e.setTitle(s),e.data("title",s)),n&&t.jstree("select_node",n)}else e.setTitle(e.data("empty-title")),e.removeData("title")};t.is(":empty")&&i?this.loadTree({forceValue:i},n):n()},setValue:function(t){this.data("metadata",e.extend(this.data("metadata"),{id:t})),this.find(":input:hidden").val(t).trigger("valueupdated").trigger("change")},getValue:function(){return this.find(":input:hidden").val()},loadTree:function(t,i){var n,s=this,a=this.getPanel(),r=e(a).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),a.addClass("loading"),n=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){a.removeClass("loading")},success:function(t,n,a){r.html(t);var o=!0;r.jstree("destroy").bind("loaded.jstree",function(e,t){var n=s.getValue(),a=r.find('*[data-id="'+n+'"]'),l=t.inst.get_selected();n&&a!=l&&t.inst.select_node(a),o=!1,i&&i.apply(s)}).jstree(s.getTreeConfig()).bind("select_node.jstree",function(t,i){var n=i.rslt.obj,a=e(n).data("id");o||s.getValue()!=a?(s.data("metadata",e.extend({id:a},e(n).getMetaData())),s.setTitle(i.inst.get_text(n)),s.setValue(a)):(s.data("metadata",null),s.setTitle(null),s.setValue(null),i.inst.deselect_node(n)),o||s.closePanel(),o=!1}),s.setCurrentXhr(null)}}),this.setCurrentXhr(n)},getTreeConfig:function(){var t=this;return{core:{html_titles:!0,animation:0},html_data:{data:this.getPanel().find(".tree-holder").html(),ajax:{url:function i(n){var i=e.path.parseUrl(t.data("urlTree")).hrefNoSearch;return i+"/"+(e(n).data("id")?e(n).data("id"):0)},data:function(i){var n=e.query.load(t.data("urlTree")).keys,s=t.getRequestParams();return s=e.extend({},n,s,{ajax:1})}}},ui:{select_limit:1,initially_select:[this.getPanel().find(".current").attr("id")]},themes:{theme:"apple"},types:{types:{"default":{check_node:function(e){return!e.hasClass("disabled")},uncheck_node:function(e){return!e.hasClass("disabled")},select_node:function(e){return!e.hasClass("disabled")},deselect_node:function(e){return!e.hasClass("disabled")}}}},plugins:["html_data","ui","themes","types"]}},getRequestParams:function(){return{}}}),e(".TreeDropdownField .tree-holder li").entwine({getMetaData:function(){var e=this.attr("class").match(/class-([^\s]*)/i),t=e?e[1]:"";return{ClassName:t}}}),e(".TreeDropdownField *").entwine({getField:function(){return this.parents(".TreeDropdownField:first")}}),e(".TreeDropdownField").entwine({onclick:function(e){return this.togglePanel(),!1}}),e(".TreeDropdownField .treedropdownfield-panel").entwine({onclick:function(e){return!1}}),e(".TreeDropdownField.searchable").entwine({onadd:function(){this._super();var t=o["default"]._t("TreeDropdownField.ENTERTOSEARCH");this.find(".treedropdownfield-panel").prepend(e('<input type="text" class="search treedropdownfield-search" data-skip-autofocus="true" placeholder="'+t+'" value="" />'))},search:function(e,t){this.openPanel(),this.loadTree({search:e},t)},cancelSearch:function(){this.closePanel(),this.loadTree()}}),e(".TreeDropdownField.searchable input.search").entwine({onkeydown:function(e){var t=this.getField();return 13==e.keyCode?(t.search(this.val()),!1):void(27==e.keyCode&&t.cancelSearch())}}),e(".TreeDropdownField.multiple").entwine({getTreeConfig:function(){var e=this._super();return e.checkbox={override_ui:!0,two_state:!0},e.plugins.push("checkbox"),e.ui.select_limit=-1,e},loadTree:function(t,i){var n,s=this,a=this.getPanel(),r=e(a).find(".tree-holder"),t=t?e.extend({},this.getRequestParams(),t):this.getRequestParams();this.getCurrentXhr()&&this.getCurrentXhr().abort(),a.addClass("loading"),n=e.ajax({url:this.data("urlTree"),data:t,complete:function(e,t){a.removeClass("loading")},success:function(t,n,a){r.html(t);var o=!0;s.setCurrentXhr(null),r.jstree("destroy").bind("loaded.jstree",function(t,n){e.each(s.getValue(),function(e,t){n.inst.check_node(r.find("*[data-id="+t+"]"))}),o=!1,i&&i.apply(s)}).jstree(s.getTreeConfig()).bind("uncheck_node.jstree check_node.jstree",function(t,i){var n=i.inst.get_checked(null,!0);s.setValue(e.map(n,function(t,i){return e(t).data("id")})),s.setTitle(e.map(n,function(e,t){return i.inst.get_text(e)})),s.data("metadata",e.map(n,function(t,i){return{id:e(t).data("id"),metadata:e(t).getMetaData()}}))})}}),this.setCurrentXhr(n)},getValue:function(){var e=this._super();return e.split(/ *, */)},setValue:function(t){this._super(e.isArray(t)?t.join(","):t)},setTitle:function(t){this._super(e.isArray(t)?t.join(", "):t)},updateTitle:function(){}}),e(".TreeDropdownField input[type=hidden]").entwine({onadd:function(){this._super(),this.bind("change.TreeDropdownField",function(){e(this).getField().updateTitle()})},onremove:function(){this._super(),this.unbind(".TreeDropdownField")}})})},{"./i18n":"i18n","./jQuery":"jQuery"}],18:[function(e,t,i){!function(e){e.fn.changetracker=function(t){var i=this;if(this.length>1)return this.each(function(e,i){this.changetracker(t)}),this;this.defaults={fieldSelector:":input:not(:submit)",ignoreFieldSelector:"",changedCssClass:"changed"};var n=e.extend({},this.defaults,t);if(this.initialize=function(){e.meta&&(n=e.extend({},n,this.data()));var t,s=!1,a=function(t){var a,r=e(t.target),o=r.data("changetracker.origVal");a=r.is(":checkbox")?r.is(":checked")?1:0:r.val(),null===o||a!=o?(r.addClass(n.changedCssClass),i.addClass(n.changedCssClass)):(r.removeClass(n.changedCssClass),r.is(":radio")&&i.find(":radio[name="+r.attr("name")+"]").removeClass(n.changedCssClass),s||i.getFields().filter("."+n.changedCssClass).length||i.removeClass(n.changedCssClass))},r=this.getFields();r.filter(":radio,:checkbox").bind("click.changetracker",a),r.not(":radio,:checkbox").bind("change.changetracker",a),r.each(function(){t=e(this).is(":radio,:checkbox")?i.find(":input[name="+e(this).attr("name")+"]:checked").val():e(this).val(),e(this).data("changetracker.origVal",t)}),i.bind("dirty.changetracker",function(){s=!0,i.addClass(n.changedCssClass)}),this.data("changetracker",!0)},this.destroy=function(){this.getFields().unbind(".changetracker").removeClass(n.changedCssClass).removeData("changetracker.origVal"),this.unbind(".changetracker").removeData("changetracker")},this.reset=function(){this.getFields().each(function(){i.resetField(this)}),this.removeClass(n.changedCssClass)},this.resetField=function(t){return e(t).removeData("changetracker.origVal").removeClass("changed")},this.getFields=function(){return this.find(n.fieldSelector).not(n.ignoreFieldSelector)},"string"==typeof arguments[0]){var s=(arguments[1],Array.prototype.slice.call(arguments));return s.splice(0,1),this[arguments[0]].apply(this,s)}return this.initialize()}}(jQuery)},{}],19:[function(e,t,i){jQuery.cookie=function(e,t,i){if("undefined"==typeof t){var n=null;if(document.cookie&&""!=document.cookie)for(var s=document.cookie.split(";"),a=0;a<s.length;a++){var r=jQuery.trim(s[a]);if(r.substring(0,e.length+1)==e+"="){n=decodeURIComponent(r.substring(e.length+1));break}}return n}i=i||{},null===t&&(t="",i=jQuery.extend({},i),i.expires=-1);var o="";if(i.expires&&("number"==typeof i.expires||i.expires.toUTCString)){var l;"number"==typeof i.expires?(l=new Date,l.setTime(l.getTime()+24*i.expires*60*60*1e3)):l=i.expires,o="; expires="+l.toUTCString()}var h=i.path?"; path="+i.path:"",c=i.domain?"; domain="+i.domain:"",d=i.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(t),o,h,c,d].join("")}},{}],20:[function(e,t,i){var n;!function(){var e={},t=/xyz/.test(function(){})?/\b_super\b/:/.*/;n=function(){},n.addMethod=function(e,i){var n=this._super&&this._super.prototype;n&&t.test(i)?this.prototype[e]=function(){var t=this._super;this._super=n[e];try{var s=i.apply(this,arguments)}finally{this._super=t}return s}:this.prototype[e]=i},n.addMethods=function(e){for(var t in e)"function"==typeof e[t]?this.addMethod(t,e[t]):this.prototype[t]=e[t]},n.subclassOf=function(e){for(var t=this;t;){if(t===e)return!0;t=t._super}},n.extend=function(t){var i=function(){if(arguments[0]!==e){if(!(this instanceof i)){var t=new i(e);return t.init&&t.init.apply(t,arguments),t}this.init&&this.init.apply(this,arguments)}};return i.constructor=i,i.extend=n.extend,i.addMethod=n.addMethod,i.addMethods=n.addMethods,i.subclassOf=n.subclassOf,i._super=this,i.prototype=new this(e),i.prototype.constructor=i,i.addMethods(t),i}}(),function(e){var t={UNICODE:/\\[0-9a-f]{1,6}(?:\r\n|[ \n\r\t\f])?/,ESCAPE:/(?:UNICODE)|\\[^\n\r\f0-9a-f]/,NONASCII:/[^\x00-\x7F]/,NMSTART:/[_a-z]|(?:NONASCII)|(?:ESCAPE)/,NMCHAR:/[_a-z0-9-]|(?:NONASCII)|(?:ESCAPE)/,IDENT:/-?(?:NMSTART)(?:NMCHAR)*/,NL:/\n|\r\n|\r|\f/,STRING:/(?:STRING1)|(?:STRING2)|(?:STRINGBARE)/,STRING1:/"(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\"])*"/,STRING2:/'(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\'])*'/,STRINGBARE:/(?:(?:ESCAPE)|\\(?:NL)|[^\n\r\f\]])*/,FUNCTION:/(?:IDENT)\(\)/,INTEGER:/[0-9]+/,WITHN:/([-+])?(INTEGER)?(n)\s*(?:([-+])\s*(INTEGER))?/,WITHOUTN:/([-+])?(INTEGER)/},i={not:/:not\(/,not_end:/\)/,tag:/((?:IDENT)|\*)/,id:/#(IDENT)/,cls:/\.(IDENT)/,attr:/\[\s*(IDENT)\s*(?:([^=]?=)\s*(STRING)\s*)?\]/,pseudo_el:/(?::(first-line|first-letter|before|after))|(?:::((?:FUNCTION)|(?:IDENT)))/,pseudo_cls_nth:/:nth-child\(\s*(?:(?:WITHN)|(?:WITHOUTN)|(odd|even))\s*\)/,pseudo_cls:/:(IDENT)/,comb:/\s*(\+|~|>)\s*|\s+/,comma:/\s*,\s*/,important:/\s+!important\s*$/},s=/[A-Z][A-Z0-9]+/;for(var a in i){for(var r,o=i[a].source;r=o.match(s);)o=o.replace(r[0],t[r[0]].source);i[a]=new RegExp(o,"gi")}var l=n.extend({init:function(e){this.str=e,this.pos=0},match:function(e){var t;return e.lastIndex=this.pos,(t=e.exec(this.str))&&t.index==this.pos?(this.pos=e.lastIndex?e.lastIndex:this.str.length,t):null},peek:function(e){var t;return e.lastIndex=this.pos,(t=e.exec(this.str))&&t.index==this.pos?t:null},showpos:function(){return this.str.slice(0,this.pos)+"<HERE>"+this.str.slice(this.pos)},done:function(){return this.pos==this.str.length}}),h=n.extend({}),c=h.extend({init:function(){this.tag=null,this.id=null,this.classes=[],this.attrs=[],this.nots=[],this.pseudo_classes=[],this.pseudo_els=[]},parse:function(e){var t;(t=e.match(i.tag))&&(this.tag=t[1]);do if(t=e.match(i.not)){if(this.nots[this.nots.length]=u().parse(e),!(t=e.match(i.not_end)))throw"Invalid :not term in selector"}else if(t=e.match(i.id))this.id=t[1];else if(t=e.match(i.cls))this.classes[this.classes.length]=t[1];else if(t=e.match(i.attr))this.attrs[this.attrs.length]=[t[1],t[2],t[3]];else if(t=e.match(i.pseudo_el))this.pseudo_els[this.pseudo_els.length]=t[1]||t[2];else if(t=e.match(i.pseudo_cls_nth)){if(t[3])var n=parseInt((t[1]||"")+(t[2]||"1")),s=parseInt((t[4]||"")+(t[5]||"0"));else var n=t[8]?2:0,s=t[8]?4-t[8].length:parseInt((t[6]||"")+t[7]);this.pseudo_classes[this.pseudo_classes.length]=["nth-child",[n,s]]}else(t=e.match(i.pseudo_cls))&&(this.pseudo_classes[this.pseudo_classes.length]=[t[1]]);while(t&&!e.done());return this}}),d=h.extend({init:function(){this.parts=[]},parse:function(e){for(this.parts[this.parts.length]=c().parse(e);!e.done()&&!e.peek(i.comma)&&(r=e.match(i.comb));)this.parts[this.parts.length]=r[1]||" ",this.parts[this.parts.length]=c().parse(e);return 1==this.parts.length?this.parts[0]:this}}),u=h.extend({init:function(){this.parts=[]},parse:function(e){for(this.parts[this.parts.length]=d().parse(e);!e.done()&&(r=e.match(i.comma));)this.parts[this.parts.length]=d().parse(e);return 1==this.parts.length?this.parts[0]:this}});e.selector=function(e){var t=l(e),i=u().parse(t);if(i.selector=e,t.done())return i;throw"Could not parse selector - "+t.showpos()},e.selector.SelectorBase=h,e.selector.SimpleSelector=c,e.selector.Selector=d,e.selector.SelectorsGroup=u}(jQuery),function(e){e.selector.SimpleSelector.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[this.id?1:0,this.classes.length+this.attrs.length+this.pseudo_classes.length,(this.tag&&"*"!=this.tag?1:0)+this.pseudo_els.length];return e.each(this.nots,function(e,i){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}),this.spec=t}),e.selector.Selector.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[0,0,0];return e.each(this.parts,function(e,i){if(!(e%2)){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}}),this.spec=t}),e.selector.SelectorsGroup.addMethod("specifity",function(){if(this.spec)return this.spec;var t=[0,0,0];return e.each(this.parts,function(e,i){var n=i.specifity();t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}),this.spec=t})}(jQuery),function(e){function t(e){return e.complex?c(["l"+ ++v+":{",e.replace(o,"break l"+v),"}"]):e.replace(o,"")}var i=document.createElement("div");i.innerHTML='<form id="test"><input name="id" type="text"/></form>';var s,a="test"!==i.firstChild.getAttribute("id"),r=i.firstElementChild&&"FORM"==i.firstElementChild.tagName,o=(i.children&&"FORM"==i.children[0].tagName,/GOOD/g),l=/BAD/g,h=/^['"]/g,c=function(e){return e.join("\n")},d=function(e){var t=new String(e.join("\n"));return t.complex=!0,t},u=function(e){return"_"+e.replace(/^[^A-Za-z]|[^A-Za-z0-9]/g,function(e){return"_0x"+e.charCodeAt(0).toString(16)+"_"})};if(a){var p={"class":"className","for":"htmlFor"};s=function(e){var t=p[e]||e;return"var "+u(e)+' = el.getAttribute("'+t+'",2) || (el.getAttributeNode("'+e+'")||{}).nodeValue;'}}else s=function(e){return"var "+u(e)+' = el.getAttribute("'+e+'");'};var f={"-":"!K","=":'K != "V"',"!=":'K == "V"',"~=":'_WS_K.indexOf(" V ") == -1',"^=":'!K || K.indexOf("V") != 0',"*=":'!K || K.indexOf("V") == -1',"$=":'!K || K.substr(K.length-"V".length) != "V"'},g=e.selector.State=n.extend({init:function(){this.reset()},reset:function(){this.attrs={},this.wsattrs={}},prev:function(){return this.reset(),r?"el = el.previousElementSibling":"while((el = el.previousSibling) && el.nodeType != 1) {}"},next:function(){return this.reset(),r?"el = el.nextElementSibling":"while((el = el.nextSibling) && el.nodeType != 1) {}"},prevLoop:function(e){return this.reset(),c(r?["while(el = el.previousElementSibling){",e]:["while(el = el.previousSibling){","if (el.nodeType != 1) continue;",e])},parent:function(){return this.reset(),"el = el.parentNode;"},parentLoop:function(e){return this.reset(),c(["while((el = el.parentNode) && el.nodeType == 1){",e,"}"])},uses_attr:function(e){return this.attrs[e]?void 0:(this.attrs[e]=!0,s(e))},uses_wsattr:function(e){return this.wsattrs[e]?void 0:(this.wsattrs[e]=!0,c([this.uses_attr(e),"var _WS_"+u(e)+' = " "+'+u(e)+'+" ";']))},uses_jqueryFilters:function(){return this.jqueryFiltersAdded?void 0:(this.jqueryFiltersAdded=!0,"var _$filters = jQuery.find.selectors.filters;")},save:function(e){return"var el"+e+" = el;"},restore:function(e){return this.reset(),"el = el"+e+";"}}),m={"first-child":c(["var cel = el;","while(cel = cel.previousSibling){ if (cel.nodeType === 1) BAD; }"]),"last-child":c(["var cel = el;","while(cel = cel.nextSibling){ if (cel.nodeType === 1) BAD; }"]),"nth-child":function(e,t){var i=c(["var i = 1, cel = el;","while(cel = cel.previousSibling){","if (cel.nodeType === 1) i++;","}"]);return c(0==e?[i,"if (i- "+t+" != 0) BAD;"]:0==t&&e>=0?[i,"if (i%"+e+" != 0 || i/"+e+" < 0) BAD;"]:0==t&&0>e?["BAD;"]:[i,"if ((i- "+t+")%"+e+" != 0 || (i- "+t+")/"+e+" < 0) BAD;"])}};m["only-child"]=c([m["first-child"],m["last-child"]]),e.selector.SimpleSelector.addMethod("compile",function(t){var i=[];return this.tag&&"*"!=this.tag&&(i[i.length]='if (el.tagName != "'+this.tag.toUpperCase()+'") BAD;'),this.id&&(i[i.length]=t.uses_attr("id"),i[i.length]='if (_id !== "'+this.id+'") BAD;'),this.classes.length&&(i[i.length]=t.uses_wsattr("class"),e.each(this.classes,function(e,t){i[i.length]='if (_WS__class.indexOf(" '+t+' ") == -1) BAD;'})),e.each(this.attrs,function(e,n){i[i.length]="~="==n[1]?t.uses_wsattr(n[0]):t.uses_attr(n[0]);var s=f[n[1]||"-"];s=s.replace(/K/g,u(n[0])).replace(/V/g,n[2]&&n[2].match(h)?n[2].slice(1,-1):n[2]),i[i.length]="if ("+s+") BAD;"}),e.each(this.nots,function(n,s){var a=++v,r=c(["l"+a+":{",s.compile(t).replace(l,"break l"+a).replace(o,"BAD"),"}"]);s instanceof e.selector.SimpleSelector||(r=c([t.save(a),r,t.restore(a)])),i[i.length]=r}),e.each(this.pseudo_classes,function(n,s){var a=m[s[0]];a?i[i.length]="function"==typeof a?a.apply(this,s[1]):a:(a=e.find.selectors.filters[s[0]])&&(i[i.length]=t.uses_jqueryFilters(),i[i.length]="if (!_$filters."+s[0]+"(el)) BAD;")}),i[i.length]="GOOD",c(i)});var v=0,_={" ":function(e,t,i){return d([i,"while(true){",e.parent(),"if (!el || el.nodeType !== 1) BAD;",t.compile(e).replace(l,"continue"),"}"])},">":function(e,t,i){return c([i,e.parent(),"if (!el || el.nodeType !== 1) BAD;",t.compile(e)])},"~":function(e,t,i){return d([i,e.prevLoop(),t.compile(e).replace(l,"continue"),"}","BAD;"])},"+":function(e,t,i){return c([i,e.prev(),"if (!el) BAD;",t.compile(e)])}};e.selector.Selector.addMethod("compile",function(e){for(var i=this.parts.length,n=this.parts[--i].compile(e);i;){var s=this.parts[--i];n=_[s](e,this.parts[--i],t(n))}return n}),e.selector.SelectorsGroup.addMethod("compile",function(e){for(var t=[],i=++v,n=0;n<this.parts.length;n++)t[t.length]=c([0==n?e.save(i):e.restore(i),"l"+i+"_"+n+":{",this.parts[n].compile(e).replace(l,"break l"+i+"_"+n),"}"]);return t[t.length]="BAD;",c(t)}),e.selector.SelectorBase.addMethod("matches",function(e){return this.matches=new Function("el",c(["if (!el) return false;",this.compile(new g).replace(l,"return false").replace(o,"return true")])),this.matches(e)})}(jQuery),function(e){var t=/DIRECT/g,i=/CONTEXT/g,n=/DIRECT|CONTEXT/g;e.selector.SelectorBase.addMethod("affectedBy",function(e){return this.affectedBy=new Function("props",["var direct_classes, context_classes, direct_attrs, context_attrs, t;",this.ABC_compile().replace(t,"direct").replace(i,"context"),"return {classes: {context: context_classes, direct: direct_classes}, attrs: {context: context_attrs, direct: direct_attrs}};"].join("\n")),this.affectedBy(e)}),e.selector.SimpleSelector.addMethod("ABC_compile",function(){var t=[];return e.each(this.classes,function(e,i){t[t.length]="if (t = props.classes['"+i+"']) (DIRECT_classes || (DIRECT_classes = {}))['"+i+"'] = t;"}),e.each(this.nots,function(e,i){t[t.length]=i.ABC_compile()}),t.join("\n")}),e.selector.Selector.addMethod("ABC_compile",function(e){var t=[],i=this.parts.length-1;for(t[t.length]=this.parts[i].ABC_compile();(i-=2)>=0;)t[t.length]=this.parts[i].ABC_compile().replace(n,"CONTEXT");return t.join("\n")}),e.selector.SelectorsGroup.addMethod("ABC_compile",function(){var t=[];return e.each(this.parts,function(e,i){t[t.length]=i.ABC_compile()}),t.join("\n")})}(jQuery),function(e){void 0===e.support.focusinBubbles&&(e.support.focusinBubbles=!!e.browser.msie),e.support.focusinBubbles||e.event.special.focusin||e.each({focus:"focusin",blur:"focusout"},function(t,i){e.event.special[i]={setup:function(){return this.addEventListener?void this.addEventListener(t,e.event.special[i].handler,!0):!1},teardown:function(){return this.removeEventListener?void this.removeEventListener(t,e.event.special[i].handler,!0):!1},handler:function(t){return arguments[0]=e.event.fix(t),arguments[0].type=i,e.event.handle.apply(this,arguments)}}}),function(){var t=null;e(document).bind("focusin",function(i){var n=i.realTarget||i.target;t&&t!==n&&(i.type="focusout",e(t).trigger(i),i.type="focusin",i.target=n),t=n}).bind("focusout",function(e){t=null})}()}(jQuery);try{console.log}catch(s){window.console=void 0}!function(e){var t=function(){function t(e,i){return new t.fn.init(e,i)}jQuery.extend(!0,t,e),t.superclass=e,t.fn=t.prototype=e(),t.fn.constructor=t,t.fn.init=function(e,n){return n&&n instanceof jQuery&&!(n instanceof t)&&(n=t(n)),jQuery.fn.init.call(this,e,n,i)},t.fn.init.prototype=t.fn;var i=t(document);return t},i={};e.entwine=function(){e.fn.entwine.apply(null,arguments)},e.extend(e.entwine,{namespaces:i,clear_all_rules:function(){for(var t in e.fn)e.fn[t].isentwinemethod&&delete e.fn[t];e(document).unbind(".entwine"),e(window).unbind(".entwine");for(var t in i)delete i[t];for(var t in e.entwine.capture_bindings)delete e.entwine.capture_bindings[t]},WARN_LEVEL_NONE:0,WARN_LEVEL_IMPORTANT:1,WARN_LEVEL_BESTPRACTISE:2,warningLevel:0,warn:function(t,i){i<=e.entwine.warningLevel&&console&&console.warn&&(console.warn(t),console.trace&&console.trace())},warn_exception:function(t,i,n){e.entwine.WARN_LEVEL_IMPORTANT<=e.entwine.warningLevel&&console&&console.warn&&(2==arguments.length&&(n=i,i=null),i?console.warn("Uncaught exception",n,"in",t,"on",i):console.warn("Uncaught exception",n,"in",t),n.stack&&console.warn("Stack Trace:\n"+n.stack))}});var s=0,a=n.extend({init:function(e,t){this.selector=e,this.specifity=e.specifity(),this.important=0,this.name=t,this.rulecount=s++}});a.compare=function(e,t){var i=e.specifity,n=t.specifity;return e.important-t.important||i[0]-n[0]||i[1]-n[1]||i[2]-n[2]||e.rulecount-t.rulecount},e.entwine.RuleList=function(){var e=[];return e.addRule=function(t,i){var n=a(t,i);return e[e.length]=n,e.sort(a.compare),n},e};var r=[];e.entwine.Namespace=n.extend({init:function(n){if(n&&!n.match(/^[A-Za-z0-9.]+$/)&&e.entwine.warn("Entwine namespace "+n+" is not formatted as period seperated identifiers",e.entwine.WARN_LEVEL_BESTPRACTISE),n=n||"__base",this.name=n,this.store={},i[n]=this,"__base"==n)this.injectee=e.fn,this.$=e;else{this.$=e.sub?e.sub():t(),this.$.cache=e.cache,this.injectee=this.$.prototype;var s=this.injectee.entwine=function(t){var i=arguments;return t&&"string"==typeof t?"."!=t.charAt(0)&&(i[0]=n+"."+t):(i=e.makeArray(i),i.unshift(n)),e.fn.entwine.apply(this,i)};this.$.entwine=function(){s.apply(null,arguments)};for(var a=0;a<r.length;a++){var o,l=r[a];if(o=l.namespaceMethodOverrides){var h=o(this);for(var c in h)this.injectee[c]=h[c]}if(o=l.namespaceStaticOverrides){var h=o(this);for(var c in h)this.$.entwine[c]=h[c]}}}},one:function(e,t,i){var n=this,s=this.store[e],a=function(e,r,o){for(void 0===o&&(o=s.length);o--;)if(s[o].selector.matches(e)){var l,h=e.i,c=e.f;e.i=o,e.f=a;try{l=s[o][t].apply(n.$(e),r)}finally{e.i=h,e.f=c}return l}return i?i.apply(n.$(e),r):void 0};return a},build_proxy:function(t,i){var n=this.one(t,"func",i),s=function(){for(var t,i=e(this),s=i.length;s--;)t=n(i[s],arguments);return t};return s},bind_proxy:function(t,i,n){var s=this.store[i]||(this.store[i]=e.entwine.RuleList()),a=s.addRule(t,i);a.func=n,this.injectee.hasOwnProperty(i)&&this.injectee[i].isentwinemethod||(this.injectee[i]=this.build_proxy(i,this.injectee.hasOwnProperty(i)?this.injectee[i]:null),this.injectee[i].isentwinemethod=!0),this.injectee[i].isentwinemethod||e.entwine.warn("Warning: Entwine function "+i+" clashes with regular jQuery function - entwine function will not be callable directly on jQuery object",e.entwine.WARN_LEVEL_IMPORTANT)},add:function(e,t){for(var i in t)for(var n=t[i],s=0;s<r.length&&(!r[s].bind||!r[s].bind.call(this,e,i,n));s++);},has:function(e,t){var i=this.store[t];if(!i)return!1;for(var n=0;n<i.length;n++)if(e=e.not(i[n].selector),!e.length)return!0;return!1}}),e.entwine.Namespace.addHandler=function(e){for(var t=0;t<r.length&&r[t].order<e.order;t++);r.splice(t,0,e)},e.entwine.Namespace.addHandler({order:50,bind:function(t,i,n){return e.isFunction(n)?(this.bind_proxy(t,i,n),!0):void 0}}),e.extend(e.fn,{entwine:function(t){var n=0,s=null,a=i.__base||e.entwine.Namespace();for("string"==typeof t&&("."==t.charAt("0")&&(t=t.substr(1)),t&&(a=i[t]||e.entwine.Namespace(t)),n=1);n<arguments.length;){var r=arguments[n++];e.isFunction(r)&&(1!=r.length&&e.entwine.warn("Function block inside entwine definition does not take $ argument properly",e.entwine.WARN_LEVEL_IMPORTANT),r=r.call(a.$(this),a.$)),r&&(null===s&&(s=this.selector?e.selector(this.selector):!1),s?a.add(s,r):e.entwine.warn("Entwine block given to entwine call without selector. Make sure you call $(selector).entwine when defining blocks",e.entwine.WARN_LEVEL_IMPORTANT))}return a.$(this)},_super:function(){for(var e,t=this.length;t--;){var i=this[0];e=i.f(i,arguments,i.i)}return e}})}(jQuery),function(e){function t(e,t){for(var i,n=e.length,s=t.firstChild;i=s;)for(1===i.nodeType&&(e[n++]=i),s=i.firstChild||i.nextSibling;!s&&(i=i.parentNode)&&i!==t;)s=i.nextSibling}var i=!1,n=function(n){var s=function(s){var a=[];i||(1==s.nodeType&&(a[a.length]=s),t(a,s));var r=n.apply(this,arguments);if(!i&&a.length){var o=e.Event("EntwineElementsAdded");o.targets=a,e(document).triggerHandler(o)}return r};return s.patched=!0,s},s=e.prototype.jquery.split("."),a=s[0]>1||s[1]>=10?1:2,r=e.prototype.domManip;e.prototype.domManip=function(){return arguments[a].patched||(arguments[a]=n(arguments[a])),r.apply(this,arguments)};var o=e.prototype.html;e.prototype.html=function(n){if(void 0===n)return o.apply(this,arguments);i=!0;var s=o.apply(this,arguments);i=!1;for(var a=[],r=0,l=this.length;l>r;r++)t(a,this[r]);var h=e.Event("EntwineElementsAdded");return h.targets=a,e(document).triggerHandler(h),s};var l=!1,h=e.cleanData;e.cleanData=function(t){var i=t;if(l)for(var n=0,s=t.length,i=[],a=0;s>n;n++)for(var r=t[n],o=r;o=o.parentNode;)if(9==o.nodeType){i[a++]=r;break}if(i.length){var c=e.Event("EntwineElementsRemoved");c.targets=i,e(document).triggerHandler(c)}l||h.apply(this,arguments)};var c=e.prototype.remove;e.prototype.remove=function(e,t){l=t;var i=c.call(this,e);return l=!1,i},e(function(){var i=[];t(i,document);var n=e.Event("EntwineElementsAdded");n.targets=i,e(document).triggerHandler(n)})}(jQuery),function(e){var t=function(){var t=e.makeArray(arguments),i=t.pop();e.each(t,function(t,n){var s=e.fn[n];e.fn[n]=function(){var t=this,n=e.makeArray(arguments),a=s.apply(t,n);return i.apply(t,n),a}})},i=window.setTimeout,s=n.extend({init:function(){this.global=!1,this.attrs={},this.classes={}},triggerEvent:function(){a==this&&(this.check_id&&clearTimeout(this.check_id),a=new s,e(document).triggerHandler("EntwineSubtreeMaybeChanged",[this]))},changed:function(){if(!this.check_id){var e=this;this.check_id=i(function(){e.check_id=null,e.triggerEvent()},10)}},addAll:function(){return this.global?this:(this.global=!0,this.changed(),this)},addSubtree:function(e){return this.addAll()},addSubtreeFuture:function(t){return this.global?this:(this.subtree=this.subtree?this.subtree.add(t):e(t),this.changed(),this)},addAttr:function(t,i){return this.global?this:(this.attrs[t]=t in this.attrs?this.attrs[t].add(i):e(i),this.changed(),this)},addClass:function(t,i){return this.global?this:(this.classes[t]=t in this.classes?this.classes[t].add(i):e(i),this.changed(),this)}}),a=new s;e(document).bind("EntwineElementsAdded",function(e){a.addSubtree(e.targets)});var r=null;e(document).bind("EntwineElementsRemoved",function(e){r=e.targets}),t("remove","html","empty",function(){var e=r;r=null,e&&a.addSubtree(e)}),t("removeAttr",function(e){
|
||||
|
4
admin/javascript/dist/leaktools.js
vendored
4
admin/javascript/dist/leaktools.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.leaktools', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssLeaktools = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/sspath.js
vendored
4
admin/javascript/dist/sspath.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.sspath', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssSspath = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
admin/javascript/dist/ssui.core.js
vendored
4
admin/javascript/dist/ssui.core.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.ssui.core', ['jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssSsuiCore = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
@ -454,6 +454,9 @@ $.entwine('ss.preview', function($){
|
||||
this.setCurrentStateName(null);
|
||||
}
|
||||
|
||||
// Mark url as a preview url so it can get special treatment
|
||||
url += ((url.indexOf('?') === -1) ? '?' : '&') + 'CMSPreview=1';
|
||||
|
||||
// If this preview panel isn't visible at the moment, delay loading the URL until it (maybe) is later
|
||||
if (this.is('.column-hidden')) {
|
||||
this.setPendingURL(url);
|
||||
|
4
javascript/dist/AssetUploadField.js
vendored
4
javascript/dist/AssetUploadField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.AssetUploadField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssAssetUploadField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/ConfirmedPasswordField.js
vendored
4
javascript/dist/ConfirmedPasswordField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.ConfirmedPasswordField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssConfirmedPasswordField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/DateField.js
vendored
4
javascript/dist/DateField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.DateField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssDateField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/GridField.js
vendored
4
javascript/dist/GridField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.GridField', ['./jQuery', './i18n'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssGridField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery, _i18n) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
var _i18n2 = _interopRequireDefault(_i18n);
|
||||
|
4
javascript/dist/HtmlEditorField.js
vendored
4
javascript/dist/HtmlEditorField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.HtmlEditorField', ['./jQuery', './i18n'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssHtmlEditorField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery, _i18n) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
var _i18n2 = _interopRequireDefault(_i18n);
|
||||
|
4
javascript/dist/InlineFormAction.js
vendored
4
javascript/dist/InlineFormAction.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.InlineFormAction', [], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssInlineFormAction = mod.exports;
|
||||
}
|
||||
})(this, function () {
|
||||
'use strict';
|
||||
|
||||
Behaviour.register({
|
||||
'div.inlineformaction input#$ID': {
|
||||
onclick: function onclick() {
|
||||
|
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.PermissionCheckboxSetField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssPermissionCheckboxSetField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/SelectionGroup.js
vendored
4
javascript/dist/SelectionGroup.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.SelectionGroup', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssSelectionGroup = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/TabSet.js
vendored
4
javascript/dist/TabSet.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.TabSet', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssTabSet = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/ToggleCompositeField.js
vendored
4
javascript/dist/ToggleCompositeField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.ToggleCompositeField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssToggleCompositeField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/ToggleField.js
vendored
4
javascript/dist/ToggleField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.ToggleField', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssToggleField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
4
javascript/dist/TreeDropdownField.js
vendored
4
javascript/dist/TreeDropdownField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.TreeDropdownField', ['./jQuery', './i18n'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssTreeDropdownField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery, _i18n) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
var _i18n2 = _interopRequireDefault(_i18n);
|
||||
|
4
javascript/dist/UploadField.js
vendored
4
javascript/dist/UploadField.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.UploadField', ['./jQuery', './i18n'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssUploadField = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery, _i18n) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
var _i18n2 = _interopRequireDefault(_i18n);
|
||||
|
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.UploadField_downloadtemplate', [], factory);
|
||||
@ -13,5 +11,7 @@
|
||||
global.ssUploadField_downloadtemplate = mod.exports;
|
||||
}
|
||||
})(this, function () {
|
||||
'use strict';
|
||||
|
||||
window.tmpl.cache['ss-uploadfield-downloadtemplate'] = tmpl('{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' + '<li class="ss-uploadfield-item template-download{% if (file.error) { %} ui-state-error{% } %}" data-fileid="{%=file.id%}">' + '{% if (file.thumbnail_url) { %}' + '<div class="ss-uploadfield-item-preview preview"><span>' + '<img src="{%=file.thumbnail_url%}" alt="" />' + '</span></div>' + '{% } %}' + '<div class="ss-uploadfield-item-info">' + '{% if (!file.error && file.id) { %}' + '<input type="hidden" name="{%=file.fieldname%}[Files][]" value="{%=file.id%}" />' + '{% } %}' + '{% if (!file.error && file.filename) { %}' + '<input type="hidden" value="{%=file.filename%}" name="{%=file.fieldname%}[Filename]" />' + '<input type="hidden" value="{%=file.hash%}" name="{%=file.fieldname%}[Hash]" />' + '<input type="hidden" value="{%=file.variant%}" name="{%=file.fieldname%}[Variant]" />' + '{% } %}' + '<label class="ss-uploadfield-item-name">' + '<span class="name" title="{%=file.name%}">{%=file.name%}</span> ' + '<span class="size">{%=o.formatFileSize(file.size)%}</span>' + '{% if (!file.error) { %}' + '<div class="ss-uploadfield-item-status ui-state-success-text" title="' + ss.i18n._t('UploadField.Uploaded', 'Uploaded') + '">' + ss.i18n._t('UploadField.Uploaded', 'Uploaded') + '</div>' + '{% } else { %}' + '<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</div>' + '{% } %}' + '<div class="clear"><!-- --></div>' + '</label>' + '{% if (file.error) { %}' + '<div class="ss-uploadfield-item-actions">' + '<div class="ss-uploadfield-item-cancel ss-uploadfield-item-cancelfailed delete"><button type="button" class="icon icon-16" data-icon="delete" title="' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '">' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '</button></div>' + '</div>' + '{% } else { %}' + '<div class="ss-uploadfield-item-actions">{% print(file.buttons, true); %}</div>' + '{% } %}' + '</div>' + '{% if (!file.error) { %}' + '<div class="ss-uploadfield-item-editform"><iframe frameborder="0" data-src="{%=file.edit_url%}" src="about:blank"></iframe></div>' + '{% } %}' + '</li>' + '{% } %}');
|
||||
});
|
4
javascript/dist/UploadField_select.js
vendored
4
javascript/dist/UploadField_select.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.UploadField_select', ['./jQuery'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssUploadField_select = mod.exports;
|
||||
}
|
||||
})(this, function (_jQuery) {
|
||||
'use strict';
|
||||
|
||||
var _jQuery2 = _interopRequireDefault(_jQuery);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
|
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.UploadField_uploadtemplate', [], factory);
|
||||
@ -13,5 +11,7 @@
|
||||
global.ssUploadField_uploadtemplate = mod.exports;
|
||||
}
|
||||
})(this, function () {
|
||||
'use strict';
|
||||
|
||||
window.tmpl.cache['ss-uploadfield-uploadtemplate'] = tmpl('{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}' + '<li class="ss-uploadfield-item template-upload{% if (file.error) { %} ui-state-error{% } %}">' + '<div class="ss-uploadfield-item-preview preview"><span></span></div>' + '<div class="ss-uploadfield-item-info">' + '<label class="ss-uploadfield-item-name">' + '<span class="name" title="{% if (file.name) { %}{%=file.name%}{% } else { %}' + ss.i18n._t('UploadField.NOFILENAME', 'Untitled') + '{% } %}">' + '{% if (file.name) { %}{%=file.name%}{% } else { %}' + ss.i18n._t('UploadField.NOFILENAME', 'Untitled') + '{% } %}</span> ' + '{% if (!file.error) { %}' + '<div class="ss-uploadfield-item-status">0%</div>' + '{% } else { %}' + '<div class="ss-uploadfield-item-status ui-state-error-text" title="{%=o.options.errorMessages[file.error] || file.error%}">{%=o.options.errorMessages[file.error] || file.error%}</div>' + '{% } %}' + '<div class="clear"><!-- --></div>' + '</label>' + '<div class="ss-uploadfield-item-actions">' + '{% if (!file.error) { %}' + '<div class="ss-uploadfield-item-progress"><div class="ss-uploadfield-item-progressbar"><div class="ss-uploadfield-item-progressbarvalue"></div></div></div>' + '{% if (!o.options.autoUpload) { %}' + '<div class="ss-uploadfield-item-start start"><button type="button" class="icon icon-16" data-icon="navigation">' + ss.i18n._t('UploadField.START', 'Start') + '</button></div>' + '{% } %}' + '{% } %}' + '<div class="ss-uploadfield-item-cancel cancel">' + '<button type="button" class="icon icon-16" data-icon="minus-circle" title="' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '">' + ss.i18n._t('UploadField.CANCELREMOVE', 'Cancel/Remove') + '</button>' + '</div>' + '<div class="ss-uploadfield-item-overwrite hide ">' + '<button type="button" data-icon="drive-upload" class="ss-uploadfield-item-overwrite-warning" title="' + ss.i18n._t('UploadField.OVERWRITE', 'Overwrite') + '">' + ss.i18n._t('UploadField.OVERWRITE', 'Overwrite') + '</button>' + '</div>' + '</div>' + '</div>' + '</li>' + '{% } %}');
|
||||
});
|
4
javascript/dist/i18n.js
vendored
4
javascript/dist/i18n.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.i18n', ['exports'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssI18n = mod.exports;
|
||||
}
|
||||
})(this, function (exports) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
4
javascript/dist/i18nx.js
vendored
4
javascript/dist/i18nx.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.i18nx', ['exports'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssI18nx = mod.exports;
|
||||
}
|
||||
})(this, function (exports) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
4
javascript/dist/jQuery.js
vendored
4
javascript/dist/jQuery.js
vendored
@ -1,5 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define('ss.jQuery', ['exports'], factory);
|
||||
@ -13,6 +11,8 @@
|
||||
global.ssJQuery = mod.exports;
|
||||
}
|
||||
})(this, function (exports) {
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user