diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-09-17 17:33:27 +0300 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2019-09-28 12:39:28 +0300 |
commit | de6940352a2f708376219a89ec84a8e6d25ca59e (patch) | |
tree | 459bacfc183b24d611be1877fbe22bbcd4efb1d6 /core/js/dist/login.js | |
parent | c8cd607681ac128228f57114ce14dd67ab05de04 (diff) |
Move settings to an app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/js/dist/login.js')
-rw-r--r-- | core/js/dist/login.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/dist/login.js b/core/js/dist/login.js index bfb4f59b399..7340323d865 100644 --- a/core/js/dist/login.js +++ b/core/js/dist/login.js @@ -144,7 +144,7 @@ function Ce(e){for(var t,n=[],r=0,a=-1,i=0;r<e.length;){t=e.charAt(r);var s=!i&& * You should have received a copy of the GNU Affero General Public License * along with this program. If not see <http://www.gnu.org/licenses/>. */ -var r=["","admin","log","core/search","settings","core","3rdparty"],a=50,i=0,s=4,o=1,u=2,d=8,l=16,c=31,f="_$!<Favorite>!$_"},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"h",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return h}));var r=n(2),a=n.n(r),i=n(3),s=n(5),o=function(e,t){return m(e,"",t)},u=function(e){return h()+"/remote.php/"+e},d=function(e){return window.location.protocol+"//"+window.location.host+u(e)},l=function(e,t){return t=2!==t?1:2,window.location.protocol+"//"+window.location.host+h()+"/ocs/v"+t+".php/"+e+"/"},c=function(e,t,n){var r=n||{};a.a.defaults(r,{escape:!0});var s=function(e,t){return t=t||[],e.replace(/{([^{}]*)}/g,(function(e,n){var a=t[n];return r.escape?"string"==typeof a||"number"==typeof a?encodeURIComponent(a):encodeURIComponent(e):"string"==typeof a||"number"==typeof a?a:e}))};return"/"!==e.charAt(0)&&(e="/"+e),!0===i.a.config.modRewriteWorking?h()+s(e,t):h()+"/index.php"+s(e,t)},f=function(e,t){return-1===t.indexOf(".")?m(e,"img",t+".svg"):m(e,"img",t)},m=function(e,t,n){var r=-1!==s.i.indexOf(e),a=h();return"php"!==n.substring(n.length-3)||r?"php"===n.substring(n.length-3)||r?(a+="settings"!==e&&"core"!==e&&"search"!==e||"ajax"!==t?"/":"/index.php/",r||(a+="apps/"),""!==e&&(a+=e+="/"),t&&(a+=t+"/"),a+=n):(a=i.a.appswebroots[e],t&&(a+="/"+t+"/"),"/"!==a.substring(a.length-1)&&(a+="/"),a+=n):(a+="/index.php/apps/"+e,"index.php"!==n&&(a+="/",t&&(a+=encodeURI(t+"/")),a+=n)),a},h=function(){return i.a.webroot}},,,,,function(e,t,n){"use strict";t.__esModule=!0,t.extend=o,t.indexOf=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!i.test(e))return e;return e.replace(a,s)},t.isEmpty=function(e){return!e&&0!==e||!(!l(e)||0!==e.length)},t.createFrame=function(e){var t=o({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var r={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},a=/[&<>"'`=]/g,i=/[&<>"'`=]/;function s(e){return r[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var u=Object.prototype.toString;t.toString=u;var d=function(e){return"function"==typeof e};d(/x/)&&(t.isFunction=d=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)}),t.isFunction=d;var l=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===u.call(e)};t.isArray=l},function(e,t,n){(function(r){var a,i,s;s="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,a=[n(2),n(0),t],void 0===(i=function(e,t,n){s.Backbone=function(e,t,n,r){var a=e.Backbone,i=Array.prototype.slice;t.VERSION="1.4.0",t.$=r,t.noConflict=function(){return e.Backbone=a,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s,o=t.Events={},u=/\s+/,d=function(e,t,r,a,i){var s,o=0;if(r&&"object"==typeof r){void 0!==a&&"context"in i&&void 0===i.context&&(i.context=a);for(s=n.keys(r);o<s.length;o++)t=d(e,t,s[o],r[s[o]],i)}else if(r&&u.test(r))for(s=r.split(u);o<s.length;o++)t=e(t,s[o],a,i);else t=e(t,r,a,i);return t};o.on=function(e,t,n){return this._events=d(l,this._events||{},e,t,{context:n,ctx:this,listening:s}),s&&((this._listeners||(this._listeners={}))[s.id]=s,s.interop=!1),this},o.listenTo=function(e,t,r){if(!e)return this;var a=e._listenId||(e._listenId=n.uniqueId("l")),i=this._listeningTo||(this._listeningTo={}),o=s=i[a];o||(this._listenId||(this._listenId=n.uniqueId("l")),o=s=i[a]=new p(this,e));var u=c(e,t,r,this);if(s=void 0,u)throw u;return o.interop&&o.on(t,r),this};var l=function(e,t,n,r){if(n){var a=e[t]||(e[t]=[]),i=r.context,s=r.ctx,o=r.listening;o&&o.count++,a.push({callback:n,context:i,ctx:i||s,listening:o})}return e},c=function(e,t,n,r){try{e.on(t,n,r)}catch(e){return e}};o.off=function(e,t,n){return this._events?(this._events=d(f,this._events,e,t,{context:n,listeners:this._listeners}),this):this},o.stopListening=function(e,t,r){var a=this._listeningTo;if(!a)return this;for(var i=e?[e._listenId]:n.keys(a),s=0;s<i.length;s++){var o=a[i[s]];if(!o)break;o.obj.off(t,r,this),o.interop&&o.off(t,r)}return n.isEmpty(a)&&(this._listeningTo=void 0),this};var f=function(e,t,r,a){if(e){var i,s=a.context,o=a.listeners,u=0;if(t||s||r){for(i=t?[t]:n.keys(e);u<i.length;u++){var d=e[t=i[u]];if(!d)break;for(var l=[],c=0;c<d.length;c++){var f=d[c];if(r&&r!==f.callback&&r!==f.callback._callback||s&&s!==f.context)l.push(f);else{var m=f.listening;m&&m.off(t,r)}}l.length?e[t]=l:delete e[t]}return e}for(i=n.keys(o);u<i.length;u++)o[i[u]].cleanup()}};o.once=function(e,t,n){var r=d(m,{},e,t,this.off.bind(this));return"string"==typeof e&&null==n&&(t=void 0),this.on(r,t,n)},o.listenToOnce=function(e,t,n){var r=d(m,{},t,n,this.stopListening.bind(this,e));return this.listenTo(e,r)};var m=function(e,t,r,a){if(r){var i=e[t]=n.once((function(){a(t,i),r.apply(this,arguments)}));i._callback=r}return e};o.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return d(h,this._events,e,void 0,n),this};var h=function(e,t,n,r){if(e){var a=e[t],i=e.all;a&&i&&(i=i.slice()),a&&_(a,r),i&&_(i,[t].concat(r))}return e},_=function(e,t){var n,r=-1,a=e.length,i=t[0],s=t[1],o=t[2];switch(t.length){case 0:for(;++r<a;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i);return;case 2:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i,s);return;case 3:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i,s,o);return;default:for(;++r<a;)(n=e[r]).callback.apply(n.ctx,t);return}},p=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};p.prototype.on=o.on,p.prototype.off=function(e,t){var n;this.interop?(this._events=d(f,this._events,e,t,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},p.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},o.bind=o.on,o.unbind=o.off,n.extend(t,o);var y=t.Model=function(e,t){var r=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var a=n.result(this,"defaults");r=n.defaults(n.extend({},a,r),a),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,o,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var a;if("object"==typeof e?(a=e,r=t):(a={})[e]=t,r||(r={}),!this._validate(a,r))return!1;var i=r.unset,s=r.silent,o=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var d=this.attributes,l=this.changed,c=this._previousAttributes;for(var f in a)t=a[f],n.isEqual(d[f],t)||o.push(f),n.isEqual(c[f],t)?delete l[f]:l[f]=t,i?delete d[f]:d[f]=t;if(this.idAttribute in a&&(this.id=this.get(this.idAttribute)),!s){o.length&&(this._pending=r);for(var m=0;m<o.length;m++)this.trigger("change:"+o[m],this,d[o[m]],r)}if(u)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t,r=this._changing?this._previousAttributes:this.attributes,a={};for(var i in e){var s=e[i];n.isEqual(r[i],s)||(a[i]=s,t=!0)}return!!t&&a},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var a=e.parse?t.parse(n,e):n;if(!t.set(a,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},U(this,e),this.sync("read",this,e)},save:function(e,t,r){var a;null==e||"object"==typeof e?(a=e,r=t):(a={})[e]=t;var i=(r=n.extend({validate:!0,parse:!0},r)).wait;if(a&&!i){if(!this.set(a,r))return!1}else if(!this._validate(a,r))return!1;var s=this,o=r.success,u=this.attributes;r.success=function(e){s.attributes=u;var t=r.parse?s.parse(e,r):e;if(i&&(t=n.extend({},a,t)),t&&!s.set(t,r))return!1;o&&o.call(r.context,s,e,r),s.trigger("sync",s,e,r)},U(this,r),a&&i&&(this.attributes=n.extend({},u,a));var d=this.isNew()?"create":r.patch?"patch":"update";"patch"!==d||r.attrs||(r.attrs=a);var l=this.sync(d,this,r);return this.attributes=u,l},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,a=e.wait,i=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){a&&i(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var s=!1;return this.isNew()?n.defer(e.success):(U(this,e),s=this.sync("delete",this,e)),a||i(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||z();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var v=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},M={add:!0,remove:!1},L=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,a=Array(e.length-n),i=t.length;for(r=0;r<a.length;r++)a[r]=e[r+n];for(r=0;r<i;r++)e[r+n]=t[r];for(r=0;r<a.length;r++)e[r+i+n]=a[r]};n.extend(v.prototype,o,{model:y,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,M))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var a=this._removeModels(e,t);return!t.silent&&a.length&&(t.changes={added:[],merged:[],removed:a},this.trigger("update",this,t)),r?a[0]:a},set:function(e,t){if(null!=e){(t=n.extend({},g,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var a=t.at;null!=a&&(a=+a),a>this.length&&(a=this.length),a<0&&(a+=this.length+1);var i,s,o=[],u=[],d=[],l=[],c={},f=t.add,m=t.merge,h=t.remove,_=!1,p=this.comparator&&null==a&&!1!==t.sort,y=n.isString(this.comparator)?this.comparator:null;for(s=0;s<e.length;s++){i=e[s];var v=this.get(i);if(v){if(m&&i!==v){var M=this._isModel(i)?i.attributes:i;t.parse&&(M=v.parse(M,t)),v.set(M,t),d.push(v),p&&!_&&(_=v.hasChanged(y))}c[v.cid]||(c[v.cid]=!0,o.push(v)),e[s]=v}else f&&(i=e[s]=this._prepareModel(i,t))&&(u.push(i),this._addReference(i,t),c[i.cid]=!0,o.push(i))}if(h){for(s=0;s<this.length;s++)c[(i=this.models[s]).cid]||l.push(i);l.length&&this._removeModels(l,t)}var k=!1,w=!p&&f&&h;if(o.length&&w?(k=this.length!==o.length||n.some(this.models,(function(e,t){return e!==o[t]})),this.models.length=0,L(this.models,o,0),this.length=this.models.length):u.length&&(p&&(_=!0),L(this.models,u,null==a?this.length:a),this.length=this.models.length),_&&this.sort({silent:!0}),!t.silent){for(s=0;s<u.length;s++)null!=a&&(t.index=a+s),(i=u[s]).trigger("add",i,this,t);(_||k)&&this.trigger("sort",this,t),(u.length||l.length||d.length)&&(t.changes={added:u,removed:l,merged:d},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return i.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=t.bind(this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var a=e.reset?"reset":"set";r[a](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},U(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var a=this,i=t.success;return t.success=function(e,t,n){r&&a.add(e,n),i&&i.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},values:function(){return new w(this,Y)},keys:function(){return new w(this,b)},entries:function(){return new w(this,T)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var a=this.get(e[r]);if(a){var i=this.indexOf(a);this.models.splice(i,1),this.length--,delete this._byId[a.cid];var s=this.modelId(a.attributes);null!=s&&delete this._byId[s],t.silent||(t.index=i,a.trigger("remove",a,this,t)),n.push(a),this._removeReference(a,t)}}return n},_isModel:function(e){return e instanceof y},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var a=this.modelId(t.previousAttributes()),i=this.modelId(t.attributes);a!==i&&(null!=a&&delete this._byId[a],null!=i&&(this._byId[i]=t))}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(v.prototype[k]=v.prototype.values);var w=function(e,t){this._collection=e,this._kind=t,this._index=0},Y=1,b=2,T=3;k&&(w.prototype[k]=function(){return this}),w.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e,t=this._collection.at(this._index);if(this._index++,this._kind===Y)e=t;else{var n=this._collection.modelId(t.attributes);e=this._kind===b?n:[n,t]}return{value:e,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var D=t.View=function(e){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(e,S)),this._ensureElement(),this.initialize.apply(this,arguments)},x=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];n.extend(D.prototype,o,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var a=t.match(x);this.delegate(a[1],a[2],r.bind(this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}});var H=function(e,t,r,a){n.each(r,(function(n,r){t[r]&&(e.prototype[r]=function(e,t,n,r){switch(t){case 1:return function(){return e[n](this[r])};case 2:return function(t){return e[n](this[r],t)};case 3:return function(t,a){return e[n](this[r],j(t,this),a)};case 4:return function(t,a,i){return e[n](this[r],j(t,this),a,i)};default:return function(){var t=i.call(arguments);return t.unshift(this[r]),e[n].apply(e,t)}}}(t,n,r,a))}))},j=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?A(e):n.isString(e)?function(t){return t.get(e)}:e},A=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}};n.each([[v,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(e){var t=e[0],r=e[1],a=e[2];t.mixin=function(e){var r=n.reduce(n.functions(e),(function(e,t){return e[t]=0,e}),{});H(t,e,r,a)},H(t,n,r,a)})),t.sync=function(e,r,a){var i=O[e];n.defaults(a||(a={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var s={type:i,dataType:"json"};if(a.url||(s.url=n.result(r,"url")||z()),null!=a.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(a.attrs||r.toJSON(a))),a.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),a.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){s.type="POST",a.emulateJSON&&(s.data._method=i);var o=a.beforeSend;a.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",i),o)return o.apply(this,arguments)}}"GET"===s.type||a.emulateJSON||(s.processData=!1);var u=a.error;a.error=function(e,t,n){a.textStatus=t,a.errorThrown=n,u&&u.call(a.context,e,t,n)};var d=a.xhr=t.ajax(n.extend(s,a));return r.trigger("request",r,d,a),d};var O={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var P=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},E=/\((.*?)\)/g,C=/(\(\?)?:\w+/g,N=/\*\w+/g,F=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(P.prototype,o,{preinitialize:function(){},initialize:function(){},route:function(e,r,a){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(a=r,r=""),a||(a=this[r]);var i=this;return t.history.route(e,(function(n){var s=i._extractParameters(e,n);!1!==i.execute(a,s,r)&&(i.trigger.apply(i,["route:"+r].concat(s)),i.trigger("route",r,s),t.history.trigger("route",i,r,s))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(F,"\\$&").replace(E,"(?:$1)?").replace(C,(function(e,t){return t?e:"([^/?]+)"})).replace(N,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var I=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},W=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,$=/#.*$/;I.started=!1,n.extend(I.prototype,o,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(W,"")},start:function(e){if(I.started)throw new Error("Backbone.history has already been started");if(I.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,a=r.insertBefore(this.iframe,r.firstChild).contentWindow;a.document.open(),a.document.close(),a.location.hash="#"+this.fragment}var i=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),I.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!I.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;e=e.replace($,"");var a=this.decodeFragment(e);if(this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new I,y.extend=v.extend=P.extend=D.extend=I.extend=function(e,t){var r,a=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return a.apply(this,arguments)},n.extend(r,a,t),r.prototype=n.create(a.prototype,e),r.prototype.constructor=r,r.__super__=a.prototype,r};var z=function(){throw new Error('A "url" property or function must be specified')},U=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(s,n,e,t)}.apply(t,a))||(e.exports=i)}).call(this,n(26))},function(e,t,n){"use strict";var r=n(2),a=n.n(r),i=n(0),s=n.n(i),o=n(19),u=n.n(o),d=n(30),l=n.n(d),c=n(3); +var r=["","admin","log","core/search","core","3rdparty"],a=50,i=0,s=4,o=1,u=2,d=8,l=16,c=31,f="_$!<Favorite>!$_"},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"h",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return h}));var r=n(2),a=n.n(r),i=n(3),s=n(5),o=function(e,t){return m(e,"",t)},u=function(e){return h()+"/remote.php/"+e},d=function(e){return window.location.protocol+"//"+window.location.host+u(e)},l=function(e,t){return t=2!==t?1:2,window.location.protocol+"//"+window.location.host+h()+"/ocs/v"+t+".php/"+e+"/"},c=function(e,t,n){var r=n||{};a.a.defaults(r,{escape:!0});var s=function(e,t){return t=t||[],e.replace(/{([^{}]*)}/g,(function(e,n){var a=t[n];return r.escape?"string"==typeof a||"number"==typeof a?encodeURIComponent(a):encodeURIComponent(e):"string"==typeof a||"number"==typeof a?a:e}))};return"/"!==e.charAt(0)&&(e="/"+e),!0===i.a.config.modRewriteWorking?h()+s(e,t):h()+"/index.php"+s(e,t)},f=function(e,t){return-1===t.indexOf(".")?m(e,"img",t+".svg"):m(e,"img",t)},m=function(e,t,n){var r=-1!==s.i.indexOf(e),a=h();return"php"!==n.substring(n.length-3)||r?"php"===n.substring(n.length-3)||r?(a+="core"!==e&&"search"!==e||"ajax"!==t?"/":"/index.php/",r||(a+="apps/"),""!==e&&(a+=e+="/"),t&&(a+=t+"/"),a+=n):(a=i.a.appswebroots[e],t&&(a+="/"+t+"/"),"/"!==a.substring(a.length-1)&&(a+="/"),a+=n):(a+="/index.php/apps/"+e,"index.php"!==n&&(a+="/",t&&(a+=encodeURI(t+"/")),a+=n)),a},h=function(){return i.a.webroot}},,,,,function(e,t,n){"use strict";t.__esModule=!0,t.extend=o,t.indexOf=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},t.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!i.test(e))return e;return e.replace(a,s)},t.isEmpty=function(e){return!e&&0!==e||!(!l(e)||0!==e.length)},t.createFrame=function(e){var t=o({},e);return t._parent=e,t},t.blockParams=function(e,t){return e.path=t,e},t.appendContextPath=function(e,t){return(e?e+".":"")+t};var r={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},a=/[&<>"'`=]/g,i=/[&<>"'`=]/;function s(e){return r[e]}function o(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var u=Object.prototype.toString;t.toString=u;var d=function(e){return"function"==typeof e};d(/x/)&&(t.isFunction=d=function(e){return"function"==typeof e&&"[object Function]"===u.call(e)}),t.isFunction=d;var l=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===u.call(e)};t.isArray=l},function(e,t,n){(function(r){var a,i,s;s="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,a=[n(2),n(0),t],void 0===(i=function(e,t,n){s.Backbone=function(e,t,n,r){var a=e.Backbone,i=Array.prototype.slice;t.VERSION="1.4.0",t.$=r,t.noConflict=function(){return e.Backbone=a,this},t.emulateHTTP=!1,t.emulateJSON=!1;var s,o=t.Events={},u=/\s+/,d=function(e,t,r,a,i){var s,o=0;if(r&&"object"==typeof r){void 0!==a&&"context"in i&&void 0===i.context&&(i.context=a);for(s=n.keys(r);o<s.length;o++)t=d(e,t,s[o],r[s[o]],i)}else if(r&&u.test(r))for(s=r.split(u);o<s.length;o++)t=e(t,s[o],a,i);else t=e(t,r,a,i);return t};o.on=function(e,t,n){return this._events=d(l,this._events||{},e,t,{context:n,ctx:this,listening:s}),s&&((this._listeners||(this._listeners={}))[s.id]=s,s.interop=!1),this},o.listenTo=function(e,t,r){if(!e)return this;var a=e._listenId||(e._listenId=n.uniqueId("l")),i=this._listeningTo||(this._listeningTo={}),o=s=i[a];o||(this._listenId||(this._listenId=n.uniqueId("l")),o=s=i[a]=new p(this,e));var u=c(e,t,r,this);if(s=void 0,u)throw u;return o.interop&&o.on(t,r),this};var l=function(e,t,n,r){if(n){var a=e[t]||(e[t]=[]),i=r.context,s=r.ctx,o=r.listening;o&&o.count++,a.push({callback:n,context:i,ctx:i||s,listening:o})}return e},c=function(e,t,n,r){try{e.on(t,n,r)}catch(e){return e}};o.off=function(e,t,n){return this._events?(this._events=d(f,this._events,e,t,{context:n,listeners:this._listeners}),this):this},o.stopListening=function(e,t,r){var a=this._listeningTo;if(!a)return this;for(var i=e?[e._listenId]:n.keys(a),s=0;s<i.length;s++){var o=a[i[s]];if(!o)break;o.obj.off(t,r,this),o.interop&&o.off(t,r)}return n.isEmpty(a)&&(this._listeningTo=void 0),this};var f=function(e,t,r,a){if(e){var i,s=a.context,o=a.listeners,u=0;if(t||s||r){for(i=t?[t]:n.keys(e);u<i.length;u++){var d=e[t=i[u]];if(!d)break;for(var l=[],c=0;c<d.length;c++){var f=d[c];if(r&&r!==f.callback&&r!==f.callback._callback||s&&s!==f.context)l.push(f);else{var m=f.listening;m&&m.off(t,r)}}l.length?e[t]=l:delete e[t]}return e}for(i=n.keys(o);u<i.length;u++)o[i[u]].cleanup()}};o.once=function(e,t,n){var r=d(m,{},e,t,this.off.bind(this));return"string"==typeof e&&null==n&&(t=void 0),this.on(r,t,n)},o.listenToOnce=function(e,t,n){var r=d(m,{},t,n,this.stopListening.bind(this,e));return this.listenTo(e,r)};var m=function(e,t,r,a){if(r){var i=e[t]=n.once((function(){a(t,i),r.apply(this,arguments)}));i._callback=r}return e};o.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return d(h,this._events,e,void 0,n),this};var h=function(e,t,n,r){if(e){var a=e[t],i=e.all;a&&i&&(i=i.slice()),a&&_(a,r),i&&_(i,[t].concat(r))}return e},_=function(e,t){var n,r=-1,a=e.length,i=t[0],s=t[1],o=t[2];switch(t.length){case 0:for(;++r<a;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i);return;case 2:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i,s);return;case 3:for(;++r<a;)(n=e[r]).callback.call(n.ctx,i,s,o);return;default:for(;++r<a;)(n=e[r]).callback.apply(n.ctx,t);return}},p=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};p.prototype.on=o.on,p.prototype.off=function(e,t){var n;this.interop?(this._events=d(f,this._events,e,t,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},p.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},o.bind=o.on,o.unbind=o.off,n.extend(t,o);var y=t.Model=function(e,t){var r=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var a=n.result(this,"defaults");r=n.defaults(n.extend({},a,r),a),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,o,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var a;if("object"==typeof e?(a=e,r=t):(a={})[e]=t,r||(r={}),!this._validate(a,r))return!1;var i=r.unset,s=r.silent,o=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var d=this.attributes,l=this.changed,c=this._previousAttributes;for(var f in a)t=a[f],n.isEqual(d[f],t)||o.push(f),n.isEqual(c[f],t)?delete l[f]:l[f]=t,i?delete d[f]:d[f]=t;if(this.idAttribute in a&&(this.id=this.get(this.idAttribute)),!s){o.length&&(this._pending=r);for(var m=0;m<o.length;m++)this.trigger("change:"+o[m],this,d[o[m]],r)}if(u)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t,r=this._changing?this._previousAttributes:this.attributes,a={};for(var i in e){var s=e[i];n.isEqual(r[i],s)||(a[i]=s,t=!0)}return!!t&&a},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var a=e.parse?t.parse(n,e):n;if(!t.set(a,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},U(this,e),this.sync("read",this,e)},save:function(e,t,r){var a;null==e||"object"==typeof e?(a=e,r=t):(a={})[e]=t;var i=(r=n.extend({validate:!0,parse:!0},r)).wait;if(a&&!i){if(!this.set(a,r))return!1}else if(!this._validate(a,r))return!1;var s=this,o=r.success,u=this.attributes;r.success=function(e){s.attributes=u;var t=r.parse?s.parse(e,r):e;if(i&&(t=n.extend({},a,t)),t&&!s.set(t,r))return!1;o&&o.call(r.context,s,e,r),s.trigger("sync",s,e,r)},U(this,r),a&&i&&(this.attributes=n.extend({},u,a));var d=this.isNew()?"create":r.patch?"patch":"update";"patch"!==d||r.attrs||(r.attrs=a);var l=this.sync(d,this,r);return this.attributes=u,l},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,a=e.wait,i=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){a&&i(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var s=!1;return this.isNew()?n.defer(e.success):(U(this,e),s=this.sync("delete",this,e)),a||i(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||z();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}});var v=t.Collection=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},M={add:!0,remove:!1},L=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,a=Array(e.length-n),i=t.length;for(r=0;r<a.length;r++)a[r]=e[r+n];for(r=0;r<i;r++)e[r+n]=t[r];for(r=0;r<a.length;r++)e[r+i+n]=a[r]};n.extend(v.prototype,o,{model:y,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,M))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var a=this._removeModels(e,t);return!t.silent&&a.length&&(t.changes={added:[],merged:[],removed:a},this.trigger("update",this,t)),r?a[0]:a},set:function(e,t){if(null!=e){(t=n.extend({},g,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var a=t.at;null!=a&&(a=+a),a>this.length&&(a=this.length),a<0&&(a+=this.length+1);var i,s,o=[],u=[],d=[],l=[],c={},f=t.add,m=t.merge,h=t.remove,_=!1,p=this.comparator&&null==a&&!1!==t.sort,y=n.isString(this.comparator)?this.comparator:null;for(s=0;s<e.length;s++){i=e[s];var v=this.get(i);if(v){if(m&&i!==v){var M=this._isModel(i)?i.attributes:i;t.parse&&(M=v.parse(M,t)),v.set(M,t),d.push(v),p&&!_&&(_=v.hasChanged(y))}c[v.cid]||(c[v.cid]=!0,o.push(v)),e[s]=v}else f&&(i=e[s]=this._prepareModel(i,t))&&(u.push(i),this._addReference(i,t),c[i.cid]=!0,o.push(i))}if(h){for(s=0;s<this.length;s++)c[(i=this.models[s]).cid]||l.push(i);l.length&&this._removeModels(l,t)}var k=!1,w=!p&&f&&h;if(o.length&&w?(k=this.length!==o.length||n.some(this.models,(function(e,t){return e!==o[t]})),this.models.length=0,L(this.models,o,0),this.length=this.models.length):u.length&&(p&&(_=!0),L(this.models,u,null==a?this.length:a),this.length=this.models.length),_&&this.sort({silent:!0}),!t.silent){for(s=0;s<u.length;s++)null!=a&&(t.index=a+s),(i=u[s]).trigger("add",i,this,t);(_||k)&&this.trigger("sort",this,t),(u.length||l.length||d.length)&&(t.changes={added:u,removed:l,merged:d},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return i.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=t.bind(this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var a=e.reset?"reset":"set";r[a](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},U(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var a=this,i=t.success;return t.success=function(e,t,n){r&&a.add(e,n),i&&i.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},values:function(){return new w(this,Y)},keys:function(){return new w(this,b)},entries:function(){return new w(this,T)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var a=this.get(e[r]);if(a){var i=this.indexOf(a);this.models.splice(i,1),this.length--,delete this._byId[a.cid];var s=this.modelId(a.attributes);null!=s&&delete this._byId[s],t.silent||(t.index=i,a.trigger("remove",a,this,t)),n.push(a),this._removeReference(a,t)}}return n},_isModel:function(e){return e instanceof y},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var a=this.modelId(t.previousAttributes()),i=this.modelId(t.attributes);a!==i&&(null!=a&&delete this._byId[a],null!=i&&(this._byId[i]=t))}}this.trigger.apply(this,arguments)}});var k="function"==typeof Symbol&&Symbol.iterator;k&&(v.prototype[k]=v.prototype.values);var w=function(e,t){this._collection=e,this._kind=t,this._index=0},Y=1,b=2,T=3;k&&(w.prototype[k]=function(){return this}),w.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var e,t=this._collection.at(this._index);if(this._index++,this._kind===Y)e=t;else{var n=this._collection.modelId(t.attributes);e=this._kind===b?n:[n,t]}return{value:e,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var D=t.View=function(e){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(e,S)),this._ensureElement(),this.initialize.apply(this,arguments)},x=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];n.extend(D.prototype,o,{tagName:"div",$:function(e){return this.$el.find(e)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var a=t.match(x);this.delegate(a[1],a[2],r.bind(this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}});var H=function(e,t,r,a){n.each(r,(function(n,r){t[r]&&(e.prototype[r]=function(e,t,n,r){switch(t){case 1:return function(){return e[n](this[r])};case 2:return function(t){return e[n](this[r],t)};case 3:return function(t,a){return e[n](this[r],j(t,this),a)};case 4:return function(t,a,i){return e[n](this[r],j(t,this),a,i)};default:return function(){var t=i.call(arguments);return t.unshift(this[r]),e[n].apply(e,t)}}}(t,n,r,a))}))},j=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?A(e):n.isString(e)?function(t){return t.get(e)}:e},A=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}};n.each([[v,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models"],[y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],(function(e){var t=e[0],r=e[1],a=e[2];t.mixin=function(e){var r=n.reduce(n.functions(e),(function(e,t){return e[t]=0,e}),{});H(t,e,r,a)},H(t,n,r,a)})),t.sync=function(e,r,a){var i=O[e];n.defaults(a||(a={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var s={type:i,dataType:"json"};if(a.url||(s.url=n.result(r,"url")||z()),null!=a.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(a.attrs||r.toJSON(a))),a.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),a.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){s.type="POST",a.emulateJSON&&(s.data._method=i);var o=a.beforeSend;a.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",i),o)return o.apply(this,arguments)}}"GET"===s.type||a.emulateJSON||(s.processData=!1);var u=a.error;a.error=function(e,t,n){a.textStatus=t,a.errorThrown=n,u&&u.call(a.context,e,t,n)};var d=a.xhr=t.ajax(n.extend(s,a));return r.trigger("request",r,d,a),d};var O={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var P=t.Router=function(e){e||(e={}),this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},E=/\((.*?)\)/g,C=/(\(\?)?:\w+/g,N=/\*\w+/g,F=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(P.prototype,o,{preinitialize:function(){},initialize:function(){},route:function(e,r,a){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(a=r,r=""),a||(a=this[r]);var i=this;return t.history.route(e,(function(n){var s=i._extractParameters(e,n);!1!==i.execute(a,s,r)&&(i.trigger.apply(i,["route:"+r].concat(s)),i.trigger("route",r,s),t.history.trigger("route",i,r,s))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(F,"\\$&").replace(E,"(?:$1)?").replace(C,(function(e,t){return t?e:"([^/?]+)"})).replace(N,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var I=t.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},W=/^[#\/]|\s+$/g,R=/^\/+|\/+$/g,$=/#.*$/;I.started=!1,n.extend(I.prototype,o,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(W,"")},start:function(e){if(I.started)throw new Error("Backbone.history has already been started");if(I.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(R,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,a=r.insertBefore(this.iframe,r.firstChild).contentWindow;a.document.open(),a.document.close(),a.location.hash="#"+this.fragment}var i=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),I.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!I.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;e=e.replace($,"");var a=this.decodeFragment(e);if(this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new I,y.extend=v.extend=P.extend=D.extend=I.extend=function(e,t){var r,a=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return a.apply(this,arguments)},n.extend(r,a,t),r.prototype=n.create(a.prototype,e),r.prototype.constructor=r,r.__super__=a.prototype,r};var z=function(){throw new Error('A "url" property or function must be specified')},U=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(s,n,e,t)}.apply(t,a))||(e.exports=i)}).call(this,n(26))},function(e,t,n){"use strict";var r=n(2),a=n.n(r),i=n(0),s=n.n(i),o=n(19),u=n.n(o),d=n(30),l=n.n(d),c=n(3); /* * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * |