Moderate severityNVD Advisory· Published Oct 21, 2021· Updated Aug 4, 2024
Improper Neutralization HTML tags in sulu/sulu
CVE-2021-41169
Description
Sulu is an open-source PHP content management system based on the Symfony framework. In versions before 1.6.43 are subject to stored cross site scripting attacks. HTML input into Tag names is not properly sanitized. Only admin users are allowed to create tags. Users are advised to upgrade.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
sulu/suluPackagist | < 1.6.43 | 1.6.43 |
Affected products
1Patches
120007ac70a3aMerge pull request from GHSA-h58v-g3q6-q9fx
10 files changed · +11 −11
src/Sulu/Bundle/AdminBundle/Resources/public/dist/app.min.1634826923308.css+0 −0 renamedsrc/Sulu/Bundle/AdminBundle/Resources/public/dist/app.min.1634826923308.js+1 −1 renamedsrc/Sulu/Bundle/AdminBundle/Resources/public/dist/app.min.js+1 −1 modifiedsrc/Sulu/Bundle/AdminBundle/Resources/public/dist/login.min.1634826923308.css+0 −0 renamedsrc/Sulu/Bundle/AdminBundle/Resources/public/dist/login.min.1634826923308.js+1 −1 renamed@@ -1 +1 @@ -require.config({waitSeconds:0,paths:{suluadmin:"../../suluadmin/js",main:"login",cultures:"vendor/globalize/cultures","aura_extensions/backbone-relational":"aura_extensions/backbone-relational",husky:"vendor/husky/husky","__component__$login@suluadmin":"components/login/main"},include:["aura_extensions/backbone-relational","__component__$login@suluadmin"],exclude:["husky"],urlArgs:"v=1614246819288"}),define("underscore",[],function(){return window._}),require(["husky"],function(e){"use strict";var t,n=SULU.translations,r=SULU.fallbackLocale;t=window.navigator.languages?window.navigator.languages[0]:null,t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t=t.slice(0,2).toLowerCase(),n.indexOf(t)===-1&&(t=r),require(["text!/admin/translations/sulu."+t+".json","text!/admin/translations/sulu."+r+".json"],function(n,r){var i=JSON.parse(n),s=JSON.parse(r),o=new e({debug:{enable:!!SULU.debug},culture:{name:t,messages:i,defaultMessages:s}});o.use("aura_extensions/backbone-relational"),o.components.addSource("suluadmin","/bundles/suluadmin/js/components"),o.start(),window.app=o})}),define("main",function(){}),function(e,t){typeof define=="function"&&define.amd?define("vendor/backbone-relational/backbone-relational",["exports","backbone","underscore"],t):typeof exports!="undefined"?t(exports,require("backbone"),require("underscore")):t(e,e.Backbone,e._)}(this,function(e,t,n){"use strict";t.Relational={showWarnings:!0},t.Semaphore={_permitsAvailable:null,_permitsUsed:0,acquire:function(){if(this._permitsAvailable&&this._permitsUsed>=this._permitsAvailable)throw new Error("Max permits acquired");this._permitsUsed++},release:function(){if(this._permitsUsed===0)throw new Error("All permits released");this._permitsUsed--},isLocked:function(){return this._permitsUsed>0},setAvailablePermits:function(e){if(this._permitsUsed>e)throw new Error("Available permits cannot be less than used permits");this._permitsAvailable=e}},t.BlockingQueue=function(){this._queue=[]},n.extend(t.BlockingQueue.prototype,t.Semaphore,{_queue:null,add:function(e){this.isBlocked()?this._queue.push(e):e()},process:function(){var e=this._queue;this._queue=[];while(e&&e.length)e.shift()()},block:function(){this.acquire()},unblock:function(){this.release(),this.isBlocked()||this.process()},isBlocked:function(){return this.isLocked()}}),t.Relational.eventQueue=new t.BlockingQueue,t.Store=function(){this._collections=[],this._reverseRelations=[],this._orphanRelations=[],this._subModels=[],this._modelScopes=[e]},n.extend(t.Store.prototype,t.Events,{initializeRelation:function(e,r,i){var s=n.isString(r.type)?t[r.type]||this.getObjectByName(r.type):r.type;s&&s.prototype instanceof t.Relation?new s(e,r,i):t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; missing or invalid relation type!",r)},addModelScope:function(e){this._modelScopes.push(e)},removeModelScope:function(e){this._modelScopes=n.without(this._modelScopes,e)},addSubModels:function(e,t){this._subModels.push({superModelType:t,subModels:e})},setupSuperModel:function(e){n.find(this._subModels,function(t){return n.filter(t.subModels||[],function(n,r){var i=this.getObjectByName(n);if(e===i)return t.superModelType._subModels[r]=e,e._superModel=t.superModelType,e._subModelTypeValue=r,e._subModelTypeAttribute=t.superModelType.prototype.subModelTypeAttribute,!0},this).length},this)},addReverseRelation:function(e){var t=n.any(this._reverseRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&(this._reverseRelations.push(e),this._addRelation(e.model,e),this.retroFitRelation(e))},addOrphanRelation:function(e){var t=n.any(this._orphanRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&this._orphanRelations.push(e)},processOrphanRelations:function(){n.each(this._orphanRelations.slice(0),function(e){var r=t.Relational.store.getObjectByName(e.relatedModel);r&&(this.initializeRelation(null,e),this._orphanRelations=n.without(this._orphanRelations,e))},this)},_addRelation:function(e,t){e.prototype.relations||(e.prototype.relations=[]),e.prototype.relations.push(t),n.each(e._subModels||[],function(e){this._addRelation(e,t)},this)},retroFitRelation:function(e){var t=this.getCollection(e.model,!1);t&&t.each(function(t){if(!(t instanceof e.model))return;new e.type(t,e)},this)},getCollection:function(e,r){e instanceof t.RelationalModel&&(e=e.constructor);var i=e;while(i._superModel)i=i._superModel;var s=n.find(this._collections,function(e){return e.model===i});return!s&&r!==!1&&(s=this._createCollection(i)),s},getObjectByName:function(e){var t=e.split("."),r=null;return n.find(this._modelScopes,function(e){r=n.reduce(t||[],function(e,t){return e?e[t]:undefined},e);if(r&&r!==e)return!0},this),r},_createCollection:function(e){var n;return e instanceof t.RelationalModel&&(e=e.constructor),e.prototype instanceof t.RelationalModel&&(n=new t.Collection,n.model=e,this._collections.push(n)),n},resolveIdForItem:function(e,r){var i=n.isString(r)||n.isNumber(r)?r:null;return i===null&&(r instanceof t.RelationalModel?i=r.id:n.isObject(r)&&(i=r[e.prototype.idAttribute])),!i&&i!==0&&(i=null),i},find:function(e,t){var n=this.resolveIdForItem(e,t),r=this.getCollection(e);if(r){var i=r.get(n);if(i instanceof e)return i}return null},register:function(e){var t=this.getCollection(e);if(t){var n=e.collection;t.add(e),e.collection=n}},checkId:function(e,n){var r=this.getCollection(e),i=r&&r.get(n);if(i&&e!==i)throw t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Duplicate id! Old RelationalModel=%o, new RelationalModel=%o",i,e),new Error("Cannot instantiate more than one Backbone.RelationalModel with the same id per type!")},update:function(e){var t=this.getCollection(e);t.contains(e)||this.register(e),t._onModelEvent("change:"+e.idAttribute,e,t),e.trigger("relational:change:id",e,t)},unregister:function(e){var r,i;e instanceof t.Model?(r=this.getCollection(e),i=[e]):e instanceof t.Collection?(r=this.getCollection(e.model),i=n.clone(e.models)):(r=this.getCollection(e),i=n.clone(r.models)),n.each(i,function(e){this.stopListening(e),n.invoke(e.getRelations(),"stopListening")},this),n.contains(this._collections,e)?r.reset([]):n.each(i,function(e){r.get(e)?r.remove(e):r.trigger("relational:remove",e,r)},this)},reset:function(){this.stopListening(),n.each(this._collections,function(e){this.unregister(e)},this),this._collections=[],this._subModels=[],this._modelScopes=[e]}}),t.Relational.store=new t.Store,t.Relation=function(e,r,i){this.instance=e,r=n.isObject(r)?r:{},this.reverseRelation=n.defaults(r.reverseRelation||{},this.options.reverseRelation),this.options=n.defaults(r,this.options,t.Relation.prototype.options),this.reverseRelation.type=n.isString(this.reverseRelation.type)?t[this.reverseRelation.type]||t.Relational.store.getObjectByName(this.reverseRelation.type):this.reverseRelation.type,this.key=this.options.key,this.keySource=this.options.keySource||this.key,this.keyDestination=this.options.keyDestination||this.keySource||this.key,this.model=this.options.model||this.instance.constructor,this.relatedModel=this.options.relatedModel,n.isFunction(this.relatedModel)&&!(this.relatedModel.prototype instanceof t.RelationalModel)&&(this.relatedModel=n.result(this,"relatedModel")),n.isString(this.relatedModel)&&(this.relatedModel=t.Relational.store.getObjectByName(this.relatedModel));if(!this.checkPreconditions())return;!this.options.isAutoRelation&&this.reverseRelation.type&&this.reverseRelation.key&&t.Relational.store.addReverseRelation(n.defaults({isAutoRelation:!0,model:this.relatedModel,relatedModel:this.model,reverseRelation:this.options},this.reverseRelation));if(e){var s=this.keySource;s!==this.key&&typeof this.instance.get(this.key)=="object"&&(s=this.key),this.setKeyContents(this.instance.get(s)),this.relatedCollection=t.Relational.store.getCollection(this.relatedModel),this.keySource!==this.key&&delete this.instance.attributes[this.keySource],this.instance._relations[this.key]=this,this.initialize(i),this.options.autoFetch&&this.instance.fetchRelated(this.key,n.isObject(this.options.autoFetch)?this.options.autoFetch:{}),this.listenTo(this.instance,"destroy",this.destroy).listenTo(this.relatedCollection,"relational:add relational:change:id",this.tryAddRelated).listenTo(this.relatedCollection,"relational:remove",this.removeRelated)}},t.Relation.extend=t.Model.extend,n.extend(t.Relation.prototype,t.Events,t.Semaphore,{options:{createModels:!0,includeInJSON:!0,isAutoRelation:!1,autoFetch:!1,parse:!1},instance:null,key:null,keyContents:null,relatedModel:null,relatedCollection:null,reverseRelation:null,related:null,checkPreconditions:function(){var e=this.instance,r=this.key,i=this.model,s=this.relatedModel,o=t.Relational.showWarnings&&typeof console!="undefined";if(!i||!r||!s)return o&&console.warn("Relation=%o: missing model, key or relatedModel (%o, %o, %o).",this,i,r,s),!1;if(i.prototype instanceof t.RelationalModel){if(s.prototype instanceof t.RelationalModel){if(this instanceof t.HasMany&&this.reverseRelation.type===t.HasMany)return o&&console.warn("Relation=%o: relation is a HasMany, and the reverseRelation is HasMany as well.",this),!1;if(e&&n.keys(e._relations).length){var u=n.find(e._relations,function(e){return e.key===r},this);if(u)return o&&console.warn("Cannot create relation=%o on %o for model=%o: already taken by relation=%o.",this,r,e,u),!1}return!0}return o&&console.warn("Relation=%o: relatedModel does not inherit from Backbone.RelationalModel (%o).",this,s),!1}return o&&console.warn("Relation=%o: model does not inherit from Backbone.RelationalModel (%o).",this,e),!1},setRelated:function(e){this.related=e,this.instance.attributes[this.key]=e},_isReverseRelation:function(e){return e.instance instanceof this.relatedModel&&this.reverseRelation.key===e.key&&this.key===e.reverseRelation.key},getReverseRelations:function(e){var t=[],r=n.isUndefined(e)?this.related&&(this.related.models||[this.related]):[e];return n.each(r||[],function(e){n.each(e.getRelations()||[],function(e){this._isReverseRelation(e)&&t.push(e)},this)},this),t},destroy:function(){this.stopListening(),this instanceof t.HasOne?this.setRelated(null):this instanceof t.HasMany&&this.setRelated(this._prepareCollection()),n.each(this.getReverseRelations(),function(e){e.removeRelated(this.instance)},this)}}),t.HasOne=t.Relation.extend({options:{reverseRelation:{type:"HasMany"}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange);var t=this.findRelated(e);this.setRelated(t),n.each(this.getReverseRelations(),function(t){t.addRelated(this.instance,e)},this)},findRelated:function(e){var t=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof this.relatedModel)t=this.keyContents;else if(this.keyContents||this.keyContents===0){var r=n.defaults({create:this.options.createModels},e);t=this.relatedModel.findOrCreate(this.keyContents,r)}return t&&(this.keyId=null),t},setKeyContents:function(e){this.keyContents=e,this.keyId=t.Relational.store.resolveIdForItem(this.relatedModel,this.keyContents)},onChange:function(e,r,i){if(this.isLocked())return;this.acquire(),i=i?n.clone(i):{};var s=n.isUndefined(i.__related),o=s?this.related:i.__related;if(s){this.setKeyContents(r);var u=this.findRelated(i);this.setRelated(u)}o&&this.related!==o&&n.each(this.getReverseRelations(o),function(e){e.removeRelated(this.instance,null,i)},this),n.each(this.getReverseRelations(),function(e){e.addRelated(this.instance,i)},this);if(!i.silent&&this.related!==o){var a=this;this.changed=!0,t.Relational.eventQueue.add(function(){a.instance.trigger("change:"+a.key,a.instance,a.related,i,!0),a.changed=!1})}this.release()},tryAddRelated:function(e,t,n){(this.keyId||this.keyId===0)&&e.id===this.keyId&&(this.addRelated(e,n),this.keyId=null)},addRelated:function(e,t){var r=this;e.queue(function(){if(e!==r.related){var i=r.related||null;r.setRelated(e),r.onChange(r.instance,e,n.defaults({__related:i},t))}})},removeRelated:function(e,t,r){if(!this.related)return;if(e===this.related){var i=this.related||null;this.setRelated(null),this.onChange(this.instance,e,n.defaults({__related:i},r))}}}),t.HasMany=t.Relation.extend({collectionType:null,options:{reverseRelation:{type:"HasOne"},collectionType:t.Collection,collectionKey:!0,collectionOptions:{}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange),this.collectionType=this.options.collectionType,n.isFunction(this.collectionType)&&this.collectionType!==t.Collection&&!(this.collectionType.prototype instanceof t.Collection)&&(this.collectionType=n.result(this,"collectionType")),n.isString(this.collectionType)&&(this.collectionType=t.Relational.store.getObjectByName(this.collectionType));if(!(this.collectionType===t.Collection||this.collectionType.prototype instanceof t.Collection))throw new Error("`collectionType` must inherit from Backbone.Collection");var r=this.findRelated(e);this.setRelated(r)},_prepareCollection:function(e){this.related&&this.stopListening(this.related);if(!e||!(e instanceof t.Collection)){var r=n.isFunction(this.options.collectionOptions)?this.options.collectionOptions(this.instance):this.options.collectionOptions;e=new this.collectionType(null,r)}e.model=this.relatedModel;if(this.options.collectionKey){var i=this.options.collectionKey===!0?this.options.reverseRelation.key:this.options.collectionKey;e[i]&&e[i]!==this.instance?t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; collectionKey=%s already exists on collection=%o",this,i,this.options.collectionKey):i&&(e[i]=this.instance)}return this.listenTo(e,"relational:add",this.handleAddition).listenTo(e,"relational:remove",this.handleRemoval).listenTo(e,"relational:reset",this.handleReset),e},findRelated:function(e){var r=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof t.Collection)this._prepareCollection(this.keyContents),r=this.keyContents;else{var i=[];n.each(this.keyContents,function(t){if(t instanceof this.relatedModel)var r=t;else r=this.relatedModel.findOrCreate(t,n.extend({merge:!0},e,{create:this.options.createModels}));r&&i.push(r)},this),this.related instanceof t.Collection?r=this.related:r=this._prepareCollection(),r.set(i,n.defaults({merge:!1,parse:!1},e))}return this.keyIds=n.difference(this.keyIds,n.pluck(r.models,"id")),r},setKeyContents:function(e){this.keyContents=e instanceof t.Collection?e:null,this.keyIds=[],!this.keyContents&&(e||e===0)&&(this.keyContents=n.isArray(e)?e:[e],n.each(this.keyContents,function(e){var n=t.Relational.store.resolveIdForItem(this.relatedModel,e);(n||n===0)&&this.keyIds.push(n)},this))},onChange:function(e,r,i){i=i?n.clone(i):{},this.setKeyContents(r),this.changed=!1;var s=this.findRelated(i);this.setRelated(s);if(!i.silent){var o=this;t.Relational.eventQueue.add(function(){o.changed&&(o.instance.trigger("change:"+o.key,o.instance,o.related,i,!0),o.changed=!1)})}},handleAddition:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.addRelated(this.instance,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("add:"+s.key,e,s.related,i)})},handleRemoval:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.removeRelated(this.instance,null,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("remove:"+s.key,e,s.related,i)})},handleReset:function(e,r){var i=this;r=r?n.clone(r):{},!r.silent&&t.Relational.eventQueue.add(function(){i.instance.trigger("reset:"+i.key,i.related,r)})},tryAddRelated:function(e,t,r){var i=n.contains(this.keyIds,e.id);i&&(this.addRelated(e,r),this.keyIds=n.without(this.keyIds,e.id))},addRelated:function(e,t){var r=this;e.queue(function(){r.related&&!r.related.get(e)&&r.related.add(e,n.defaults({parse:!1},t))})},removeRelated:function(e,t,n){this.related.get(e)&&this.related.remove(e,n)}}),t.RelationalModel=t.Model.extend({relations:null,_relations:null,_isInitialized:!1,_deferProcessing:!1,_queue:null,_attributeChangeFired:!1,subModelTypeAttribute:"type",subModelTypes:null,constructor:function(e,r){if(r&&r.collection){var i=this,s=this.collection=r.collection;delete r.collection,this._deferProcessing=!0;var o=function(e){e===i&&(i._deferProcessing=!1,i.processQueue(),s.off("relational:add",o))};s.on("relational:add",o),n.defer(function(){o(i)})}t.Relational.store.processOrphanRelations(),t.Relational.store.listenTo(this,"relational:unregister",t.Relational.store.unregister),this._queue=new t.BlockingQueue,this._queue.block(),t.Relational.eventQueue.block();try{t.Model.apply(this,arguments)}finally{t.Relational.eventQueue.unblock()}},trigger:function(e){if(e.length>5&&e.indexOf("change")===0){var n=this,r=arguments;t.Relational.eventQueue.isLocked()?t.Relational.eventQueue.add(function(){var i=!0;if(e==="change")i=n.hasChanged()||n._attributeChangeFired,n._attributeChangeFired=!1;else{var s=e.slice(7),o=n.getRelation(s);o?(i=r[4]===!0,i?n.changed[s]=r[2]:o.changed||delete n.changed[s]):i&&(n._attributeChangeFired=!0)}i&&t.Model.prototype.trigger.apply(n,r)}):t.Model.prototype.trigger.apply(n,r)}else e==="destroy"?(t.Model.prototype.trigger.apply(this,arguments),t.Relational.store.unregister(this)):t.Model.prototype.trigger.apply(this,arguments);return this},initializeRelations:function(e){this.acquire(),this._relations={},n.each(this.relations||[],function(n){t.Relational.store.initializeRelation(this,n,e)},this),this._isInitialized=!0,this.release(),this.processQueue()},updateRelations:function(e,t){this._isInitialized&&!this.isLocked()&&n.each(this._relations,function(n){if(!e||n.keySource in e||n.key in e){var r=this.attributes[n.keySource]||this.attributes[n.key],i=e&&(e[n.keySource]||e[n.key]);(n.related!==r||r===null&&i===null)&&this.trigger("relational:change:"+n.key,this,r,t||{})}n.keySource!==n.key&&delete this.attributes[n.keySource]},this)},queue:function(e){this._queue.add(e)},processQueue:function(){this._isInitialized&&!this._deferProcessing&&this._queue.isBlocked()&&this._queue.unblock()},getRelation:function(e){return this._relations[e]},getRelations:function(){return n.values(this._relations)},fetchRelated:function(e,r,i){r=n.extend({update:!0,remove:!1},r);var s,o,u=[],a=this.getRelation(e),f=a&&(a.keyIds&&a.keyIds.slice(0)||(a.keyId||a.keyId===0?[a.keyId]:[]));i&&(s=a.related instanceof t.Collection?a.related.models:[a.related],n.each(s,function(e){(e.id||e.id===0)&&f.push(e.id)}));if(f&&f.length){var l=[];s=n.map(f,function(e){var t=a.relatedModel.findModel(e);if(!t){var n={};n[a.relatedModel.prototype.idAttribute]=e,t=a.relatedModel.findOrCreate(n,r),l.push(t)}return t},this),a.related instanceof t.Collection&&n.isFunction(a.related.url)&&(o=a.related.url(s));if(o&&o!==a.related.url()){var c=n.defaults({error:function(){var e=arguments;n.each(l,function(t){t.trigger("destroy",t,t.collection,r),r.error&&r.error.apply(t,e)})},url:o},r);u=[a.related.fetch(c)]}else u=n.map(s,function(e){var t=n.defaults({error:function(){n.contains(l,e)&&(e.trigger("destroy",e,e.collection,r),r.error&&r.error.apply(e,arguments))}},r);return e.fetch(t)},this)}return u},get:function(e){var r=t.Model.prototype.get.call(this,e);if(!this.dotNotation||e.indexOf(".")===-1)return r;var i=e.split("."),s=n.reduce(i,function(e,r){if(n.isNull(e)||n.isUndefined(e))return undefined;if(e instanceof t.Model)return t.Model.prototype.get.call(e,r);if(e instanceof t.Collection)return t.Collection.prototype.at.call(e,r);throw new Error("Attribute must be an instanceof Backbone.Model or Backbone.Collection. Is: "+e+", currentSplit: "+r)},this);if(r!==undefined&&s!==undefined)throw new Error("Ambiguous result for '"+e+"'. direct result: "+r+", dotNotation: "+s);return r||s},set:function(e,r,i){t.Relational.eventQueue.block();var s;n.isObject(e)||e==null?(s=e,i=r):(s={},s[e]=r);try{var o=this.id,u=s&&this.idAttribute in s&&s[this.idAttribute];t.Relational.store.checkId(this,u);var a=t.Model.prototype.set.apply(this,arguments);!this._isInitialized&&!this.isLocked()?(this.constructor.initializeModelHierarchy(),(u||u===0)&&t.Relational.store.register(this),this.initializeRelations(i)):u&&u!==o&&t.Relational.store.update(this),s&&this.updateRelations(s,i)}finally{t.Relational.eventQueue.unblock()}return a},clone:function(){var e=n.clone(this.attributes);return n.isUndefined(e[this.idAttribute])||(e[this.idAttribute]=null),n.each(this.getRelations(),function(t){delete e[t.key]}),new this.constructor(e)},toJSON:function(e){if(this.isLocked())return this.id;this.acquire();var r=t.Model.prototype.toJSON.call(this,e);return this.constructor._superModel&&!(this.constructor._subModelTypeAttribute in r)&&(r[this.constructor._subModelTypeAttribute]=this.constructor._subModelTypeValue),n.each(this._relations,function(i){var s=r[i.key],o=i.options.includeInJSON,u=null;o===!0?s&&n.isFunction(s.toJSON)&&(u=s.toJSON(e)):n.isString(o)?(s instanceof t.Collection?u=s.pluck(o):s instanceof t.Model&&(u=s.get(o)),o===i.relatedModel.prototype.idAttribute&&(i instanceof t.HasMany?u=u.concat(i.keyIds):i instanceof t.HasOne&&(u=u||i.keyId,!u&&!n.isObject(i.keyContents)&&(u=i.keyContents||null)))):n.isArray(o)?s instanceof t.Collection?(u=[],s.each(function(e){var t={};n.each(o,function(n){t[n]=e.get(n)}),u.push(t)})):s instanceof t.Model&&(u={},n.each(o,function(e){u[e]=s.get(e)})):delete r[i.key],o&&(r[i.keyDestination]=u),i.keyDestination!==i.key&&delete r[i.key]}),this.release(),r}},{setup:function(e){return this.prototype.relations=(this.prototype.relations||[]).slice(0),this._subModels={},this._superModel=null,this.prototype.hasOwnProperty("subModelTypes")?t.Relational.store.addSubModels(this.prototype.subModelTypes,this):this.prototype.subModelTypes=null,n.each(this.prototype.relations||[],function(e){e.model||(e.model=this);if(e.reverseRelation&&e.model===this){var r=!0;if(n.isString(e.relatedModel)){var i=t.Relational.store.getObjectByName(e.relatedModel);r=i&&i.prototype instanceof t.RelationalModel}r?t.Relational.store.initializeRelation(null,e):n.isString(e.relatedModel)&&t.Relational.store.addOrphanRelation(e)}},this),this},build:function(e,t){this.initializeModelHierarchy();var n=this._findSubModelType(this,e)||this;return new n(e,t)},_findSubModelType:function(e,t){if(e._subModels&&e.prototype.subModelTypeAttribute in t){var n=t[e.prototype.subModelTypeAttribute],r=e._subModels[n];if(r)return r;for(n in e._subModels){r=this._findSubModelType(e._subModels[n],t);if(r)return r}}return null},initializeModelHierarchy:function(){this.inheritRelations();if(this.prototype.subModelTypes){var e=n.keys(this._subModels),r=n.omit(this.prototype.subModelTypes,e);n.each(r,function(e){var n=t.Relational.store.getObjectByName(e);n&&n.initializeModelHierarchy()})}},inheritRelations:function(){if(!n.isUndefined(this._superModel)&&!n.isNull(this._superModel))return;t.Relational.store.setupSuperModel(this);if(this._superModel){this._superModel.inheritRelations();if(this._superModel.prototype.relations){var e=n.filter(this._superModel.prototype.relations||[],function(e){return!n.any(this.prototype.relations||[],function(t){return e.relatedModel===t.relatedModel&&e.key===t.key},this)},this);this.prototype.relations=e.concat(this.prototype.relations)}}else this._superModel=!1},findOrCreate:function(e,t){t||(t={});var r=n.isObject(e)&&t.parse&&this.prototype.parse?this.prototype.parse(n.clone(e)):e,i=this.findModel(r);return n.isObject(e)&&(i&&t.merge!==!1?(delete t.collection,delete t.url,i.set(r,t)):!i&&t.create!==!1&&(i=this.build(r,n.defaults({parse:!1},t)))),i},find:function(e,t){return t||(t={}),t.create=!1,this.findOrCreate(e,t)},findModel:function(e){return t.Relational.store.find(this,e)}}),n.extend(t.RelationalModel.prototype,t.Semaphore),t.Collection.prototype.__prepareModel=t.Collection.prototype._prepareModel,t.Collection.prototype._prepareModel=function(e,r){var i;return e instanceof t.Model?(e.collection||(e.collection=this),i=e):(r=r?n.clone(r):{},r.collection=this,typeof this.model.findOrCreate!="undefined"?i=this.model.findOrCreate(e,r):i=new this.model(e,r),i&&i.validationError&&(this.trigger("invalid",this,e,r),i=!1)),i};var r=t.Collection.prototype.__set=t.Collection.prototype.set;t.Collection.prototype.set=function(e,i){if(this.model.prototype instanceof t.RelationalModel){i&&i.parse&&(e=this.parse(e,i));var s=!n.isArray(e),o=[],u=[];e=s?e?[e]:[]:n.clone(e),n.each(e,function(e){e instanceof t.Model||(e=t.Collection.prototype._prepareModel.call(this,e,i)),e&&(u.push(e),!this.get(e)&&!this.get(e.cid)?o.push(e):e.id!=null&&(this._byId[e.id]=e))},this),u=s?u.length?u[0]:null:u;var a=r.call(this,u,n.defaults({parse:!1},i));return n.each(o,function(e){(this.get(e)||this.get(e.cid))&&this.trigger("relational:add",e,this,i)},this),a}return r.apply(this,arguments)};var i=t.Collection.prototype.__remove=t.Collection.prototype.remove;t.Collection.prototype.remove=function(e,r){if(this.model.prototype instanceof t.RelationalModel){var s=!n.isArray(e),o=[];e=s?e?[e]:[]:n.clone(e),r||(r={}),n.each(e,function(e){e=this.get(e)||e&&this.get(e.cid),e&&o.push(e)},this);var u=i.call(this,s?o.length?o[0]:null:o,r);return n.each(o,function(e){this.trigger("relational:remove",e,this,r)},this),u}return i.apply(this,arguments)};var s=t.Collection.prototype.__reset=t.Collection.prototype.reset;t.Collection.prototype.reset=function(e,r){r=n.extend({merge:!0},r);var i=s.call(this,e,r);return this.model.prototype instanceof t.RelationalModel&&this.trigger("relational:reset",this,r),i};var o=t.Collection.prototype.__sort=t.Collection.prototype.sort;t.Collection.prototype.sort=function(e){var n=o.call(this,e);return this.model.prototype instanceof t.RelationalModel&&this.trigger("relational:reset",this,e),n};var u=t.Collection.prototype.__trigger=t.Collection.prototype.trigger;t.Collection.prototype.trigger=function(e){if(this.model.prototype instanceof t.RelationalModel){if(e==="add"||e==="remove"||e==="reset"||e==="sort"){var r=this,i=arguments;n.isObject(i[3])&&(i=n.toArray(i),i[3]=n.clone(i[3])),t.Relational.eventQueue.add(function(){u.apply(r,i)})}else u.apply(this,arguments);return this}return u.apply(this,arguments)},t.RelationalModel.extend=function(e,n){var r=t.Model.extend.apply(this,arguments);return r.setup(this),r}}),function(){"use strict";define("aura_extensions/backbone-relational",["vendor/backbone-relational/backbone-relational"],function(){return{name:"relationalmodel",initialize:function(e){var t=e.core,n=e.sandbox;t.mvc.relationalModel=Backbone.RelationalModel,n.mvc.relationalModel=function(e){return t.mvc.relationalModel.extend(e)},define("mvc/relationalmodel",function(){return n.mvc.relationalModel}),n.mvc.HasMany=Backbone.HasMany,n.mvc.HasOne=Backbone.HasOne,define("mvc/hasmany",function(){return n.mvc.HasMany}),define("mvc/hasone",function(){return n.mvc.HasOne}),n.mvc.Store=Backbone.Relational.store,define("mvc/relationalstore",function(){return n.mvc.Store})}}})}(),define("__component__$login@suluadmin",[],function(){"use strict";var e={instanceName:"",backgroundImg:"/bundles/suluadmin/img/background.jpg",loginUrl:"",loginCheck:"",resetMailUrl:"",resendUrl:"",resetUrl:"",resetToken:"",csrfToken:"",resetMode:!1,translations:{resetPassword:"sulu.login.reset-password",reset:"public.reset",backLogin:"sulu.login.back-login",resendResetMail:"sulu.login.resend-email",emailSent:"sulu.login.email-sent-message",backWebsite:"sulu.login.back-website",login:"public.login",errorMessage:"sulu.login.error-message",forgotPassword:"sulu.login.forgot-password",emailUser:"sulu.login.email-username",password:"public.password",emailSentSuccess:"sulu.login.email-sent-success",enterNewPassword:"sulu.login.enter-new-password",repeatPassword:"sulu.login.repeat-password"},errorTranslations:{0:"sulu.login.mail.user-not-found",1003:"sulu.login.mail.already-sent",1005:"sulu.login.token-does-not-exist",1007:"sulu.login.mail.limit-reached",1009:"sulu.login.mail.user-not-found"}},t={componentClass:"sulu-login",mediaLogoClass:"media-logo",mediaBackgroundClass:"media-background",mediaLoadingClass:"media-loading",contentLoadingClass:"content-loading",successClass:"content-success",contentBoxClass:"content-box",websiteSwitchClass:"website-switch",successOverlayClass:"success-overlay",frameSliderClass:"frame-slider",frameClass:"box-frame",forgotPasswordSwitchClass:"forgot-password-switch",loginSwitchClass:"login-switch-span",loginButtonId:"login-button",requestResetMailButtonId:"request-mail-button",resendResetMailButtonId:"resend-mail-button",resetPasswordButtonId:"reset-password-button",loginRouteClass:"login-route-span",errorMessageClass:"error-message",errorClass:"login-error",loaderClass:"login-loader"},n={mediaContainer:['<div class="media-container '+t.mediaLoadingClass+'">',' <div class="media-logo"></div>',' <div class="'+t.mediaBackgroundClass+'">',' <div class="darkener"></div>'," </div>","</div>"].join(""),contentContainer:['<div class="content-container">',' <div class="'+t.contentBoxClass+'">',' <div class="content-logo navigator'+t.websiteSwitchClass+'"></div>',' <div class="'+t.frameSliderClass+'"></div>'," </div>",' <div class="grid-row login-content-footer">',' <span class="navigator '+t.websiteSwitchClass+'"><%= backWebsiteMessage %></span>'," </div>",' <div class="'+t.successOverlayClass+'">',' <div class="success-icon"></div>'," </div>","</div>"].join(""),loginFrame:function(){return['<div class="'+t.frameClass+' login">',' <form class="grid inputs">',' <span class="'+t.errorMessageClass+'"><%= errorMessage %></span>',' <div class="grid-row">',' <input class="form-element input-large husky-validate" type="text" name="username" id="username" placeholder="<%= emailUser %>"/>'," </div>",' <div class="grid-row">',' <input class="form-element input-large husky-validate" type="password" name="password" id="password" placeholder="<%= password %>"/>'," </div>",' <input type="hidden" name="_csrf_token" id="_csrf_token" value="',this.options.csrfToken,'"/>',' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.forgotPasswordSwitchClass+'"><%= forgotPasswordMessage %></span>',' <div id="'+t.loginButtonId+'" class="btn action large fit"><%= login %></div>'," </div>"," </form>","</div>"].join("")},forgotPasswordFrame:['<div class="'+t.frameClass+' forgot-password">',' <div class="grid inputs">',' <span class="'+t.errorMessageClass+'"></span>',' <div class="grid-row">',' <input id="user" class="form-element input-large husky-validate" type="text" placeholder="<%= emailUser %>" tabindex="-1"/>'," </div>"," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginSwitchClass+'"><%= backLoginMessage %></span>',' <div id="'+t.requestResetMailButtonId+'" class="btn action large fit"><%= reset %></div>'," </div>","</div>"].join(""),resendMailFrame:['<div class="'+t.frameClass+' resend-mail">',' <div class="grid-row">',' <span class="message"><%= sentMessage %></span>',' <span class="message to-mail"></span>'," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginSwitchClass+'"><%= backLoginMessage %></span>',' <div id="'+t.resendResetMailButtonId+'" class="btn action large fit"><%= resend %></div>'," </div>","</div>"].join(""),resetPasswordFrame:['<div class="'+t.frameClass+' reset-password">',' <div class="grid inputs">',' <div class="grid-row">',' <input id="password1" class="form-element input-large husky-validate" type="password" placeholder="<%= password1Label %>"/>'," </div>",' <div class="grid-row">',' <input id="password2" class="form-element input-large husky-validate" type="password" placeholder="<%= password2Label %>"/>'," </div>"," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginRouteClass+'"><%= loginRouteMessage %></span>',' <div id="'+t.resetPasswordButtonId+'" class="btn action large fit"><%= login %></div>'," </div>","</div>"].join("")},r=function(){return i.call(this,"initialized")},i=function(e){return"sulu.login."+(this.options.instanceName?this.options.instanceName+".":"")+e};return{initialize:function(){this.options=this.sandbox.util.extend(!0,{},e,this.options),this.initProperties(),this.render(),this.bindDomEvents(),this.sandbox.emit(r.call(this))},initProperties:function(){this.dom={$mediaContainer:null,$contentContainer:null,$successOverlay:null,$loader:null,$mediaBackground:null,$contentBox:null,$frameSlider:null,$loginFrame:null,$forgotPasswordFrame:null,$resendMailFrame:null,$resetPasswordFrame:null,$loginButton:null,$loginForm:null,$forgotPasswordSwitch:null,$requestResetMailButton:null,$resendResetMailButton:null,$resetPasswordButton:null},this.resetMailUser=null},render:function(){this.sandbox.dom.addClass(this.$el,t.componentClass),this.renderMediaContainer(),this.renderContentContainer(),this.moveFrameSliderTo(this.sandbox.dom.find("."+t.frameClass,this.dom.$frameSlider)[0])},renderMediaContainer:function(){var e=this.sandbox.dom.createElement("<img/>");this.sandbox.dom.one(e,"load",this.showMediaBackground.bind(this)),this.sandbox.dom.attr(e,"src",this.options.backgroundImg),this.dom.$mediaContainer=this.sandbox.dom.createElement(n.mediaContainer),this.dom.$mediaBackground=this.sandbox.dom.find("."+t.mediaBackgroundClass,this.dom.$mediaContainer),this.sandbox.dom.css(this.dom.$mediaBackground,"background-image",'url("'+this.options.backgroundImg+'")'),this.sandbox.dom.append(this.$el,this.dom.$mediaContainer)},showMediaBackground:function(){this.sandbox.dom.removeClass(this.dom.$mediaContainer,t.mediaLoadingClass)},renderContentContainer:function(){this.dom.$contentContainer=this.sandbox.dom.createElement(this.sandbox.util.template(n.contentContainer)({backWebsiteMessage:this.sandbox.translate(this.options.translations.backWebsite)})),this.dom.$contentBox=this.sandbox.dom.find("."+t.contentBoxClass,this.dom.$contentContainer),this.dom.$frameSlider=this.sandbox.dom.find("."+t.frameSliderClass,this.dom.$contentContainer),this.dom.$successOverlay=this.sandbox.dom.find("."+t.successOverlayClass,this.dom.$contentContainer),this.options.resetMode===!1?(this.renderLoginFrame(),this.renderForgotPasswordFrame(),this.renderResendMailFrame()):this.renderResetPasswordFrame(),this.renderLoader(),this.sandbox.dom.append(this.$el,this.dom.$contentContainer)},renderLoginFrame:function(){this.dom.$loginFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.loginFrame.call(this))({emailUser:this.sandbox.translate(this.options.translations.emailUser),password:this.sandbox.translate(this.options.translations.password),forgotPasswordMessage:this.sandbox.translate(this.options.translations.forgotPassword),errorMessage:this.sandbox.translate(this.options.translations.errorMessage),login:this.sandbox.translate(this.options.translations.login)})),this.dom.$forgotPasswordSwitch=this.sandbox.dom.find("."+t.forgotPasswordSwitchClass,this.dom.$loginFrame),this.dom.$loginButton=this.sandbox.dom.find("#"+t.loginButtonId,this.dom.$loginFrame),this.dom.$loginForm=this.sandbox.dom.find("form",this.dom.$loginFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$loginFrame)},renderForgotPasswordFrame:function(){this.dom.$forgotPasswordFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.forgotPasswordFrame)({label:this.sandbox.translate(this.options.translations.resetPassword),reset:this.sandbox.translate(this.options.translations.reset),emailUser:this.sandbox.translate(this.options.translations.emailUser),backLoginMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$requestResetMailButton=this.sandbox.dom.find("#"+t.requestResetMailButtonId,this.dom.$forgotPasswordFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$forgotPasswordFrame)},renderResendMailFrame:function(){this.dom.$resendMailFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.resendMailFrame)({resend:this.sandbox.translate(this.options.translations.resendResetMail),sentMessage:this.sandbox.translate(this.options.translations.emailSent),backLoginMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$resendResetMailButton=this.sandbox.dom.find("#"+t.resendResetMailButtonId,this.dom.$resendMailFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$resendMailFrame)},renderResetPasswordFrame:function(){this.dom.$resetPasswordFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.resetPasswordFrame)({password1Label:this.sandbox.translate(this.options.translations.enterNewPassword),password2Label:this.sandbox.translate(this.options.translations.repeatPassword),password:this.sandbox.translate(this.options.translations.password),login:this.sandbox.translate(this.options.translations.login),backWebsiteMessage:this.sandbox.translate(this.options.translations.backWebsite),loginRouteMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$resetPasswordButton=this.sandbox.dom.find("#"+t.resetPasswordButtonId,this.dom.$resetPasswordFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$resetPasswordFrame)},renderLoader:function(){this.dom.$loader=this.sandbox.dom.createElement('<div class="'+t.loaderClass+'"/>'),this.sandbox.dom.append(this.dom.$contentContainer,this.dom.$loader),this.sandbox.start([{name:"loader@husky",options:{el:this.dom.$loader,size:"40px",color:"#fff"}}])},bindDomEvents:function(){this.bindGeneralDomEvents(),this.options.resetMode===!1?(this.bindLoginDomEvents(),this.bindForgotPasswordDomEvents(),this.bindResendMailDomEvents(),this.sandbox.dom.on(this.dom.$contentBox,"click",this.moveToLoginFrame.bind(this),"."+t.loginSwitchClass)):this.bindResetPasswordDomEvents()},bindGeneralDomEvents:function(){this.sandbox.dom.on(this.dom.$contentContainer,"click",this.redirectTo.bind(this,this.sandbox.dom.window.location.origin),"."+t.websiteSwitchClass)},bindLoginDomEvents:function(){this.sandbox.dom.on(this.dom.$loginForm,"keydown",this.inputFormKeyHandler.bind(this,this.dom.$loginForm)),this.sandbox.dom.on(this.dom.$forgotPasswordSwitch,"click",this.moveToForgotPasswordFrame.bind(this)),this.sandbox.dom.on(this.dom.$loginButton,"click",this.loginButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$loginFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$loginFrame),".husky-validate")},bindForgotPasswordDomEvents:function(){this.sandbox.dom.on(this.dom.$forgotPasswordFrame,"keydown",this.inputFormKeyHandler.bind(this,this.dom.$forgotPasswordFrame)),this.sandbox.dom.on(this.dom.$requestResetMailButton,"click",this.requestResetMailButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$forgotPasswordFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$forgotPasswordFrame),".husky-validate")},bindResendMailDomEvents:function(){this.sandbox.dom.on(this.dom.$resendResetMailButton,"click",this.resendResetMailButtonClickHandler.bind(this))},bindResetPasswordDomEvents:function(){this.sandbox.dom.on(this.dom.$resetPasswordButton,"click",this.resetPasswordButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$resetPasswordFrame,"keydown",this.inputFormKeyHandler.bind(this,this.dom.resetPasswordFrame)),this.sandbox.dom.on(this.sandbox.dom.find("."+t.loginRouteClass),"click",this.loginRouteClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$resetPasswordFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$resetPasswordFrame),".husky-validate")},loginButtonClickHandler:function(){var e=this.sandbox.dom.val(this.sandbox.dom.find("#username",this.dom.$loginForm)),t=this.sandbox.dom.val(this.sandbox.dom.find("#password",this.dom.$loginForm)),n=$("#_csrf_token").val();return e.length===0||t.length===0?this.displayLoginError():this.login(e,t,n),!1},validationInputChangeHandler:function(e,n){if(n.type==="keyup"&&n.keyCode===13)return!1;this.sandbox.dom.hasClass(e,t.errorClass)&&this.sandbox.dom.removeClass(e,t.errorClass)},loginRouteClickHandler:function(){this.redirectTo(this.options.loginUrl)},requestResetMailButtonClickHandler:function(){var e=this.sandbox.dom.trim(this.sandbox.dom.val(this.sandbox.dom.find("#user",this.dom.$forgotPasswordFrame)));this.requestResetMail(e)},resetPasswordButtonClickHandler:function(){var e=this.sandbox.dom.val(this.sandbox.dom.find("#password1",this.dom.$resetPasswordFrame)),n=this.sandbox.dom.val(this.sandbox.dom.find("#password2",this.dom.$resetPasswordFrame));if(e!==n||e.length===0)return this.sandbox.dom.addClass(this.dom.$resetPasswordFrame,t.errorClass),this.focusFirstInput(this.dom.$resetPasswordFrame),!1;this.resetPassword(e)},resendResetMailButtonClickHandler:function(){if(this.sandbox.dom.hasClass(this.dom.$resendResetMailButton,"inactive"))return!1;this.resendResetMail()},inputFormKeyHandler:function(e,t){if(t.keyCode===13){var n=this.sandbox.dom.find(".btn",e);this.sandbox.dom.click(n)}},login:function(e,t,n){this.showLoader(this.dom.$loginFrame),this.sandbox.util.save(this.options.loginCheck,"POST",{_username:e,_password:t,_csrf_token:n}).then(function(e){this.displaySuccessAndRedirect(e.url+this.sandbox.dom.window.location.hash)}.bind(this)).fail(function(){this.hideLoader(this.dom.$loginFrame),this.displayLoginError()}.bind(this))},displaySuccessAndRedirect:function(e){this.sandbox.dom.css(this.dom.$loader,"opacity","0"),this.sandbox.dom.css(this.dom.$successOverlay,"z-index","20"),this.sandbox.dom.addClass(this.$el,t.successClass),this.sandbox.util.delay(this.redirectTo.bind(this,e),800)},requestResetMail:function(e){this.showLoader(this.dom.$forgotPasswordFrame),this.sandbox.util.save(this.options.resetMailUrl,"POST",{user:e}).then(function(t){this.resetMailUser=e,this.hideLoader(this.dom.$forgotPasswordFrame),this.showEmailSentLabel()}.bind(this)).fail(function(e){this.hideLoader(this.dom.$forgotPasswordFrame),this.displayRequestResetMailError(e.responseJSON.code)}.bind(this))},resetPassword:function(e){this.showLoader(this.dom.$resetPasswordFrame),this.sandbox.util.save(this.options.resetUrl,"POST",{password:e,token:this.options.resetToken}).then(function(e){this.displaySuccessAndRedirect(e.url)}.bind(this)).fail(function(e){this.hideLoader(this.dom.$resetPasswordFrame),this.displayResetPasswordError(e.responseJSON.code)}.bind(this))},resendResetMail:function(){this.showLoader(this.dom.$resendMailFrame),this.sandbox.util.save(this.options.resendUrl,"POST",{user:this.resetMailUser}).then(function(){this.hideLoader(this.dom.$resendMailFrame),this.showEmailSentLabel()}.bind(this)).fail(function(e){this.hideLoader(this.dom.$resendMailFrame),this.displayResendResetMailError(e.responseJSON.code)}.bind(this))},showLoader:function(e){if(this.sandbox.dom.hasClass(e,t.contentLoadingClass))return!1;var n=this.sandbox.dom.find(".btn",e);this.sandbox.dom.after(n,this.dom.$loader),this.sandbox.dom.css(this.dom.$loader,"width",this.sandbox.dom.css(n,"width")),this.sandbox.dom.addClass(e,t.contentLoadingClass)},hideLoader:function(e){this.sandbox.dom.removeClass(e,t.contentLoadingClass)},showEmailSentLabel:function(){this.sandbox.emit("sulu.labels.success.show",this.options.translations.emailSentSuccess,"labels.success")},displayLoginError:function(){this.sandbox.dom.addClass(this.dom.$loginFrame,t.errorClass),this.focusFirstInput(this.dom.$loginFrame)},displayRequestResetMailError:function(e){var n=this.options.errorTranslations[e]||"Error";this.sandbox.dom.html(this.sandbox.dom.find("."+t.errorMessageClass,this.dom.$forgotPasswordFrame),this.sandbox.translate(n)),this.sandbox.dom.addClass(this.dom.$forgotPasswordFrame,t.errorClass),this.focusFirstInput(this.dom.$forgotPasswordFrame)},displayResendResetMailError:function(e){var t=this.options.errorTranslations[e]||"Error";this.sandbox.emit("sulu.labels.error.show",this.sandbox.translate(t),"labels.error"),this.sandbox.dom.addClass(this.dom.$resendResetMailButton,"inactive")},displayResetPasswordError:function(e){var t=this.options.errorTranslations[e]||"Error";this.sandbox.emit("sulu.labels.error.show",this.sandbox.translate(t),"labels.error"),this.focusFirstInput(this.dom.$forgotPasswordFrame)},redirectTo:function(e){this.sandbox.dom.window.location=e},moveToForgotPasswordFrame:function(){this.moveFrameSliderTo(this.dom.$forgotPasswordFrame)},moveToResendMailFrame:function(e){this.sandbox.dom.html(this.sandbox.dom.find(".to-mail",this.dom.$resendMailFrame),e),this.moveFrameSliderTo(this.dom.$resendMailFrame)},moveToLoginFrame:function(){this.moveFrameSliderTo(this.dom.$loginFrame)},moveFrameSliderTo:function(e){this.sandbox.dom.one(this.$el,"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){this.focusFirstInput(e)}.bind(this)),this.sandbox.dom.css(this.dom.$frameSlider,"left",-this.sandbox.dom.position(e).left+"px")},focusFirstInput:function(e){if(this.sandbox.dom.find("input",e).length<1)return!1;var t=this.sandbox.dom.find("input",e)[0];this.sandbox.dom.select(t),t.setSelectionRange(this.sandbox.dom.val(t).length,this.sandbox.dom.val(t).length)}}}); \ No newline at end of file +require.config({waitSeconds:0,paths:{suluadmin:"../../suluadmin/js",main:"login",cultures:"vendor/globalize/cultures","aura_extensions/backbone-relational":"aura_extensions/backbone-relational",husky:"vendor/husky/husky","__component__$login@suluadmin":"components/login/main"},include:["aura_extensions/backbone-relational","__component__$login@suluadmin"],exclude:["husky"],urlArgs:"v=1634826923308"}),define("underscore",[],function(){return window._}),require(["husky"],function(e){"use strict";var t,n=SULU.translations,r=SULU.fallbackLocale;t=window.navigator.languages?window.navigator.languages[0]:null,t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t=t.slice(0,2).toLowerCase(),n.indexOf(t)===-1&&(t=r),require(["text!/admin/translations/sulu."+t+".json","text!/admin/translations/sulu."+r+".json"],function(n,r){var i=JSON.parse(n),s=JSON.parse(r),o=new e({debug:{enable:!!SULU.debug},culture:{name:t,messages:i,defaultMessages:s}});o.use("aura_extensions/backbone-relational"),o.components.addSource("suluadmin","/bundles/suluadmin/js/components"),o.start(),window.app=o})}),define("main",function(){}),function(e,t){typeof define=="function"&&define.amd?define("vendor/backbone-relational/backbone-relational",["exports","backbone","underscore"],t):typeof exports!="undefined"?t(exports,require("backbone"),require("underscore")):t(e,e.Backbone,e._)}(this,function(e,t,n){"use strict";t.Relational={showWarnings:!0},t.Semaphore={_permitsAvailable:null,_permitsUsed:0,acquire:function(){if(this._permitsAvailable&&this._permitsUsed>=this._permitsAvailable)throw new Error("Max permits acquired");this._permitsUsed++},release:function(){if(this._permitsUsed===0)throw new Error("All permits released");this._permitsUsed--},isLocked:function(){return this._permitsUsed>0},setAvailablePermits:function(e){if(this._permitsUsed>e)throw new Error("Available permits cannot be less than used permits");this._permitsAvailable=e}},t.BlockingQueue=function(){this._queue=[]},n.extend(t.BlockingQueue.prototype,t.Semaphore,{_queue:null,add:function(e){this.isBlocked()?this._queue.push(e):e()},process:function(){var e=this._queue;this._queue=[];while(e&&e.length)e.shift()()},block:function(){this.acquire()},unblock:function(){this.release(),this.isBlocked()||this.process()},isBlocked:function(){return this.isLocked()}}),t.Relational.eventQueue=new t.BlockingQueue,t.Store=function(){this._collections=[],this._reverseRelations=[],this._orphanRelations=[],this._subModels=[],this._modelScopes=[e]},n.extend(t.Store.prototype,t.Events,{initializeRelation:function(e,r,i){var s=n.isString(r.type)?t[r.type]||this.getObjectByName(r.type):r.type;s&&s.prototype instanceof t.Relation?new s(e,r,i):t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; missing or invalid relation type!",r)},addModelScope:function(e){this._modelScopes.push(e)},removeModelScope:function(e){this._modelScopes=n.without(this._modelScopes,e)},addSubModels:function(e,t){this._subModels.push({superModelType:t,subModels:e})},setupSuperModel:function(e){n.find(this._subModels,function(t){return n.filter(t.subModels||[],function(n,r){var i=this.getObjectByName(n);if(e===i)return t.superModelType._subModels[r]=e,e._superModel=t.superModelType,e._subModelTypeValue=r,e._subModelTypeAttribute=t.superModelType.prototype.subModelTypeAttribute,!0},this).length},this)},addReverseRelation:function(e){var t=n.any(this._reverseRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&(this._reverseRelations.push(e),this._addRelation(e.model,e),this.retroFitRelation(e))},addOrphanRelation:function(e){var t=n.any(this._orphanRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&this._orphanRelations.push(e)},processOrphanRelations:function(){n.each(this._orphanRelations.slice(0),function(e){var r=t.Relational.store.getObjectByName(e.relatedModel);r&&(this.initializeRelation(null,e),this._orphanRelations=n.without(this._orphanRelations,e))},this)},_addRelation:function(e,t){e.prototype.relations||(e.prototype.relations=[]),e.prototype.relations.push(t),n.each(e._subModels||[],function(e){this._addRelation(e,t)},this)},retroFitRelation:function(e){var t=this.getCollection(e.model,!1);t&&t.each(function(t){if(!(t instanceof e.model))return;new e.type(t,e)},this)},getCollection:function(e,r){e instanceof t.RelationalModel&&(e=e.constructor);var i=e;while(i._superModel)i=i._superModel;var s=n.find(this._collections,function(e){return e.model===i});return!s&&r!==!1&&(s=this._createCollection(i)),s},getObjectByName:function(e){var t=e.split("."),r=null;return n.find(this._modelScopes,function(e){r=n.reduce(t||[],function(e,t){return e?e[t]:undefined},e);if(r&&r!==e)return!0},this),r},_createCollection:function(e){var n;return e instanceof t.RelationalModel&&(e=e.constructor),e.prototype instanceof t.RelationalModel&&(n=new t.Collection,n.model=e,this._collections.push(n)),n},resolveIdForItem:function(e,r){var i=n.isString(r)||n.isNumber(r)?r:null;return i===null&&(r instanceof t.RelationalModel?i=r.id:n.isObject(r)&&(i=r[e.prototype.idAttribute])),!i&&i!==0&&(i=null),i},find:function(e,t){var n=this.resolveIdForItem(e,t),r=this.getCollection(e);if(r){var i=r.get(n);if(i instanceof e)return i}return null},register:function(e){var t=this.getCollection(e);if(t){var n=e.collection;t.add(e),e.collection=n}},checkId:function(e,n){var r=this.getCollection(e),i=r&&r.get(n);if(i&&e!==i)throw t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Duplicate id! Old RelationalModel=%o, new RelationalModel=%o",i,e),new Error("Cannot instantiate more than one Backbone.RelationalModel with the same id per type!")},update:function(e){var t=this.getCollection(e);t.contains(e)||this.register(e),t._onModelEvent("change:"+e.idAttribute,e,t),e.trigger("relational:change:id",e,t)},unregister:function(e){var r,i;e instanceof t.Model?(r=this.getCollection(e),i=[e]):e instanceof t.Collection?(r=this.getCollection(e.model),i=n.clone(e.models)):(r=this.getCollection(e),i=n.clone(r.models)),n.each(i,function(e){this.stopListening(e),n.invoke(e.getRelations(),"stopListening")},this),n.contains(this._collections,e)?r.reset([]):n.each(i,function(e){r.get(e)?r.remove(e):r.trigger("relational:remove",e,r)},this)},reset:function(){this.stopListening(),n.each(this._collections,function(e){this.unregister(e)},this),this._collections=[],this._subModels=[],this._modelScopes=[e]}}),t.Relational.store=new t.Store,t.Relation=function(e,r,i){this.instance=e,r=n.isObject(r)?r:{},this.reverseRelation=n.defaults(r.reverseRelation||{},this.options.reverseRelation),this.options=n.defaults(r,this.options,t.Relation.prototype.options),this.reverseRelation.type=n.isString(this.reverseRelation.type)?t[this.reverseRelation.type]||t.Relational.store.getObjectByName(this.reverseRelation.type):this.reverseRelation.type,this.key=this.options.key,this.keySource=this.options.keySource||this.key,this.keyDestination=this.options.keyDestination||this.keySource||this.key,this.model=this.options.model||this.instance.constructor,this.relatedModel=this.options.relatedModel,n.isFunction(this.relatedModel)&&!(this.relatedModel.prototype instanceof t.RelationalModel)&&(this.relatedModel=n.result(this,"relatedModel")),n.isString(this.relatedModel)&&(this.relatedModel=t.Relational.store.getObjectByName(this.relatedModel));if(!this.checkPreconditions())return;!this.options.isAutoRelation&&this.reverseRelation.type&&this.reverseRelation.key&&t.Relational.store.addReverseRelation(n.defaults({isAutoRelation:!0,model:this.relatedModel,relatedModel:this.model,reverseRelation:this.options},this.reverseRelation));if(e){var s=this.keySource;s!==this.key&&typeof this.instance.get(this.key)=="object"&&(s=this.key),this.setKeyContents(this.instance.get(s)),this.relatedCollection=t.Relational.store.getCollection(this.relatedModel),this.keySource!==this.key&&delete this.instance.attributes[this.keySource],this.instance._relations[this.key]=this,this.initialize(i),this.options.autoFetch&&this.instance.fetchRelated(this.key,n.isObject(this.options.autoFetch)?this.options.autoFetch:{}),this.listenTo(this.instance,"destroy",this.destroy).listenTo(this.relatedCollection,"relational:add relational:change:id",this.tryAddRelated).listenTo(this.relatedCollection,"relational:remove",this.removeRelated)}},t.Relation.extend=t.Model.extend,n.extend(t.Relation.prototype,t.Events,t.Semaphore,{options:{createModels:!0,includeInJSON:!0,isAutoRelation:!1,autoFetch:!1,parse:!1},instance:null,key:null,keyContents:null,relatedModel:null,relatedCollection:null,reverseRelation:null,related:null,checkPreconditions:function(){var e=this.instance,r=this.key,i=this.model,s=this.relatedModel,o=t.Relational.showWarnings&&typeof console!="undefined";if(!i||!r||!s)return o&&console.warn("Relation=%o: missing model, key or relatedModel (%o, %o, %o).",this,i,r,s),!1;if(i.prototype instanceof t.RelationalModel){if(s.prototype instanceof t.RelationalModel){if(this instanceof t.HasMany&&this.reverseRelation.type===t.HasMany)return o&&console.warn("Relation=%o: relation is a HasMany, and the reverseRelation is HasMany as well.",this),!1;if(e&&n.keys(e._relations).length){var u=n.find(e._relations,function(e){return e.key===r},this);if(u)return o&&console.warn("Cannot create relation=%o on %o for model=%o: already taken by relation=%o.",this,r,e,u),!1}return!0}return o&&console.warn("Relation=%o: relatedModel does not inherit from Backbone.RelationalModel (%o).",this,s),!1}return o&&console.warn("Relation=%o: model does not inherit from Backbone.RelationalModel (%o).",this,e),!1},setRelated:function(e){this.related=e,this.instance.attributes[this.key]=e},_isReverseRelation:function(e){return e.instance instanceof this.relatedModel&&this.reverseRelation.key===e.key&&this.key===e.reverseRelation.key},getReverseRelations:function(e){var t=[],r=n.isUndefined(e)?this.related&&(this.related.models||[this.related]):[e];return n.each(r||[],function(e){n.each(e.getRelations()||[],function(e){this._isReverseRelation(e)&&t.push(e)},this)},this),t},destroy:function(){this.stopListening(),this instanceof t.HasOne?this.setRelated(null):this instanceof t.HasMany&&this.setRelated(this._prepareCollection()),n.each(this.getReverseRelations(),function(e){e.removeRelated(this.instance)},this)}}),t.HasOne=t.Relation.extend({options:{reverseRelation:{type:"HasMany"}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange);var t=this.findRelated(e);this.setRelated(t),n.each(this.getReverseRelations(),function(t){t.addRelated(this.instance,e)},this)},findRelated:function(e){var t=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof this.relatedModel)t=this.keyContents;else if(this.keyContents||this.keyContents===0){var r=n.defaults({create:this.options.createModels},e);t=this.relatedModel.findOrCreate(this.keyContents,r)}return t&&(this.keyId=null),t},setKeyContents:function(e){this.keyContents=e,this.keyId=t.Relational.store.resolveIdForItem(this.relatedModel,this.keyContents)},onChange:function(e,r,i){if(this.isLocked())return;this.acquire(),i=i?n.clone(i):{};var s=n.isUndefined(i.__related),o=s?this.related:i.__related;if(s){this.setKeyContents(r);var u=this.findRelated(i);this.setRelated(u)}o&&this.related!==o&&n.each(this.getReverseRelations(o),function(e){e.removeRelated(this.instance,null,i)},this),n.each(this.getReverseRelations(),function(e){e.addRelated(this.instance,i)},this);if(!i.silent&&this.related!==o){var a=this;this.changed=!0,t.Relational.eventQueue.add(function(){a.instance.trigger("change:"+a.key,a.instance,a.related,i,!0),a.changed=!1})}this.release()},tryAddRelated:function(e,t,n){(this.keyId||this.keyId===0)&&e.id===this.keyId&&(this.addRelated(e,n),this.keyId=null)},addRelated:function(e,t){var r=this;e.queue(function(){if(e!==r.related){var i=r.related||null;r.setRelated(e),r.onChange(r.instance,e,n.defaults({__related:i},t))}})},removeRelated:function(e,t,r){if(!this.related)return;if(e===this.related){var i=this.related||null;this.setRelated(null),this.onChange(this.instance,e,n.defaults({__related:i},r))}}}),t.HasMany=t.Relation.extend({collectionType:null,options:{reverseRelation:{type:"HasOne"},collectionType:t.Collection,collectionKey:!0,collectionOptions:{}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange),this.collectionType=this.options.collectionType,n.isFunction(this.collectionType)&&this.collectionType!==t.Collection&&!(this.collectionType.prototype instanceof t.Collection)&&(this.collectionType=n.result(this,"collectionType")),n.isString(this.collectionType)&&(this.collectionType=t.Relational.store.getObjectByName(this.collectionType));if(!(this.collectionType===t.Collection||this.collectionType.prototype instanceof t.Collection))throw new Error("`collectionType` must inherit from Backbone.Collection");var r=this.findRelated(e);this.setRelated(r)},_prepareCollection:function(e){this.related&&this.stopListening(this.related);if(!e||!(e instanceof t.Collection)){var r=n.isFunction(this.options.collectionOptions)?this.options.collectionOptions(this.instance):this.options.collectionOptions;e=new this.collectionType(null,r)}e.model=this.relatedModel;if(this.options.collectionKey){var i=this.options.collectionKey===!0?this.options.reverseRelation.key:this.options.collectionKey;e[i]&&e[i]!==this.instance?t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; collectionKey=%s already exists on collection=%o",this,i,this.options.collectionKey):i&&(e[i]=this.instance)}return this.listenTo(e,"relational:add",this.handleAddition).listenTo(e,"relational:remove",this.handleRemoval).listenTo(e,"relational:reset",this.handleReset),e},findRelated:function(e){var r=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof t.Collection)this._prepareCollection(this.keyContents),r=this.keyContents;else{var i=[];n.each(this.keyContents,function(t){if(t instanceof this.relatedModel)var r=t;else r=this.relatedModel.findOrCreate(t,n.extend({merge:!0},e,{create:this.options.createModels}));r&&i.push(r)},this),this.related instanceof t.Collection?r=this.related:r=this._prepareCollection(),r.set(i,n.defaults({merge:!1,parse:!1},e))}return this.keyIds=n.difference(this.keyIds,n.pluck(r.models,"id")),r},setKeyContents:function(e){this.keyContents=e instanceof t.Collection?e:null,this.keyIds=[],!this.keyContents&&(e||e===0)&&(this.keyContents=n.isArray(e)?e:[e],n.each(this.keyContents,function(e){var n=t.Relational.store.resolveIdForItem(this.relatedModel,e);(n||n===0)&&this.keyIds.push(n)},this))},onChange:function(e,r,i){i=i?n.clone(i):{},this.setKeyContents(r),this.changed=!1;var s=this.findRelated(i);this.setRelated(s);if(!i.silent){var o=this;t.Relational.eventQueue.add(function(){o.changed&&(o.instance.trigger("change:"+o.key,o.instance,o.related,i,!0),o.changed=!1)})}},handleAddition:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.addRelated(this.instance,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("add:"+s.key,e,s.related,i)})},handleRemoval:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.removeRelated(this.instance,null,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("remove:"+s.key,e,s.related,i)})},handleReset:function(e,r){var i=this;r=r?n.clone(r):{},!r.silent&&t.Relational.eventQueue.add(function(){i.instance.trigger("reset:"+i.key,i.related,r)})},tryAddRelated:function(e,t,r){var i=n.contains(this.keyIds,e.id);i&&(this.addRelated(e,r),this.keyIds=n.without(this.keyIds,e.id))},addRelated:function(e,t){var r=this;e.queue(function(){r.related&&!r.related.get(e)&&r.related.add(e,n.defaults({parse:!1},t))})},removeRelated:function(e,t,n){this.related.get(e)&&this.related.remove(e,n)}}),t.RelationalModel=t.Model.extend({relations:null,_relations:null,_isInitialized:!1,_deferProcessing:!1,_queue:null,_attributeChangeFired:!1,subModelTypeAttribute:"type",subModelTypes:null,constructor:function(e,r){if(r&&r.collection){var i=this,s=this.collection=r.collection;delete r.collection,this._deferProcessing=!0;var o=function(e){e===i&&(i._deferProcessing=!1,i.processQueue(),s.off("relational:add",o))};s.on("relational:add",o),n.defer(function(){o(i)})}t.Relational.store.processOrphanRelations(),t.Relational.store.listenTo(this,"relational:unregister",t.Relational.store.unregister),this._queue=new t.BlockingQueue,this._queue.block(),t.Relational.eventQueue.block();try{t.Model.apply(this,arguments)}finally{t.Relational.eventQueue.unblock()}},trigger:function(e){if(e.length>5&&e.indexOf("change")===0){var n=this,r=arguments;t.Relational.eventQueue.isLocked()?t.Relational.eventQueue.add(function(){var i=!0;if(e==="change")i=n.hasChanged()||n._attributeChangeFired,n._attributeChangeFired=!1;else{var s=e.slice(7),o=n.getRelation(s);o?(i=r[4]===!0,i?n.changed[s]=r[2]:o.changed||delete n.changed[s]):i&&(n._attributeChangeFired=!0)}i&&t.Model.prototype.trigger.apply(n,r)}):t.Model.prototype.trigger.apply(n,r)}else e==="destroy"?(t.Model.prototype.trigger.apply(this,arguments),t.Relational.store.unregister(this)):t.Model.prototype.trigger.apply(this,arguments);return this},initializeRelations:function(e){this.acquire(),this._relations={},n.each(this.relations||[],function(n){t.Relational.store.initializeRelation(this,n,e)},this),this._isInitialized=!0,this.release(),this.processQueue()},updateRelations:function(e,t){this._isInitialized&&!this.isLocked()&&n.each(this._relations,function(n){if(!e||n.keySource in e||n.key in e){var r=this.attributes[n.keySource]||this.attributes[n.key],i=e&&(e[n.keySource]||e[n.key]);(n.related!==r||r===null&&i===null)&&this.trigger("relational:change:"+n.key,this,r,t||{})}n.keySource!==n.key&&delete this.attributes[n.keySource]},this)},queue:function(e){this._queue.add(e)},processQueue:function(){this._isInitialized&&!this._deferProcessing&&this._queue.isBlocked()&&this._queue.unblock()},getRelation:function(e){return this._relations[e]},getRelations:function(){return n.values(this._relations)},fetchRelated:function(e,r,i){r=n.extend({update:!0,remove:!1},r);var s,o,u=[],a=this.getRelation(e),f=a&&(a.keyIds&&a.keyIds.slice(0)||(a.keyId||a.keyId===0?[a.keyId]:[]));i&&(s=a.related instanceof t.Collection?a.related.models:[a.related],n.each(s,function(e){(e.id||e.id===0)&&f.push(e.id)}));if(f&&f.length){var l=[];s=n.map(f,function(e){var t=a.relatedModel.findModel(e);if(!t){var n={};n[a.relatedModel.prototype.idAttribute]=e,t=a.relatedModel.findOrCreate(n,r),l.push(t)}return t},this),a.related instanceof t.Collection&&n.isFunction(a.related.url)&&(o=a.related.url(s));if(o&&o!==a.related.url()){var c=n.defaults({error:function(){var e=arguments;n.each(l,function(t){t.trigger("destroy",t,t.collection,r),r.error&&r.error.apply(t,e)})},url:o},r);u=[a.related.fetch(c)]}else u=n.map(s,function(e){var t=n.defaults({error:function(){n.contains(l,e)&&(e.trigger("destroy",e,e.collection,r),r.error&&r.error.apply(e,arguments))}},r);return e.fetch(t)},this)}return u},get:function(e){var r=t.Model.prototype.get.call(this,e);if(!this.dotNotation||e.indexOf(".")===-1)return r;var i=e.split("."),s=n.reduce(i,function(e,r){if(n.isNull(e)||n.isUndefined(e))return undefined;if(e instanceof t.Model)return t.Model.prototype.get.call(e,r);if(e instanceof t.Collection)return t.Collection.prototype.at.call(e,r);throw new Error("Attribute must be an instanceof Backbone.Model or Backbone.Collection. Is: "+e+", currentSplit: "+r)},this);if(r!==undefined&&s!==undefined)throw new Error("Ambiguous result for '"+e+"'. direct result: "+r+", dotNotation: "+s);return r||s},set:function(e,r,i){t.Relational.eventQueue.block();var s;n.isObject(e)||e==null?(s=e,i=r ... [truncated]
src/Sulu/Bundle/AdminBundle/Resources/public/dist/login.min.js+1 −1 modified@@ -1 +1 @@ -require.config({waitSeconds:0,paths:{suluadmin:"../../suluadmin/js",main:"login",cultures:"vendor/globalize/cultures","aura_extensions/backbone-relational":"aura_extensions/backbone-relational",husky:"vendor/husky/husky","__component__$login@suluadmin":"components/login/main"},include:["aura_extensions/backbone-relational","__component__$login@suluadmin"],exclude:["husky"],urlArgs:"v=1614246819288"}),define("underscore",[],function(){return window._}),require(["husky"],function(e){"use strict";var t,n=SULU.translations,r=SULU.fallbackLocale;t=window.navigator.languages?window.navigator.languages[0]:null,t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t=t.slice(0,2).toLowerCase(),n.indexOf(t)===-1&&(t=r),require(["text!/admin/translations/sulu."+t+".json","text!/admin/translations/sulu."+r+".json"],function(n,r){var i=JSON.parse(n),s=JSON.parse(r),o=new e({debug:{enable:!!SULU.debug},culture:{name:t,messages:i,defaultMessages:s}});o.use("aura_extensions/backbone-relational"),o.components.addSource("suluadmin","/bundles/suluadmin/js/components"),o.start(),window.app=o})}),define("main",function(){}),function(e,t){typeof define=="function"&&define.amd?define("vendor/backbone-relational/backbone-relational",["exports","backbone","underscore"],t):typeof exports!="undefined"?t(exports,require("backbone"),require("underscore")):t(e,e.Backbone,e._)}(this,function(e,t,n){"use strict";t.Relational={showWarnings:!0},t.Semaphore={_permitsAvailable:null,_permitsUsed:0,acquire:function(){if(this._permitsAvailable&&this._permitsUsed>=this._permitsAvailable)throw new Error("Max permits acquired");this._permitsUsed++},release:function(){if(this._permitsUsed===0)throw new Error("All permits released");this._permitsUsed--},isLocked:function(){return this._permitsUsed>0},setAvailablePermits:function(e){if(this._permitsUsed>e)throw new Error("Available permits cannot be less than used permits");this._permitsAvailable=e}},t.BlockingQueue=function(){this._queue=[]},n.extend(t.BlockingQueue.prototype,t.Semaphore,{_queue:null,add:function(e){this.isBlocked()?this._queue.push(e):e()},process:function(){var e=this._queue;this._queue=[];while(e&&e.length)e.shift()()},block:function(){this.acquire()},unblock:function(){this.release(),this.isBlocked()||this.process()},isBlocked:function(){return this.isLocked()}}),t.Relational.eventQueue=new t.BlockingQueue,t.Store=function(){this._collections=[],this._reverseRelations=[],this._orphanRelations=[],this._subModels=[],this._modelScopes=[e]},n.extend(t.Store.prototype,t.Events,{initializeRelation:function(e,r,i){var s=n.isString(r.type)?t[r.type]||this.getObjectByName(r.type):r.type;s&&s.prototype instanceof t.Relation?new s(e,r,i):t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; missing or invalid relation type!",r)},addModelScope:function(e){this._modelScopes.push(e)},removeModelScope:function(e){this._modelScopes=n.without(this._modelScopes,e)},addSubModels:function(e,t){this._subModels.push({superModelType:t,subModels:e})},setupSuperModel:function(e){n.find(this._subModels,function(t){return n.filter(t.subModels||[],function(n,r){var i=this.getObjectByName(n);if(e===i)return t.superModelType._subModels[r]=e,e._superModel=t.superModelType,e._subModelTypeValue=r,e._subModelTypeAttribute=t.superModelType.prototype.subModelTypeAttribute,!0},this).length},this)},addReverseRelation:function(e){var t=n.any(this._reverseRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&(this._reverseRelations.push(e),this._addRelation(e.model,e),this.retroFitRelation(e))},addOrphanRelation:function(e){var t=n.any(this._orphanRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&this._orphanRelations.push(e)},processOrphanRelations:function(){n.each(this._orphanRelations.slice(0),function(e){var r=t.Relational.store.getObjectByName(e.relatedModel);r&&(this.initializeRelation(null,e),this._orphanRelations=n.without(this._orphanRelations,e))},this)},_addRelation:function(e,t){e.prototype.relations||(e.prototype.relations=[]),e.prototype.relations.push(t),n.each(e._subModels||[],function(e){this._addRelation(e,t)},this)},retroFitRelation:function(e){var t=this.getCollection(e.model,!1);t&&t.each(function(t){if(!(t instanceof e.model))return;new e.type(t,e)},this)},getCollection:function(e,r){e instanceof t.RelationalModel&&(e=e.constructor);var i=e;while(i._superModel)i=i._superModel;var s=n.find(this._collections,function(e){return e.model===i});return!s&&r!==!1&&(s=this._createCollection(i)),s},getObjectByName:function(e){var t=e.split("."),r=null;return n.find(this._modelScopes,function(e){r=n.reduce(t||[],function(e,t){return e?e[t]:undefined},e);if(r&&r!==e)return!0},this),r},_createCollection:function(e){var n;return e instanceof t.RelationalModel&&(e=e.constructor),e.prototype instanceof t.RelationalModel&&(n=new t.Collection,n.model=e,this._collections.push(n)),n},resolveIdForItem:function(e,r){var i=n.isString(r)||n.isNumber(r)?r:null;return i===null&&(r instanceof t.RelationalModel?i=r.id:n.isObject(r)&&(i=r[e.prototype.idAttribute])),!i&&i!==0&&(i=null),i},find:function(e,t){var n=this.resolveIdForItem(e,t),r=this.getCollection(e);if(r){var i=r.get(n);if(i instanceof e)return i}return null},register:function(e){var t=this.getCollection(e);if(t){var n=e.collection;t.add(e),e.collection=n}},checkId:function(e,n){var r=this.getCollection(e),i=r&&r.get(n);if(i&&e!==i)throw t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Duplicate id! Old RelationalModel=%o, new RelationalModel=%o",i,e),new Error("Cannot instantiate more than one Backbone.RelationalModel with the same id per type!")},update:function(e){var t=this.getCollection(e);t.contains(e)||this.register(e),t._onModelEvent("change:"+e.idAttribute,e,t),e.trigger("relational:change:id",e,t)},unregister:function(e){var r,i;e instanceof t.Model?(r=this.getCollection(e),i=[e]):e instanceof t.Collection?(r=this.getCollection(e.model),i=n.clone(e.models)):(r=this.getCollection(e),i=n.clone(r.models)),n.each(i,function(e){this.stopListening(e),n.invoke(e.getRelations(),"stopListening")},this),n.contains(this._collections,e)?r.reset([]):n.each(i,function(e){r.get(e)?r.remove(e):r.trigger("relational:remove",e,r)},this)},reset:function(){this.stopListening(),n.each(this._collections,function(e){this.unregister(e)},this),this._collections=[],this._subModels=[],this._modelScopes=[e]}}),t.Relational.store=new t.Store,t.Relation=function(e,r,i){this.instance=e,r=n.isObject(r)?r:{},this.reverseRelation=n.defaults(r.reverseRelation||{},this.options.reverseRelation),this.options=n.defaults(r,this.options,t.Relation.prototype.options),this.reverseRelation.type=n.isString(this.reverseRelation.type)?t[this.reverseRelation.type]||t.Relational.store.getObjectByName(this.reverseRelation.type):this.reverseRelation.type,this.key=this.options.key,this.keySource=this.options.keySource||this.key,this.keyDestination=this.options.keyDestination||this.keySource||this.key,this.model=this.options.model||this.instance.constructor,this.relatedModel=this.options.relatedModel,n.isFunction(this.relatedModel)&&!(this.relatedModel.prototype instanceof t.RelationalModel)&&(this.relatedModel=n.result(this,"relatedModel")),n.isString(this.relatedModel)&&(this.relatedModel=t.Relational.store.getObjectByName(this.relatedModel));if(!this.checkPreconditions())return;!this.options.isAutoRelation&&this.reverseRelation.type&&this.reverseRelation.key&&t.Relational.store.addReverseRelation(n.defaults({isAutoRelation:!0,model:this.relatedModel,relatedModel:this.model,reverseRelation:this.options},this.reverseRelation));if(e){var s=this.keySource;s!==this.key&&typeof this.instance.get(this.key)=="object"&&(s=this.key),this.setKeyContents(this.instance.get(s)),this.relatedCollection=t.Relational.store.getCollection(this.relatedModel),this.keySource!==this.key&&delete this.instance.attributes[this.keySource],this.instance._relations[this.key]=this,this.initialize(i),this.options.autoFetch&&this.instance.fetchRelated(this.key,n.isObject(this.options.autoFetch)?this.options.autoFetch:{}),this.listenTo(this.instance,"destroy",this.destroy).listenTo(this.relatedCollection,"relational:add relational:change:id",this.tryAddRelated).listenTo(this.relatedCollection,"relational:remove",this.removeRelated)}},t.Relation.extend=t.Model.extend,n.extend(t.Relation.prototype,t.Events,t.Semaphore,{options:{createModels:!0,includeInJSON:!0,isAutoRelation:!1,autoFetch:!1,parse:!1},instance:null,key:null,keyContents:null,relatedModel:null,relatedCollection:null,reverseRelation:null,related:null,checkPreconditions:function(){var e=this.instance,r=this.key,i=this.model,s=this.relatedModel,o=t.Relational.showWarnings&&typeof console!="undefined";if(!i||!r||!s)return o&&console.warn("Relation=%o: missing model, key or relatedModel (%o, %o, %o).",this,i,r,s),!1;if(i.prototype instanceof t.RelationalModel){if(s.prototype instanceof t.RelationalModel){if(this instanceof t.HasMany&&this.reverseRelation.type===t.HasMany)return o&&console.warn("Relation=%o: relation is a HasMany, and the reverseRelation is HasMany as well.",this),!1;if(e&&n.keys(e._relations).length){var u=n.find(e._relations,function(e){return e.key===r},this);if(u)return o&&console.warn("Cannot create relation=%o on %o for model=%o: already taken by relation=%o.",this,r,e,u),!1}return!0}return o&&console.warn("Relation=%o: relatedModel does not inherit from Backbone.RelationalModel (%o).",this,s),!1}return o&&console.warn("Relation=%o: model does not inherit from Backbone.RelationalModel (%o).",this,e),!1},setRelated:function(e){this.related=e,this.instance.attributes[this.key]=e},_isReverseRelation:function(e){return e.instance instanceof this.relatedModel&&this.reverseRelation.key===e.key&&this.key===e.reverseRelation.key},getReverseRelations:function(e){var t=[],r=n.isUndefined(e)?this.related&&(this.related.models||[this.related]):[e];return n.each(r||[],function(e){n.each(e.getRelations()||[],function(e){this._isReverseRelation(e)&&t.push(e)},this)},this),t},destroy:function(){this.stopListening(),this instanceof t.HasOne?this.setRelated(null):this instanceof t.HasMany&&this.setRelated(this._prepareCollection()),n.each(this.getReverseRelations(),function(e){e.removeRelated(this.instance)},this)}}),t.HasOne=t.Relation.extend({options:{reverseRelation:{type:"HasMany"}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange);var t=this.findRelated(e);this.setRelated(t),n.each(this.getReverseRelations(),function(t){t.addRelated(this.instance,e)},this)},findRelated:function(e){var t=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof this.relatedModel)t=this.keyContents;else if(this.keyContents||this.keyContents===0){var r=n.defaults({create:this.options.createModels},e);t=this.relatedModel.findOrCreate(this.keyContents,r)}return t&&(this.keyId=null),t},setKeyContents:function(e){this.keyContents=e,this.keyId=t.Relational.store.resolveIdForItem(this.relatedModel,this.keyContents)},onChange:function(e,r,i){if(this.isLocked())return;this.acquire(),i=i?n.clone(i):{};var s=n.isUndefined(i.__related),o=s?this.related:i.__related;if(s){this.setKeyContents(r);var u=this.findRelated(i);this.setRelated(u)}o&&this.related!==o&&n.each(this.getReverseRelations(o),function(e){e.removeRelated(this.instance,null,i)},this),n.each(this.getReverseRelations(),function(e){e.addRelated(this.instance,i)},this);if(!i.silent&&this.related!==o){var a=this;this.changed=!0,t.Relational.eventQueue.add(function(){a.instance.trigger("change:"+a.key,a.instance,a.related,i,!0),a.changed=!1})}this.release()},tryAddRelated:function(e,t,n){(this.keyId||this.keyId===0)&&e.id===this.keyId&&(this.addRelated(e,n),this.keyId=null)},addRelated:function(e,t){var r=this;e.queue(function(){if(e!==r.related){var i=r.related||null;r.setRelated(e),r.onChange(r.instance,e,n.defaults({__related:i},t))}})},removeRelated:function(e,t,r){if(!this.related)return;if(e===this.related){var i=this.related||null;this.setRelated(null),this.onChange(this.instance,e,n.defaults({__related:i},r))}}}),t.HasMany=t.Relation.extend({collectionType:null,options:{reverseRelation:{type:"HasOne"},collectionType:t.Collection,collectionKey:!0,collectionOptions:{}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange),this.collectionType=this.options.collectionType,n.isFunction(this.collectionType)&&this.collectionType!==t.Collection&&!(this.collectionType.prototype instanceof t.Collection)&&(this.collectionType=n.result(this,"collectionType")),n.isString(this.collectionType)&&(this.collectionType=t.Relational.store.getObjectByName(this.collectionType));if(!(this.collectionType===t.Collection||this.collectionType.prototype instanceof t.Collection))throw new Error("`collectionType` must inherit from Backbone.Collection");var r=this.findRelated(e);this.setRelated(r)},_prepareCollection:function(e){this.related&&this.stopListening(this.related);if(!e||!(e instanceof t.Collection)){var r=n.isFunction(this.options.collectionOptions)?this.options.collectionOptions(this.instance):this.options.collectionOptions;e=new this.collectionType(null,r)}e.model=this.relatedModel;if(this.options.collectionKey){var i=this.options.collectionKey===!0?this.options.reverseRelation.key:this.options.collectionKey;e[i]&&e[i]!==this.instance?t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; collectionKey=%s already exists on collection=%o",this,i,this.options.collectionKey):i&&(e[i]=this.instance)}return this.listenTo(e,"relational:add",this.handleAddition).listenTo(e,"relational:remove",this.handleRemoval).listenTo(e,"relational:reset",this.handleReset),e},findRelated:function(e){var r=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof t.Collection)this._prepareCollection(this.keyContents),r=this.keyContents;else{var i=[];n.each(this.keyContents,function(t){if(t instanceof this.relatedModel)var r=t;else r=this.relatedModel.findOrCreate(t,n.extend({merge:!0},e,{create:this.options.createModels}));r&&i.push(r)},this),this.related instanceof t.Collection?r=this.related:r=this._prepareCollection(),r.set(i,n.defaults({merge:!1,parse:!1},e))}return this.keyIds=n.difference(this.keyIds,n.pluck(r.models,"id")),r},setKeyContents:function(e){this.keyContents=e instanceof t.Collection?e:null,this.keyIds=[],!this.keyContents&&(e||e===0)&&(this.keyContents=n.isArray(e)?e:[e],n.each(this.keyContents,function(e){var n=t.Relational.store.resolveIdForItem(this.relatedModel,e);(n||n===0)&&this.keyIds.push(n)},this))},onChange:function(e,r,i){i=i?n.clone(i):{},this.setKeyContents(r),this.changed=!1;var s=this.findRelated(i);this.setRelated(s);if(!i.silent){var o=this;t.Relational.eventQueue.add(function(){o.changed&&(o.instance.trigger("change:"+o.key,o.instance,o.related,i,!0),o.changed=!1)})}},handleAddition:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.addRelated(this.instance,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("add:"+s.key,e,s.related,i)})},handleRemoval:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.removeRelated(this.instance,null,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("remove:"+s.key,e,s.related,i)})},handleReset:function(e,r){var i=this;r=r?n.clone(r):{},!r.silent&&t.Relational.eventQueue.add(function(){i.instance.trigger("reset:"+i.key,i.related,r)})},tryAddRelated:function(e,t,r){var i=n.contains(this.keyIds,e.id);i&&(this.addRelated(e,r),this.keyIds=n.without(this.keyIds,e.id))},addRelated:function(e,t){var r=this;e.queue(function(){r.related&&!r.related.get(e)&&r.related.add(e,n.defaults({parse:!1},t))})},removeRelated:function(e,t,n){this.related.get(e)&&this.related.remove(e,n)}}),t.RelationalModel=t.Model.extend({relations:null,_relations:null,_isInitialized:!1,_deferProcessing:!1,_queue:null,_attributeChangeFired:!1,subModelTypeAttribute:"type",subModelTypes:null,constructor:function(e,r){if(r&&r.collection){var i=this,s=this.collection=r.collection;delete r.collection,this._deferProcessing=!0;var o=function(e){e===i&&(i._deferProcessing=!1,i.processQueue(),s.off("relational:add",o))};s.on("relational:add",o),n.defer(function(){o(i)})}t.Relational.store.processOrphanRelations(),t.Relational.store.listenTo(this,"relational:unregister",t.Relational.store.unregister),this._queue=new t.BlockingQueue,this._queue.block(),t.Relational.eventQueue.block();try{t.Model.apply(this,arguments)}finally{t.Relational.eventQueue.unblock()}},trigger:function(e){if(e.length>5&&e.indexOf("change")===0){var n=this,r=arguments;t.Relational.eventQueue.isLocked()?t.Relational.eventQueue.add(function(){var i=!0;if(e==="change")i=n.hasChanged()||n._attributeChangeFired,n._attributeChangeFired=!1;else{var s=e.slice(7),o=n.getRelation(s);o?(i=r[4]===!0,i?n.changed[s]=r[2]:o.changed||delete n.changed[s]):i&&(n._attributeChangeFired=!0)}i&&t.Model.prototype.trigger.apply(n,r)}):t.Model.prototype.trigger.apply(n,r)}else e==="destroy"?(t.Model.prototype.trigger.apply(this,arguments),t.Relational.store.unregister(this)):t.Model.prototype.trigger.apply(this,arguments);return this},initializeRelations:function(e){this.acquire(),this._relations={},n.each(this.relations||[],function(n){t.Relational.store.initializeRelation(this,n,e)},this),this._isInitialized=!0,this.release(),this.processQueue()},updateRelations:function(e,t){this._isInitialized&&!this.isLocked()&&n.each(this._relations,function(n){if(!e||n.keySource in e||n.key in e){var r=this.attributes[n.keySource]||this.attributes[n.key],i=e&&(e[n.keySource]||e[n.key]);(n.related!==r||r===null&&i===null)&&this.trigger("relational:change:"+n.key,this,r,t||{})}n.keySource!==n.key&&delete this.attributes[n.keySource]},this)},queue:function(e){this._queue.add(e)},processQueue:function(){this._isInitialized&&!this._deferProcessing&&this._queue.isBlocked()&&this._queue.unblock()},getRelation:function(e){return this._relations[e]},getRelations:function(){return n.values(this._relations)},fetchRelated:function(e,r,i){r=n.extend({update:!0,remove:!1},r);var s,o,u=[],a=this.getRelation(e),f=a&&(a.keyIds&&a.keyIds.slice(0)||(a.keyId||a.keyId===0?[a.keyId]:[]));i&&(s=a.related instanceof t.Collection?a.related.models:[a.related],n.each(s,function(e){(e.id||e.id===0)&&f.push(e.id)}));if(f&&f.length){var l=[];s=n.map(f,function(e){var t=a.relatedModel.findModel(e);if(!t){var n={};n[a.relatedModel.prototype.idAttribute]=e,t=a.relatedModel.findOrCreate(n,r),l.push(t)}return t},this),a.related instanceof t.Collection&&n.isFunction(a.related.url)&&(o=a.related.url(s));if(o&&o!==a.related.url()){var c=n.defaults({error:function(){var e=arguments;n.each(l,function(t){t.trigger("destroy",t,t.collection,r),r.error&&r.error.apply(t,e)})},url:o},r);u=[a.related.fetch(c)]}else u=n.map(s,function(e){var t=n.defaults({error:function(){n.contains(l,e)&&(e.trigger("destroy",e,e.collection,r),r.error&&r.error.apply(e,arguments))}},r);return e.fetch(t)},this)}return u},get:function(e){var r=t.Model.prototype.get.call(this,e);if(!this.dotNotation||e.indexOf(".")===-1)return r;var i=e.split("."),s=n.reduce(i,function(e,r){if(n.isNull(e)||n.isUndefined(e))return undefined;if(e instanceof t.Model)return t.Model.prototype.get.call(e,r);if(e instanceof t.Collection)return t.Collection.prototype.at.call(e,r);throw new Error("Attribute must be an instanceof Backbone.Model or Backbone.Collection. Is: "+e+", currentSplit: "+r)},this);if(r!==undefined&&s!==undefined)throw new Error("Ambiguous result for '"+e+"'. direct result: "+r+", dotNotation: "+s);return r||s},set:function(e,r,i){t.Relational.eventQueue.block();var s;n.isObject(e)||e==null?(s=e,i=r):(s={},s[e]=r);try{var o=this.id,u=s&&this.idAttribute in s&&s[this.idAttribute];t.Relational.store.checkId(this,u);var a=t.Model.prototype.set.apply(this,arguments);!this._isInitialized&&!this.isLocked()?(this.constructor.initializeModelHierarchy(),(u||u===0)&&t.Relational.store.register(this),this.initializeRelations(i)):u&&u!==o&&t.Relational.store.update(this),s&&this.updateRelations(s,i)}finally{t.Relational.eventQueue.unblock()}return a},clone:function(){var e=n.clone(this.attributes);return n.isUndefined(e[this.idAttribute])||(e[this.idAttribute]=null),n.each(this.getRelations(),function(t){delete e[t.key]}),new this.constructor(e)},toJSON:function(e){if(this.isLocked())return this.id;this.acquire();var r=t.Model.prototype.toJSON.call(this,e);return this.constructor._superModel&&!(this.constructor._subModelTypeAttribute in r)&&(r[this.constructor._subModelTypeAttribute]=this.constructor._subModelTypeValue),n.each(this._relations,function(i){var s=r[i.key],o=i.options.includeInJSON,u=null;o===!0?s&&n.isFunction(s.toJSON)&&(u=s.toJSON(e)):n.isString(o)?(s instanceof t.Collection?u=s.pluck(o):s instanceof t.Model&&(u=s.get(o)),o===i.relatedModel.prototype.idAttribute&&(i instanceof t.HasMany?u=u.concat(i.keyIds):i instanceof t.HasOne&&(u=u||i.keyId,!u&&!n.isObject(i.keyContents)&&(u=i.keyContents||null)))):n.isArray(o)?s instanceof t.Collection?(u=[],s.each(function(e){var t={};n.each(o,function(n){t[n]=e.get(n)}),u.push(t)})):s instanceof t.Model&&(u={},n.each(o,function(e){u[e]=s.get(e)})):delete r[i.key],o&&(r[i.keyDestination]=u),i.keyDestination!==i.key&&delete r[i.key]}),this.release(),r}},{setup:function(e){return this.prototype.relations=(this.prototype.relations||[]).slice(0),this._subModels={},this._superModel=null,this.prototype.hasOwnProperty("subModelTypes")?t.Relational.store.addSubModels(this.prototype.subModelTypes,this):this.prototype.subModelTypes=null,n.each(this.prototype.relations||[],function(e){e.model||(e.model=this);if(e.reverseRelation&&e.model===this){var r=!0;if(n.isString(e.relatedModel)){var i=t.Relational.store.getObjectByName(e.relatedModel);r=i&&i.prototype instanceof t.RelationalModel}r?t.Relational.store.initializeRelation(null,e):n.isString(e.relatedModel)&&t.Relational.store.addOrphanRelation(e)}},this),this},build:function(e,t){this.initializeModelHierarchy();var n=this._findSubModelType(this,e)||this;return new n(e,t)},_findSubModelType:function(e,t){if(e._subModels&&e.prototype.subModelTypeAttribute in t){var n=t[e.prototype.subModelTypeAttribute],r=e._subModels[n];if(r)return r;for(n in e._subModels){r=this._findSubModelType(e._subModels[n],t);if(r)return r}}return null},initializeModelHierarchy:function(){this.inheritRelations();if(this.prototype.subModelTypes){var e=n.keys(this._subModels),r=n.omit(this.prototype.subModelTypes,e);n.each(r,function(e){var n=t.Relational.store.getObjectByName(e);n&&n.initializeModelHierarchy()})}},inheritRelations:function(){if(!n.isUndefined(this._superModel)&&!n.isNull(this._superModel))return;t.Relational.store.setupSuperModel(this);if(this._superModel){this._superModel.inheritRelations();if(this._superModel.prototype.relations){var e=n.filter(this._superModel.prototype.relations||[],function(e){return!n.any(this.prototype.relations||[],function(t){return e.relatedModel===t.relatedModel&&e.key===t.key},this)},this);this.prototype.relations=e.concat(this.prototype.relations)}}else this._superModel=!1},findOrCreate:function(e,t){t||(t={});var r=n.isObject(e)&&t.parse&&this.prototype.parse?this.prototype.parse(n.clone(e)):e,i=this.findModel(r);return n.isObject(e)&&(i&&t.merge!==!1?(delete t.collection,delete t.url,i.set(r,t)):!i&&t.create!==!1&&(i=this.build(r,n.defaults({parse:!1},t)))),i},find:function(e,t){return t||(t={}),t.create=!1,this.findOrCreate(e,t)},findModel:function(e){return t.Relational.store.find(this,e)}}),n.extend(t.RelationalModel.prototype,t.Semaphore),t.Collection.prototype.__prepareModel=t.Collection.prototype._prepareModel,t.Collection.prototype._prepareModel=function(e,r){var i;return e instanceof t.Model?(e.collection||(e.collection=this),i=e):(r=r?n.clone(r):{},r.collection=this,typeof this.model.findOrCreate!="undefined"?i=this.model.findOrCreate(e,r):i=new this.model(e,r),i&&i.validationError&&(this.trigger("invalid",this,e,r),i=!1)),i};var r=t.Collection.prototype.__set=t.Collection.prototype.set;t.Collection.prototype.set=function(e,i){if(this.model.prototype instanceof t.RelationalModel){i&&i.parse&&(e=this.parse(e,i));var s=!n.isArray(e),o=[],u=[];e=s?e?[e]:[]:n.clone(e),n.each(e,function(e){e instanceof t.Model||(e=t.Collection.prototype._prepareModel.call(this,e,i)),e&&(u.push(e),!this.get(e)&&!this.get(e.cid)?o.push(e):e.id!=null&&(this._byId[e.id]=e))},this),u=s?u.length?u[0]:null:u;var a=r.call(this,u,n.defaults({parse:!1},i));return n.each(o,function(e){(this.get(e)||this.get(e.cid))&&this.trigger("relational:add",e,this,i)},this),a}return r.apply(this,arguments)};var i=t.Collection.prototype.__remove=t.Collection.prototype.remove;t.Collection.prototype.remove=function(e,r){if(this.model.prototype instanceof t.RelationalModel){var s=!n.isArray(e),o=[];e=s?e?[e]:[]:n.clone(e),r||(r={}),n.each(e,function(e){e=this.get(e)||e&&this.get(e.cid),e&&o.push(e)},this);var u=i.call(this,s?o.length?o[0]:null:o,r);return n.each(o,function(e){this.trigger("relational:remove",e,this,r)},this),u}return i.apply(this,arguments)};var s=t.Collection.prototype.__reset=t.Collection.prototype.reset;t.Collection.prototype.reset=function(e,r){r=n.extend({merge:!0},r);var i=s.call(this,e,r);return this.model.prototype instanceof t.RelationalModel&&this.trigger("relational:reset",this,r),i};var o=t.Collection.prototype.__sort=t.Collection.prototype.sort;t.Collection.prototype.sort=function(e){var n=o.call(this,e);return this.model.prototype instanceof t.RelationalModel&&this.trigger("relational:reset",this,e),n};var u=t.Collection.prototype.__trigger=t.Collection.prototype.trigger;t.Collection.prototype.trigger=function(e){if(this.model.prototype instanceof t.RelationalModel){if(e==="add"||e==="remove"||e==="reset"||e==="sort"){var r=this,i=arguments;n.isObject(i[3])&&(i=n.toArray(i),i[3]=n.clone(i[3])),t.Relational.eventQueue.add(function(){u.apply(r,i)})}else u.apply(this,arguments);return this}return u.apply(this,arguments)},t.RelationalModel.extend=function(e,n){var r=t.Model.extend.apply(this,arguments);return r.setup(this),r}}),function(){"use strict";define("aura_extensions/backbone-relational",["vendor/backbone-relational/backbone-relational"],function(){return{name:"relationalmodel",initialize:function(e){var t=e.core,n=e.sandbox;t.mvc.relationalModel=Backbone.RelationalModel,n.mvc.relationalModel=function(e){return t.mvc.relationalModel.extend(e)},define("mvc/relationalmodel",function(){return n.mvc.relationalModel}),n.mvc.HasMany=Backbone.HasMany,n.mvc.HasOne=Backbone.HasOne,define("mvc/hasmany",function(){return n.mvc.HasMany}),define("mvc/hasone",function(){return n.mvc.HasOne}),n.mvc.Store=Backbone.Relational.store,define("mvc/relationalstore",function(){return n.mvc.Store})}}})}(),define("__component__$login@suluadmin",[],function(){"use strict";var e={instanceName:"",backgroundImg:"/bundles/suluadmin/img/background.jpg",loginUrl:"",loginCheck:"",resetMailUrl:"",resendUrl:"",resetUrl:"",resetToken:"",csrfToken:"",resetMode:!1,translations:{resetPassword:"sulu.login.reset-password",reset:"public.reset",backLogin:"sulu.login.back-login",resendResetMail:"sulu.login.resend-email",emailSent:"sulu.login.email-sent-message",backWebsite:"sulu.login.back-website",login:"public.login",errorMessage:"sulu.login.error-message",forgotPassword:"sulu.login.forgot-password",emailUser:"sulu.login.email-username",password:"public.password",emailSentSuccess:"sulu.login.email-sent-success",enterNewPassword:"sulu.login.enter-new-password",repeatPassword:"sulu.login.repeat-password"},errorTranslations:{0:"sulu.login.mail.user-not-found",1003:"sulu.login.mail.already-sent",1005:"sulu.login.token-does-not-exist",1007:"sulu.login.mail.limit-reached",1009:"sulu.login.mail.user-not-found"}},t={componentClass:"sulu-login",mediaLogoClass:"media-logo",mediaBackgroundClass:"media-background",mediaLoadingClass:"media-loading",contentLoadingClass:"content-loading",successClass:"content-success",contentBoxClass:"content-box",websiteSwitchClass:"website-switch",successOverlayClass:"success-overlay",frameSliderClass:"frame-slider",frameClass:"box-frame",forgotPasswordSwitchClass:"forgot-password-switch",loginSwitchClass:"login-switch-span",loginButtonId:"login-button",requestResetMailButtonId:"request-mail-button",resendResetMailButtonId:"resend-mail-button",resetPasswordButtonId:"reset-password-button",loginRouteClass:"login-route-span",errorMessageClass:"error-message",errorClass:"login-error",loaderClass:"login-loader"},n={mediaContainer:['<div class="media-container '+t.mediaLoadingClass+'">',' <div class="media-logo"></div>',' <div class="'+t.mediaBackgroundClass+'">',' <div class="darkener"></div>'," </div>","</div>"].join(""),contentContainer:['<div class="content-container">',' <div class="'+t.contentBoxClass+'">',' <div class="content-logo navigator'+t.websiteSwitchClass+'"></div>',' <div class="'+t.frameSliderClass+'"></div>'," </div>",' <div class="grid-row login-content-footer">',' <span class="navigator '+t.websiteSwitchClass+'"><%= backWebsiteMessage %></span>'," </div>",' <div class="'+t.successOverlayClass+'">',' <div class="success-icon"></div>'," </div>","</div>"].join(""),loginFrame:function(){return['<div class="'+t.frameClass+' login">',' <form class="grid inputs">',' <span class="'+t.errorMessageClass+'"><%= errorMessage %></span>',' <div class="grid-row">',' <input class="form-element input-large husky-validate" type="text" name="username" id="username" placeholder="<%= emailUser %>"/>'," </div>",' <div class="grid-row">',' <input class="form-element input-large husky-validate" type="password" name="password" id="password" placeholder="<%= password %>"/>'," </div>",' <input type="hidden" name="_csrf_token" id="_csrf_token" value="',this.options.csrfToken,'"/>',' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.forgotPasswordSwitchClass+'"><%= forgotPasswordMessage %></span>',' <div id="'+t.loginButtonId+'" class="btn action large fit"><%= login %></div>'," </div>"," </form>","</div>"].join("")},forgotPasswordFrame:['<div class="'+t.frameClass+' forgot-password">',' <div class="grid inputs">',' <span class="'+t.errorMessageClass+'"></span>',' <div class="grid-row">',' <input id="user" class="form-element input-large husky-validate" type="text" placeholder="<%= emailUser %>" tabindex="-1"/>'," </div>"," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginSwitchClass+'"><%= backLoginMessage %></span>',' <div id="'+t.requestResetMailButtonId+'" class="btn action large fit"><%= reset %></div>'," </div>","</div>"].join(""),resendMailFrame:['<div class="'+t.frameClass+' resend-mail">',' <div class="grid-row">',' <span class="message"><%= sentMessage %></span>',' <span class="message to-mail"></span>'," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginSwitchClass+'"><%= backLoginMessage %></span>',' <div id="'+t.resendResetMailButtonId+'" class="btn action large fit"><%= resend %></div>'," </div>","</div>"].join(""),resetPasswordFrame:['<div class="'+t.frameClass+' reset-password">',' <div class="grid inputs">',' <div class="grid-row">',' <input id="password1" class="form-element input-large husky-validate" type="password" placeholder="<%= password1Label %>"/>'," </div>",' <div class="grid-row">',' <input id="password2" class="form-element input-large husky-validate" type="password" placeholder="<%= password2Label %>"/>'," </div>"," </div>",' <div class="grid-row small box-frame-footer">',' <span class="navigator '+t.loginRouteClass+'"><%= loginRouteMessage %></span>',' <div id="'+t.resetPasswordButtonId+'" class="btn action large fit"><%= login %></div>'," </div>","</div>"].join("")},r=function(){return i.call(this,"initialized")},i=function(e){return"sulu.login."+(this.options.instanceName?this.options.instanceName+".":"")+e};return{initialize:function(){this.options=this.sandbox.util.extend(!0,{},e,this.options),this.initProperties(),this.render(),this.bindDomEvents(),this.sandbox.emit(r.call(this))},initProperties:function(){this.dom={$mediaContainer:null,$contentContainer:null,$successOverlay:null,$loader:null,$mediaBackground:null,$contentBox:null,$frameSlider:null,$loginFrame:null,$forgotPasswordFrame:null,$resendMailFrame:null,$resetPasswordFrame:null,$loginButton:null,$loginForm:null,$forgotPasswordSwitch:null,$requestResetMailButton:null,$resendResetMailButton:null,$resetPasswordButton:null},this.resetMailUser=null},render:function(){this.sandbox.dom.addClass(this.$el,t.componentClass),this.renderMediaContainer(),this.renderContentContainer(),this.moveFrameSliderTo(this.sandbox.dom.find("."+t.frameClass,this.dom.$frameSlider)[0])},renderMediaContainer:function(){var e=this.sandbox.dom.createElement("<img/>");this.sandbox.dom.one(e,"load",this.showMediaBackground.bind(this)),this.sandbox.dom.attr(e,"src",this.options.backgroundImg),this.dom.$mediaContainer=this.sandbox.dom.createElement(n.mediaContainer),this.dom.$mediaBackground=this.sandbox.dom.find("."+t.mediaBackgroundClass,this.dom.$mediaContainer),this.sandbox.dom.css(this.dom.$mediaBackground,"background-image",'url("'+this.options.backgroundImg+'")'),this.sandbox.dom.append(this.$el,this.dom.$mediaContainer)},showMediaBackground:function(){this.sandbox.dom.removeClass(this.dom.$mediaContainer,t.mediaLoadingClass)},renderContentContainer:function(){this.dom.$contentContainer=this.sandbox.dom.createElement(this.sandbox.util.template(n.contentContainer)({backWebsiteMessage:this.sandbox.translate(this.options.translations.backWebsite)})),this.dom.$contentBox=this.sandbox.dom.find("."+t.contentBoxClass,this.dom.$contentContainer),this.dom.$frameSlider=this.sandbox.dom.find("."+t.frameSliderClass,this.dom.$contentContainer),this.dom.$successOverlay=this.sandbox.dom.find("."+t.successOverlayClass,this.dom.$contentContainer),this.options.resetMode===!1?(this.renderLoginFrame(),this.renderForgotPasswordFrame(),this.renderResendMailFrame()):this.renderResetPasswordFrame(),this.renderLoader(),this.sandbox.dom.append(this.$el,this.dom.$contentContainer)},renderLoginFrame:function(){this.dom.$loginFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.loginFrame.call(this))({emailUser:this.sandbox.translate(this.options.translations.emailUser),password:this.sandbox.translate(this.options.translations.password),forgotPasswordMessage:this.sandbox.translate(this.options.translations.forgotPassword),errorMessage:this.sandbox.translate(this.options.translations.errorMessage),login:this.sandbox.translate(this.options.translations.login)})),this.dom.$forgotPasswordSwitch=this.sandbox.dom.find("."+t.forgotPasswordSwitchClass,this.dom.$loginFrame),this.dom.$loginButton=this.sandbox.dom.find("#"+t.loginButtonId,this.dom.$loginFrame),this.dom.$loginForm=this.sandbox.dom.find("form",this.dom.$loginFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$loginFrame)},renderForgotPasswordFrame:function(){this.dom.$forgotPasswordFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.forgotPasswordFrame)({label:this.sandbox.translate(this.options.translations.resetPassword),reset:this.sandbox.translate(this.options.translations.reset),emailUser:this.sandbox.translate(this.options.translations.emailUser),backLoginMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$requestResetMailButton=this.sandbox.dom.find("#"+t.requestResetMailButtonId,this.dom.$forgotPasswordFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$forgotPasswordFrame)},renderResendMailFrame:function(){this.dom.$resendMailFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.resendMailFrame)({resend:this.sandbox.translate(this.options.translations.resendResetMail),sentMessage:this.sandbox.translate(this.options.translations.emailSent),backLoginMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$resendResetMailButton=this.sandbox.dom.find("#"+t.resendResetMailButtonId,this.dom.$resendMailFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$resendMailFrame)},renderResetPasswordFrame:function(){this.dom.$resetPasswordFrame=this.sandbox.dom.createElement(this.sandbox.util.template(n.resetPasswordFrame)({password1Label:this.sandbox.translate(this.options.translations.enterNewPassword),password2Label:this.sandbox.translate(this.options.translations.repeatPassword),password:this.sandbox.translate(this.options.translations.password),login:this.sandbox.translate(this.options.translations.login),backWebsiteMessage:this.sandbox.translate(this.options.translations.backWebsite),loginRouteMessage:this.sandbox.translate(this.options.translations.backLogin)})),this.dom.$resetPasswordButton=this.sandbox.dom.find("#"+t.resetPasswordButtonId,this.dom.$resetPasswordFrame),this.sandbox.dom.append(this.dom.$frameSlider,this.dom.$resetPasswordFrame)},renderLoader:function(){this.dom.$loader=this.sandbox.dom.createElement('<div class="'+t.loaderClass+'"/>'),this.sandbox.dom.append(this.dom.$contentContainer,this.dom.$loader),this.sandbox.start([{name:"loader@husky",options:{el:this.dom.$loader,size:"40px",color:"#fff"}}])},bindDomEvents:function(){this.bindGeneralDomEvents(),this.options.resetMode===!1?(this.bindLoginDomEvents(),this.bindForgotPasswordDomEvents(),this.bindResendMailDomEvents(),this.sandbox.dom.on(this.dom.$contentBox,"click",this.moveToLoginFrame.bind(this),"."+t.loginSwitchClass)):this.bindResetPasswordDomEvents()},bindGeneralDomEvents:function(){this.sandbox.dom.on(this.dom.$contentContainer,"click",this.redirectTo.bind(this,this.sandbox.dom.window.location.origin),"."+t.websiteSwitchClass)},bindLoginDomEvents:function(){this.sandbox.dom.on(this.dom.$loginForm,"keydown",this.inputFormKeyHandler.bind(this,this.dom.$loginForm)),this.sandbox.dom.on(this.dom.$forgotPasswordSwitch,"click",this.moveToForgotPasswordFrame.bind(this)),this.sandbox.dom.on(this.dom.$loginButton,"click",this.loginButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$loginFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$loginFrame),".husky-validate")},bindForgotPasswordDomEvents:function(){this.sandbox.dom.on(this.dom.$forgotPasswordFrame,"keydown",this.inputFormKeyHandler.bind(this,this.dom.$forgotPasswordFrame)),this.sandbox.dom.on(this.dom.$requestResetMailButton,"click",this.requestResetMailButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$forgotPasswordFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$forgotPasswordFrame),".husky-validate")},bindResendMailDomEvents:function(){this.sandbox.dom.on(this.dom.$resendResetMailButton,"click",this.resendResetMailButtonClickHandler.bind(this))},bindResetPasswordDomEvents:function(){this.sandbox.dom.on(this.dom.$resetPasswordButton,"click",this.resetPasswordButtonClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$resetPasswordFrame,"keydown",this.inputFormKeyHandler.bind(this,this.dom.resetPasswordFrame)),this.sandbox.dom.on(this.sandbox.dom.find("."+t.loginRouteClass),"click",this.loginRouteClickHandler.bind(this)),this.sandbox.dom.on(this.dom.$resetPasswordFrame,"keyup change",this.validationInputChangeHandler.bind(this,this.dom.$resetPasswordFrame),".husky-validate")},loginButtonClickHandler:function(){var e=this.sandbox.dom.val(this.sandbox.dom.find("#username",this.dom.$loginForm)),t=this.sandbox.dom.val(this.sandbox.dom.find("#password",this.dom.$loginForm)),n=$("#_csrf_token").val();return e.length===0||t.length===0?this.displayLoginError():this.login(e,t,n),!1},validationInputChangeHandler:function(e,n){if(n.type==="keyup"&&n.keyCode===13)return!1;this.sandbox.dom.hasClass(e,t.errorClass)&&this.sandbox.dom.removeClass(e,t.errorClass)},loginRouteClickHandler:function(){this.redirectTo(this.options.loginUrl)},requestResetMailButtonClickHandler:function(){var e=this.sandbox.dom.trim(this.sandbox.dom.val(this.sandbox.dom.find("#user",this.dom.$forgotPasswordFrame)));this.requestResetMail(e)},resetPasswordButtonClickHandler:function(){var e=this.sandbox.dom.val(this.sandbox.dom.find("#password1",this.dom.$resetPasswordFrame)),n=this.sandbox.dom.val(this.sandbox.dom.find("#password2",this.dom.$resetPasswordFrame));if(e!==n||e.length===0)return this.sandbox.dom.addClass(this.dom.$resetPasswordFrame,t.errorClass),this.focusFirstInput(this.dom.$resetPasswordFrame),!1;this.resetPassword(e)},resendResetMailButtonClickHandler:function(){if(this.sandbox.dom.hasClass(this.dom.$resendResetMailButton,"inactive"))return!1;this.resendResetMail()},inputFormKeyHandler:function(e,t){if(t.keyCode===13){var n=this.sandbox.dom.find(".btn",e);this.sandbox.dom.click(n)}},login:function(e,t,n){this.showLoader(this.dom.$loginFrame),this.sandbox.util.save(this.options.loginCheck,"POST",{_username:e,_password:t,_csrf_token:n}).then(function(e){this.displaySuccessAndRedirect(e.url+this.sandbox.dom.window.location.hash)}.bind(this)).fail(function(){this.hideLoader(this.dom.$loginFrame),this.displayLoginError()}.bind(this))},displaySuccessAndRedirect:function(e){this.sandbox.dom.css(this.dom.$loader,"opacity","0"),this.sandbox.dom.css(this.dom.$successOverlay,"z-index","20"),this.sandbox.dom.addClass(this.$el,t.successClass),this.sandbox.util.delay(this.redirectTo.bind(this,e),800)},requestResetMail:function(e){this.showLoader(this.dom.$forgotPasswordFrame),this.sandbox.util.save(this.options.resetMailUrl,"POST",{user:e}).then(function(t){this.resetMailUser=e,this.hideLoader(this.dom.$forgotPasswordFrame),this.showEmailSentLabel()}.bind(this)).fail(function(e){this.hideLoader(this.dom.$forgotPasswordFrame),this.displayRequestResetMailError(e.responseJSON.code)}.bind(this))},resetPassword:function(e){this.showLoader(this.dom.$resetPasswordFrame),this.sandbox.util.save(this.options.resetUrl,"POST",{password:e,token:this.options.resetToken}).then(function(e){this.displaySuccessAndRedirect(e.url)}.bind(this)).fail(function(e){this.hideLoader(this.dom.$resetPasswordFrame),this.displayResetPasswordError(e.responseJSON.code)}.bind(this))},resendResetMail:function(){this.showLoader(this.dom.$resendMailFrame),this.sandbox.util.save(this.options.resendUrl,"POST",{user:this.resetMailUser}).then(function(){this.hideLoader(this.dom.$resendMailFrame),this.showEmailSentLabel()}.bind(this)).fail(function(e){this.hideLoader(this.dom.$resendMailFrame),this.displayResendResetMailError(e.responseJSON.code)}.bind(this))},showLoader:function(e){if(this.sandbox.dom.hasClass(e,t.contentLoadingClass))return!1;var n=this.sandbox.dom.find(".btn",e);this.sandbox.dom.after(n,this.dom.$loader),this.sandbox.dom.css(this.dom.$loader,"width",this.sandbox.dom.css(n,"width")),this.sandbox.dom.addClass(e,t.contentLoadingClass)},hideLoader:function(e){this.sandbox.dom.removeClass(e,t.contentLoadingClass)},showEmailSentLabel:function(){this.sandbox.emit("sulu.labels.success.show",this.options.translations.emailSentSuccess,"labels.success")},displayLoginError:function(){this.sandbox.dom.addClass(this.dom.$loginFrame,t.errorClass),this.focusFirstInput(this.dom.$loginFrame)},displayRequestResetMailError:function(e){var n=this.options.errorTranslations[e]||"Error";this.sandbox.dom.html(this.sandbox.dom.find("."+t.errorMessageClass,this.dom.$forgotPasswordFrame),this.sandbox.translate(n)),this.sandbox.dom.addClass(this.dom.$forgotPasswordFrame,t.errorClass),this.focusFirstInput(this.dom.$forgotPasswordFrame)},displayResendResetMailError:function(e){var t=this.options.errorTranslations[e]||"Error";this.sandbox.emit("sulu.labels.error.show",this.sandbox.translate(t),"labels.error"),this.sandbox.dom.addClass(this.dom.$resendResetMailButton,"inactive")},displayResetPasswordError:function(e){var t=this.options.errorTranslations[e]||"Error";this.sandbox.emit("sulu.labels.error.show",this.sandbox.translate(t),"labels.error"),this.focusFirstInput(this.dom.$forgotPasswordFrame)},redirectTo:function(e){this.sandbox.dom.window.location=e},moveToForgotPasswordFrame:function(){this.moveFrameSliderTo(this.dom.$forgotPasswordFrame)},moveToResendMailFrame:function(e){this.sandbox.dom.html(this.sandbox.dom.find(".to-mail",this.dom.$resendMailFrame),e),this.moveFrameSliderTo(this.dom.$resendMailFrame)},moveToLoginFrame:function(){this.moveFrameSliderTo(this.dom.$loginFrame)},moveFrameSliderTo:function(e){this.sandbox.dom.one(this.$el,"transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",function(){this.focusFirstInput(e)}.bind(this)),this.sandbox.dom.css(this.dom.$frameSlider,"left",-this.sandbox.dom.position(e).left+"px")},focusFirstInput:function(e){if(this.sandbox.dom.find("input",e).length<1)return!1;var t=this.sandbox.dom.find("input",e)[0];this.sandbox.dom.select(t),t.setSelectionRange(this.sandbox.dom.val(t).length,this.sandbox.dom.val(t).length)}}}); \ No newline at end of file +require.config({waitSeconds:0,paths:{suluadmin:"../../suluadmin/js",main:"login",cultures:"vendor/globalize/cultures","aura_extensions/backbone-relational":"aura_extensions/backbone-relational",husky:"vendor/husky/husky","__component__$login@suluadmin":"components/login/main"},include:["aura_extensions/backbone-relational","__component__$login@suluadmin"],exclude:["husky"],urlArgs:"v=1634826923308"}),define("underscore",[],function(){return window._}),require(["husky"],function(e){"use strict";var t,n=SULU.translations,r=SULU.fallbackLocale;t=window.navigator.languages?window.navigator.languages[0]:null,t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t=t.slice(0,2).toLowerCase(),n.indexOf(t)===-1&&(t=r),require(["text!/admin/translations/sulu."+t+".json","text!/admin/translations/sulu."+r+".json"],function(n,r){var i=JSON.parse(n),s=JSON.parse(r),o=new e({debug:{enable:!!SULU.debug},culture:{name:t,messages:i,defaultMessages:s}});o.use("aura_extensions/backbone-relational"),o.components.addSource("suluadmin","/bundles/suluadmin/js/components"),o.start(),window.app=o})}),define("main",function(){}),function(e,t){typeof define=="function"&&define.amd?define("vendor/backbone-relational/backbone-relational",["exports","backbone","underscore"],t):typeof exports!="undefined"?t(exports,require("backbone"),require("underscore")):t(e,e.Backbone,e._)}(this,function(e,t,n){"use strict";t.Relational={showWarnings:!0},t.Semaphore={_permitsAvailable:null,_permitsUsed:0,acquire:function(){if(this._permitsAvailable&&this._permitsUsed>=this._permitsAvailable)throw new Error("Max permits acquired");this._permitsUsed++},release:function(){if(this._permitsUsed===0)throw new Error("All permits released");this._permitsUsed--},isLocked:function(){return this._permitsUsed>0},setAvailablePermits:function(e){if(this._permitsUsed>e)throw new Error("Available permits cannot be less than used permits");this._permitsAvailable=e}},t.BlockingQueue=function(){this._queue=[]},n.extend(t.BlockingQueue.prototype,t.Semaphore,{_queue:null,add:function(e){this.isBlocked()?this._queue.push(e):e()},process:function(){var e=this._queue;this._queue=[];while(e&&e.length)e.shift()()},block:function(){this.acquire()},unblock:function(){this.release(),this.isBlocked()||this.process()},isBlocked:function(){return this.isLocked()}}),t.Relational.eventQueue=new t.BlockingQueue,t.Store=function(){this._collections=[],this._reverseRelations=[],this._orphanRelations=[],this._subModels=[],this._modelScopes=[e]},n.extend(t.Store.prototype,t.Events,{initializeRelation:function(e,r,i){var s=n.isString(r.type)?t[r.type]||this.getObjectByName(r.type):r.type;s&&s.prototype instanceof t.Relation?new s(e,r,i):t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; missing or invalid relation type!",r)},addModelScope:function(e){this._modelScopes.push(e)},removeModelScope:function(e){this._modelScopes=n.without(this._modelScopes,e)},addSubModels:function(e,t){this._subModels.push({superModelType:t,subModels:e})},setupSuperModel:function(e){n.find(this._subModels,function(t){return n.filter(t.subModels||[],function(n,r){var i=this.getObjectByName(n);if(e===i)return t.superModelType._subModels[r]=e,e._superModel=t.superModelType,e._subModelTypeValue=r,e._subModelTypeAttribute=t.superModelType.prototype.subModelTypeAttribute,!0},this).length},this)},addReverseRelation:function(e){var t=n.any(this._reverseRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&(this._reverseRelations.push(e),this._addRelation(e.model,e),this.retroFitRelation(e))},addOrphanRelation:function(e){var t=n.any(this._orphanRelations,function(t){return n.all(e||[],function(e,n){return e===t[n]})});!t&&e.model&&e.type&&this._orphanRelations.push(e)},processOrphanRelations:function(){n.each(this._orphanRelations.slice(0),function(e){var r=t.Relational.store.getObjectByName(e.relatedModel);r&&(this.initializeRelation(null,e),this._orphanRelations=n.without(this._orphanRelations,e))},this)},_addRelation:function(e,t){e.prototype.relations||(e.prototype.relations=[]),e.prototype.relations.push(t),n.each(e._subModels||[],function(e){this._addRelation(e,t)},this)},retroFitRelation:function(e){var t=this.getCollection(e.model,!1);t&&t.each(function(t){if(!(t instanceof e.model))return;new e.type(t,e)},this)},getCollection:function(e,r){e instanceof t.RelationalModel&&(e=e.constructor);var i=e;while(i._superModel)i=i._superModel;var s=n.find(this._collections,function(e){return e.model===i});return!s&&r!==!1&&(s=this._createCollection(i)),s},getObjectByName:function(e){var t=e.split("."),r=null;return n.find(this._modelScopes,function(e){r=n.reduce(t||[],function(e,t){return e?e[t]:undefined},e);if(r&&r!==e)return!0},this),r},_createCollection:function(e){var n;return e instanceof t.RelationalModel&&(e=e.constructor),e.prototype instanceof t.RelationalModel&&(n=new t.Collection,n.model=e,this._collections.push(n)),n},resolveIdForItem:function(e,r){var i=n.isString(r)||n.isNumber(r)?r:null;return i===null&&(r instanceof t.RelationalModel?i=r.id:n.isObject(r)&&(i=r[e.prototype.idAttribute])),!i&&i!==0&&(i=null),i},find:function(e,t){var n=this.resolveIdForItem(e,t),r=this.getCollection(e);if(r){var i=r.get(n);if(i instanceof e)return i}return null},register:function(e){var t=this.getCollection(e);if(t){var n=e.collection;t.add(e),e.collection=n}},checkId:function(e,n){var r=this.getCollection(e),i=r&&r.get(n);if(i&&e!==i)throw t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Duplicate id! Old RelationalModel=%o, new RelationalModel=%o",i,e),new Error("Cannot instantiate more than one Backbone.RelationalModel with the same id per type!")},update:function(e){var t=this.getCollection(e);t.contains(e)||this.register(e),t._onModelEvent("change:"+e.idAttribute,e,t),e.trigger("relational:change:id",e,t)},unregister:function(e){var r,i;e instanceof t.Model?(r=this.getCollection(e),i=[e]):e instanceof t.Collection?(r=this.getCollection(e.model),i=n.clone(e.models)):(r=this.getCollection(e),i=n.clone(r.models)),n.each(i,function(e){this.stopListening(e),n.invoke(e.getRelations(),"stopListening")},this),n.contains(this._collections,e)?r.reset([]):n.each(i,function(e){r.get(e)?r.remove(e):r.trigger("relational:remove",e,r)},this)},reset:function(){this.stopListening(),n.each(this._collections,function(e){this.unregister(e)},this),this._collections=[],this._subModels=[],this._modelScopes=[e]}}),t.Relational.store=new t.Store,t.Relation=function(e,r,i){this.instance=e,r=n.isObject(r)?r:{},this.reverseRelation=n.defaults(r.reverseRelation||{},this.options.reverseRelation),this.options=n.defaults(r,this.options,t.Relation.prototype.options),this.reverseRelation.type=n.isString(this.reverseRelation.type)?t[this.reverseRelation.type]||t.Relational.store.getObjectByName(this.reverseRelation.type):this.reverseRelation.type,this.key=this.options.key,this.keySource=this.options.keySource||this.key,this.keyDestination=this.options.keyDestination||this.keySource||this.key,this.model=this.options.model||this.instance.constructor,this.relatedModel=this.options.relatedModel,n.isFunction(this.relatedModel)&&!(this.relatedModel.prototype instanceof t.RelationalModel)&&(this.relatedModel=n.result(this,"relatedModel")),n.isString(this.relatedModel)&&(this.relatedModel=t.Relational.store.getObjectByName(this.relatedModel));if(!this.checkPreconditions())return;!this.options.isAutoRelation&&this.reverseRelation.type&&this.reverseRelation.key&&t.Relational.store.addReverseRelation(n.defaults({isAutoRelation:!0,model:this.relatedModel,relatedModel:this.model,reverseRelation:this.options},this.reverseRelation));if(e){var s=this.keySource;s!==this.key&&typeof this.instance.get(this.key)=="object"&&(s=this.key),this.setKeyContents(this.instance.get(s)),this.relatedCollection=t.Relational.store.getCollection(this.relatedModel),this.keySource!==this.key&&delete this.instance.attributes[this.keySource],this.instance._relations[this.key]=this,this.initialize(i),this.options.autoFetch&&this.instance.fetchRelated(this.key,n.isObject(this.options.autoFetch)?this.options.autoFetch:{}),this.listenTo(this.instance,"destroy",this.destroy).listenTo(this.relatedCollection,"relational:add relational:change:id",this.tryAddRelated).listenTo(this.relatedCollection,"relational:remove",this.removeRelated)}},t.Relation.extend=t.Model.extend,n.extend(t.Relation.prototype,t.Events,t.Semaphore,{options:{createModels:!0,includeInJSON:!0,isAutoRelation:!1,autoFetch:!1,parse:!1},instance:null,key:null,keyContents:null,relatedModel:null,relatedCollection:null,reverseRelation:null,related:null,checkPreconditions:function(){var e=this.instance,r=this.key,i=this.model,s=this.relatedModel,o=t.Relational.showWarnings&&typeof console!="undefined";if(!i||!r||!s)return o&&console.warn("Relation=%o: missing model, key or relatedModel (%o, %o, %o).",this,i,r,s),!1;if(i.prototype instanceof t.RelationalModel){if(s.prototype instanceof t.RelationalModel){if(this instanceof t.HasMany&&this.reverseRelation.type===t.HasMany)return o&&console.warn("Relation=%o: relation is a HasMany, and the reverseRelation is HasMany as well.",this),!1;if(e&&n.keys(e._relations).length){var u=n.find(e._relations,function(e){return e.key===r},this);if(u)return o&&console.warn("Cannot create relation=%o on %o for model=%o: already taken by relation=%o.",this,r,e,u),!1}return!0}return o&&console.warn("Relation=%o: relatedModel does not inherit from Backbone.RelationalModel (%o).",this,s),!1}return o&&console.warn("Relation=%o: model does not inherit from Backbone.RelationalModel (%o).",this,e),!1},setRelated:function(e){this.related=e,this.instance.attributes[this.key]=e},_isReverseRelation:function(e){return e.instance instanceof this.relatedModel&&this.reverseRelation.key===e.key&&this.key===e.reverseRelation.key},getReverseRelations:function(e){var t=[],r=n.isUndefined(e)?this.related&&(this.related.models||[this.related]):[e];return n.each(r||[],function(e){n.each(e.getRelations()||[],function(e){this._isReverseRelation(e)&&t.push(e)},this)},this),t},destroy:function(){this.stopListening(),this instanceof t.HasOne?this.setRelated(null):this instanceof t.HasMany&&this.setRelated(this._prepareCollection()),n.each(this.getReverseRelations(),function(e){e.removeRelated(this.instance)},this)}}),t.HasOne=t.Relation.extend({options:{reverseRelation:{type:"HasMany"}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange);var t=this.findRelated(e);this.setRelated(t),n.each(this.getReverseRelations(),function(t){t.addRelated(this.instance,e)},this)},findRelated:function(e){var t=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof this.relatedModel)t=this.keyContents;else if(this.keyContents||this.keyContents===0){var r=n.defaults({create:this.options.createModels},e);t=this.relatedModel.findOrCreate(this.keyContents,r)}return t&&(this.keyId=null),t},setKeyContents:function(e){this.keyContents=e,this.keyId=t.Relational.store.resolveIdForItem(this.relatedModel,this.keyContents)},onChange:function(e,r,i){if(this.isLocked())return;this.acquire(),i=i?n.clone(i):{};var s=n.isUndefined(i.__related),o=s?this.related:i.__related;if(s){this.setKeyContents(r);var u=this.findRelated(i);this.setRelated(u)}o&&this.related!==o&&n.each(this.getReverseRelations(o),function(e){e.removeRelated(this.instance,null,i)},this),n.each(this.getReverseRelations(),function(e){e.addRelated(this.instance,i)},this);if(!i.silent&&this.related!==o){var a=this;this.changed=!0,t.Relational.eventQueue.add(function(){a.instance.trigger("change:"+a.key,a.instance,a.related,i,!0),a.changed=!1})}this.release()},tryAddRelated:function(e,t,n){(this.keyId||this.keyId===0)&&e.id===this.keyId&&(this.addRelated(e,n),this.keyId=null)},addRelated:function(e,t){var r=this;e.queue(function(){if(e!==r.related){var i=r.related||null;r.setRelated(e),r.onChange(r.instance,e,n.defaults({__related:i},t))}})},removeRelated:function(e,t,r){if(!this.related)return;if(e===this.related){var i=this.related||null;this.setRelated(null),this.onChange(this.instance,e,n.defaults({__related:i},r))}}}),t.HasMany=t.Relation.extend({collectionType:null,options:{reverseRelation:{type:"HasOne"},collectionType:t.Collection,collectionKey:!0,collectionOptions:{}},initialize:function(e){this.listenTo(this.instance,"relational:change:"+this.key,this.onChange),this.collectionType=this.options.collectionType,n.isFunction(this.collectionType)&&this.collectionType!==t.Collection&&!(this.collectionType.prototype instanceof t.Collection)&&(this.collectionType=n.result(this,"collectionType")),n.isString(this.collectionType)&&(this.collectionType=t.Relational.store.getObjectByName(this.collectionType));if(!(this.collectionType===t.Collection||this.collectionType.prototype instanceof t.Collection))throw new Error("`collectionType` must inherit from Backbone.Collection");var r=this.findRelated(e);this.setRelated(r)},_prepareCollection:function(e){this.related&&this.stopListening(this.related);if(!e||!(e instanceof t.Collection)){var r=n.isFunction(this.options.collectionOptions)?this.options.collectionOptions(this.instance):this.options.collectionOptions;e=new this.collectionType(null,r)}e.model=this.relatedModel;if(this.options.collectionKey){var i=this.options.collectionKey===!0?this.options.reverseRelation.key:this.options.collectionKey;e[i]&&e[i]!==this.instance?t.Relational.showWarnings&&typeof console!="undefined"&&console.warn("Relation=%o; collectionKey=%s already exists on collection=%o",this,i,this.options.collectionKey):i&&(e[i]=this.instance)}return this.listenTo(e,"relational:add",this.handleAddition).listenTo(e,"relational:remove",this.handleRemoval).listenTo(e,"relational:reset",this.handleReset),e},findRelated:function(e){var r=null;e=n.defaults({parse:this.options.parse},e);if(this.keyContents instanceof t.Collection)this._prepareCollection(this.keyContents),r=this.keyContents;else{var i=[];n.each(this.keyContents,function(t){if(t instanceof this.relatedModel)var r=t;else r=this.relatedModel.findOrCreate(t,n.extend({merge:!0},e,{create:this.options.createModels}));r&&i.push(r)},this),this.related instanceof t.Collection?r=this.related:r=this._prepareCollection(),r.set(i,n.defaults({merge:!1,parse:!1},e))}return this.keyIds=n.difference(this.keyIds,n.pluck(r.models,"id")),r},setKeyContents:function(e){this.keyContents=e instanceof t.Collection?e:null,this.keyIds=[],!this.keyContents&&(e||e===0)&&(this.keyContents=n.isArray(e)?e:[e],n.each(this.keyContents,function(e){var n=t.Relational.store.resolveIdForItem(this.relatedModel,e);(n||n===0)&&this.keyIds.push(n)},this))},onChange:function(e,r,i){i=i?n.clone(i):{},this.setKeyContents(r),this.changed=!1;var s=this.findRelated(i);this.setRelated(s);if(!i.silent){var o=this;t.Relational.eventQueue.add(function(){o.changed&&(o.instance.trigger("change:"+o.key,o.instance,o.related,i,!0),o.changed=!1)})}},handleAddition:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.addRelated(this.instance,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("add:"+s.key,e,s.related,i)})},handleRemoval:function(e,r,i){i=i?n.clone(i):{},this.changed=!0,n.each(this.getReverseRelations(e),function(e){e.removeRelated(this.instance,null,i)},this);var s=this;!i.silent&&t.Relational.eventQueue.add(function(){s.instance.trigger("remove:"+s.key,e,s.related,i)})},handleReset:function(e,r){var i=this;r=r?n.clone(r):{},!r.silent&&t.Relational.eventQueue.add(function(){i.instance.trigger("reset:"+i.key,i.related,r)})},tryAddRelated:function(e,t,r){var i=n.contains(this.keyIds,e.id);i&&(this.addRelated(e,r),this.keyIds=n.without(this.keyIds,e.id))},addRelated:function(e,t){var r=this;e.queue(function(){r.related&&!r.related.get(e)&&r.related.add(e,n.defaults({parse:!1},t))})},removeRelated:function(e,t,n){this.related.get(e)&&this.related.remove(e,n)}}),t.RelationalModel=t.Model.extend({relations:null,_relations:null,_isInitialized:!1,_deferProcessing:!1,_queue:null,_attributeChangeFired:!1,subModelTypeAttribute:"type",subModelTypes:null,constructor:function(e,r){if(r&&r.collection){var i=this,s=this.collection=r.collection;delete r.collection,this._deferProcessing=!0;var o=function(e){e===i&&(i._deferProcessing=!1,i.processQueue(),s.off("relational:add",o))};s.on("relational:add",o),n.defer(function(){o(i)})}t.Relational.store.processOrphanRelations(),t.Relational.store.listenTo(this,"relational:unregister",t.Relational.store.unregister),this._queue=new t.BlockingQueue,this._queue.block(),t.Relational.eventQueue.block();try{t.Model.apply(this,arguments)}finally{t.Relational.eventQueue.unblock()}},trigger:function(e){if(e.length>5&&e.indexOf("change")===0){var n=this,r=arguments;t.Relational.eventQueue.isLocked()?t.Relational.eventQueue.add(function(){var i=!0;if(e==="change")i=n.hasChanged()||n._attributeChangeFired,n._attributeChangeFired=!1;else{var s=e.slice(7),o=n.getRelation(s);o?(i=r[4]===!0,i?n.changed[s]=r[2]:o.changed||delete n.changed[s]):i&&(n._attributeChangeFired=!0)}i&&t.Model.prototype.trigger.apply(n,r)}):t.Model.prototype.trigger.apply(n,r)}else e==="destroy"?(t.Model.prototype.trigger.apply(this,arguments),t.Relational.store.unregister(this)):t.Model.prototype.trigger.apply(this,arguments);return this},initializeRelations:function(e){this.acquire(),this._relations={},n.each(this.relations||[],function(n){t.Relational.store.initializeRelation(this,n,e)},this),this._isInitialized=!0,this.release(),this.processQueue()},updateRelations:function(e,t){this._isInitialized&&!this.isLocked()&&n.each(this._relations,function(n){if(!e||n.keySource in e||n.key in e){var r=this.attributes[n.keySource]||this.attributes[n.key],i=e&&(e[n.keySource]||e[n.key]);(n.related!==r||r===null&&i===null)&&this.trigger("relational:change:"+n.key,this,r,t||{})}n.keySource!==n.key&&delete this.attributes[n.keySource]},this)},queue:function(e){this._queue.add(e)},processQueue:function(){this._isInitialized&&!this._deferProcessing&&this._queue.isBlocked()&&this._queue.unblock()},getRelation:function(e){return this._relations[e]},getRelations:function(){return n.values(this._relations)},fetchRelated:function(e,r,i){r=n.extend({update:!0,remove:!1},r);var s,o,u=[],a=this.getRelation(e),f=a&&(a.keyIds&&a.keyIds.slice(0)||(a.keyId||a.keyId===0?[a.keyId]:[]));i&&(s=a.related instanceof t.Collection?a.related.models:[a.related],n.each(s,function(e){(e.id||e.id===0)&&f.push(e.id)}));if(f&&f.length){var l=[];s=n.map(f,function(e){var t=a.relatedModel.findModel(e);if(!t){var n={};n[a.relatedModel.prototype.idAttribute]=e,t=a.relatedModel.findOrCreate(n,r),l.push(t)}return t},this),a.related instanceof t.Collection&&n.isFunction(a.related.url)&&(o=a.related.url(s));if(o&&o!==a.related.url()){var c=n.defaults({error:function(){var e=arguments;n.each(l,function(t){t.trigger("destroy",t,t.collection,r),r.error&&r.error.apply(t,e)})},url:o},r);u=[a.related.fetch(c)]}else u=n.map(s,function(e){var t=n.defaults({error:function(){n.contains(l,e)&&(e.trigger("destroy",e,e.collection,r),r.error&&r.error.apply(e,arguments))}},r);return e.fetch(t)},this)}return u},get:function(e){var r=t.Model.prototype.get.call(this,e);if(!this.dotNotation||e.indexOf(".")===-1)return r;var i=e.split("."),s=n.reduce(i,function(e,r){if(n.isNull(e)||n.isUndefined(e))return undefined;if(e instanceof t.Model)return t.Model.prototype.get.call(e,r);if(e instanceof t.Collection)return t.Collection.prototype.at.call(e,r);throw new Error("Attribute must be an instanceof Backbone.Model or Backbone.Collection. Is: "+e+", currentSplit: "+r)},this);if(r!==undefined&&s!==undefined)throw new Error("Ambiguous result for '"+e+"'. direct result: "+r+", dotNotation: "+s);return r||s},set:function(e,r,i){t.Relational.eventQueue.block();var s;n.isObject(e)||e==null?(s=e,i=r ... [truncated]
src/Sulu/Bundle/AdminBundle/Resources/public/js/vendor/husky/husky.js+2 −2 modified@@ -38866,7 +38866,7 @@ define('__component__$auto-complete@husky',[], function() { ' <div class="border">' + ' <div class="text">' + ' <% _.each(fields, function(field, idx) { %>' + - ' <div class="suggestion-column" style="width: <%= field.width %>;"><%= context[field.id] %></div>' + + ' <div class="suggestion-column" style="width: <%= field.width %>;"><%- context[field.id] %></div>' + ' <% }) %>' + ' </div>' + ' </div>' + @@ -38876,7 +38876,7 @@ define('__component__$auto-complete@husky',[], function() { '<div class="' + this.options.suggestionClass + '" data-id="<%= context[\'id \']%>">' + ' <div class="border">' + iconHTML + - ' <div class="text"><%= context[this.options.valueKey] %></div>' + + ' <div class="text"><%- context[this.options.valueKey] %></div>' + ' </div>' + '</div>'); }
src/Sulu/Bundle/AdminBundle/Resources/public/js/vendor/husky/husky.min.js+1 −1 modifiedsrc/Sulu/Bundle/AdminBundle/Resources/views/Admin/index.html.dist.twig+2 −2 modified@@ -13,7 +13,7 @@ <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> {% block stylesheets %} - <link rel="stylesheet" href="/bundles/suluadmin/dist/app.min.1614246819288.css"> + <link rel="stylesheet" href="/bundles/suluadmin/dist/app.min.1634826923308.css"> {% endblock stylesheets %} </head> <body> @@ -72,7 +72,7 @@ </script> {% block javascripts %} - <script data-main="/bundles/suluadmin/dist/app.min.1614246819288" src="/bundles/suluadmin/js/vendor/husky/husky.min.js?v=1614246819288"></script> + <script data-main="/bundles/suluadmin/dist/app.min.1634826923308" src="/bundles/suluadmin/js/vendor/husky/husky.min.js?v=1634826923308"></script> {% endblock javascripts %} </body> </html>
src/Sulu/Bundle/AdminBundle/Resources/views/Security/login.html.dist.twig+2 −2 modified@@ -14,7 +14,7 @@ <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> {% block stylesheets %} - <link rel="stylesheet" href="/bundles/suluadmin/dist/login.min.1614246819288.css"> + <link rel="stylesheet" href="/bundles/suluadmin/dist/login.min.1634826923308.css"> <link rel="stylesheet" type="text/css" href="/bundles/suluadmin/css/main.css"/> {% endblock stylesheets %} @@ -49,7 +49,7 @@ </script> {% block javascripts %} - <script data-main="/bundles/suluadmin/dist/login.min.1614246819288" src="/bundles/suluadmin/js/vendor/husky/husky.min.js?v=1614246819288"></script> + <script data-main="/bundles/suluadmin/dist/login.min.1634826923308" src="/bundles/suluadmin/js/vendor/husky/husky.min.js?v=1634826923308"></script> {% endblock javascripts %} </body> </html>
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-h58v-g3q6-q9fxghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-41169ghsaADVISORY
- github.com/sulu/sulu/commit/20007ac70a3af3c9e53a6acb0ef8794b65642445ghsax_refsource_MISCWEB
- github.com/sulu/sulu/security/advisories/GHSA-h58v-g3q6-q9fxghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.