UNPKG

@atlassian/aui

Version:

Atlassian User Interface library

12 lines 509 kB
/*!! * @atlassian/aui - Atlassian User Interface library * @version v9.13.2 * @link https://aui.atlassian.com * @license Apache-2.0 * @author Atlassian Pty Ltd. */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define("@atlassian/aui",["jquery"],e):"object"==typeof exports?exports["@atlassian/aui"]=e(require("jquery")):t.AJS=e(t.jQuery)}(window,(t=>(()=>{var e={547:()=>{console.debug("AUI import for WRM I18n not loaded")},581:()=>{jQuery.fn.moveTo=function(t){var e,i=jQuery.extend({transition:!1,scrollOffset:35},t),n=this,s=n.offset().top;if((jQuery(window).scrollTop()+jQuery(window).height()-this.outerHeight()<s||jQuery(window).scrollTop()+i.scrollOffset>s)&&jQuery(window).height()>i.scrollOffset){if(e=jQuery(window).scrollTop()+i.scrollOffset>s?s-(jQuery(window).height()-this.outerHeight())+i.scrollOffset:s-i.scrollOffset,!jQuery.fn.moveTo.animating&&i.transition)return jQuery(document).trigger("moveToStarted",this),jQuery.fn.moveTo.animating=!0,jQuery("html,body").animate({scrollTop:e},1e3,(function(){jQuery(document).trigger("moveToFinished",n),delete jQuery.fn.moveTo.animating})),this;var r=jQuery("html, body");return r.is(":animated")&&(r.stop(),delete jQuery.fn.moveTo.animating),jQuery(document).trigger("moveToStarted"),jQuery(window).scrollTop(e),setTimeout((function(){jQuery(document).trigger("moveToFinished",n)}),100),this}return jQuery(document).trigger("moveToFinished",this),this}},973:(t,e,i)=>{var n,s,r;r="object"==typeof self&&self.self===self&&self||"object"==typeof i.g&&i.g.global===i.g&&i.g,n=[i(126),i(687),e],s=function(t,e,i){r.Backbone=function(t,e,i,n){var s=t.Backbone,r=Array.prototype.slice;e.VERSION="1.6.0",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var a,o=e.Events={},l=/\s+/,c=function(t,e,n,s,r){var a,o=0;if(n&&"object"==typeof n){void 0!==s&&"context"in r&&void 0===r.context&&(r.context=s);for(a=i.keys(n);o<a.length;o++)e=c(t,e,a[o],n[a[o]],r)}else if(n&&l.test(n))for(a=n.split(l);o<a.length;o++)e=t(e,a[o],s,r);else e=t(e,n,s,r);return e};o.on=function(t,e,i){return this._events=c(u,this._events||{},t,e,{context:i,ctx:this,listening:a}),a&&((this._listeners||(this._listeners={}))[a.id]=a,a.interop=!1),this},o.listenTo=function(t,e,n){if(!t)return this;var s=t._listenId||(t._listenId=i.uniqueId("l")),r=this._listeningTo||(this._listeningTo={}),o=a=r[s];o||(this._listenId||(this._listenId=i.uniqueId("l")),o=a=r[s]=new m(this,t));var l=d(t,e,n,this);if(a=void 0,l)throw l;return o.interop&&o.on(e,n),this};var u=function(t,e,i,n){if(i){var s=t[e]||(t[e]=[]),r=n.context,a=n.ctx,o=n.listening;o&&o.count++,s.push({callback:i,context:r,ctx:r||a,listening:o})}return t},d=function(t,e,i,n){try{t.on(e,i,n)}catch(t){return t}};o.off=function(t,e,i){return this._events?(this._events=c(h,this._events,t,e,{context:i,listeners:this._listeners}),this):this},o.stopListening=function(t,e,n){var s=this._listeningTo;if(!s)return this;for(var r=t?[t._listenId]:i.keys(s),a=0;a<r.length;a++){var o=s[r[a]];if(!o)break;o.obj.off(e,n,this),o.interop&&o.off(e,n)}return i.isEmpty(s)&&(this._listeningTo=void 0),this};var h=function(t,e,n,s){if(t){var r,a=s.context,o=s.listeners,l=0;if(e||a||n){for(r=e?[e]:i.keys(t);l<r.length;l++){var c=t[e=r[l]];if(!c)break;for(var u=[],d=0;d<c.length;d++){var h=c[d];if(n&&n!==h.callback&&n!==h.callback._callback||a&&a!==h.context)u.push(h);else{var p=h.listening;p&&p.off(e,n)}}u.length?t[e]=u:delete t[e]}return t}for(r=i.keys(o);l<r.length;l++)o[r[l]].cleanup()}};o.once=function(t,e,i){var n=c(p,{},t,e,this.off.bind(this));return"string"==typeof t&&null==i&&(e=void 0),this.on(n,e,i)},o.listenToOnce=function(t,e,i){var n=c(p,{},e,i,this.stopListening.bind(this,t));return this.listenTo(t,n)};var p=function(t,e,n,s){if(n){var r=t[e]=i.once((function(){s(e,r),n.apply(this,arguments)}));r._callback=n}return t};o.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),i=Array(e),n=0;n<e;n++)i[n]=arguments[n+1];return c(f,this._events,t,void 0,i),this};var f=function(t,e,i,n){if(t){var s=t[e],r=t.all;s&&r&&(r=r.slice()),s&&g(s,n),r&&g(r,[e].concat(n))}return t},g=function(t,e){var i,n=-1,s=t.length,r=e[0],a=e[1],o=e[2];switch(e.length){case 0:for(;++n<s;)(i=t[n]).callback.call(i.ctx);return;case 1:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r);return;case 2:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a);return;case 3:for(;++n<s;)(i=t[n]).callback.call(i.ctx,r,a,o);return;default:for(;++n<s;)(i=t[n]).callback.apply(i.ctx,e);return}},m=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=o.on,m.prototype.off=function(t,e){var i;this.interop?(this._events=c(h,this._events,t,e,{context:void 0,listeners:void 0}),i=!this._events):(this.count--,i=0===this.count),i&&this.cleanup()},m.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,i.extend(e,o);var v=e.Model=function(t,e){var n=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=i.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{});var s=i.result(this,"defaults");n=i.defaults(i.extend({},s,n),s),this.set(n,e),this.changed={},this.initialize.apply(this,arguments)};i.extend(v.prototype,o,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!i.iteratee(t,this)(this.attributes)},set:function(t,e,n){if(null==t)return this;var s;if("object"==typeof t?(s=t,n=e):(s={})[t]=e,n||(n={}),!this._validate(s,n))return!1;var r=n.unset,a=n.silent,o=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=i.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,d=this._previousAttributes;for(var h in s)e=s[h],i.isEqual(c[h],e)||o.push(h),i.isEqual(d[h],e)?delete u[h]:u[h]=e,r?delete c[h]:c[h]=e;if(this.idAttribute in s){var p=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,p,n)}if(!a){o.length&&(this._pending=n);for(var f=0;f<o.length;f++)this.trigger("change:"+o[f],this,c[o[f]],n)}if(l)return this;if(!a)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,i.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!i.isEmpty(this.changed):i.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&i.clone(this.changed);var e,n=this._changing?this._previousAttributes:this.attributes,s={};for(var r in t){var a=t[r];i.isEqual(n[r],a)||(s[r]=a,e=!0)}return!!e&&s},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=i.extend({parse:!0},t);var e=this,n=t.success;return t.success=function(i){var s=t.parse?e.parse(i,t):i;if(!e.set(s,t))return!1;n&&n.call(t.context,e,i,t),e.trigger("sync",e,i,t)},K(this,t),this.sync("read",this,t)},save:function(t,e,n){var s;null==t||"object"==typeof t?(s=t,n=e):(s={})[t]=e;var r=(n=i.extend({validate:!0,parse:!0},n)).wait;if(s&&!r){if(!this.set(s,n))return!1}else if(!this._validate(s,n))return!1;var a=this,o=n.success,l=this.attributes;n.success=function(t){a.attributes=l;var e=n.parse?a.parse(t,n):t;if(r&&(e=i.extend({},s,e)),e&&!a.set(e,n))return!1;o&&o.call(n.context,a,t,n),a.trigger("sync",a,t,n)},K(this,n),s&&r&&(this.attributes=i.extend({},l,s));var c=this.isNew()?"create":n.patch?"patch":"update";"patch"!==c||n.attrs||(n.attrs=s);var u=this.sync(c,this,n);return this.attributes=l,u},destroy:function(t){t=t?i.clone(t):{};var e=this,n=t.success,s=t.wait,r=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(i){s&&r(),n&&n.call(t.context,e,i,t),e.isNew()||e.trigger("sync",e,i,t)};var a=!1;return this.isNew()?i.defer(t.success):(K(this,t),a=this.sync("delete",this,t)),s||r(),a},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||q();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=i.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return!n||(this.trigger("invalid",this,n,i.extend(e,{validationError:n})),!1)}});var b=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,i.extend({silent:!0},e))},y={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},_=function(t,e,i){i=Math.min(Math.max(i,0),t.length);var n,s=Array(t.length-i),r=e.length;for(n=0;n<s.length;n++)s[n]=t[n+i];for(n=0;n<r;n++)t[n+i]=e[n];for(n=0;n<s.length;n++)t[n+r+i]=s[n]};i.extend(b.prototype,o,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map((function(e){return e.toJSON(t)}))},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:!1},e,w))},remove:function(t,e){e=i.extend({},e);var n=!i.isArray(t);t=n?[t]:t.slice();var s=this._removeModels(t,e);return!e.silent&&s.length&&(e.changes={added:[],merged:[],removed:s},this.trigger("update",this,e)),n?s[0]:s},set:function(t,e){if(null!=t){(e=i.extend({},y,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var n=!i.isArray(t);t=n?[t]:t.slice();var s=e.at;null!=s&&(s=+s),s>this.length&&(s=this.length),s<0&&(s+=this.length+1);var r,a,o=[],l=[],c=[],u=[],d={},h=e.add,p=e.merge,f=e.remove,g=!1,m=this.comparator&&null==s&&!1!==e.sort,v=i.isString(this.comparator)?this.comparator:null;for(a=0;a<t.length;a++){r=t[a];var b=this.get(r);if(b){if(p&&r!==b){var w=this._isModel(r)?r.attributes:r;e.parse&&(w=b.parse(w,e)),b.set(w,e),c.push(b),m&&!g&&(g=b.hasChanged(v))}d[b.cid]||(d[b.cid]=!0,o.push(b)),t[a]=b}else h&&(r=t[a]=this._prepareModel(r,e))&&(l.push(r),this._addReference(r,e),d[r.cid]=!0,o.push(r))}if(f){for(a=0;a<this.length;a++)d[(r=this.models[a]).cid]||u.push(r);u.length&&this._removeModels(u,e)}var x=!1,C=!m&&h&&f;if(o.length&&C?(x=this.length!==o.length||i.some(this.models,(function(t,e){return t!==o[e]})),this.models.length=0,_(this.models,o,0),this.length=this.models.length):l.length&&(m&&(g=!0),_(this.models,l,null==s?this.length:s),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(a=0;a<l.length;a++)null!=s&&(e.index=s+a),(r=l[a]).trigger("add",r,this,e);(g||x)&&this.trigger("sort",this,e),(l.length||u.length||c.length)&&(e.changes={added:l,removed:u,merged:c},this.trigger("update",this,e))}return n?t[0]:t}},reset:function(t,e){e=e?i.clone(e):{};for(var n=0;n<this.models.length;n++)this._removeReference(this.models[n],e);return e.previousModels=this.models,this._reset(),t=this.add(t,i.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return r.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var n=e.length;return i.isFunction(e)&&(e=e.bind(this)),1===n||i.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=i.extend({parse:!0},t)).success,n=this;return t.success=function(i){var s=t.reset?"reset":"set";n[s](i,t),e&&e.call(t.context,n,i,t),n.trigger("sync",n,i,t)},K(this,t),this.sync("read",this,t)},create:function(t,e){var n=(e=e?i.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;n||this.add(t,e);var s=this,r=e.success;return e.success=function(t,e,i){n&&(t.off("error",s._forwardPristineError,s),s.add(t,i)),r&&r.call(i.context,t,e,i)},n&&t.once("error",this._forwardPristineError,this),t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new C(this,k)},keys:function(){return new C(this,T)},entries:function(){return new C(this,E)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?i.clone(e):{}).collection=this,(n=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError?(this.trigger("invalid",this,n.validationError,e),!1):n);var n},_removeModels:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=this.get(t[n]);if(s){var r=this.indexOf(s);this.models.splice(r,1),this.length--,delete this._byId[s.cid];var a=this.modelId(s.attributes,s.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=r,s.trigger("remove",s,this,e)),i.push(s),this._removeReference(s,e)}}return t.length>0&&!e.silent&&delete e.index,i},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var i=this.modelId(t.attributes,t.idAttribute);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes,t.idAttribute);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,n){if(e){if(("add"===t||"remove"===t)&&i!==this)return;if("destroy"===t&&this.remove(e,n),"changeId"===t){var s=this.modelId(e.previousAttributes(),e.idAttribute),r=this.modelId(e.attributes,e.idAttribute);null!=s&&delete this._byId[s],null!=r&&(this._byId[r]=e)}}this.trigger.apply(this,arguments)},_forwardPristineError:function(t,e,i){this.has(t)||this._onModelEvent("error",t,e,i)}});var x="function"==typeof Symbol&&Symbol.iterator;x&&(b.prototype[x]=b.prototype.values);var C=function(t,e){this._collection=t,this._kind=e,this._index=0},k=1,T=2,E=3;x&&(C.prototype[x]=function(){return this}),C.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===k)t=e;else{var i=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===T?i:[i,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var A=e.View=function(t){this.cid=i.uniqueId("view"),this.preinitialize.apply(this,arguments),i.extend(this,i.pick(t,S)),this._ensureElement(),this.initialize.apply(this,arguments)},D=/^(\S+)\s*(.*)$/,S=["model","collection","el","id","attributes","className","tagName","events"];i.extend(A.prototype,o,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var n=t[e];if(i.isFunction(n)||(n=this[n]),n){var s=e.match(D);this.delegate(s[1],s[2],n.bind(this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(i.result(this,"el"));else{var t=i.extend({},i.result(this,"attributes"));this.id&&(t.id=i.result(this,"id")),this.className&&(t.class=i.result(this,"className")),this.setElement(this._createElement(i.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var M=function(t,e,i,n){switch(e){case 1:return function(){return t[i](this[n])};case 2:return function(e){return t[i](this[n],e)};case 3:return function(e,s){return t[i](this[n],N(e,this),s)};case 4:return function(e,s,r){return t[i](this[n],N(e,this),s,r)};default:return function(){var e=r.call(arguments);return e.unshift(this[n]),t[i].apply(t,e)}}},I=function(t,e,n,s){i.each(n,(function(i,n){e[n]&&(t.prototype[n]=M(e,i,n,s))}))},N=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?O(t):i.isString(t)?function(e){return e.get(t)}:t},O=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},L={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},P={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};i.each([[b,L,"models"],[v,P,"attributes"]],(function(t){var e=t[0],n=t[1],s=t[2];e.mixin=function(t){var n=i.reduce(i.functions(t),(function(t,e){return t[e]=0,t}),{});I(e,t,n,s)},I(e,i,n,s)})),e.sync=function(t,n,s){var r=R[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:r,dataType:"json"};if(s.url||(a.url=i.result(n,"url")||q()),null!=s.data||!n||"create"!==t&&"update"!==t&&"patch"!==t||(a.contentType="application/json",a.data=JSON.stringify(s.attrs||n.toJSON(s))),s.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),s.emulateHTTP&&("PUT"===r||"DELETE"===r||"PATCH"===r)){a.type="POST",s.emulateJSON&&(a.data._method=r);var o=s.beforeSend;s.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",r),o)return o.apply(this,arguments)}}"GET"===a.type||s.emulateJSON||(a.processData=!1);var l=s.error;s.error=function(t,e,i){s.textStatus=e,s.errorThrown=i,l&&l.call(s.context,t,e,i)};var c=s.xhr=e.ajax(i.extend(a,s));return n.trigger("request",n,c,s),c};var R={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},j=/\((.*?)\)/g,z=/(\(\?)?:\w+/g,F=/\*\w+/g,H=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,o,{preinitialize:function(){},initialize:function(){},route:function(t,n,s){i.isRegExp(t)||(t=this._routeToRegExp(t)),i.isFunction(n)&&(s=n,n=""),s||(s=this[n]);var r=this;return e.history.route(t,(function(i){var a=r._extractParameters(t,i);!1!==r.execute(s,a,n)&&(r.trigger.apply(r,["route:"+n].concat(a)),r.trigger("route",n,a),e.history.trigger("route",r,n,a))})),this},execute:function(t,e,i){t&&t.apply(this,e)},navigate:function(t,i){return e.history.navigate(t,i),this},_bindRoutes:function(){if(this.routes){this.routes=i.result(this,"routes");for(var t,e=i.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(H,"\\$&").replace(j,"(?:$1)?").replace(z,(function(t,e){return e?t:"([^/?]+)"})).replace(F,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return i.map(n,(function(t,e){return e===n.length-1?t||null:t?decodeURIComponent(t):null}))}});var B=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},U=/^[#\/]|\s+$/g,W=/^\/+|\/+$/g,V=/#.*$/;B.started=!1,i.extend(B.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(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(U,"")},start:function(t){if(B.started)throw new Error("Backbone.history has already been started");if(B.started=!0,this.options=i.extend({root:"/"},this.options,t),this.root=this.options.root,this._trailingSlash=this.options.trailingSlash,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(W,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+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 n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?r("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?r("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),B.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!this.matchRoot()&&this.notfound();this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),i.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0}))||this.notfound()):this.notfound()},notfound:function(){return this.trigger("notfound"),!1},navigate:function(t,e){if(!B.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;this._trailingSlash||""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;t=t.replace(V,"");var s=this.decodeFragment(t);if(this.fragment!==s){if(this.fragment=s,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new B;var Y=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};v.extend=b.extend=$.extend=A.extend=B.extend=Y;var q=function(){throw new Error('A "url" property or function must be specified')},K=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e._debug=function(){return{root:t,_:i}},e}(r,i,t,e)}.apply(e,n),void 0===s||(t.exports=s)},672:function(t){ /*! @license DOMPurify 2.5.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.7/LICENSE */ t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,i){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,i)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(t,s,r){return n=i()?Reflect.construct:function(t,i,n){var s=[null];s.push.apply(s,i);var r=new(Function.bind.apply(t,s));return n&&e(r,n.prototype),r},n.apply(null,arguments)}function s(t){return r(t)||a(t)||o(t)||c()}function r(t){if(Array.isArray(t))return l(t)}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t,e){if(t){if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,d=Object.setPrototypeOf,h=Object.isFrozen,p=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,g=Object.freeze,m=Object.seal,v=Object.create,b="undefined"!=typeof Reflect&&Reflect,y=b.apply,w=b.construct;y||(y=function(t,e,i){return t.apply(e,i)}),g||(g=function(t){return t}),m||(m=function(t){return t}),w||(w=function(t,e){return n(t,s(e))});var _=N(Array.prototype.forEach),x=N(Array.prototype.pop),C=N(Array.prototype.push),k=N(String.prototype.toLowerCase),T=N(String.prototype.toString),E=N(String.prototype.match),A=N(String.prototype.replace),D=N(String.prototype.indexOf),S=N(String.prototype.trim),M=N(RegExp.prototype.test),I=O(TypeError);function N(t){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return y(t,e,n)}}function O(t){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return w(t,i)}}function L(t,e,i){var n;i=null!==(n=i)&&void 0!==n?n:k,d&&d(t,null);for(var s=e.length;s--;){var r=e[s];if("string"==typeof r){var a=i(r);a!==r&&(h(e)||(e[s]=a),r=a)}t[r]=!0}return t}function P(t){var e,i=v(null);for(e in t)!0===y(u,t,[e])&&(i[e]=t[e]);return i}function R(t,e){for(;null!==t;){var i=f(t,e);if(i){if(i.get)return N(i.get);if("function"==typeof i.value)return N(i.value)}t=p(t)}function n(t){return console.warn("fallback value for",t),null}return n}var $=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),z=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F=g(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),H=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=g(["#text"]),W=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=g(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),K=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=m(/<%[\w\W]*|[\w\W]*%>/gm),G=m(/\${[\w\W]*}/gm),J=m(/^data-[\-\w.\u00B7-\uFFFF]/),Z=m(/^aria-[\-\w]+$/),X=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=m(/^(?:\w+script|data):/i),et=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),it=m(/^html$/i),nt=m(/^[a-z][.\w]*(-[.\w]+)+$/i),st=function(){return"undefined"==typeof window?null:window},rt=function(e,i){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var n=null,s="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(s)&&(n=i.currentScript.getAttribute(s));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st(),i=function(t){return at(t)};if(i.version="2.5.7",i.removed=[],!e||!e.document||9!==e.document.nodeType)return i.isSupported=!1,i;var n=e.document,r=e.document,a=e.DocumentFragment,o=e.HTMLTemplateElement,l=e.Node,c=e.Element,u=e.NodeFilter,d=e.NamedNodeMap,h=void 0===d?e.NamedNodeMap||e.MozNamedAttrMap:d,p=e.HTMLFormElement,f=e.DOMParser,m=e.trustedTypes,v=c.prototype,b=R(v,"cloneNode"),y=R(v,"nextSibling"),w=R(v,"childNodes"),N=R(v,"parentNode");if("function"==typeof o){var O=r.createElement("template");O.content&&O.content.ownerDocument&&(r=O.content.ownerDocument)}var ot=rt(m,n),lt=ot?ot.createHTML(""):"",ct=r,ut=ct.implementation,dt=ct.createNodeIterator,ht=ct.createDocumentFragment,pt=ct.getElementsByTagName,ft=n.importNode,gt={};try{gt=P(r).documentMode?r.documentMode:{}}catch(t){}var mt={};i.isSupported="function"==typeof N&&ut&&void 0!==ut.createHTMLDocument&&9!==gt;var vt,bt,yt=K,wt=Q,_t=G,xt=J,Ct=Z,kt=tt,Tt=et,Et=nt,At=X,Dt=null,St=L({},[].concat(s($),s(j),s(z),s(H),s(U))),Mt=null,It=L({},[].concat(s(W),s(V),s(Y),s(q))),Nt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ot=null,Lt=null,Pt=!0,Rt=!0,$t=!1,jt=!0,zt=!1,Ft=!0,Ht=!1,Bt=!1,Ut=!1,Wt=!1,Vt=!1,Yt=!1,qt=!0,Kt=!1,Qt="user-content-",Gt=!0,Jt=!1,Zt={},Xt=null,te=L({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ee=null,ie=L({},["audio","video","img","source","image","track"]),ne=null,se=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",ae="http://www.w3.org/2000/svg",oe="http://www.w3.org/1999/xhtml",le=oe,ce=!1,ue=null,de=L({},[re,ae,oe],T),he=["application/xhtml+xml","text/html"],pe="text/html",fe=null,ge=r.createElement("form"),me=function(t){return t instanceof RegExp||t instanceof Function},ve=function(e){fe&&fe===e||(e&&"object"===t(e)||(e={}),e=P(e),vt=vt=-1===he.indexOf(e.PARSER_MEDIA_TYPE)?pe:e.PARSER_MEDIA_TYPE,bt="application/xhtml+xml"===vt?T:k,Dt="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS,bt):St,Mt="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR,bt):It,ue="ALLOWED_NAMESPACES"in e?L({},e.ALLOWED_NAMESPACES,T):de,ne="ADD_URI_SAFE_ATTR"in e?L(P(se),e.ADD_URI_SAFE_ATTR,bt):se,ee="ADD_DATA_URI_TAGS"in e?L(P(ie),e.ADD_DATA_URI_TAGS,bt):ie,Xt="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS,bt):te,Ot="FORBID_TAGS"in e?L({},e.FORBID_TAGS,bt):{},Lt="FORBID_ATTR"in e?L({},e.FORBID_ATTR,bt):{},Zt="USE_PROFILES"in e&&e.USE_PROFILES,Pt=!1!==e.ALLOW_ARIA_ATTR,Rt=!1!==e.ALLOW_DATA_ATTR,$t=e.ALLOW_UNKNOWN_PROTOCOLS||!1,jt=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,zt=e.SAFE_FOR_TEMPLATES||!1,Ft=!1!==e.SAFE_FOR_XML,Ht=e.WHOLE_DOCUMENT||!1,Wt=e.RETURN_DOM||!1,Vt=e.RETURN_DOM_FRAGMENT||!1,Yt=e.RETURN_TRUSTED_TYPE||!1,Ut=e.FORCE_BODY||!1,qt=!1!==e.SANITIZE_DOM,Kt=e.SANITIZE_NAMED_PROPS||!1,Gt=!1!==e.KEEP_CONTENT,Jt=e.IN_PLACE||!1,At=e.ALLOWED_URI_REGEXP||At,le=e.NAMESPACE||oe,Nt=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&me(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Nt.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&me(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Nt.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Nt.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),zt&&(Rt=!1),Vt&&(Wt=!0),Zt&&(Dt=L({},s(U)),Mt=[],!0===Zt.html&&(L(Dt,$),L(Mt,W)),!0===Zt.svg&&(L(Dt,j),L(Mt,V),L(Mt,q)),!0===Zt.svgFilters&&(L(Dt,z),L(Mt,V),L(Mt,q)),!0===Zt.mathMl&&(L(Dt,H),L(Mt,Y),L(Mt,q))),e.ADD_TAGS&&(Dt===St&&(Dt=P(Dt)),L(Dt,e.ADD_TAGS,bt)),e.ADD_ATTR&&(Mt===It&&(Mt=P(Mt)),L(Mt,e.ADD_ATTR,bt)),e.ADD_URI_SAFE_ATTR&&L(ne,e.ADD_URI_SAFE_ATTR,bt),e.FORBID_CONTENTS&&(Xt===te&&(Xt=P(Xt)),L(Xt,e.FORBID_CONTENTS,bt)),Gt&&(Dt["#text"]=!0),Ht&&L(Dt,["html","head","body"]),Dt.table&&(L(Dt,["tbody"]),delete Ot.tbody),g&&g(e),fe=e)},be=L({},["mi","mo","mn","ms","mtext"]),ye=L({},["annotation-xml"]),we=L({},["title","style","font","a","script"]),_e=L({},j);L(_e,z),L(_e,F);var xe=L({},H);L(xe,B);var Ce=function(t){var e=N(t);e&&e.tagName||(e={namespaceURI:le,tagName:"template"});var i=k(t.tagName),n=k(e.tagName);return!!ue[t.namespaceURI]&&(t.namespaceURI===ae?e.namespaceURI===oe?"svg"===i:e.namespaceURI===re?"svg"===i&&("annotation-xml"===n||be[n]):Boolean(_e[i]):t.namespaceURI===re?e.namespaceURI===oe?"math"===i:e.namespaceURI===ae?"math"===i&&ye[n]:Boolean(xe[i]):t.namespaceURI===oe?!(e.namespaceURI===ae&&!ye[n])&&!(e.namespaceURI===re&&!be[n])&&!xe[i]&&(we[i]||!_e[i]):!("application/xhtml+xml"!==vt||!ue[t.namespaceURI]))},ke=function(t){C(i.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=lt}catch(e){t.remove()}}},Te=function(t,e){try{C(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){C(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Mt[t])if(Wt||Vt)try{ke(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},Ee=function(t){var e,i;if(Ut)t="<remove></remove>"+t;else{var n=E(t,/^[\r\n\t ]+/);i=n&&n[0]}"application/xhtml+xml"===vt&&le===oe&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var s=ot?ot.createHTML(t):t;if(le===oe)try{e=(new f).parseFromString(s,vt)}catch(t){}if(!e||!e.documentElement){e=ut.createDocument(le,"template",null);try{e.documentElement.innerHTML=ce?lt:s}catch(t){}}var a=e.body||e.documentElement;return t&&i&&a.insertBefore(r.createTextNode(i),a.childNodes[0]||null),le===oe?pt.call(e,Ht?"html":"body")[0]:Ht?e.documentElement:a},Ae=function(t){return dt.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null,!1)},De=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Se=function(e){return"object"===t(l)?e instanceof l:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Me=function(t,e,n){mt[t]&&_(mt[t],(function(t){t.call(i,e,n,fe)}))},Ie=function(t){var e;if(Me("beforeSanitizeElements",t,null),De(t))return ke(t),!0;if(M(/[\u0080-\uFFFF]/,t.nodeName))return ke(t),!0;var n=bt(t.nodeName);if(Me("uponSanitizeElement",t,{tagName:n,allowedTags:Dt}),t.hasChildNodes()&&!Se(t.firstElementChild)&&(!Se(t.content)||!Se(t.content.firstElementChild))&&M(/<[/\w]/g,t.innerHTML)&&M(/<[/\w]/g,t.textContent))return ke(t),!0;if("select"===n&&M(/<template/i,t.innerHTML))return ke(t),!0;if(7===t.nodeType)return ke(t),!0;if(Ft&&8===t.nodeType&&M(/<[/\w]/g,t.data))return ke(t),!0;if(!Dt[n]||Ot[n]){if(!Ot[n]&&Oe(n)){if(Nt.tagNameCheck instanceof RegExp&&M(Nt.tagNameCheck,n))return!1;if(Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(n))return!1}if(Gt&&!Xt[n]){var s=N(t)||t.parentNode,r=w(t)||t.childNodes;if(r&&s)for(var a=r.length-1;a>=0;--a){var o=b(r[a],!0);o.__removalCount=(t.__removalCount||0)+1,s.insertBefore(o,y(t))}}return ke(t),!0}return t instanceof c&&!Ce(t)?(ke(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!M(/<\/no(script|embed|frames)/i,t.innerHTML)?(zt&&3===t.nodeType&&(e=t.textContent,e=A(e,yt," "),e=A(e,wt," "),e=A(e,_t," "),t.textContent!==e&&(C(i.removed,{element:t.cloneNode()}),t.textContent=e)),Me("afterSanitizeElements",t,null),!1):(ke(t),!0)},Ne=function(t,e,i){if(qt&&("id"===e||"name"===e)&&(i in r||i in ge))return!1;if(Rt&&!Lt[e]&&M(xt,e));else if(Pt&&M(Ct,e));else if(!Mt[e]||Lt[e]){if(!(Oe(t)&&(Nt.tagNameCheck instanceof RegExp&&M(Nt.tagNameCheck,t)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(t))&&(Nt.attributeNameCheck instanceof RegExp&&M(Nt.attributeNameCheck,e)||Nt.attributeNameCheck instanceof Function&&Nt.attributeNameCheck(e))||"is"===e&&Nt.allowCustomizedBuiltInElements&&(Nt.tagNameCheck instanceof RegExp&&M(Nt.tagNameCheck,i)||Nt.tagNameCheck instanceof Function&&Nt.tagNameCheck(i))))return!1}else if(ne[e]);else if(M(At,A(i,Tt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==D(i,"data:")||!ee[t])if($t&&!M(kt,A(i,Tt,"")));else if(i)return!1;return!0},Oe=function(t){return"annotation-xml"!==t&&E(t,Et)},Le=function(e){var n,s,r,a;Me("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Mt};for(a=o.length;a--;){var c=n=o[a],u=c.name,d=c.namespaceURI;if(s="value"===u?n.value:S(n.value),r=bt(u),l.attrName=r,l.attrValue=s,l.keepAttr=!0,l.forceKeepAttr=void 0,Me("uponSanitizeAttribute",e,l),s=l.attrValue,!l.forceKeepAttr&&(Te(u,e),l.keepAttr))if(jt||!M(/\/>/i,s)){zt&&(s=A(s,yt," "),s=A(s,wt," "),s=A(s,_t," "));var h=bt(e.nodeName);if(Ne(h,r,s))if(!Kt||"id"!==r&&"name"!==r||(Te(u,e),s=Qt+s),Ft&&M(/((--!?|])>)|<\/(style|title)/i,s))Te(u,e);else{if(ot&&"object"===t(m)&&"function"==typeof m.getAttributeType)if(d);else switch(m.getAttributeType(h,r)){case"TrustedHTML":s=ot.createHTML(s);break;case"TrustedScriptURL":s=ot.createScriptURL(s)}try{d?e.setAttributeNS(d,u,s):e.setAttribute(u,s),De(e)?ke(e):x(i.removed)}catch(t){}}}else Te(u,e)}Me("afterSanitizeAttributes",e,null)}},Pe=function t(e){var i,n=Ae(e);for(Me("beforeSanitizeShadowDOM",e,null);i=n.nextNode();)Me("uponSanitizeShadowNode",i,null),Ie(i)||(i.content instanceof a&&t(i.content),Le(i));Me("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(s){var r,o,c,u,d,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((ce=!s)&&(s="\x3c!--\x3e"),"string"!=typeof s&&!Se(s)){if("function"!=typeof s.toString)throw I("toString is not a function");if("string"!=typeof(s=s.toString()))throw I("dirty is not a string, aborting")}if(!i.isSupported){if("object"===t(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof s)return e.toStaticHTML(s);if(Se(s))return e.toStaticHTML(s.outerHTML)}return s}if(Bt||ve(h),i.removed=[],"string"==typeof s&&(Jt=!1),Jt){if(s.nodeName){var p=bt(s.nodeName);if(!Dt[p]||Ot[p])throw I("root node is forbidden and cannot be sanitized in-place")}}else if(s instanceof l)1===(o=(r=Ee("\x3c!----\x3e")).ownerDocument.importNode(s,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Wt&&!zt&&!Ht&&-1===s.indexOf("<"))return ot&&Yt?ot.createHTML(s):s;if(!(r=Ee(s)))return Wt?null:Yt?lt:""}r&&Ut&&ke(r.firstChild);for(var f=Ae(Jt?s:r);c=f.nextNode();)3===c.nodeType&&c===u||Ie(c)||(c.content instanceof a&&Pe(c.content),Le(c),u=c);if(u=null,Jt)return s;if(Wt){if(Vt)for(d=ht.call(r.ownerDocument);r.firstChild;)d.appendChild(r.firstChild);else d=r;return(Mt.shadowroot||Mt.shadowrootmod)&&(d=ft.call(n,d,!0)),d}var g=Ht?r.outerHTML:r.innerHTML;return Ht&&Dt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&M(it,r.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+g),zt&&(g=A(g,yt," "),g=A(g,wt," "),g=A(g,_t," ")),ot&&Yt?ot.createHTML(g):g},i.setConfig=function(t){ve(t),Bt=!0},i.clearConfig=function(){fe=null,Bt=!1},i.isValidAttribute=function(t,e,i){fe||ve({});var n=bt(t),s=bt(e);return Ne(n,s,i)},i.addHook=function(t,e){"function"==typeof e&&(mt[t]=mt[t]||[],C(mt[t],e))},i.removeHook=function(t){if(mt[t])return x(mt[t])},i.removeHooks=function(t){mt[t]&&(mt[t]=[])},i.removeAllHooks=function(){mt={}},i}return at()}()},722:function(t,e,i){var n,s,r; /*! jQuery Fancy File Input plugin - v2.0.4 - 2018-11-23 * Copyright (c) 2018 Atlassian Pty Ltd; Licensed Apache-2.0 */void 0===(r=this)&&void 0!==window&&(r=window),n=[i(687)],void 0===(s=function(t){return r.FancyFileInput=function(t){"use strict";var e=/^.*[\\\/]/,i=/\{0\}/gi,n=function(){var t=3,e=document.createElement("div"),i=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(i[0]);return t>4?t:document.documentMode}();function s(e,i){var n=t(e).data("FancyFileInput");if(n)return n;i=t.extend({},s.defaults,i),this.el=e,this.$el=t(e),this.$label=this.createLabel(i.buttonText),this._addLabelText(),this.$clearButton=t("<button>",{text:this.$label.attr("data-ffi-clearButtonText")||i.clearButtonText,class:"ffi-clear",type:"button",tabindex:"-1"}),this.multipleFileTextPattern=this.$label.attr("data-ffi-multipleFileTextPattern")||i.multipleFileTextPattern,this._eventNamespace=".ffi",this.CLASSES={disabled:"is-disabled",focused:"is-focused",active:"is-active",valid:"is-valid",invalid:"is-invalid"},this[this.isDisabled()?"disable":"enable"](),this.isFocused=!1}return s.defaults={buttonText:"Browse…",clearButtonText:"Clear",multipleFileTextPattern:"{0} files"},s.prototype._addLabelText=function(){var e=t('label[for="'+this.el.id+'"]');e.length&&this.$el.attr("aria-label",e.text())},s.prototype.createLabel=function(e){var i=this.$el.parent(".ffi[data-ffi-button-text]");return i.length||(i=this.$el.wrap(t("<label>",{class:"ffi","data-ffi-button-text":e})).parent()),i},s.prototype.isDisabled=function(){return this.$el.is(":disabled")},s.prototype.formatMultipleFileText=function(t){return this.multipleFileTextPattern.replace(i,t)},s.prototype.bindEvents=function(){this.$el.on("invalid"+this._eventNamespace,t.proxy(this.checkValidity,this)).on("change"+this._eve