/*! Copyright (c) 2022 JustRelate Group GmbH (https://scrivito.com) */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=744)}({0:function(t,e,n){"use strict";n.d(e,"p",(function(){return p})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return m})),n.d(e,"a",(function(){return s.ArgumentError})),n.d(e,"g",(function(){return s.InternalError})),n.d(e,"h",(function(){return s.ResourceNotFoundError})),n.d(e,"i",(function(){return s.ScrivitoError})),n.d(e,"Q",(function(){return d})),n.d(e,"G",(function(){return f})),n.d(e,"I",(function(){return i})),n.d(e,"O",(function(){return u})),n.d(e,"M",(function(){return y})),n.d(e,"F",(function(){return b})),n.d(e,"x",(function(){return w})),n.d(e,"D",(function(){return _})),n.d(e,"E",(function(){return O})),n.d(e,"o",(function(){return N})),n.d(e,"q",(function(){return L})),n.d(e,"N",(function(){return I})),n.d(e,"R",(function(){return P})),n.d(e,"y",(function(){return A})),n.d(e,"f",(function(){return R})),n.d(e,"c",(function(){return D})),n.d(e,"z",(function(){return M})),n.d(e,"m",(function(){return B})),n.d(e,"L",(function(){return F})),n.d(e,"K",(function(){return q})),n.d(e,"P",(function(){return U})),n.d(e,"H",(function(){return $})),n.d(e,"t",(function(){return Q})),n.d(e,"u",(function(){return W})),n.d(e,"B",(function(){return K})),n.d(e,"w",(function(){return G})),n.d(e,"A",(function(){return Y})),n.d(e,"C",(function(){return V})),n.d(e,"S",(function(){return J})),n.d(e,"T",(function(){return tt})),n.d(e,"v",(function(){return et})),n.d(e,"J",(function(){return rt})),n.d(e,"j",(function(){return it})),n.d(e,"b",(function(){return at})),n.d(e,"s",(function(){return st})),n.d(e,"n",(function(){return lt})),n.d(e,"r",(function(){return ct})),n.d(e,"k",(function(){return dt})),n.d(e,"l",(function(){return vt}));var r=n(2);function i(t){try{return Object(r.isFunction)(t)?function(t){if(function(t){return!!t._scrivitoPrivateSchema}(t)){return"[class "+t._scrivitoPrivateSchema.name+"]"}if(function(t){var e=t.prototype;return e&&e.isReactComponent}(t)){return'[class React.Component "'+(t.displayName||t.name)+'"]'}return a(t.toString())}(t):Object(r.isObject)(t)?function(t){var e=t._scrivitoPrivateContent;if(e&&Object(r.isFunction)(e.toPrettyPrint))return e.toPrettyPrint();if(Object(r.isElement)(t))return"[object HTMLElement "+o(t.outerHTML)+"]";return o(t)}(t):o(t)}catch(t){return""}}function o(t){var e=JSON.stringify(t);return e?a(e):e}function a(t){return t.length>100?t.slice(0,100)+"...":t}var s=n(52),u=n(58);u.struct.strict=!0,u.interface.strict=!0,u.fail=function(t){throw new TypeError(t)};var l,c=[];function f(t){l?c.push(t):setTimeout(t,0)}function d(t){f((function(){throw t}))}function p(t,e,n){var r=n.docPermalink;return function(){for(var n,i=[],o=0;on)return"Expected "+n+" arguments, got "+o;var a=Object(r.flatten)(e.map((function(e,n){var r=e[0],o=e[1],a=t[n];return u.validate(a,o).errors.map((function(t){return function(t,e){var n=function(t,e){var n="argument '"+t+"'";if(0===e.path.length)return n;return"key '"+e.path.join("/")+"' in "+n}(t,e);if(void 0===e.actual)return"Missing required "+n+".";if(e.expected===u.Nil)return"Unexpected "+n+".";var r=u.getTypeName(e.expected),o="got "+i(e.actual)+", expected type "+r+".";return"Unexpected value for "+n+": "+o}(r,t)}))})));return a.length>0?a.join(" "):void 0}var v=function(){function t(){}return t.prototype.current=function(){return this.currentContext},t.prototype.runWith=function(t,e){var n=this.currentContext;try{return this.currentContext=t,e()}finally{this.currentContext=n}},t}(),m=function(){function t(){var t=this;this.promise=new it((function(e,n){t.resolve=function(n){t.settled=!0,e(n)},t.reject=function(e){t.settled=!0,n(e)}}))}return t.prototype.isPending=function(){return!this.settled},t}();function y(t){try{return{errorThrown:!1,result:t()}}catch(t){return{errorThrown:!0,error:t}}}var g=!1;function b(){for(var t,e=[],n=0;n=2?t[1]:t[0]},e.flatten=function t(e){return e.reduce((function(e,n){return e.concat(Array.isArray(n)?t(n):n)}),[])},e.groupConsecutiveElementsWhile=function(t,e){for(var n,r=[],i=0;i0&&e(n,t[i-1])?r[r.length-1].push(n):r.push([n]);return r.map((function(t){return 1===t.length?t[0]:t}))},e.sliceFromReverseWhile=function(t,e,n){for(var r={elements:[],sliceStartsAt:-1},i=e;i>=0&&n(t[i]);i--)r.sliceStartsAt=i,r.elements.unshift(t[i]);return r},e.intersperse=function(t,e){return t.reduce((function(n,r,i){return n.push(r),i0)if(this._replicationActive)this._bufferedBackendState=t;else{if(t._deleted)this._updateLocalState(null);else{var e=P(this._backendState,t);this._updateLocalState(N(this.localState,e))}this._backendState=t}},t.prototype.finishSaving=function(){var t;if(this._nextRequestDeferred)t=this._nextRequestDeferred.promise;else{if(!this._currentRequestDeferred)return f.j.resolve();t=this._currentRequestDeferred.promise}return t.catch((function(){return f.j.reject()}))},t.prototype._startReplication=function(){var t=this;u.a.isEmpty(P(this._backendState,this._localState))?this._nextRequestDeferred&&(this._nextRequestDeferred.resolve(),this._nextRequestDeferred=null):this._replicationActive?this._nextRequestDeferred||(this._nextRequestDeferred=new f.e):this._scheduledReplication||(this._scheduledReplication=!0,this._initDeferredForRequest(),I.writeStarted(this._currentRequestDeferred.promise),Object(f.G)((function(){return t._performThrottledReplication()})))},t.prototype._performReplication=function(){var t=this,e=this._localState,n=P(this._backendState,this._localState);this._scheduledReplication=!1,this._replicationActive=!0,this._replicatePatchToBackend(n).then((function(n){t._handleBackendUpdate(e,n),t._currentRequestDeferred.resolve(t._objId),t._currentRequestDeferred=null,t._replicationActive=!1,t._startReplication()}),(function(e){t._currentRequestDeferred.reject(e),t._currentRequestDeferred=null,t._replicationActive=!1}))},t.prototype._replicatePatchToBackend=function(t){if(u.a.isEmpty(t))return f.j.resolve(this._backendState);var e="workspaces/"+this._workspaceId+"/objs/"+this._objId;return b.d.put(e,{obj:t})},t.prototype._initDeferredForRequest=function(){if(this._nextRequestDeferred){var t=this._nextRequestDeferred;this._nextRequestDeferred=null,this._currentRequestDeferred=t}else this._currentRequestDeferred=new f.e},t.prototype._handleBackendUpdate=function(t,e){var n=P(t,this._localState);this._backendState=function(t,e){if(L(t,e)>0)return t;return e}(e,this._bufferedBackendState),this._bufferedBackendState=void 0,this._updateLocalState(N(this._backendState,n))},t.prototype._updateLocalState=function(t){this._localState=t,F(this._workspaceId,this._objId,this._localState)},Object.defineProperty(t.prototype,"backendState",{get:function(){return this._backendState},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localState",{get:function(){return this._localState},enumerable:!0,configurable:!0}),t.prototype.isNotStoredInBackend=function(){return null===this._backendState},t.prototype.isRequestInFlight=function(){return this._replicationActive},t}();function P(t,e){return E(t,e)}function N(t,e){return C(t,e)}function L(t,e){return t?e?function(t,e){if(t>e)return 1;if(e>t)return-1;return 0}(t._version,e._version):1:-1}var I=new(function(){function t(){this.replicationCache={},this.disabled=!1,this.writeWriteCallbacks={},this.subscriptionToken=0}return t.prototype.get=function(t,e){return this.replicationCache[t]||(this.replicationCache[t]={}),this.replicationCache[t][e]||(this.replicationCache[t][e]=new A(t,e)),this.replicationCache[t][e]},t.prototype.subscribeWrites=function(t){return this.subscriptionToken+=1,this.writeWriteCallbacks[this.subscriptionToken]=t,this.subscriptionToken},t.prototype.unsubscribeWrites=function(t){delete this.writeWriteCallbacks[t]},t.prototype.isDisabled=function(){return this.disabled},t.prototype.writeStarted=function(t){Object(s.each)(this.writeWriteCallbacks,(function(e){e(t)}))},t.prototype.disableReplication=function(){this.disabled=!0},t.prototype.enableReplication=function(){this.disabled=!1},t.prototype.clearWriteCallbacks=function(){this.writeWriteCallbacks={}},t.prototype.clearCache=function(){this.replicationCache={}},t}());function D(t){I=t}function R(){return c.m.subState("objData")}var M=new l.LoadableCollection({name:"objdata",state:R,loader:function(t){var e=t[0],n=t[1];return I.get(e,n).start(),new f.j((function(){}))}});var B=function(){function t(t,e){this._workspaceId=t,this._id=e,this._loadableData=M.get([t,e])}return t.prototype.get=function(){return Object(c.h)("for performance reasons, avoid this method when rendering"),this._loadableData.get()},t.prototype.getWidget=function(t){return Object(c.h)("for performance reasons, avoid this method when rendering"),this.getWidgetState(t).get()},t.prototype.getWidgetWithBadPerformance=function(t){return this.getWidgetState(t).get()},t.prototype.getAttribute=function(t){if("_widget_pool"===t)throw new f.g("_widget_pool is not an attribute, use getWidget or getWidgetAttribute");return this.getSubReader(t).get()},t.prototype.getWidgetAttribute=function(t,e){return this.getWidgetState(t).subState(e).get()},t.prototype.isNonExistent=function(){return!!this.getSubReader("_deleted").get()||!this.getSubReader("_id").get()},t.prototype.set=function(t){Object(c.g)("Changing CMS content"),this._loadableData.set(t)},t.prototype.setError=function(t){this._loadableData.setError(t)},t.prototype.ensureAvailable=function(){return this._loadableData.ensureAvailable()},t.prototype.isAvailable=function(){return this._loadableData.isAvailable()},t.prototype.update=function(t){var e=C(this.get(),t);this.set(e),this._replication().notifyLocalState(e)},t.prototype.finishSaving=function(){return this._replication().finishSaving()},t.prototype.workspaceId=function(){return this._workspaceId},t.prototype.equals=function(e){return e instanceof t&&(this.workspaceId()===e.workspaceId()&&this._id===e._id)},t.prototype._replication=function(){return I.get(this._workspaceId,this._id)},t.prototype.getWidgetState=function(t){return this.getSubReader("_widget_pool").subState(t)},t.prototype.getSubReader=function(t){return this._loadableData.reader().subState(t)},t}();function q(t,e){var n=U(t,e);return n.set(null),I.get(t,e).notifyBackendState(null),n}function F(t,e,n){U(t,e).set(n)}function z(t,e){var n=U(t,e);if(n.ensureAvailable())return n}function U(t,e){return new B(t,e)}var H=function(){return(H=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var i=new K(t,e,n,r-1);return Object(l.load)((function(){return i.continuationForNextBatch()}))}return f.j.resolve()}(r,i,n,o).then((function(t){if(u())throw new Error;var e={size:n,continuation:t,include_objs:!s()},o=H({},i,e);return b.e.retrieveObjQuery(r,o).then((function(t){var e=t.objs;return e&&a((function(){return e.forEach((function(t){t._id&&I.get(r,t._id).notifyBackendState(t)}))})),function(t,e){e.forEach((function(e){return function(t,e){Object(l.load)((function(){return z(t,e)}))}(t,e)}))}(r,t.results),{results:t.results,total:t.total,continuation:t.continuation}}))}))},invalidation:function(t){var e=t[0];t[1],t[2];return Object(l.loadableWithDefault)(void 0,(function(){return i(e)}))||""}}),K=function(){function t(t,e,n,r){void 0===r&&(r=0),this._workspaceId=t,this._params=e,this._batchSize=n,this._index=r}return t.store=function(t,e,n,r){void 0===r&&(r=n.length),V.get([t,$(e),0]).set({results:n,total:r})},t.firstBatchFor=function(e,n,r){return new t(e,$(n),r)},t.countFor=function(t,e){return this.firstBatchFor(t,e,0).count()},t.prototype.objIds=function(){return this._response().results},t.prototype.count=function(){return this._response().total||0},t.prototype.nextBatch=function(){if(this.continuationForNextBatch())return new t(this._workspaceId,this._params,this._batchSize,this._index+1)},Object.defineProperty(t.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),t.prototype.continuationForNextBatch=function(){return this._response().continuation},t.prototype._response=function(){return this._data().get()||W},t.prototype._data=function(){return V.get([this._workspaceId,this._params,this._index],this._batchSize)},t}(),Q=K;function $(t){var e=Object(s.omit)({query:t.query,offset:t.offset,sort_by:t.sortBy,sort_order:t.sortDirection},s.isUndefined);return t.includeDeleted&&(e.options={include_deleted:!0}),e}var G=function(){function t(t,e,n){this._workspaceId=t,this._params=e,this._batchSize=n}return t.store=function(t,e,n,r){Q.store(t,e,n,r)},t.count=function(t,e){return Q.countFor(t,e)},t.prototype.iterator=function(){var t={},e=Q.firstBatchFor(this._workspaceId,this._params,this._batchSize),n=0;return{next:function r(){if(!e)return{done:!0};var i=e.objIds();if(n=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(t,e):new o(t):new o;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}o.version="1.19.1";var a=o.prototype,s=Object.prototype.hasOwnProperty;function u(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function c(t){return"Array"===l(t)}function f(t,e){var n,r,i={};if("RegExp"===l(e))i=null;else if(c(e))for(n=0,r=e.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=m,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=m,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var n=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var y,g={encode:"encode",decode:"decode"},b=function(t,e){return function(n){try{return o[e](n+"").replace(o.characters[t][e].expression,(function(n){return o.characters[t][e].map[n]}))}catch(t){return n}}};for(y in g)o[y+"PathSegment"]=b("pathname",g[y]),o[y+"UrnPathSegment"]=b("urnpath",g[y]);var w=function(t,e,n){return function(r){var i;i=n?function(t){return o[e](o[n](t))}:o[e];for(var a=(r+"").split(t),s=0,u=a.length;s-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=o.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t="");var n,r,i=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u-1?r:t.length-1);return i>-1&&(-1===r||i-1?p.slice(0,h)+p.slice(h).replace(a,""):p.replace(a,"")).length<=l[0].length||n.ignore&&n.ignore.test(p))){var y=e(p,c,d=c+p.length,t);void 0!==y?(y=String(y),t=t.slice(0,c)+y+t.slice(d),r.lastIndex=c+y.length):r.lastIndex=d}}return r.lastIndex=0,t},o.ensureValidHostname=function(e,n){var r=!!e,i=!1;if(!!n&&(i=d(o.hostProtocols,n)),i&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=i),this},a.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new o(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=O("query","?"),a.fragment=O("fragment","#"),a.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},a.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},a.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},a.path=a.pathname,a.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var r=t instanceof o,i="object"==typeof t&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1);if(!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)"query"!==n&&s.call(this._parts,n)&&(this._parts[n]=a[n]);a.query&&this.query(a.query,!1)}return this.build(!e),this},a.is=function(t){var e=!1,r=!1,i=!1,a=!1,s=!1,u=!1,l=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),s=(a=!(e=r||i))&&n&&n.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),l=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var k=a.protocol,x=a.port,C=a.hostname;a.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,t,e)},a.scheme=a.protocol,a.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),x.call(this,t,e))},a.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return C.call(this,t,e)},a.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=o(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},a.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},a.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},a.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=o.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},a.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),a=new RegExp("^"+u(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,t),this.build(!e),this},a.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},a.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var o;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},a.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?o.decodePath(r):r}var i=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,i),s=new RegExp("^"+u(a));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),this.build(!e),this},a.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?o.decodePathSegment(r):r}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(i=!0);var a=new RegExp(u(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(a,t),i?this.normalizePath(e):this.build(!e),this},a.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),a=i.lastIndexOf(".");return-1===a?"":(n=i.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?o.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var s,l=this.suffix();if(l)s=t?new RegExp(u(l)+"$"):new RegExp(u("."+l)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return s&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t)),this.build(!e),this},a.segment=function(t,e,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(o&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(c(e)){a=[];for(var s=0,u=e.length;s"}function c(t,e){var n=e||l(t),c=(i(t),o(t));function f(e,n){if(c)return e;for(var r=!0,i=[],o=0,s=e.length;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,h=String.fromCharCode;function v(t){throw new RangeError(d[t])}function m(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function y(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+m((t=t.replace(f,".")).split("."),e).join(".")}function g(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=h((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=h(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,n){var r=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;r+=36)t=p(t/35);return p(r+36*t/(t+38))}function O(t){var e,n,r,i,o,a,s,l,c,f,d,h=[],m=t.length,y=0,g=128,w=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&v("not-basic"),h.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=m&&v("invalid-input"),((l=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||l>p((u-y)/a))&&v("overflow"),y+=l*a,!(l<(c=s<=w?1:s>=w+26?26:s-w));s+=36)a>p(u/(f=36-c))&&v("overflow"),a*=f;w=_(y-o,e=h.length+1,0==o),p(y/e)>u-g&&v("overflow"),g+=p(y/e),y%=e,h.splice(y++,0,g)}return b(h)}function k(t){var e,n,r,i,o,a,s,l,c,f,d,m,y,b,O,k=[];for(m=(t=g(t)).length,e=128,n=0,o=72,a=0;a=e&&dp((u-n)/(y=r+1))&&v("overflow"),n+=(s-e)*y,e=s,a=0;au&&v("overflow"),d==e){for(l=n,c=36;!(l<(f=c<=o?1:c>=o+26?26:c-o));c+=36)O=l-f,b=36-f,k.push(h(w(f+O%b,0))),l=p(O/b);k.push(h(w(l,0))),o=_(n,y,r==i),n=0,++r}++n,++e}return k.join("")}s={version:"1.3.2",ucs2:{decode:g,encode:b},decode:O,encode:k,toASCII:function(t){return y(t,(function(t){return c.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return y(t,(function(t){return l.test(t)?O(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(79)(t),n(41))},138:function(t,e,n){var r,i; /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.1 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */!function(o,a){"use strict";t.exports?t.exports=a():void 0===(i="function"==typeof(r=a)?r.call(e,n,e,t):r)||(t.exports=i)}(0,(function(t){"use strict";var e=t&&t.IPv6;return{best:function(t){var e,n,r=t.toLowerCase().split(":"),i=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[i-1]&&""===r[i-2]&&r.pop(),-1!==r[(i=r.length)-1].indexOf(".")&&(o=7),e=0;e1);s++)n.splice(0,1);r[a]=n.join("")}var u=-1,l=0,c=0,f=-1,d=!1;for(a=0;al&&(u=f,l=c)):"0"===r[a]&&(d=!0,f=a,c=1);c>l&&(u=f,l=c),l>1&&r.splice(u,l,""),i=r.length;var p="";for(""===r[0]&&(p=":"),a=0;a=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var i=n.list[t.slice(e+1)];return i?i.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n}))},14:function(t,e,n){"use strict";var r;function i(t){r=t}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}))},140:function(t,e){},141:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(55),i=n(219),o=n(100),a=function(){function t(){}return t.sanitize=function(e){var n={};if(!e||"object"!=typeof e)return n;var a=["bold","italic","underline","strike","code","blockquote","code-block","renderAsBlock"],s=["background","color"],u=e.font,l=e.size,c=e.link,f=e.script,d=e.list,p=e.header,h=e.align,v=e.direction,m=e.indent,y=e.mentions,g=e.mention,b=e.width,w=e.target,_=a.concat(s,["font","size","link","script","list","header","align","direction","indent","mentions","mention","width"]);if(a.forEach((function(t){var r=e[t];r&&(n[t]=!!r)})),s.forEach((function(r){var i=e[r];i&&(t.IsValidHexColor(i+"")||t.IsValidColorLiteral(i+""))&&(n[r]=i)})),u&&t.IsValidFontName(u+"")&&(n.font=u),l&&t.IsValidSize(l+"")&&(n.size=l),b&&t.IsValidWidth(b+"")&&(n.width=b),c&&(n.link=o.sanitize(c+"")),w&&t.isValidTarget(w)&&(n.target=w),f!==r.ScriptType.Sub&&r.ScriptType.Super!==f||(n.script=f),d!==r.ListType.Bullet&&d!==r.ListType.Ordered&&d!==r.ListType.Checked&&d!==r.ListType.Unchecked||(n.list=d),Number(p)&&(n.header=Math.min(Number(p),6)),h!==r.AlignType.Center&&h!==r.AlignType.Right&&h!==r.AlignType.Justify||(n.align=h),v===r.DirectionType.Rtl&&(n.direction=v),m&&Number(m)&&(n.indent=Math.min(Number(m),30)),y&&g){var O=i.MentionSanitizer.sanitize(g);Object.keys(O).length>0&&(n.mentions=!!y,n.mention=g)}return Object.keys(e).reduce((function(t,n){return-1===_.indexOf(n)&&(t[n]=e[n]),t}),n)},t.IsValidHexColor=function(t){return!!t.match(/^#([0-9A-F]{6}|[0-9A-F]{3})$/i)},t.IsValidColorLiteral=function(t){return!!t.match(/^[a-z]{1,50}$/i)},t.IsValidFontName=function(t){return!!t.match(/^[a-z\s0-9\- ]{1,30}$/i)},t.IsValidSize=function(t){return!!t.match(/^[a-z0-9\-]{1,20}$/i)},t.IsValidWidth=function(t){return!!t.match(/^[0-9]*(px|em|%)?$/)},t.isValidTarget=function(t){return!!t.match(/^[_a-zA-Z0-9\-]{1,50}$/)},t}();e.OpAttributeSanitizer=a},142:function(t,e,n){"use strict";var r;function i(t){return o(r.Html).reduce(s,t)}function o(t){var e=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["\\/","/"],["\\(","("],["\\)",")"]];return t===r.Html?e.filter((function(t){var e=t[0];t[1];return-1===e.indexOf("(")&&-1===e.indexOf(")")})):e.filter((function(t){var e=t[0];t[1];return-1===e.indexOf("/")}))}function a(t,e){return t.replace(new RegExp(e[0],"g"),e[1])}function s(t,e){return t.replace(new RegExp(e[1],"g"),e[0].replace("\\",""))}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Html=0]="Html",t[t.Url=1]="Url"}(r||(r={})),e.makeStartTag=function(t,e){if(void 0===e&&(e=void 0),!t)return"";var n="";e&&(n=[].concat(e).map((function(t){return t.key+(t.value?'="'+t.value+'"':"")})).join(" "));var r=">";return"img"!==t&&"br"!==t||(r="/>"),n?"<"+t+" "+n+r:"<"+t+r},e.makeEndTag=function(t){return void 0===t&&(t=""),t&&""||""},e.decodeHtml=i,e.encodeHtml=function(t,e){return void 0===e&&(e=!0),e&&(t=i(t)),o(r.Html).reduce(a,t)},e.encodeLink=function(t){var e=o(r.Url),n=e.reduce(s,t);return e.reduce(a,n)}},143:function(t,e,n){var r=n(229),i=n(58);function o(t,e){i.Object.is(t)&&(t=i.struct(t));var n="subtype"===t.meta.kind;var r={},o=n?t.meta.type:t;if("struct"===o.meta.kind||"interface"===o.meta.kind){var a=o.meta.props;Object.keys(a).forEach((function(t){var e,n=a[t];(e=function(){}).tcomb=n,r[t]=e}))}else 0;return n&&(r.__subtype__=function(){},r.__subtype__.predicate=t.meta.predicate),r}var a=i.irreducible("ReactElement",r.isValidElement),s=i.irreducible("ReactNode",(function(t){return i.Str.is(t)||i.Num.is(t)||a.is(t)||i.list(s).is(t)})),u=i.irreducible("ReactChild",(function(t){return s.is(t)||i.Bool.is(t)||i.Nil.is(t)})),l=i.irreducible("ReactChildren",(function(t){return u.is(t)||i.list(l).is(t)}));i.ReactElement=a,i.ReactNode=s,i.ReactChild=u,i.ReactChildren=l,t.exports={t:i,propTypes:o,props:function(t,e){return function(e){e.propTypes=o(t)}},ReactElement:a,ReactNode:s,ReactChild:u,ReactChildren:l,ReactElementT:a,ReactNodeT:s,ReactChildT:u,ReactChildrenT:l}},149:function(t,e,n){"use strict";(function(t){var r=n(150),i=setTimeout;function o(){}function a(t){if(!(this instanceof a))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],d(t,this)}function s(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,a._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void l(e.promise,t)}u(e.promise,r)}else(1===t._state?u:l)(e.promise,t._value)}))):t._deferreds.push(e)}function u(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof a)return t._state=3,t._value=e,void c(t);if("function"==typeof n)return void d((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,c(t)}catch(e){l(t,e)}var r,i}function l(t,e){t._state=2,t._value=e,c(t)}function c(t){2===t._state&&0===t._deferreds.length&&a._immediateFn((function(){t._handled||a._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e',init:function(){var t;return i.extensions.anchor.prototype.init.apply(this,arguments),this.targetCheckbox=null!=(t=this.getEditorOption("anchor"))?t.targetCheckbox:void 0},showForm:function(t){return i.extensions.anchor.prototype.showForm.call(this,t),this.updateRelUi(t)},handleClick:function(t){var e,n,r,o,a,s;return t.preventDefault(),t.stopPropagation(),this.proxy.edQuery(".scrivito_medium_link_collapse").removeClass("show"),this.isDisplayed()||(a=i.selection.getSelectionRange(this.document),o=i.selection.getSelectedParentElement(a),e=s=r=null,(n=i.util.getClosestTag(o,"a"))&&(e=(n=this.proxy.edQuery(n)).attr("href")||null,s=n.attr("target")||null,r=n.attr("rel")||null),this.showForm({value:e,target:s,rel:r})),!1},getTemplate:function(){var t,e;return e="",t="scrivito_target_checkbox_not_available",this.targetCheckbox&&(e="
\n \n
",t=""),("\n\n
\n "+e+"\n \n Save\n \n
\n").replace(/\n\s*/g,"")},attachFormEvents:function(t){var e,n;return i.extensions.anchor.prototype.attachFormEvents.call(this,t),t=this.proxy.edQuery(t),e=t.find(".medium-editor-toolbar-input"),t.find("[data-scrivito-rel]").on("click",(n=this,function(t){return n.onRelSelectionButtonClick(t)})),t.find(".scrivito_icon_gear").on("click",function(e){return function(){return e.onToggleRelPanelButtonClick(t)}}(this)),t.find(".medium-editor-toolbar-browse").on("click",function(t){return function(){return t.onContentBrowserButtonClick(e)}}(this))},completeFormSave:function(t){return this.base.restoreSelection(),t.value?(this.execAction(this.action,t),this.updateRelAttribute(t)):this.execAction("unlink"),this.base.checkSelection()},getFormOpts:function(){var t;return(t=i.extensions.anchor.prototype.getFormOpts.call(this)).rel=this.selectedRelValues(),t},relButtons:function(){return this.proxy.edQuery(this.getForm()).find(".scrivito_enum_attribute.scrivito_multi [data-scrivito-rel]")},selectedRelValues:function(){return this.relButtons().filter(".scrivito_enum_attribute_active").toArray().map((function(t){return t.attributes["data-scrivito-rel"].value})).join(" ")},updateRelIndicator:function(){var t;return t=this.proxy.edQuery(this.getForm().querySelector(".scrivito_icon_gear")),"scrivito_active_rel_selected",this.relButtons().hasClass("scrivito_enum_attribute_active")?t.addClass("scrivito_active_rel_selected"):t.removeClass("scrivito_active_rel_selected")},updateRelAttribute:function(t){var e,n,r,o;return o=i.selection.getSelectionRange(this.document),r=i.selection.getSelectedParentElement(o),n=this.proxy.edQuery(i.util.getClosestTag(r,"a")),t.rel?n.attr("rel",t.rel):n.removeAttr("rel"),e=this.getEditorElements()[0],this.base.trigger("editableInput",{},e)},updateRelUi:function(t){var e,n;return e=null!=(n=t.rel)?n.split(/\s+/):void 0,this.relButtons().each((function(t,n){return e&&-1!==e.indexOf(n.getAttribute("data-scrivito-rel"))?n.className="scrivito_enum_attribute_active":n.className=""})),this.updateRelIndicator()},onToggleRelPanelButtonClick:function(t){return this.proxy.edQuery(t.find(".scrivito_medium_link_collapse")).toggleClass("show")},onRelSelectionButtonClick:function(t){return this.proxy.edQuery(t.target).toggleClass("scrivito_enum_attribute_active"),this.updateRelIndicator()},onContentBrowserButtonClick:function(t){var e,n,r;return n=(e=this.proxy.idFromPath(t.val()))?[e]:[],scrivito.openContentBrowser({selection:n,selectionMode:"single"}).catch((function(e){throw t.focus(),e})).then((r=this,function(e){var n,i;return n=e.isSelected,i=e.selection,n&&(t.focus(),i.length?t.val(r.proxy.pathForId(i[0])):t.val("")),!1}))}}),s=function(){var t,e;return t=["bold","italic","scrivito_anchor","h2","h3","unorderedlist","orderedlist"],("undefined"!=typeof ScrivitoEditors&&null!==ScrivitoEditors&&null!=(e=ScrivitoEditors._config)?e.showHtmlEditorCodeButton:void 0)&&t.splice(2,0,"scrivito_code"),t},u=function(){return{anchor:{targetCheckbox:!0},anchorPreview:!1,extensions:{scrivito_anchor:new o,scrivito_code:new r({label:'',start:"",end:""}),imageDragging:{}},placeholder:!1,toolbar:{buttons:s(),standardizeSelectionStart:!0}}},a=function(t){var e,n,r;return e=t.jQueryElement(),null!=(r=(n=u()).extensions.scrivito_anchor)&&(r.proxy=t),new i(e,n).subscribe("editableInput",(function(){return t.save(e.html())}))},t.exports=a},153:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(217);e.QuillDeltaToHtmlConverter=r.QuillDeltaToHtmlConverter;var i=n(73);e.InlineGroup=i.InlineGroup,e.VideoItem=i.VideoItem,e.BlockGroup=i.BlockGroup,e.ListGroup=i.ListGroup,e.ListItem=i.ListItem,e.BlotBlock=i.BlotBlock;var o=n(98);e.DeltaInsertOp=o.DeltaInsertOp;var a=n(99);e.InsertDataQuill=a.InsertDataQuill,e.InsertDataCustom=a.InsertDataCustom;var s=n(55);e.NewLine=s.NewLine,e.ListType=s.ListType,e.ScriptType=s.ScriptType,e.DirectionType=s.DirectionType,e.AlignType=s.AlignType,e.DataType=s.DataType,e.GroupType=s.GroupType},154:function(t,e,n){"use strict";n.d(e,"a",(function(){return Q}));var r=function(){function t(t){var e=t.controller;this._controller=e}return t.canEdit=function(t){return!1},t.prototype.onClick=function(t){},t.prototype.contentDidChange=function(){},t.prototype.editorWillBeActivated=function(){},t.prototype.editorWillBeDeactivated=function(){},t.prototype.editorDomWasMounted=function(t){},t.prototype.editorDomWasUnmounted=function(){},t}(),i=n(152),o=n.n(i),a=n(20),s=n.n(a),u=n(153);var l,c=(l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.create=function(e){var n=t.create.call(this,e);return n.removeAttribute("target"),n},e.prototype.format=function(e,n){return e!==this.statics.blotName||n||this.domNode.removeAttribute("target"),t.prototype.format.call(this,e,n)},e}(s.a.import("formats/link")),d=function(t){var e=this,n=t.getModule("scrivitoApi").getTooltip(),r=n.hide.bind(n);n.hide=function(){var i=!n.root.classList.contains("ql-hidden"),o=n.root.classList.contains("ql-editing"),a=n.linkRange||e.lastActiveRange;i&&o&&a&&(n.textbox.value&&t.formatText(a.index,a.length,"link",n.textbox.value,"user"),p(t,a)),delete e.lastActiveRange,r()};var i=n.root.querySelector("a.ql-svt-browse"),o=n.root.querySelector("a.ql-svt-target");i.addEventListener("click",(function(e){t.getModule("scrivitoInternalLink").fromContentBrowser(),e.preventDefault()})),o.addEventListener("click",(function(e){var r=n.root.getAttribute("data-svt-target")?"":"_blank";n.root.setAttribute("data-svt-target",r),p(t,n.linkRange),e.preventDefault()})),t.on("selection-change",(function(r){if(r){e.lastActiveRange=r;var i=t.getFormat(r).link,o=t.getModule("scrivitoApi").getLinkRange(r);if(o&&i){var a=t.getFormat(o).target||"";!function(t,e,n){t.linkRange=e,t.root.setAttribute("data-svt-target",n)}(n,o,a)}else!function(t){t.root.setAttribute("data-mode",""),t.root.setAttribute("data-svt-target",""),delete t.linkRange}(n)}}))};function p(t,e){if(e&&t.getFormat(e).link){var n=t.getModule("scrivitoApi").getTooltip().root.getAttribute("data-svt-target");t.formatText(e.index,e.length,"target",n||"","user")}}s.a.register("modules/scrivitoLinkTooltip",d);var h=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=s.a.import("core/module"),m=s.a.import("formats/link"),y=function(t){function e(e){var n=t.call(this,e)||this;return n.setHtml=function(t){var n=0===e.history.stack.undo.length,r=e.clipboard;e.setContents(r.convert(t),"silent"),n&&e.history.clear()},n.getTooltip=function(){return e.theme.tooltip},n.getLinkRange=function(t){if(t){var n=e.scroll.scroll.descendant(m,t.index),r=n[0],i=n[1];return r?{index:t.index-i,length:r.length()}:void 0}},n}return h(e,t),e}(v);var g=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),b=function(t){function e(e){var n=t.call(this,e)||this;return n.fromContentBrowser=function(){return function(t){scrivito.openContentBrowser({selection:[],selectionMode:"single"}).then((function(e){if(e.isSelected&&e.selection.length){var n=e.selection[0];t.getModule("scrivitoApi").getTooltip().edit("link","/"+n)}}))}(e)},n}return g(e,t),e}(s.a.import("core/module"));s.a.register("modules/scrivitoInternalLink",b);var w=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=s.a.import("themes/bubble"),O=s.a.import("themes/snow"),k=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.snowTheme=new O(e,n),r}return w(e,t),e.prototype.extendToolbar=function(e){this.snowTheme.extendToolbar(e),this.snowTheme.tooltip.root.classList.add("ql-svt-tooltip-snow"),t.prototype.extendToolbar.call(this,e),this.tooltip.root.classList.add("ql-svt-tooltip-bubble"),this.tooltip=this.snowTheme.tooltip,this.tooltip.textbox.setAttribute("data-link","Paste or type a link"),this.tooltip.textbox.insertAdjacentHTML("beforebegin",x),this.tooltip.textbox.insertAdjacentHTML("afterend",C)},e}(_),x='\n \n \n \n',C='\n \n \n \n \n';s.a.register("themes/scrivito",k);var E,j,S=function(t){t.on("selection-change",(function(e){if(t.root.parentElement){var n=!t.getModule("scrivitoApi").getTooltip().root.classList.contains("ql-hidden"),r=e&&e.length>0;t.root.parentElement.setAttribute("data-scrivito-ql-tools",r||n?"visible":"")}}))};s.a.register({"formats/target":(E=s.a.import("parchment"),j=new E.Attributor.Attribute("target","target",{scope:E.Scope.INLINE}),j)}),s.a.register(f,!0),s.a.register("modules/scrivitoApi",y),s.a.register("modules/scrivitoZIndex",S);var T=function(t,e){var n=document.createElement("div");n.classList.add("ql-svt-container"),t.appendChild(n);var r=new s.a(n,{formats:["blockquote","bold","code","code-block","header","image","indent","italic","link","list","script","strike","target","underline","video"],modules:{scrivitoApi:!0,scrivitoInternalLink:!0,scrivitoLinkTooltip:!0,scrivitoZIndex:!0,toolbar:{container:["bold","italic",window.ScrivitoEditors&&window.ScrivitoEditors._config&&window.ScrivitoEditors._config.showHtmlEditorCodeButton?"code":void 0,"link",{header:2},{header:3},{list:"bullet"},{list:"ordered"}]}},placeholder:"Click to edit",theme:"scrivito"});return r.getModule("scrivitoApi").setHtml(e.getContent()),r.on("text-change",(function(){return e.setContent(function(t){if("\n"===t.getText())return"";var e=t.getContents().ops;return new u.QuillDeltaToHtmlConverter(e,{linkTarget:"",multiLineParagraph:!1}).convert()}(r))})),r};var A=function(t){t.getAttribute("data-scrivito-editors-placeholder")||t.setAttribute("data-scrivito-editors-placeholder","Click to edit")},P=n(53),N=n.n(P),L=function(){function t(t,e){this.domNode=t,this.controller=e}return t.prototype.content=function(){return this.controller.getContent()},t.prototype.idFromPath=function(t){if(t.match(/^objid:/))return t.replace(/^objid:/,"")},t.prototype.edQuery=function(){for(var t=[],e=0;e0&&(n.remove(),t.text(e.text()))}function U(t){return!0===t.data("scrivitoEditorsMultiline")||!1!==t.data("scrivitoEditorsMultiline")&&t.css("white-space").match(/pre/)}function H(t){if(U(t)&&!t.data("scrivito_editors_prepared_for_editing")){t.data("scrivito_editors_prepared_for_editing",!0);var e=t.html(),n=e.replace(/\r?\n/g,"
");e!==n&&t.html(n)}}var W=function(t){var e=t.jQueryElement();e.attr("contenteditable","true").blur((function(){return function(t){F(t).done((function(){return t.trigger("scrivito_editors:blur")})),function(t){var e=t.jQueryElement();e.data("scrivito_editors_prepared_for_editing",!1),e.text(t.content())}(t),H(t.jQueryElement())}(t)})).click((function(){return q(t)})).focus((function(){return function(t){H(t.jQueryElement())}(t)})).keypress((function(e){return B(e,t)})).keyup((function(e){return B(e,t)})),"false"!==e.attr("data-scrivito-editors-autosave")&&e.on("cut input keypress keyup paste",(function(){return function(t){F(t)}(t)})),H(e),e.on("click",(function(t){e.attr("contenteditable","true"),z(e),t.timeStamp-e.data("scrivito_editors_last_click")>=300&&t.preventDefault(),e.data("scrivito_editors_last_click",t.timeStamp)}))},V=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return V(e,t),e.canEdit=function(t){return"string"===t.type},e.prototype.contentDidChange=function(){this._setCurrentContent()},e.prototype.editorWillBeActivated=function(){this._controller.setDomMode("Replace")},e.prototype.editorDomWasMounted=function(t){this._currentDomNode=t,A(t);var e=new L(t,this._controller);this._setCurrentContent(),W(e)},e.prototype.editorDomWasUnmounted=function(){this._currentDomNode=void 0},e.prototype._setCurrentContent=function(){this._currentDomNode&&(this._currentDomNode.textContent=this._controller.getContent())},e}(r);function Q(){scrivito.registerEditor(D),scrivito.registerEditor(M),scrivito.registerEditor(K)}},155:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(84);function i(){var t=function(){if(window.parent!==window){var t;try{t=window.parent.connectAppDocument}catch(t){}return t?t(window.document):void 0}}();return t?t.installRailsApi():function(){window.scrivito||(window.scrivito={});var t=window.scrivito;t.on||(t.on=function(t,e){"content"===t&&Object(r.a)(document,(function(){return e(window.document)}))});t.in_editable_view||(t.in_editable_view=function(){return!1})}(),t}},17:function(t,e,n){"use strict";function r(t){return void 0===t&&(t=window),t.devicePixelRatio||1}function i(){return window.location}function o(t){window.location.assign(t)}function a(){return window.history}function s(){return window.screen}function u(){return document}function l(){return window.innerHeight}function c(){return window.pageXOffset}function f(){return window.pageYOffset}function d(t,e){window.scrollTo(t,e)}function p(){return window.document.body.scrollHeight}n.d(e,"a",(function(){return r})),n.d(e,"f",(function(){return i})),n.d(e,"i",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"j",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"c",(function(){return p}))},18:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return c}));var r=n(0),i=n(3),o=n(17),a=!1,s=!1;function u(){var t=o.f().href,e=Object(i.queryParametersFromUrl)(t),n=e._scrivito_workspace_id||"published";"string"==typeof n?(Object(i.setCurrentWorkspaceId)(n),"published"!==n&&(a=e.hasOwnProperty("_scrivito_editing"),s=!a&&e.hasOwnProperty("_scrivito_comparison"))):Object(r.Q)(new r.g("Expected value of _scrivito_workspace_id to be a string, but it is "+typeof n))}function l(){return a}function c(){return s}},185:function(t,e,n){ /*! @preserve * * tcomb.js - Type checking and DDD for JavaScript * * The MIT License (MIT) * * Copyright (c) 2014-2016 Giulio Canti * */ var r=n(21);r.Any=n(91),r.Array=n(187),r.Boolean=n(127),r.Date=n(188),r.Error=n(189),r.Function=n(72),r.Nil=n(128),r.Number=n(129),r.Integer=n(190),r.IntegerT=r.Integer,r.Object=n(191),r.RegExp=n(192),r.String=n(94),r.Type=n(193),r.TypeT=r.Type,r.Arr=r.Array,r.Bool=r.Boolean,r.Dat=r.Date,r.Err=r.Error,r.Func=r.Function,r.Num=r.Number,r.Obj=r.Object,r.Re=r.RegExp,r.Str=r.String,r.dict=n(95),r.declare=n(194),r.enums=n(195),r.irreducible=n(36),r.list=n(131),r.maybe=n(196),r.refinement=n(93),r.struct=n(198),r.tuple=n(134),r.union=n(202),r.func=n(203),r.intersection=n(204),r.subtype=r.refinement,r.inter=n(205),r.interface=r.inter,r.assert=r,r.update=n(206),r.mixin=n(96),r.isType=n(34),r.is=n(50),r.getTypeName=n(29),r.match=n(207),t.exports=r},186:function(t,e){t.exports=function(t){throw new TypeError("[tcomb] "+t)}},187:function(t,e,n){var r=n(36),i=n(47);t.exports=r("Array",i)},188:function(t,e,n){var r=n(36);t.exports=r("Date",(function(t){return t instanceof Date}))},189:function(t,e,n){var r=n(36);t.exports=r("Error",(function(t){return t instanceof Error}))},190:function(t,e,n){var r=n(93),i=n(129);t.exports=r(i,(function(t){return t%1==0}),"Integer")},191:function(t,e,n){var r=n(36),i=n(46);t.exports=r("Object",i)},192:function(t,e,n){var r=n(36);t.exports=r("RegExp",(function(t){return t instanceof RegExp}))},193:function(t,e,n){var r=n(36),i=n(34);t.exports=r("Type",i)},194:function(t,e,n){n(21),n(38),n(34),n(45);var r=n(96),i=n(29),o=n(130),a=1;t.exports=function(t){var e;function n(t,n){return e(t,n)}return n.define=function(i){return o(i)&&n.hasOwnProperty("dispatch")&&(i.dispatch=n.dispatch),r(n,e=i,!0),t&&(e.displayName=n.displayName=t,n.meta.name=t),n.meta.identity=e.meta.identity,n.prototype=e.prototype,n},n.displayName=t||i(n)+"$"+a++,n.meta={identity:!1},n.prototype=null,n}},195:function(t,e,n){var r=n(21),i=(n(38),n(64),n(92)),o=n(70);n(46);function a(t){return Object.keys(t).map((function(t){return r.stringify(t)})).join(" | ")}function s(t,e){var n=e||a(t);function r(t,e){return t}return r.meta={kind:"enums",map:t,name:e,identity:!0},r.displayName=n,r.is=function(e){return(o(e)||i(e))&&t.hasOwnProperty(e)},r}s.of=function(t,e){t=o(t)?t.split(" "):t;var n={};return t.forEach((function(t){n[t]=t})),s(n,e)},s.getDefaultName=a,t.exports=s},196:function(t,e,n){n(21),n(38),n(33);var r=n(197),i=n(48),o=n(91),a=n(49),s=n(128),u=(n(64),n(50)),l=n(29);function c(t){return"?"+l(t)}function f(t,e){if(r(t)||t===o||t===s)return t;var n=e||c(t),l=i(t);function f(e,n){return s.is(e)?e:a(t,e,n)}return f.meta={kind:"maybe",type:t,name:e,identity:l},f.displayName=n,f.is=function(e){return s.is(e)||u(e,t)},f}f.getDefaultName=c,t.exports=f},197:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)&&"maybe"===t.meta.kind}},198:function(t,e,n){var r=n(21),i=(n(38),n(94),n(72),n(71),n(46)),o=n(45),a=n(49),s=(n(29),n(95),n(132)),u=n(133);function l(t){return"Struct"+s(t)}function c(t,e){return u(d,t,e)}function f(t){return i(t)||(t=o(t)?{}:{name:t}),t.hasOwnProperty("strict")||(t.strict=d.strict),t.hasOwnProperty("defaultProps")||(t.defaultProps={}),t}function d(t,e){var n=(e=f(e)).name,i=e.strict,o=e.defaultProps;var s=n||l(t);function u(e,n){if(u.is(e))return e;if(!(this instanceof u))return new u(e,n);for(var r in t)if(t.hasOwnProperty(r)){var i=t[r],s=e[r];void 0===s&&(s=o[r]),this[r]=a(i,s,null)}}return u.meta={kind:"struct",props:t,name:n,identity:!1,strict:i,defaultProps:o},u.displayName=s,u.is=function(t){return t instanceof u},u.update=function(t,e){return new u(r.update(t,e))},u.extend=function(t,e){return c([u].concat(t),e)},u}d.strict=!1,d.getOptions=f,d.getDefaultName=l,d.extend=c,t.exports=d},199:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)&&"struct"===t.meta.kind}},2:function(t,e,n){(function(t,n){var r;!function(){var i="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||this||{},o=i._,a=Array.prototype,s=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,l=a.push,c=a.slice,f=s.toString,d=s.hasOwnProperty,p=Array.isArray,h=Object.keys,v=Object.create,m=function(){},y=function(t){return t instanceof y?t:this instanceof y?void(this._wrapped=t):new y(t)};e.nodeType?i._=y:(!n.nodeType&&n.exports&&(e=n.exports=y),e._=y),y.VERSION="1.9.1";var g,b=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},w=function(t,e,n){return y.iteratee!==g?y.iteratee(t,e):null==t?y.identity:y.isFunction(t)?b(t,e,n):y.isObject(t)&&!y.isArray(t)?y.matcher(t):y.property(t)};y.iteratee=g=function(t,e){return w(t,e,1/0)};var _=function(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),r=Array(n),i=0;i=0&&e<=E};y.each=y.forEach=function(t,e,n){var r,i;if(e=b(e,n),S(t))for(r=0,i=t.length;r0?0:a-1;for(i||(r=e[o?o[s]:s],s+=t);s>=0&&s=3;return e(t,b(n,i,4),r,o)}};y.reduce=y.foldl=y.inject=T(1),y.reduceRight=y.foldr=T(-1),y.find=y.detect=function(t,e,n){var r=(S(t)?y.findIndex:y.findKey)(t,e,n);if(void 0!==r&&-1!==r)return t[r]},y.filter=y.select=function(t,e,n){var r=[];return e=w(e,n),y.each(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r},y.reject=function(t,e,n){return y.filter(t,y.negate(w(e)),n)},y.every=y.all=function(t,e,n){e=w(e,n);for(var r=!S(t)&&y.keys(t),i=(r||t).length,o=0;o=0},y.invoke=_((function(t,e,n){var r,i;return y.isFunction(e)?i=e:y.isArray(e)&&(r=e.slice(0,-1),e=e[e.length-1]),y.map(t,(function(t){var o=i;if(!o){if(r&&r.length&&(t=C(t,r)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)}))})),y.pluck=function(t,e){return y.map(t,y.property(e))},y.where=function(t,e){return y.filter(t,y.matcher(e))},y.findWhere=function(t,e){return y.find(t,y.matcher(e))},y.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=S(t)?t:y.values(t)).length;so&&(o=r);else e=w(e,n),y.each(t,(function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)}));return o},y.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var s=0,u=(t=S(t)?t:y.values(t)).length;sr||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(c.call(r,a,s),y.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&oe?(r&&(clearTimeout(r),r=null),s=l,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(u,c)),a};return l.cancel=function(){clearTimeout(r),s=0,r=i=o=null},l},y.debounce=function(t,e,n){var r,i,o=function(e,n){r=null,n&&(i=t.apply(e,n))},a=_((function(a){if(r&&clearTimeout(r),n){var s=!r;r=setTimeout(o,e),s&&(i=t.apply(this,a))}else r=y.delay(o,e,this,a);return i}));return a.cancel=function(){clearTimeout(r),r=null},a},y.wrap=function(t,e){return y.partial(e,t)},y.negate=function(t){return function(){return!t.apply(this,arguments)}},y.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},y.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},y.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},y.once=y.partial(y.before,2),y.restArguments=_;var R=!{toString:null}.propertyIsEnumerable("toString"),M=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],B=function(t,e){var n=M.length,r=t.constructor,i=y.isFunction(r)&&r.prototype||s,o="constructor";for(x(t,o)&&!y.contains(e,o)&&e.push(o);n--;)(o=M[n])in t&&t[o]!==i[o]&&!y.contains(e,o)&&e.push(o)};y.keys=function(t){if(!y.isObject(t))return[];if(h)return h(t);var e=[];for(var n in t)x(t,n)&&e.push(n);return R&&B(t,e),e},y.allKeys=function(t){if(!y.isObject(t))return[];var e=[];for(var n in t)e.push(n);return R&&B(t,e),e},y.values=function(t){for(var e=y.keys(t),n=e.length,r=Array(n),i=0;i1&&(r=b(r,e[1])),e=y.allKeys(t)):(r=U,e=N(e,!1,!1),t=Object(t));for(var i=0,o=e.length;i1&&(n=e[1])):(e=y.map(N(e,!1,!1),String),r=function(t,n){return!y.contains(e,n)}),y.pick(t,r,n)})),y.defaults=q(y.allKeys,!0),y.create=function(t,e){var n=O(t);return e&&y.extendOwn(n,e),n},y.clone=function(t){return y.isObject(t)?y.isArray(t)?t.slice():y.extend({},t):t},y.tap=function(t,e){return e(t),t},y.isMatch=function(t,e){var n=y.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o":">",'"':""","'":"'","`":"`"},V=y.invert(W),K=function(t){var e=function(e){return t[e]},n="(?:"+y.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};y.escape=K(W),y.unescape=K(V),y.result=function(t,e,n){y.isArray(e)||(e=[e]);var r=e.length;if(!r)return y.isFunction(n)?n.call(t):n;for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $=/(.)^/,G={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,Z=function(t){return"\\"+G[t]};y.template=function(t,e,n){!e&&n&&(e=n),e=y.defaults({},e,y.templateSettings);var r,i=RegExp([(e.escape||$).source,(e.interpolate||$).source,(e.evaluate||$).source].join("|")+"|$","g"),o=0,a="__p+='";t.replace(i,(function(e,n,r,i,s){return a+=t.slice(o,s).replace(Y,Z),o=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),e})),a+="';\n",e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(e.variable||"obj","_",a)}catch(t){throw t.source=a,t}var s=function(t){return r.call(this,t,y)},u=e.variable||"obj";return s.source="function("+u+"){\n"+a+"}",s},y.chain=function(t){var e=y(t);return e._chain=!0,e};var X=function(t,e){return t._chain?y(e).chain():e};y.mixin=function(t){return y.each(y.functions(t),(function(e){var n=y[e]=t[e];y.prototype[e]=function(){var t=[this._wrapped];return l.apply(t,arguments),X(this,n.apply(y,t))}})),y},y.mixin(y),y.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=a[t];y.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],X(this,n)}})),y.each(["concat","join","slice"],(function(t){var e=a[t];y.prototype[t]=function(){return X(this,e.apply(this._wrapped,arguments))}})),y.prototype.value=function(){return this._wrapped},y.prototype.valueOf=y.prototype.toJSON=y.prototype.value,y.prototype.toString=function(){return String(this._wrapped)},void 0===(r=function(){return y}.apply(e,[]))||(n.exports=r)}()}).call(this,n(41),n(79)(t))},20:function(t,e,n){(function(e){ /*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */ var n;"undefined"!=typeof self&&self,n=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),i=n(18),o=n(19),a=n(45),s=n(46),u=n(47),l=n(48),c=n(49),f=n(12),d=n(32),p=n(33),h=n(31),v=n(1),m={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:r.default,Format:i.default,Leaf:o.default,Embed:l.default,Scroll:a.default,Block:u.default,Inline:s.default,Text:c.default,Attributor:{Attribute:f.default,Class:d.default,Style:p.default,Store:h.default}};e.default=m},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return i(e,t),e}(Error);e.ParchmentError=o;var a,s={},u={},l={},c={};function f(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=c[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=c.block:t&a.LEVEL&a.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var i in r)if(n=u[r[i]])break;n=n||l[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new o("Unable to create "+t+" blot");var r=n,i=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(i,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new o("Invalid definition");if("abstract"===r.blotName)throw new o("Cannot register abstract class");if(c[r.blotName||r.attrName]=r,"string"==typeof r.keyName)s[r.keyName]=r;else if(null!=r.className&&(u[r.className]=r),null!=r.tagName){Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase();var i=Array.isArray(r.tagName)?r.tagName:[r.tagName];i.forEach((function(t){null!=l[t]&&null!=r.className||(l[t]=r)}))}return r}},function(t,e,n){var r=n(51),i=n(11),o=n(3),a=n(20),s=String.fromCharCode(0),u=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};u.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},u.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},u.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},u.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(i(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},u.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},u.prototype.filter=function(t){return this.ops.filter(t)},u.prototype.forEach=function(t){this.ops.forEach(t)},u.prototype.map=function(t){return this.ops.map(t)},u.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},u.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},u.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},u.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},u.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=a.iterator(this.ops),i=0;i0&&n.next(o.retain-s)}for(var l=new u(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===e.peekType())l.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),d=n.next(c);if("number"==typeof d.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var h=a.attributes.compose(f.attributes,d.attributes,"number"==typeof f.retain);if(h&&(p.attributes=h),l.push(p),!n.hasNext()&&i(l.ops[l.ops.length-1],p)){var v=new u(e.rest());return l.concat(v).chop()}}else"number"==typeof d.delete&&"number"==typeof f.retain&&l.push(d)}return l.chop()},u.prototype.concat=function(t){var e=new u(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},u.prototype.diff=function(t,e){if(this.ops===t.ops)return new u;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),o=new u,l=r(n[0],n[1],e),c=a.iterator(this.ops),f=a.iterator(t.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),o.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),o.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var s=c.next(n),u=f.next(n);i(s.insert,u.insert)?o.retain(n,a.attributes.diff(s.attributes,u.attributes)):o.push(u).delete(n)}e-=n}})),o.chop()},u.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),r=new u,i=0;n.hasNext();){if("insert"!==n.peekType())return;var o=n.peek(),s=a.length(o)-n.peekLength(),l="string"==typeof o.insert?o.insert.indexOf(e,s)-s:-1;if(l<0)r.push(n.next());else if(l>0)r.push(n.next(l));else{if(!1===t(r,n.next(1).attributes||{},i))return;i+=1,r=new u}}r.length()>0&&t(r,{},i)},u.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),r=a.iterator(t.ops),i=new u;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())i.push(r.next());else{var o=Math.min(n.peekLength(),r.peekLength()),s=n.next(o),l=r.next(o);if(s.delete)continue;l.delete?i.push(l):i.retain(o,a.attributes.transform(s.attributes,l.attributes,e))}else i.retain(a.length(n.next()));return i.chop()},u.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var o=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},o}}]),e}(s.default.Block);function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,o.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:y(t.parent,e))}m.blotName="block",m.tagName="P",m.defaultChild="break",m.allowedChildren=[l.default,s.default.Embed,c.default],e.bubbleFormats=y,e.BlockEmbed=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(g(this,t),this.options=_(e,r),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new d.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t){t===u.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(u.default.events.SCROLL_UPDATE,(function(t,e){var r=n.selection.lastRange,i=r&&0===r.length?r.index:void 0;O.call(n,(function(){return n.editor.update(null,e,i)}),t)}));var o=this.clipboard.convert("
"+i+"


");this.setContents(o),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return o(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),h.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/"+i,t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),o(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,o=k(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],O.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;return O.call(this,(function(){var r=n.getSelection(!0),i=new a.default;if(null==r)return i;if(c.default.query(t,c.default.Scope.BLOCK))i=n.editor.formatLine(r.index,r.length,y({},t,e));else{if(0===r.length)return n.selection.format(t,e),i;i=n.editor.formatText(r.index,r.length,y({},t,e))}return n.setSelection(r,u.default.sources.SILENT),i}),r)}},{key:"formatLine",value:function(t,e,n,r,o){var a,s=this,u=k(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],O.call(this,(function(){return s.editor.formatLine(t,e,a)}),o,t,0)}},{key:"formatText",value:function(t,e,n,r,o){var a,s=this,u=k(t,e,n,r,o),l=i(u,4);return t=l[0],e=l[1],a=l[2],o=l[3],O.call(this,(function(){return s.editor.formatText(t,e,a)}),o,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=k(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=k(t,e),r=i(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return O.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,o){var a,s=this,u=k(t,0,n,r,o),l=i(u,4);return t=l[0],a=l[2],o=l[3],O.call(this,(function(){return s.editor.insertText(t,e,a)}),o,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,o=k(t,e,n),a=i(o,4);return t=a[0],e=a[1],n=a[3],O.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return O.call(this,(function(){t=new a.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),i=e.editor.applyDelta(t),o=i.ops[i.ops.length-1];return null!=o&&"string"==typeof o.insert&&"\n"===o.insert[o.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),i.delete(1)),r.compose(i)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var o=k(e,n,r),a=i(o,4);e=a[0],n=a[1],r=a[3],this.selection.setRange(new f.Range(e,n),r),r!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.sources.API;return O.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function _(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==w.DEFAULTS.theme){if(e.theme=w.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=v.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=w.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},w.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function O(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===u.default.sources.USER)return new a.default;var i=null==n?null:this.getSelection(),o=this.editor.delta,s=t();if(null!=i&&(!0===n&&(n=i.index),null==r?i=x(i,s,e):0!==r&&(i=x(i,n,r,e)),this.setSelection(i,u.default.sources.SILENT)),s.length()>0){var l,c,f=[u.default.events.TEXT_CHANGE,s,o,e];(l=this.emitter).emit.apply(l,[u.default.events.EDITOR_CHANGE].concat(f)),e!==u.default.sources.SILENT&&(c=this.emitter).emit.apply(c,f)}return s}function k(t,e,n,i,o){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(o=i,i=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(o=i,i=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(a=n,o=i):"string"==typeof n&&(null!=i?a[n]=i:o=n),[t,e,a,o=o||u.default.sources.API]}function x(t,e,n,r){if(null==t)return null;var o=void 0,s=void 0;if(e instanceof a.default){var l=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==u.default.sources.USER)})),c=i(l,2);o=c[0],s=c[1]}else{var d=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),p=i(d,2);o=p[0],s=p[1]}return new f.Range(o,s-o)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=u.default.events,w.sources=u.default.sources,w.version="1.3.7",w.imports={delta:a.default,parchment:c.default,"core/module":l.default,"core/theme":v.default},e.expandConfig=_,e.overload=k,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),i=e.order.indexOf(n);return r>=0||i>=0?r-i:t===n?0:t1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.quill=e,this.options=n};i.DEFAULTS={},e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=Array(n>1?n-1:0),a=1;a=0;l--)if(f[l]!=d[l])return!1;for(l=f.length-1;l>=0;l--)if(c=f[l],!a(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function u(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var i=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|i:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,u=o-a+1,l=this.isolate(a,u),c=l.next;l.format(r,i),c instanceof e&&c.formatAt(0,t-a+n-u,r,i)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var i=this.descendant(c.default,t),o=r(i,2),a=o[0],s=o[1];a.insertAt(s,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(u.default);m.blotName="code-block",m.tagName="PRE",m.TAB=" ",e.Code=v,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n=o&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var h=e.scroll.line(t),v=i(h,2),y=v[0],g=v[1],b=(0,m.default)({},(0,f.bubbleFormats)(y));if(y instanceof d.default){var w=y.descendant(u.default.Leaf,g),_=i(w,1)[0];b=(0,m.default)(b,(0,f.bubbleFormats)(_))}c=s.default.attributes.diff(b,c)||{}}else if("object"===r(a.insert)){var O=Object.keys(a.insert)[0];if(null==O)return t;e.scroll.insertAt(t,O,a.insert[O])}o+=l}return Object.keys(c).forEach((function(n){e.scroll.formatAt(t,l,n,c[n])})),t+l}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach((function(i){if(null==n.scroll.whitelist||n.scroll.whitelist[i]){var o=n.scroll.lines(t,Math.max(e,1)),a=e;o.forEach((function(e){var o=e.length();if(e instanceof l.default){var s=t-e.offset(n.scroll),u=e.newlineIndex(s+a)-s+1;e.formatAt(s,u,i,r[i])}else e.format(i,r[i]);a-=o}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,h.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])})),this.update((new a.default).retain(t).retain(e,(0,h.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=i(t,1)[0];e instanceof d.default?n.push(e):e instanceof u.default.Leaf&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(u.default.Leaf,t,e));var o=[n,r].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=w((0,f.bubbleFormats)(n),e)}return e}));return m.default.apply(m.default,o)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new a.default).retain(t).insert(e,(0,h.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===d.default.blotName&&!(t.children.length>1)&&t.children.head instanceof p.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),o=i(r,2),s=o[0],u=o[1],c=0,f=new a.default;null!=s&&(c=s instanceof l.default?s.newlineIndex(u)-u+1:s.length()-u,f=s.delta().slice(u,u+c-1).insert("\n"));var d=this.getContents(t,e+c).diff((new a.default).insert(n).concat(f)),p=(new a.default).retain(t).concat(d);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&u.default.find(e[0].target)){var i=u.default.find(e[0].target),o=(0,f.bubbleFormats)(i),s=i.offset(this.scroll),l=e[0].oldValue.replace(c.default.CONTENTS,""),d=(new a.default).insert(l),p=(new a.default).insert(i.value()),h=(new a.default).retain(s).concat(d.diff(p,n));t=h.reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new a.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function w(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},h=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=o.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u.default.sources.USER),1)})),this.emitter.on(u.default.events.EDITOR_CHANGE,(function(t,e){t===u.default.events.TEXT_CHANGE&&e.length()>0&&r.update(u.default.sources.SILENT)})),this.emitter.on(u.default.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.default.events.SCROLL_UPDATE,(function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(t){}}))}})),this.emitter.on(u.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s)}})),this.update(u.default.sources.SILENT)}return i(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(u.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!o.default.query(t,o.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=o.default.find(n.start.node,!1);if(null==r)return;if(r instanceof o.default.Leaf){var i=r.split(n.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var i=void 0,o=this.scroll.leaf(t),a=r(o,2),s=a[0],u=a[1];if(null==s)return null;var l=s.position(u,!0),c=r(l,2);i=c[0],u=c[1];var f=document.createRange();if(e>0){f.setStart(i,u);var d=this.scroll.leaf(t+e),p=r(d,2);if(s=p[0],u=p[1],null==s)return null;var h=s.position(u,!0),v=r(h,2);return i=v[0],u=v[1],f.setEnd(i,u),f.getBoundingClientRect()}var m="left",y=void 0;return i instanceof Text?(u0&&(m="right")),{bottom:y.top+y.height,height:y.height,left:y[m],right:y[m],top:y.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return d.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=r(t,2),i=n[0],a=n[1],s=o.default.find(i,!0),u=s.offset(e.scroll);return 0===a?u:s instanceof o.default.Container?u+s.length():u+s.index(i,a)})),a=Math.min(Math.max.apply(Math,c(i)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(c(i)));return new p(s,a-s)}},{key:"normalizeNative",value:function(t){if(!v(this.root,t.startContainer)||!t.collapsed&&!v(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],i=[],o=this.scroll.length();return n.forEach((function(t,n){t=Math.min(o-1,t);var a,s=e.scroll.leaf(t),u=r(s,2),l=u[0],c=u[1],f=l.position(c,0!==n),d=r(f,2);a=d[0],c=d[1],i.push(a,c)})),i.length<2&&(i=i.concat(i)),i}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var i=this.scroll.length()-1,o=this.scroll.line(Math.min(e.index,i)),a=r(o,1)[0],s=a;if(e.length>0){var u=this.scroll.line(Math.min(e.index+e.length,i));s=r(u,1)[0]}if(null!=a&&null!=s){var l=t.getBoundingClientRect();n.topl.bottom&&(t.scrollTop+=n.bottom-l.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(d.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof e&&(n=e,e=!1),d.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.default.sources.USER,e=this.lastRange,n=this.getRange(),i=r(n,2),o=i[0],l=i[1];if(this.lastRange=o,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var c;!this.composing&&null!=l&&l.native.collapsed&&l.start.node!==this.cursor.textNode&&this.cursor.restore();var f,d=[u.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(c=this.emitter).emit.apply(c,[u.default.events.EDITOR_CHANGE].concat(d)),t!==u.default.sources.SILENT&&(f=this.emitter).emit.apply(f,d)}}}]),t}();function v(t,e){try{e.parentNode}catch(t){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){var r=n(11),i=n(3),o={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=i(!0,{},e);for(var o in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[o]&&void 0===e[o]&&(r[o]=t[o]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,i){return r(t[i],e[i])||(n[i]=void 0===e[i]?null:e[i]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=o.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),"number"==typeof e.retain?i.retain=t:"string"==typeof e.insert?i.insert=e.insert.substr(n,t):i.insert=e.insert,i}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?o.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=o},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,i;try{n=Map}catch(t){n=function(){}}try{r=Set}catch(t){r=function(){}}try{i=Promise}catch(t){i=function(){}}function o(a,u,l,c,f){"object"==typeof u&&(l=u.depth,c=u.prototype,f=u.includeNonEnumerable,u=u.circular);var d=[],p=[],h=void 0!==e;return void 0===u&&(u=!0),void 0===l&&(l=1/0),function a(l,v){if(null===l)return null;if(0===v)return l;var m,y;if("object"!=typeof l)return l;if(t(l,n))m=new n;else if(t(l,r))m=new r;else if(t(l,i))m=new i((function(t,e){l.then((function(e){t(a(e,v-1))}),(function(t){e(a(t,v-1))}))}));else if(o.__isArray(l))m=[];else if(o.__isRegExp(l))m=new RegExp(l.source,s(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(o.__isDate(l))m=new Date(l.getTime());else{if(h&&e.isBuffer(l))return m=e.allocUnsafe?e.allocUnsafe(l.length):new e(l.length),l.copy(m),m;t(l,Error)?m=Object.create(l):void 0===c?(y=Object.getPrototypeOf(l),m=Object.create(y)):(m=Object.create(c),y=c)}if(u){var g=d.indexOf(l);if(-1!=g)return p[g];d.push(l),p.push(m)}for(var b in t(l,n)&&l.forEach((function(t,e){var n=a(e,v-1),r=a(t,v-1);m.set(n,r)})),t(l,r)&&l.forEach((function(t){var e=a(t,v-1);m.add(e)})),l){var w;y&&(w=Object.getOwnPropertyDescriptor(y,b)),w&&null==w.set||(m[b]=a(l[b],v-1))}if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(l);for(b=0;b<_.length;b++){var O=_[b];(!(x=Object.getOwnPropertyDescriptor(l,O))||x.enumerable||f)&&(m[O]=a(l[O],v-1),x.enumerable||Object.defineProperty(m,O,{enumerable:!1}))}}if(f){var k=Object.getOwnPropertyNames(l);for(b=0;b0){if(s instanceof u.BlockEmbed||p instanceof u.BlockEmbed)return void this.optimize();if(s instanceof f.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===p)return void this.optimize()}else if(p instanceof f.default){var v=p.newlineIndex(0);v>-1&&p.split(v+1)}var m=p.children.head instanceof c.default?null:p.children.head;s.moveChildren(p,m),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,i){(null==this.whitelist||this.whitelist[r])&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==a.default.query(n,a.default.Scope.BLOCK)){var i=a.default.create(this.statics.defaultChild);this.appendChild(i),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),i.insertAt(0,n,r)}else{var s=a.default.create(n,r);this.appendChild(s)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var r=a.default.create(this.statics.defaultChild);r.appendChild(t),t=r}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(h,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,r){var i=[],o=r;return e.children.forEachAt(n,r,(function(e,n,r){h(e)?i.push(e):e instanceof a.default.Container&&(i=i.concat(t(e,n,o))),o-=r})),i};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[l.default,u.BlockEmbed,d.default],e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="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},i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(t);if(null==r||null==r.key)return y.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,u.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var o=n.which||n.keyCode,a=(t.bindings[o]||[]).filter((function(t){return e.match(n,t)}));if(0!==a.length){var u=t.quill.getSelection();if(null!=u&&t.quill.hasFocus()){var l=t.quill.getLine(u.index),c=i(l,2),d=c[0],p=c[1],h=t.quill.getLeaf(u.index),v=i(h,2),m=v[0],y=v[1],g=0===u.length?[m,y]:t.quill.getLeaf(u.index+u.length),b=i(g,2),w=b[0],_=b[1],O=m instanceof f.default.Text?m.value().slice(0,y):"",k=w instanceof f.default.Text?w.value().slice(_):"",x={collapsed:0===u.length,empty:0===u.length&&d.length()<=1,format:t.quill.getFormat(u),offset:p,prefix:O,suffix:k};a.some((function(e){if(null!=e.collapsed&&e.collapsed!==x.collapsed)return!1;if(null!=e.empty&&e.empty!==x.empty)return!1;if(null!=e.offset&&e.offset!==x.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==x.format[t]})))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=x.format[t]:!1===e.format[t]?null==x.format[t]:(0,s.default)(e.format[t],x.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(x.prefix)||null!=e.suffix&&!e.suffix.test(x.suffix)||!0===e.handler.call(t,u,x))}))&&n.preventDefault()}}}}))}}]),e}(h.default);function w(t,e){var n,r=t===b.keys.LEFT?"prefix":"suffix";return m(n={key:t,shiftKey:e,altKey:null},r,/^$/),m(n,"handler",(function(n){var r=n.index;t===b.keys.RIGHT&&(r+=n.length+1);var o=this.quill.getLeaf(r);return!(i(o,1)[0]instanceof f.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index-1,d.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,d.default.sources.USER):this.quill.setSelection(n.index+n.length+1,d.default.sources.USER),1))})),n}function _(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=i(n,1)[0],o={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=i(a,1)[0];if(null!=s&&s.length()>1){var u=r.formats(),l=this.quill.getFormat(t.index-1,1);o=c.default.attributes.diff(u,l)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,d.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index-f,f,o,d.default.sources.USER),this.quill.focus()}}function O(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},o=0,a=this.quill.getLine(t.index),s=i(a,1)[0];if(e.offset>=s.length()-1){var u=this.quill.getLine(t.index+1),l=i(u,1)[0];if(l){var f=s.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},o=l.length()}}this.quill.deleteText(t.index,n,d.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+o-1,n,r,d.default.sources.USER)}}function k(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),i=e[e.length-1].formats();n=c.default.attributes.diff(i,r)||{}}this.quill.deleteText(t,d.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,d.default.sources.USER),this.quill.setSelection(t.index,d.default.sources.SILENT),this.quill.focus()}function x(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",r,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],d.default.sources.USER))}))}function C(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,o=e.length,a=this.quill.scroll.descendant(n,r),s=i(a,2),u=s[0],l=s[1];if(null!=u){var c=this.quill.getIndex(u),p=u.newlineIndex(l,!0)+1,h=u.newlineIndex(c+l+o),v=u.domNode.textContent.slice(p,h).split("\n");l=0,v.forEach((function(e,i){t?(u.insertAt(p+l,n.TAB),l+=n.TAB.length,0===i?r+=n.TAB.length:o+=n.TAB.length):e.startsWith(n.TAB)&&(u.deleteAt(p+l,n.TAB.length),l-=n.TAB.length,0===i?r-=n.TAB.length:o-=n.TAB.length),l+=e.length+1})),this.quill.update(d.default.sources.USER),this.quill.setSelection(r,o,d.default.sources.SILENT)}}}}function E(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],d.default.sources.USER)}}}function j(t){if("string"==typeof t||"number"==typeof t)return j({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[g]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:E("bold"),italic:E("italic"),underline:E("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",d.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",d.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",d.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,d.default.sources.USER)}},"indent code-block":C(!0),"outdent code-block":C(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,d.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new l.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,d.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,d.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,d.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(0,u.default)({},r.formats(),{list:"checked"}),s=(new l.default).retain(t.index).insert("\n",a).retain(r.length()-o-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=i(n,2),o=r[0],a=r[1],s=(new l.default).retain(t.index).insert("\n",e.format).retain(o.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,d.default.sources.USER),this.quill.setSelection(t.index+1,d.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),o=i(r,2),a=o[0],s=o[1];if(s>n)return!0;var u=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":u="unchecked";break;case"[x]":u="checked";break;case"-":case"*":u="bullet";break;default:u="ordered"}this.quill.insertText(t.index," ",d.default.sources.USER),this.quill.history.cutoff();var c=(new l.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:u});this.quill.updateContents(c,d.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,d.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=i(e,2),r=n[0],o=n[1],a=(new l.default).retain(t.index+r.length()-o-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,d.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(t,e){for(var n=0;n-1}l.blotName="link",l.tagName="A",l.SANITIZED_URL="about:blank",l.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=l,e.sanitize=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="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},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var i=document.createEvent("Event");i.initEvent("change",!0,!0),this.select.dispatchEvent(i)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=y(n(0)),i=y(n(5)),o=n(4),a=y(o),s=y(n(16)),u=y(n(25)),l=y(n(24)),c=y(n(35)),f=y(n(6)),d=y(n(22)),p=y(n(7)),h=y(n(55)),v=y(n(42)),m=y(n(23));function y(t){return t&&t.__esModule?t:{default:t}}i.default.register({"blots/block":a.default,"blots/block/embed":o.BlockEmbed,"blots/break":s.default,"blots/container":u.default,"blots/cursor":l.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":d.default,"blots/text":p.default,"modules/clipboard":h.default,"modules/history":v.default,"modules/keyboard":m.default}),r.default.register(a.default,s.default,l.default,f.default,d.default,p.default),e.default=i.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,i){var o=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&i)o.wrap(n,i);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var a=r.create(this.statics.scope);o.wrap(a),a.format(n,i)}},t.prototype.insertAt=function(t,e,n){var i=null==n?r.create("text",e):r.create(e,n),o=this.split(t);this.parent.insertBefore(i,o)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),i=n(32),o=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=i.default.keys(this.domNode),s=o.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){o(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(o(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function o(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[o(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[o(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[o(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i.undo),t=i.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function u(t){var e=t.reduce((function(t,e){return t+=e.delete||0}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=i.default.query(t,i.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var r=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=r;break;case"video":e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/),n=e?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var i=this.quill.getSelection(!0);if(null!=i){var o=i.index+i.length;this.quill.insertEmbed(o,this.root.getAttribute("data-mode"),n,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(o+1," ",a.default.sources.USER),this.quill.setSelection(o+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(d.default);function x(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)}))}e.BaseTooltip=k,e.default=O},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var i=n.length();if(ta?n(r,t-a,Math.min(e,a+u-t)):n(r,0,Math.min(u,t+e-a)),a+=u}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return i(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,i){this.update(),t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var i=[].slice.call(this.observer.takeRecords());i.length>0;)e.push(i.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},u=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof o.default&&t.children.forEach(u),t.optimize(n))},l=e,c=0;l.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof o.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(u),i=(l=[].slice.call(this.observer.takeRecords())).slice();i.length>0;)e.push(i.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==r&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(o.default);e.default=u},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var i=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach((function(t){t instanceof o.default||(t=t.wrap(e.blotName,!0)),i.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||a.query(r,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(n){var r=a.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,i){null!=a.query(r,a.Scope.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e),o=a.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(o.default);e.default=s},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=o},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return i(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(o.default);e.default=s},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:i.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;oe.length?t:e,u=t.length>e.length?e:t,l=s.indexOf(u);if(-1!=l)return a=[[1,s.substring(0,l)],[0,u],[1,s.substring(l+u.length)]],t.length>e.length&&(a[0][0]=a[2][0]=-1),a;if(1==u.length)return[[-1,t],[1,e]];var c=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,a,s,u,f]:null}var s,u,l,c,f,d=a(n,r,Math.ceil(n.length/4)),p=a(n,r,Math.ceil(n.length/2));if(!d&&!p)return null;s=p?d&&d[4].length>p[4].length?d:p:d,t.length>e.length?(u=s[0],l=s[1],c=s[2],f=s[3]):(c=s[0],f=s[1],u=s[2],l=s[3]);var h=s[4];return[u,l,c,f,h]}(t,e);if(c){var f=c[0],d=c[1],p=c[2],h=c[3],v=c[4],m=n(f,p),y=n(d,h);return m.concat([[0,v]],y)}return function(t,e){for(var n=t.length,i=e.length,o=Math.ceil((n+i)/2),a=o,s=2*o,u=new Array(s),l=new Array(s),c=0;cn)h+=2;else if(w>i)p+=2;else if(d&&(k=a+f-g)>=0&&k=_)return r(t,e,C,w)}}for(var O=-y+v;O<=y-m;O+=2){for(var k=a+O,x=(_=O==-y||O!=y&&l[k-1]n)m+=2;else if(x>i)v+=2;else if(!d&&(b=a+f-O)>=0&&b=(_=n-_))return r(t,e,C,w)}}}return[[-1,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-u),e=e.substring(0,e.length-u));return l&&f.unshift([0,l]),c&&f.push([0,c]),function t(e){e.push([0,""]);for(var n,r=0,a=0,s=0,u="",l="";r1?(0!==a&&0!==s&&(0!==(n=i(l,u))&&(r-a-s>0&&0==e[r-a-s-1][0]?e[r-a-s-1][1]+=l.substring(0,n):(e.splice(0,0,[0,l.substring(0,n)]),r++),l=l.substring(n),u=u.substring(n)),0!==(n=o(l,u))&&(e[r][1]=l.substring(l.length-n)+e[r][1],l=l.substring(0,l.length-n),u=u.substring(0,u.length-n))),0===a?e.splice(r-s,a+s,[1,l]):0===s?e.splice(r-a,a+s,[-1,u]):e.splice(r-a-s,a+s,[-1,u],[1,l]),r=r-a-s+(a?1:0)+(s?1:0)+1):0!==r&&0==e[r-1][0]?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,s=0,a=0,u="",l=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(r=1;r0&&r.splice(i+2,0,[a[0],u]),s(r,i,3)}return t}(f,a)),f=function(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},r=2;r=55296&&i.charCodeAt(i.length-1)<=56319&&-1===t[r-1][0]&&n(t[r-1][1])&&1===t[r][0]&&n(t[r][1])&&(e=!0,t[r-1][1]=t[r-2][1].slice(-1)+t[r-1][1],t[r][1]=t[r-2][1].slice(-1)+t[r][1],t[r-2][1]=t[r-2][1].slice(0,-1));var i;if(!e)return t;var o=[];for(r=0;r0&&o.push(t[r]);return o}(f)}function r(t,e,r,i){var o=t.substring(0,r),a=e.substring(0,i),s=t.substring(r),u=e.substring(i),l=n(o,a),c=n(s,u);return l.concat(c)}function i(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n=0&&r>=e-1;r--)if(r+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=j(e,n)),parseFloat(r.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=u.default.query(t);if(null==n||"list-item"!==n.blotName||!T(e,"\n"))return e;for(var r=-1,i=t.parentNode;!i.classList.contains("ql-clipboard");)"list"===(u.default.query(i)||{}).blotName&&(r+=1),i=i.parentNode;return r<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new s.default}]],x=[d.AlignAttribute,m.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),C=[d.AlignStyle,p.BackgroundStyle,v.ColorStyle,m.DirectionStyle,y.FontStyle,g.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),E=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],k.concat(r.options.matchers).forEach((function(t){var e=i(t,2),o=e[0],a=e[1];(n.matchVisual||a!==D)&&r.addMatcher(o,a)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,w({},h.default.blotName,e[h.default.blotName]))}var r=this.prepareMatching(),o=i(r,2),a=o[0],u=o[1],l=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce((function(t,n){return n(e,t)}),new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(i,o){var a=t(o,n,r);return o.nodeType===e.ELEMENT_NODE&&(a=n.reduce((function(t,e){return e(o,t)}),a),a=(o[O]||[]).reduce((function(t,e){return e(o,t)}),a)),i.concat(a)}),new s.default):new s.default}(this.container,a,u);return T(l,"\n")&&null==l.ops[l.ops.length-1].attributes&&(l=l.compose((new s.default).retain(l.length()-1).delete(1))),_.log("convert",this.container.innerHTML,l),this.container.innerHTML="",l}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,l.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),l.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new s.default).retain(n.index),i=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(l.default.sources.SILENT),setTimeout((function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,l.default.sources.USER),e.quill.setSelection(r.length()-n.length,l.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=i,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(r){var o=i(r,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[O]=t[O]||[],t[O].push(s)}))}})),[e,n]}}]),e}(f.default);function j(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce((function(t,n){return j(t,n,e[n])}),t):t.reduce((function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,a.default)({},w({},e,n),r.attributes))}),new s.default)}function S(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function T(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length-1}function P(t,e,n){return j(n,t,!0)}function N(t,e){var n=u.default.Attributor.Attribute.keys(t),r=u.default.Attributor.Class.keys(t),i=u.default.Attributor.Style.keys(t),o={};return n.concat(r).concat(i).forEach((function(e){var n=u.default.query(e,u.default.Scope.ATTRIBUTE);null!=n&&(o[n.attrName]=n.value(t),o[n.attrName])||(null==(n=x[e])||n.attrName!==e&&n.keyName!==e||(o[n.attrName]=n.value(t)||void 0),null==(n=C[e])||n.attrName!==e&&n.keyName!==e||(n=C[e],o[n.attrName]=n.value(t)||void 0))})),Object.keys(o).length>0&&(e=j(e,o)),e}function L(t,e){var n=u.default.query(t);if(null==n)return e;if(n.prototype instanceof u.default.Embed){var r={},i=n.value(t);null!=i&&(r[n.blotName]=i,e=(new s.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}function I(t,e){return T(e,"\n")||(A(t)||e.length()>0&&t.nextSibling&&A(t.nextSibling))&&e.insert("\n"),e}function D(t,e){if(A(t)&&null!=t.nextElementSibling&&!T(e,"\n\n")){var n=t.offsetHeight+parseFloat(S(t).marginTop)+parseFloat(S(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!S(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&A(t.parentNode)||null!=t.previousSibling&&A(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&A(t.parentNode)||null!=t.nextSibling&&A(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}E.DEFAULTS={matchers:[],matchVisual:!0},e.default=E,e.matchAttributor=N,e.matchBlot=L,e.matchNewline=I,e.matchSpacing=D,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;nr.right&&(o=r.right-i.right,this.root.style.left=e+o+"px"),i.leftr.bottom){var a=i.bottom-i.top,s=t.bottom-t.top+a;this.root.style.top=n-s+"px",this.root.classList.add("ql-flip")}return o}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},o=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=D(n(29)),i=n(36),o=n(38),a=n(64),s=D(n(65)),u=D(n(66)),l=n(67),c=D(l),f=n(37),d=n(26),p=n(39),h=n(40),v=D(n(56)),m=D(n(68)),y=D(n(27)),g=D(n(69)),b=D(n(70)),w=D(n(71)),_=D(n(72)),O=D(n(73)),k=n(13),x=D(k),C=D(n(74)),E=D(n(75)),j=D(n(57)),S=D(n(41)),T=D(n(28)),A=D(n(59)),P=D(n(60)),N=D(n(61)),L=D(n(108)),I=D(n(62));function D(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":o.DirectionAttribute,"attributors/class/align":i.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":d.ColorClass,"attributors/class/direction":o.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":i.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":d.ColorStyle,"attributors/style/direction":o.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":h.SizeStyle},!0),r.default.register({"formats/align":i.AlignClass,"formats/direction":o.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":d.ColorStyle,"formats/font":p.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":x.default,"formats/header":u.default,"formats/list":c.default,"formats/bold":v.default,"formats/code":k.Code,"formats/italic":m.default,"formats/link":y.default,"formats/script":g.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":_.default,"formats/video":O.default,"formats/list/item":l.ListItem,"modules/formula":C.default,"modules/syntax":E.default,"modules/toolbar":j.default,"themes/bubble":L.default,"themes/snow":I.default,"ui/icons":S.default,"ui/picker":T.default,"ui/icon-picker":P.default,"ui/color-picker":A.default,"ui/tooltip":N.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,i=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof d)i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),o=this.split(r);o.parent.insertBefore(t,o)}}},{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=o.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);p.blotName="list",p.scope=o.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[d],e.ListItem=d,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(56);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var s=function(t){function e(){return o(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(((r=i)&&r.__esModule?r:{default:r}).default);s.blotName="italic",s.tagName=["EM","I"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,u.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(s.default.Embed);d.blotName="image",d.tagName="IMG",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return f.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return u.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(a.BlockEmbed);d.blotName="video",d.className="ql-video",d.tagName="IFRAME",e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(s(n(13)).default);f.className="ql-syntax";var d=new i.default.Attributor.Class("token","hljs",{scope:i.default.Scope.INLINE}),p=function(t){function e(t,n){u(this,e);var r=l(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var i=null;return r.quill.on(o.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(i),i=setTimeout((function(){r.highlight(),i=null}),r.options.interval)})),r.highlight(),r}return c(e,t),r(e,null,[{key:"register",value:function(){o.default.register(d,!0),o.default.register(f,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(o.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(o.default.sources.SILENT),null!=e&&this.quill.setSelection(e,o.default.sources.SILENT)}}}]),e}(a.default);p.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=d,e.default=p},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},i=function(){function t(t,e){for(var n=0;n0&&i===a.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var o=r.quill.getLines(e.index,e.length);if(1===o.length)r.position(r.quill.getBounds(e));else{var s=o[o.length-1],u=r.quill.getIndex(s),c=Math.min(s.length()-1,e.index+e.length-u),f=r.quill.getBounds(new l.Range(u,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()})),r}return h(e,t),i(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),i=this.root.querySelector(".ql-tooltip-arrow");if(i.style.marginLeft="",0===n)return n;i.style.marginLeft=-1*n-i.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);y.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=y,e.default=m},function(t,e,n){t.exports=n(63)}]).default},t.exports=n()}).call(this,n(213).Buffer)},200:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)&&"interface"===t.meta.kind}},201:function(t,e,n){var r=n(34);function i(t){return r(t)&&"subtype"===t.meta.kind}function o(t){return i(t)?[t.meta.predicate].concat(o(t.meta.type)):[]}function a(t){return i(t)?a(t.meta.type):t}t.exports=function(t){return{predicates:o(t),unrefinedType:a(t)}}},202:function(t,e,n){var r=n(21),i=(n(38),n(33),n(29)),o=n(48),a=(n(47),n(49)),s=n(50),u=(n(64),n(130)),l=n(45);function c(t){return t.map(i).join(" | ")}function f(t,e){var n=e||c(t),i=t.every(o);function f(t,e){if(i)return t;var n=f.dispatch(t);return!n&&f.is(t)?t:a(n,t,e)}return f.meta={kind:"union",types:t,name:e,identity:i},f.displayName=n,f.is=function(e){return t.some((function(t){return s(e,t)}))},f.dispatch=function(e){for(var n=0,r=t.length;n "+u(e)}function f(t){return r.is(t)&&o(t.instrumentation)}function d(t){for(var e=t.length,n=!1,r=e-1;r>=0;r--){var i=t[r];if(!l(i)||"maybe"!==i.meta.kind)return r+1;n=!0}return n?0:e}function p(t,e,n){t=i(t)?t:[t];var r=n||c(t,e),o=t.length;d(t);function u(t,e){return f(t)?t:u.of(t)}return u.meta={kind:"func",domain:t,codomain:e,name:n,identity:!0},u.displayName=r,u.is=function(n){return f(n)&&n.instrumentation.domain.length===o&&n.instrumentation.domain.every((function(e,n){return e===t[n]}))&&n.instrumentation.codomain===e},u.of=function(n,r){if(u.is(n))return n;function i(){var i=Array.prototype.slice.call(arguments),s=i.length;if(r&&s0?e.concat(t):e},$remove:function(t,e){if(t.length>0){e=a(e);for(var n=0,r=t.length;n0?(e=a(e),t.reduce((function(t,e){return t.splice.apply(t,e),t}),e)):e},$swap:function(t,e){if(t.from!==t.to){var n=(e=a(e))[t.to];e[t.to]=e[t.from],e[t.from]=n}return e},$unshift:function(t,e){return t.length>0?t.concat(e):e},$merge:function(t,e){var n=!1,r=a(e);for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i],n=n||r[i]!==e[i]);return n?r:e}},t.exports=l},207:function(t,e,n){var r=n(21),i=n(33),o=n(34),a=n(91);t.exports=function(t){for(var e,n,s,u=1,l=arguments.length;u=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(209),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(41))},209:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,s,u=1,l={},c=!1,f=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){h(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){h(t.data)},r=function(t){o.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){h(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(h,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&h(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),f=[".","!","~","*","'","(",")"].join(""),d=function(t,e){var n,r,d,v,m,y,g,b,w,_,O,k,x,C,E="-",j="",S="",T=!0,A={},P="";if("string"!=typeof t)return"";if("string"==typeof e&&(E=e),g=u.en,b=s.en,"object"==typeof e)for(O in n=e.maintainCase||!1,A=e.custom&&"object"==typeof e.custom?e.custom:A,d=+e.truncate>1&&e.truncate||!1,v=e.uric||!1,m=e.uricNoSlash||!1,y=e.mark||!1,T=!1!==e.symbols&&!1!==e.lang,E=e.separator||E,v&&(P+=l),m&&(P+=c),y&&(P+=f),g=e.lang&&u[e.lang]&&T?u[e.lang]:T?u.en:{},b=e.lang&&s[e.lang]?s[e.lang]:!1===e.lang||!0===e.lang?{}:s.en,e.titleCase&&"number"==typeof e.titleCase.length&&Array.prototype.toString.call(e.titleCase)?(e.titleCase.forEach((function(t){A[t+""]=t+""})),r=!0):r=!!e.titleCase,e.custom&&"number"==typeof e.custom.length&&Array.prototype.toString.call(e.custom)&&e.custom.forEach((function(t){A[t+""]=t+""})),Object.keys(A).forEach((function(e){var n;n=e.length>1?new RegExp("\\b"+p(e)+"\\b","gi"):new RegExp(p(e),"gi"),t=t.replace(n,A[e])})),A)P+=O;for(P=p(P+=E),x=!1,C=!1,_=0,k=(t=t.replace(/(^\s+|\s+$)/g,"")).length;_=0?(S+=O,O=""):!0===C?(O=a[S]+i[O],S=""):O=x&&i[O].match(/[A-Za-z0-9]/)?" "+i[O]:i[O],x=!1,C=!1):O in a?(S+=O,O="",_===k-1&&(O=a[S]),C=!0):!g[O]||v&&-1!==l.indexOf(O)||m&&-1!==c.indexOf(O)?(!0===C?(O=a[S]+O,S="",C=!1):x&&(/[A-Za-z0-9]/.test(O)||j.substr(-1).match(/A-Za-z0-9]/))&&(O=" "+O),x=!1):(O=x||j.substr(-1).match(/[A-Za-z0-9]/)?E+g[O]:g[O],O+=void 0!==t[_+1]&&t[_+1].match(/[A-Za-z0-9]/)?E:"",x=!0),j+=O.replace(new RegExp("[^\\w\\s"+P+"_-]","g"),E);return r&&(j=j.replace(/(\w)(\S*)/g,(function(t,e,n){var r=e.toUpperCase()+(null!==n?n:"");return Object.keys(A).indexOf(r.toLowerCase())<0?r:r.toLowerCase()}))),j=j.replace(/\s+/g,E).replace(new RegExp("\\"+E+"+","g"),E).replace(new RegExp("(^\\"+E+"+|\\"+E+"+$)","g"),""),d&&j.length>d&&(w=j.charAt(d)===E,j=j.slice(0,d),w||(j=j.slice(0,j.lastIndexOf(E)))),n||r||(j=j.toLowerCase()),j},p=function(t){return t.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},h=function(t,e){for(var n in e)if(e[n]===t)return!0};t.exports?(t.exports=d,t.exports.createSlug=function(t){return function(e){return d(e,t)}}):void 0===(r=function(){return d}.apply(e,[]))||(t.exports=r)}()},211:function(t,e,n){(function(r){var i; /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"classList"in document.createElement("_")||function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,r=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e1?e:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(t);t.Blob=function(t,n){var r=n&&n.type||"",i=new e;if(t)for(var o=0,a=t.length;o-1,isMac:e.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(t){return!!(a.isMac&&t.metaKey||!a.isMac&&t.ctrlKey)},isKey:function(t,e){var n=a.getKeyCode(t);return!1===Array.isArray(e)?n===e:-1!==e.indexOf(n)},getKeyCode:function(t){var e=t.which;return null===e&&(e=null!==t.charCode?t.charCode:t.keyCode),e},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var t=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},defaults:function(){var t=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,t)},createLink:function(t,e,n,r){var i=t.createElement("a");return a.moveTextRangeIntoElement(e[0],e[e.length-1],i),i.setAttribute("href",n),r&&("_blank"===r&&i.setAttribute("rel","noopener noreferrer"),i.setAttribute("target",r)),i},findOrCreateMatchingTextNodes:function(t,e,n){for(var r=t.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),i=[],o=0,s=!1,u=null,l=null;null!==(u=r.nextNode());)if(!(u.nodeType>3))if(3===u.nodeType){if(!s&&n.startn.end+1)throw new Error("PerformLinking overshot the target!");s&&i.push(l||u),o+=u.nodeValue.length,null!==l&&(o+=l.nodeValue.length,r.nextNode()),l=null}else"img"===u.tagName.toLowerCase()&&(!s&&n.start<=o&&(s=!0),s&&i.push(u));return i},splitStartNodeIfNeeded:function(t,e,n){return e!==n?t.splitText(e-n):null},splitEndNodeIfNeeded:function(t,e,n,r){var i,o;i=r+t.nodeValue.length+(e?e.nodeValue.length:0)-1,o=n-r-(e?t.nodeValue.length:0),i>=n&&r!==i&&0!==o&&(e||t).splitText(o)},splitByBlockElements:function(e){if(3!==e.nodeType&&1!==e.nodeType)return[];var n=[],r=t.util.blockContainerElementNames.join(",");if(3===e.nodeType||0===e.querySelectorAll(r).length)return[e];for(var i=0;i0)break;r=o.nextNode()}return r},findPreviousSibling:function(t){if(!t||a.isMediumEditorElement(t))return!1;for(var e=t.previousSibling;!e&&!a.isMediumEditorElement(t.parentNode);)e=(t=t.parentNode).previousSibling;return e},isDescendant:function(t,e,n){if(!t||!e)return!1;if(t===e)return!!n;if(1!==t.nodeType)return!1;if(r||3!==e.nodeType)return t.contains(e);for(var i=e.parentNode;null!==i;){if(i===t)return!0;i=i.parentNode}return!1},isElement:function(t){return!(!t||1!==t.nodeType)},throttle:function(t,e){var n,r,i,o=null,a=0,s=function(){a=Date.now(),o=null,i=t.apply(n,r),o||(n=r=null)};return e||0===e||(e=50),function(){var u=Date.now(),l=e-(u-a);return n=this,r=arguments,l<=0||l>e?(o&&(clearTimeout(o),o=null),a=u,i=t.apply(n,r),o||(n=r=null)):o||(o=setTimeout(s,l)),i}},traverseUp:function(t,e){if(!t)return!1;do{if(1===t.nodeType){if(e(t))return t;if(a.isMediumEditorElement(t))return!1}t=t.parentNode}while(t);return!1},htmlEntities:function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(e,n){var r,i,o,s,u,l,c,f=!1,d=["insertHTML",!1,n];if(!t.util.isEdge&&e.queryCommandSupported("insertHTML"))try{return e.execCommand.apply(e,d)}catch(t){}if((r=e.getSelection()).rangeCount){if(c=(i=r.getRangeAt(0)).commonAncestorContainer,a.isMediumEditorElement(c)&&!c.firstChild)i.selectNode(c.appendChild(e.createTextNode("")));else if(3===c.nodeType&&0===i.startOffset&&i.endOffset===c.nodeValue.length||3!==c.nodeType&&c.innerHTML===i.toString()){for(;!a.isMediumEditorElement(c)&&c.parentNode&&1===c.parentNode.childNodes.length&&!a.isMediumEditorElement(c.parentNode);)c=c.parentNode;i.selectNode(c)}for(i.deleteContents(),(o=e.createElement("div")).innerHTML=n,s=e.createDocumentFragment();o.firstChild;)u=o.firstChild,l=s.appendChild(u);i.insertNode(s),l&&((i=i.cloneRange()).setStartAfter(l),i.collapse(!0),t.selection.selectRange(e,i)),f=!0}return e.execCommand.callListeners&&e.execCommand.callListeners(d,f),f},execFormatBlock:function(e,n){var r=a.getTopBlockContainer(t.selection.getSelectionStart(e));if("blockquote"===n){if(r&&Array.prototype.slice.call(r.childNodes).some((function(t){return a.isBlockContainer(t)})))return e.execCommand("outdent",!1,null);if(a.isIE)return e.execCommand("indent",!1,n)}if(r&&n===r.nodeName.toLowerCase()&&(n="p"),a.isIE&&(n="<"+n+">"),r&&"blockquote"===r.nodeName.toLowerCase()){if(a.isIE&&"

"===n)return e.execCommand("outdent",!1,n);if((a.isFF||a.isEdge)&&"p"===n)return Array.prototype.slice.call(r.childNodes).some((function(t){return!a.isBlockContainer(t)}))&&e.execCommand("formatBlock",!1,n),e.execCommand("outdent",!1,n)}return e.execCommand("formatBlock",!1,n)},setTargetBlank:function(t,e){var n,r=e||!1;if("a"===t.nodeName.toLowerCase())t.target="_blank",t.rel="noopener noreferrer";else for(t=t.getElementsByTagName("a"),n=0;nr?(i=i.parentNode,n-=1):(o=o.parentNode,r-=1);for(;i!==o;)i=i.parentNode,o=o.parentNode;return i},isElementAtBeginningOfBlock:function(t){for(var e;!a.isBlockContainer(t)&&!a.isMediumEditorElement(t);){for(e=t;e=e.previousSibling;)if((3===e.nodeType?e.nodeValue:e.textContent).length>0)return!1;t=t.parentNode}return!0},isMediumEditorElement:function(t){return t&&t.getAttribute&&!!t.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(t){return a.traverseUp(t,(function(t){return a.isMediumEditorElement(t)}))},isBlockContainer:function(t){return t&&3!==t.nodeType&&-1!==a.blockContainerElementNames.indexOf(t.nodeName.toLowerCase())},getClosestBlockContainer:function(t){return a.traverseUp(t,(function(t){return a.isBlockContainer(t)||a.isMediumEditorElement(t)}))},getTopBlockContainer:function(t){var e=!!a.isBlockContainer(t)&&t;return a.traverseUp(t,(function(t){return a.isBlockContainer(t)&&(e=t),!(e||!a.isMediumEditorElement(t))&&(e=t,!0)})),e},getFirstSelectableLeafNode:function(t){for(;t&&t.firstChild;)t=t.firstChild;if("table"===(t=a.traverseUp(t,(function(t){return-1===a.emptyElementNames.indexOf(t.nodeName.toLowerCase())}))).nodeName.toLowerCase()){var e=t.querySelector("th, td");e&&(t=e)}return t},getFirstTextNode:function(t){return a.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),a._getFirstTextNode(t)},_getFirstTextNode:function(t){if(3===t.nodeType)return t;for(var e=0;e0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(t),a.setEnd(o.startContainer,o.startOffset),n={start:i=a.toString().length,end:i+o.toString().length},this.doesRangeStartWithImages(o,e)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(t,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var u=this.getIndexRelativeToAdjacentEmptyBlocks(e,t,o.startContainer,o.startOffset);-1!==u&&(n.emptyBlocksIndex=u)}}return n},importSelection:function(t,e,n,r){if(t&&e){var i=n.createRange();i.setStart(e,0),i.collapse(!0);var o,a=e,s=[],u=0,l=!1,c=!1,f=0,d=!1,p=!1,h=null;for((r||t.startsWithImage||void 0!==t.emptyBlocksIndex)&&(p=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if(t.trailingImageCount&&c&&("img"===a.nodeName.toLowerCase()&&f++,f===t.trailingImageCount)){for(var v=0;a.parentNode.childNodes[v]!==a;)v++;i.setEnd(a.parentNode,v+1),d=!0}if(!d&&1===a.nodeType)for(var m=a.childNodes.length-1;m>=0;)s.push(a.childNodes[m]),m-=1}else o=u+a.length,!l&&t.start>=u&&t.start<=o&&(p||t.start=u&&t.end<=o&&(t.trailingImageCount?c=!0:(i.setEnd(a,t.end-u),d=!0)),u=o;d||(a=s.pop())}!l&&h&&(i.setStart(h,h.length),i.setEnd(h,h.length)),void 0!==t.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,e,t.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(t,i)),this.selectRange(n,i)}},importSelectionMoveCursorPastAnchor:function(e,n){if(e.start===e.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&t.util.traverseUp(n.startContainer,(function(t){return"a"===t.nodeName.toLowerCase()}))){for(var r=n.startContainer,i=n.startContainer.parentNode;null!==i&&"a"!==i.nodeName.toLowerCase();)i.childNodes[i.childNodes.length-1]!==r?i=null:(r=i,i=i.parentNode);if(null!==i&&"a"===i.nodeName.toLowerCase()){for(var o=null,a=0;null===o&&a0)break}else a===u.currentNode&&(s=u.currentNode);return s||(s=a),o.setStart(t.util.getFirstSelectableLeafNode(s),0),o},getIndexRelativeToAdjacentEmptyBlocks:function(n,r,i,o){if(i.textContent.length>0&&o>0)return-1;var a=i;if(3!==a.nodeType&&(a=i.childNodes[o]),a){if(!t.util.isElementAtBeginningOfBlock(a))return-1;var s=t.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var u=t.util.getClosestBlockContainer(i),l=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,e,!1),c=0;l.nextNode();){var f=""===l.currentNode.textContent;if((f||c>0)&&(c+=1),l.currentNode===u)return c;f||(c=0)}return c},doesRangeStartWithImages:function(t,e){if(0!==t.startOffset||1!==t.startContainer.nodeType)return!1;if("img"===t.startContainer.nodeName.toLowerCase())return!0;var n=t.startContainer.querySelector("img");if(!n)return!1;for(var r=e.createTreeWalker(t.startContainer,NodeFilter.SHOW_ALL,null,!1);r.nextNode();){var i=r.currentNode;if(i===n)break;if(i.nodeValue)return!1}return!0},getTrailingImageCount:function(t,e,n,r){if(0===r||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var i=n.childNodes[r-1];i.hasChildNodes();)i=i.lastChild;for(var o,a=t,s=[],u=0,l=!1,c=!1,f=!1,d=0;!f&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if("img"===a.nodeName.toLowerCase()&&d++,a===i)f=!0;else if(1===a.nodeType)for(var p=a.childNodes.length-1;p>=0;)s.push(a.childNodes[p]),p-=1}else d=0,o=u+a.length,!l&&e.start>=u&&e.start<=o&&(l=!0),l&&e.end>=u&&e.end<=o&&(c=!0),u=o;f||(a=s.pop())}return d},selectionContainsContent:function(t){var e=t.getSelection();if(!e||e.isCollapsed||!e.rangeCount)return!1;if(""!==e.toString().trim())return!0;var n=this.getSelectedParentElement(e.getRangeAt(0));return!(!n||!("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img")))},selectionInContentEditableFalse:function(t){var e,n=this.findMatchingSelectionParent((function(t){var n=t&&t.getAttribute("contenteditable");return"true"===n&&(e=!0),"#text"!==t.nodeName&&"false"===n}),t);return!e&&n},getSelectionHtml:function(t){var e,n,r,i="",o=t.getSelection();if(o.rangeCount){for(r=t.createElement("div"),e=0,n=o.rangeCount;e-1?[e]:e,Array.prototype.forEach.call(e,function(t){t.addEventListener(n,r,i),this.events.push([t,n,r,i])}.bind(this))},detachDOMEvent:function(e,n,r,i){var o,a,s=this.base.options.contentWindow,u=this.base.options.ownerDocument;null!==e&&(e=t.util.isElement(e)||[s,u].indexOf(e)>-1?[e]:e,Array.prototype.forEach.call(e,function(t){-1!==(o=this.indexOfListener(t,n,r,i))&&(a=this.events.splice(o,1)[0])[0].removeEventListener(a[1],a[2],a[3])}.bind(this)))},indexOfListener:function(t,e,n,r){var i,o,a;for(i=0,o=this.events.length;i0&&(r=-1!==i.indexOf(t.nodeName.toLowerCase())),!r&&this.style&&(e=this.style.value.split("|"),n=this.window.getComputedStyle(t,null).getPropertyValue(this.style.prop),e.forEach((function(t){this.knownState||((r=-1!==n.indexOf(t))||"text-decoration"!==this.style.prop)&&(this.knownState=r)}),this)),r)}})).isBuiltInButton=function(e){return"string"==typeof e&&t.extensions.button.prototype.defaults.hasOwnProperty(e)},t.extensions.button=n,t.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"html",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}},r=t.extensions.button.extend({init:function(){t.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return!!this.hasForm&&this.getForm().classList.contains(this.activeClass)},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var t=this.base.getExtensionByName("toolbar");t&&t.hideToolbarDefaultActions()},setToolbarPosition:function(){var t=this.base.getExtensionByName("toolbar");t&&t.setToolbarPosition()}}),t.extensions.form=r,i=t.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){t.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(e){e.preventDefault(),e.stopPropagation();var n=t.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||t.util.getClosestTag(t.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(e){t.util.isKey(e,t.util.keyCode.K)&&t.util.isMetaCtrlKey(e)&&!e.shiftKey&&this.handleClick(e)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var t=[''];return t.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formSaveLabel,""),t.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formCloseLabel,""),this.targetCheckbox&&t.push('

','','","
"),this.customClassOption&&t.push('
','',"","
"),t.join("")},isDisplayed:function(){return t.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){t.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(e){var n=this.getInput(),r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox();if("string"==typeof(e=e||{value:""})&&(e={value:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),t.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),n.value=e.value,n.focus(),r&&(r.checked="_blank"===e.target),i){var o=e.buttonClass?e.buttonClass.split(" "):[];i.checked=-1!==o.indexOf(this.customClassOption)}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var t=this.getAnchorTargetCheckbox(),e=this.getAnchorButtonCheckbox(),n={value:this.getInput().value.trim()};return this.linkValidation&&(n.value=this.checkLinkFormat(n.value)),n.target="_self",t&&t.checked&&(n.target="_blank"),e&&e.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var t=this.getFormOpts();this.completeFormSave(t)},completeFormSave:function(t){this.base.restoreSelection(),this.execAction(this.action,t),this.base.checkSelection()},ensureEncodedUri:function(t){return t===decodeURI(t)?encodeURI(t):t},ensureEncodedUriComponent:function(t){return t===decodeURIComponent(t)?encodeURIComponent(t):t},ensureEncodedParam:function(t){var e=t.split("="),n=e[0],r=e[1];return n+(void 0===r?"":"="+this.ensureEncodedUriComponent(r))},ensureEncodedQuery:function(t){return t.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(t){var e=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i.test(t),n="",r=t.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),i=r[1],o=r[2],a=r[3];if(/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/.test(t))return"tel:"+t;if(!e){var s=i.split("/")[0];(s.match(/.+(\.|:).+/)||"localhost"===s)&&(n="http://")}return n+this.ensureEncodedUri(i)+(void 0===o?"":"?"+this.ensureEncodedQuery(o))+(void 0===a?"":"#"+a)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(t){var e=t.querySelector(".medium-editor-toolbar-close"),n=t.querySelector(".medium-editor-toolbar-save"),r=t.querySelector(".medium-editor-toolbar-input");this.on(t,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(e,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var t=this.document.createElement("div");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),t.innerHTML=this.getTemplate(),this.attachFormEvents(t),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(e){if(e.keyCode===t.util.keyCode.ENTER)return e.preventDefault(),void this.doFormSave();e.keyCode===t.util.keyCode.ESCAPE&&(e.preventDefault(),this.doFormCancel())},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}}),t.extensions.anchor=i,o=t.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var t=this.document.createElement("div");return t.id="medium-editor-anchor-preview-"+this.getEditorId(),t.className="medium-editor-anchor-preview",t.innerHTML=this.getTemplate(),this.on(t,"click",this.handleClick.bind(this)),t},getTemplate:function(){return'
'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(t){return!(!this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")&&!t.getAttribute("data-disable-preview"))||(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=t.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=t.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=t,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(t){t=t||this.activeAnchor;var e,n,r,i,o,a=this.window.innerWidth,s=this.anchorPreview.offsetHeight,u=t.getBoundingClientRect(),l=this.diffLeft,c=this.diffTop,f=this.getEditorOption("elementsContainer"),d=["absolute","fixed"].indexOf(window.getComputedStyle(f).getPropertyValue("position"))>-1,p={};e=this.anchorPreview.offsetWidth/2;var h=this.base.getExtensionByName("toolbar");h&&(l=h.diffLeft,c=h.diffTop),n=l-e,d?(i=f.getBoundingClientRect(),["top","left"].forEach((function(t){p[t]=u[t]-i[t]})),p.width=u.width,p.height=u.height,u=p,a=i.width,o=f.scrollTop):o=this.window.pageYOffset,r=u.left+u.width/2,o+=s+u.top+u.height-c-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(o)+"px",this.anchorPreview.style.right="initial",rthis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}}),t.extensions.anchorPreview=o,function(){var e,n,r,i;e=[" ","\t","\n","\r"," "," "," "," "," ","\u2028","\u2029"],n="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",r=new RegExp("^("+n+")$","i"),i=new RegExp("(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.](com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.(com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw))","gi");var o=t.Extension.extend({init:function(){t.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var t=0,e=0;e0&&null!==i;)(r=(n=o.currentNode).nodeValue).length>e?(i=n.splitText(r.length-e),e=0):(i=o.previousNode(),e-=r.length);return i},performLinkingWithinElement:function(e){for(var n=this.findLinkableText(e),r=0;r1;)i.appendChild(r.childNodes[1])}});t.extensions.autoLink=o}(),function(){function e(e){var n=t.util.getContainerEditorElement(e);Array.prototype.slice.call(n.parentElement.querySelectorAll(".medium-editor-dragover")).forEach((function(t){t.classList.remove("medium-editor-dragover")}))}var n=t.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(t){t.preventDefault(),t.dataTransfer.dropEffect="copy";var n=t.target.classList?t.target:t.target.parentElement;e(n),"dragover"===t.type&&n.classList.add("medium-editor-dragover")},handleDrop:function(t){t.preventDefault(),t.stopPropagation(),this.base.selectElement(t.target);var n=this.base.exportSelection();n.start=n.end,this.base.importSelection(n),t.dataTransfer.files&&Array.prototype.slice.call(t.dataTransfer.files).forEach((function(t){this.isAllowedFile(t)&&t.type.match("image")&&this.insertImageFile(t)}),this),e(t.target)},isAllowedFile:function(t){return this.allowedTypes.some((function(e){return!!t.type.match(e)}))},insertImageFile:function(e){if("function"==typeof FileReader){var n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",function(e){var n=this.document.createElement("img");n.src=e.target.result,t.util.insertHTMLCommand(this.document,n.outerHTML)}.bind(this))}}});t.extensions.fileDragging=n}(),a=t.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){t.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach((function(t){var e=t.key.charCodeAt(0);this.keys[e]||(this.keys[e]=[]),this.keys[e].push(t)}),this)},handleKeydown:function(e){var n=t.util.getKeyCode(e);if(this.keys[n]){var r=t.util.isMetaCtrlKey(e),i=!!e.shiftKey,o=!!e.altKey;this.keys[n].forEach((function(t){t.meta!==r||t.shift!==i||t.alt!==o&&void 0!==t.alt||(e.preventDefault(),e.stopPropagation(),"function"==typeof t.command?t.command.apply(this):!1!==t.command&&this.execAction(t.command))}),this)}}}),t.extensions.keyboardCommands=a,s=t.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontName")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(t){var e=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var t,e=this.document,n=e.createElement("div"),r=e.createElement("select"),i=e.createElement("a"),o=e.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a
':"✓",n.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",n.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){t.selection.getSelectedElements(this.document).forEach((function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("face")&&t.removeAttribute("face")}))},handleFontChange:function(){var t=this.getSelect().value;""===t?this.clearFontName():this.execAction("fontName",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}}),t.extensions.fontName=s,u=t.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){t.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(t){if(t.preventDefault(),t.stopPropagation(),!this.isDisplayed()){var e=this.document.queryCommandValue("fontSize")+"";this.showForm(e)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(t){var e=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),e.value=t||"",e.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var t=this.document,e=t.createElement("div"),n=t.createElement("input"),r=t.createElement("a"),i=t.createElement("a");return e.className="medium-editor-toolbar-form",e.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(e,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",e.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),i.setAttribute("href","#"),i.className="medium-editor-toobar-save",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"✓",e.appendChild(i),this.on(i,"click",this.handleSaveClick.bind(this),!0),r.setAttribute("href","#"),r.className="medium-editor-toobar-close",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",e.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),e},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){t.selection.getSelectedElements(this.document).forEach((function(t){"font"===t.nodeName.toLowerCase()&&t.hasAttribute("size")&&t.removeAttribute("size")}))},handleSliderChange:function(){var t=this.getInput().value;"4"===t?this.clearFontSize():this.execAction("fontSize",{value:t})},handleFormClick:function(t){t.stopPropagation()},handleSaveClick:function(t){t.preventDefault(),this.doFormSave()},handleCloseClick:function(t){t.preventDefault(),this.doFormCancel()}}),t.extensions.fontSize=u,function(){var e=null,n=null,r=function(t){t.stopPropagation()};function i(t,e,n){var r=t.clipboardData||e.clipboardData||n.dataTransfer,i={};if(!r)return i;if(r.getData){var o=r.getData("Text");o&&o.length>0&&(i["text/plain"]=o)}if(r.types)for(var a=0;a1)for(o=0;o"+t.util.htmlEntities(i[o])+"

");else a=t.util.htmlEntities(i[0]);t.util.insertHTMLCommand(this.document,a)},handlePasteBinPaste:function(t){if(t.defaultPrevented)this.removePasteBin();else{var e=i(t,this.window,this.document),r=e["text/html"],o=e["text/plain"],a=n;if(!this.cleanPastedHTML||r)return t.preventDefault(),this.removePasteBin(),this.doPaste(r,o,a),void this.trigger("editablePaste",{currentTarget:a,target:a},a);setTimeout(function(){this.cleanPastedHTML&&(r=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(r,o,a),this.trigger("editablePaste",{currentTarget:a,target:a},a)}.bind(this),0)}},handleKeydown:function(e,n){t.util.isKey(e,t.util.keyCode.V)&&t.util.isMetaCtrlKey(e)&&(e.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(n))},createPasteBin:function(i){var o,a=t.selection.getSelectionRange(this.document),s=this.window.pageYOffset;n=i,a&&((o=a.getClientRects()).length?s+=o[0].top:void 0!==a.startContainer.getBoundingClientRect?s+=a.startContainer.getBoundingClientRect().top:s+=a.getBoundingClientRect().top),e=a;var u=this.document.createElement("div");u.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),u.setAttribute("style","border: 1px red solid; position: absolute; top: "+s+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),u.setAttribute("contentEditable",!0),u.innerHTML="%ME_PASTEBIN%",this.document.body.appendChild(u),this.on(u,"focus",r),this.on(u,"focusin",r),this.on(u,"focusout",r),u.focus(),t.selection.selectNode(u,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(u,"paste",this.boundHandlePaste)},removePasteBin:function(){null!==e&&(t.selection.selectRange(this.document,e),e=null),null!==n&&(n=null);var i=this.getPasteBin();i&&i&&(this.off(i,"focus",r),this.off(i,"focusin",r),this.off(i,"focusout",r),this.off(i,"paste",this.boundHandlePaste),i.parentElement.removeChild(i))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var t=this.getPasteBin();if(!t)return!1;if(t.firstChild&&"mcepastebin"===t.firstChild.id)return!1;var e=t.innerHTML;return!(!e||"%ME_PASTEBIN%"===e)&&e},cleanPaste:function(t){var e,n,r,i,o=/]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/|/g),""],[new RegExp(/
$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
/g),"
"],[new RegExp(/]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:(bold|700)[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

"],[new RegExp(/\n+

/gi),""],[new RegExp(/(((?!/gi),"$1"]],this.cleanReplacements||[]);for(e=0;e"+t.split("

").join("

")+"

",n=r.querySelectorAll("a,p,div,br"),e=0;e"+r.innerHTML+"
":i.innerHTML=r.innerHTML,r.parentNode.replaceChild(i,r);for(o=e.querySelectorAll("span"),n=0;n0&&(r[0].classList.add(this.firstButtonClass),r[r.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=t.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(e){if(e&&e.target&&t.util.isDescendant(this.getToolbarElement(),e.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension((function(t){t.hasForm&&t.isDisplayed()&&t.hideForm()}))},multipleBlockElementsSelected:function(){var e=new RegExp("<("+t.util.blockContainerElementNames.join("|")+")[^>]*>","g"),n=t.selection.getSelectionHtml(this.document).replace(/<[^\/>][^>]*><\/[^>]+>/gim,"").match(e);return!!n&&n.length>1},modifySelection:function(){var e=this.window.getSelection().getRangeAt(0);if(this.standardizeSelectionStart&&e.startContainer.nodeValue&&e.startOffset===e.startContainer.nodeValue.length){var n=t.util.findAdjacentTextNodeWithContent(t.selection.getSelectionElement(this.window),e.startContainer,this.document);if(n){for(var r=0;0===n.nodeValue.substr(r,1).trim().length;)r+=1;e=t.selection.select(this.document,n,r,e.endContainer,e.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||t.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var e=t.selection.getSelectionElement(this.window);return!e||-1===this.getEditorElements().indexOf(e)||e.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this.static?this.showAndUpdateToolbar():!t.selection.selectionContainsContent(this.document)||!1===this.allowMultiParagraphSelection&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension((function(t){"function"==typeof t.isActive&&"function"==typeof t.setInactive&&t.setInactive()})),this.checkActiveButtons()},checkActiveButtons:function(){var e,n=[],r=null,i=t.selection.getSelectionRange(this.document),o=function(t){"function"==typeof t.checkState?t.checkState(e):"function"==typeof t.isActive&&"function"==typeof t.isAlreadyApplied&&"function"==typeof t.setActive&&!t.isActive()&&t.isAlreadyApplied(e)&&t.setActive()};if(i&&(this.forEachExtension((function(t){"function"!=typeof t.queryCommandState||null===(r=t.queryCommandState())?n.push(t):r&&"function"==typeof t.setActive&&t.setActive()})),e=t.selection.getSelectedParentElement(i),this.getEditorElements().some((function(n){return t.util.isDescendant(n,e,!0)}))))for(;e&&(n.forEach(o),!t.util.isMediumEditorElement(e));)e=e.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var t=this.base.getFocusedElement(),e=this.window.getSelection();if(!t)return this;!this.static&&e.isCollapsed||(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(t):this.positionToolbar(e)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(t){this.getToolbarElement().style.left="0";var e,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=t.getBoundingClientRect(),a=o.top+n,s=o.left+o.width/2,u=i.offsetHeight,l=i.offsetWidth,c=l/2;switch(this.sticky?n>a+t.offsetHeight-u-this.stickyTopOffset?(i.style.top=a+t.offsetHeight-u+"px",i.classList.remove("medium-editor-sticky-toolbar")):n>a-u-this.stickyTopOffset?(i.classList.add("medium-editor-sticky-toolbar"),i.style.top=this.stickyTopOffset+"px"):(i.classList.remove("medium-editor-sticky-toolbar"),i.style.top=a-u+"px"):i.style.top=a-u+"px",this.align){case"left":e=o.left;break;case"right":e=o.right-l;break;case"center":e=s-c}e<0?e=0:e+l>r&&(e=r-Math.ceil(l)-1),i.style.left=e+"px"},positionToolbar:function(t){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var e=t.getRangeAt(0),n=e.getBoundingClientRect();(!n||0===n.height&&0===n.width&&e.startContainer===e.endContainer)&&(n=1===e.startContainer.nodeType&&e.startContainer.querySelector("img")?e.startContainer.querySelector("img").getBoundingClientRect():e.startContainer.getBoundingClientRect());var r,i,o=this.window.innerWidth,a=this.getToolbarElement(),s=a.offsetHeight,u=a.offsetWidth/2,l=this.diffLeft-u,c=this.getEditorOption("elementsContainer"),f=["absolute","fixed"].indexOf(window.getComputedStyle(c).getPropertyValue("position"))>-1,d={},p={};f?(i=c.getBoundingClientRect(),["top","left"].forEach((function(t){p[t]=n[t]-i[t]})),p.width=n.width,p.height=n.height,n=p,o=i.width,d.top=c.scrollTop):d.top=this.window.pageYOffset,r=n.left+n.width/2,d.top+=n.top-s,n.top<50?(a.classList.add("medium-toolbar-arrow-over"),a.classList.remove("medium-toolbar-arrow-under"),d.top+=50+n.height-this.diffTop):(a.classList.add("medium-toolbar-arrow-under"),a.classList.remove("medium-toolbar-arrow-over"),d.top+=this.diffTop),r'),n.onload=function(){var t=this.document.getElementById(r);t&&(t.removeAttribute("id"),t.removeAttribute("class"),t.src=n.result)}.bind(this))}.bind(this)),e.target.classList.remove("medium-editor-dragover")}}),t.extensions.imageDragging=f,function(){function e(e){var n=t.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=t.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim()||void 0!==r[i.left]&&""===r[i.left].trim())&&e.preventDefault()}function n(e,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))e.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=t.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&e.preventDefault()}}function r(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);"pre"===(n&&n.nodeName.toLowerCase())&&(e.preventDefault(),t.util.insertHTMLCommand(this.options.ownerDocument," ")),t.util.isListItem(n)&&(e.preventDefault(),e.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(e){var n,r=t.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|)?$/i,a=/h\d/i;t.util.isKey(e,[t.util.keyCode.BACKSPACE,t.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===t.selection.getCaretOffsets(r).left?t.util.isKey(e,t.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),e.preventDefault()):!this.options.disableDoubleReturn&&t.util.isKey(e,t.util.keyCode.ENTER)&&((n=this.options.ownerDocument.createElement("p")).innerHTML="
",r.previousElementSibling.parentNode.insertBefore(n,r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(t.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&"li"===i&&o.test(r.innerHTML)&&!r.previousElementSibling&&!r.parentElement.previousElementSibling&&r.nextElementSibling&&"li"===r.nextElementSibling.nodeName.toLowerCase()?((n=this.options.ownerDocument.createElement("p")).innerHTML="
",r.parentElement.parentElement.insertBefore(n,r.parentElement),t.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).left?(e.preventDefault(),t.util.execFormatBlock(this.options.ownerDocument,"p")):t.util.isKey(e,t.util.keyCode.ENTER)&&!1!==t.util.getClosestTag(r,"blockquote")&&0===t.selection.getCaretOffsets(r).right?((n=this.options.ownerDocument.createElement("p")).innerHTML="
",r.parentElement.insertBefore(n,r.nextSibling),t.selection.moveCursor(this.options.ownerDocument,n),e.preventDefault()):t.util.isKey(e,t.util.keyCode.BACKSPACE)&&t.util.isMediumEditorElement(r.parentElement)&&!r.previousElementSibling&&r.nextElementSibling&&o.test(r.innerHTML)&&(e.preventDefault(),t.selection.moveCursor(this.options.ownerDocument,r.nextSibling),r.parentElement.removeChild(r))}function o(e){var n=t.selection.getSelectionStart(this.options.ownerDocument);n&&(t.util.isMediumEditorElement(n)&&0===n.children.length&&!t.util.isBlockContainer(n)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),!t.util.isKey(e,t.util.keyCode.ENTER)||t.util.isListItem(n)||t.util.isBlockContainer(n)||("a"===n.nodeName.toLowerCase()?this.options.ownerDocument.execCommand("unlink",!1,null):e.shiftKey||e.ctrlKey||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(t,e){var n=e.parentNode.querySelector('textarea[medium-editor-textarea-id="'+e.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=e.innerHTML.trim())}function s(t){t._mediumEditors||(t._mediumEditors=[null]),this.id||(this.id=t._mediumEditors.length),t._mediumEditors[this.id]=this}function u(t){t._mediumEditors&&t._mediumEditors[this.id]&&(t._mediumEditors[this.id]=null)}function l(e,n,r){var i=[];if(e||(e=[]),"string"==typeof e&&(e=n.querySelectorAll(e)),t.util.isElement(e)&&(e=[e]),r)for(var o=0;o=0&&(r=t.selection.exportSelection(e,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(e,n){if(e){var r=this.elements[e.editableElementIndex||0];t.selection.importSelection(e,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(e){var n,r=t.selection.getSelectionElement(this.options.contentWindow),i={};if(-1!==this.elements.indexOf(r)){try{if(this.events.disableCustomEvent("editableInput"),e.url&&t.util.deprecated(".url option for createLink",".value","6.0.0"),(n=e.url||e.value)&&n.trim().length>0){var o=this.options.contentWindow.getSelection();if(o){var a,s,u,l,c=o.getRangeAt(0),f=c.commonAncestorContainer;if(3===c.endContainer.nodeType&&3!==c.startContainer.nodeType&&0===c.startOffset&&c.startContainer.firstChild===c.endContainer&&(f=c.endContainer),s=t.util.getClosestBlockContainer(c.startContainer),u=t.util.getClosestBlockContainer(c.endContainer),3!==f.nodeType&&0!==f.textContent.length&&s===u){var d=s||r,p=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),a=this.exportSelection(),p.appendChild(d.cloneNode(!0)),r===d?t.selection.select(this.options.ownerDocument,d.firstChild,0,d.lastChild,3===d.lastChild.nodeType?d.lastChild.nodeValue.length:d.lastChild.childNodes.length):t.selection.select(this.options.ownerDocument,d,0,d,d.childNodes.length);var h=this.exportSelection();0===(l=t.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,p,{start:a.start-h.start,end:a.end-h.start,editableElementIndex:a.editableElementIndex})).length&&((p=this.options.ownerDocument.createDocumentFragment()).appendChild(f.cloneNode(!0)),l=[p.firstChild.firstChild,p.firstChild.lastChild]),t.util.createLink(this.options.ownerDocument,l,n.trim());var v=(p.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;t.util.insertHTMLCommand(this.options.ownerDocument,p.firstChild.innerHTML.replace(/^\s+/,"")),a.start-=v,a.end-=v,this.importSelection(a)}else this.options.ownerDocument.execCommand("createLink",!1,n);this.options.targetBlank||"_blank"===e.target?t.util.setTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n):t.util.removeTargetBlank(t.selection.getSelectionStart(this.options.ownerDocument),n),e.buttonClass&&t.util.addClassToAnchors(t.selection.getSelectionStart(this.options.ownerDocument),e.buttonClass)}}if(this.options.targetBlank||"_blank"===e.target||e.buttonClass){(i=this.options.ownerDocument.createEvent("HTMLEvents")).initEvent("input",!0,!0,this.options.contentWindow);for(var m=0,y=this.elements.length;m1?e[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:r,toString:function(){return[n[0],n[1],n[2]].join(".")+(r?"-"+r:"")}}},t.version=t.parseVersionString.call(this,"5.23.2"),t}())}).call(this,n(97))},212:function(t,e,n){"use strict";function r(t){if(void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.start&&/\S{1}/.test(t.start)&&void 0!==t.end&&/\S{1}/.test(t.end)||void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.action&&/\S{1}/.test(t.action)){t.start=void 0===t.start?"":t.start,t.end=void 0===t.end?"":t.end;var e=this;this.options=t,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=t.label,this.button.onclick=function(){var n,r,o=i(),a=window.getSelection(),s=a.anchorNode.parentElement;if(void 0===t.start||-1==o.indexOf(t.start)&&-1==o.indexOf(t.end)?(null!=t.action&&(o=t.action(o,!0,s)),o=t.start+o+t.end):(null!=t.action&&(o=t.action(o,!1,s)),o=String(o).split(t.start).join(""),o=String(o).split(t.end).join("")),a.getRangeAt&&a.rangeCount){if((n=window.getSelection().getRangeAt(0)).deleteContents(),n.createContextualFragment)r=n.createContextualFragment(o);else{var u=document.createElement("div");for(u.innerHTML=o,r=document.createDocumentFragment();child=u.firstChild;)r.appendChild(child)}var l=r.firstChild,c=r.lastChild;n.insertNode(r),l&&(n.setStartBefore(l),n.setEndAfter(c)),a.removeAllRanges(),a.addRange(n)}e.base.checkContentChanged()}}else console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"')}function i(){var t,e="";if(void 0!==window.getSelection){if((t=window.getSelection()).rangeCount){for(var n=document.createElement("div"),r=0,i=t.rangeCount;r-1&&e.indexOf(this.options.end)>-1?this.button.classList.add("medium-editor-button-active"):this.button.classList.remove("medium-editor-button-active")},t.exports&&(e=t.exports=r),e.MediumButton=r},213:function(t,e,n){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var r=n(214),i=n(215),o=n(216);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function h(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return F(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return j(this,e,n);case"latin1":case"binary":return S(this,e,n);case"base64":return C(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var f=!0,d=0;di&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function C(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=t.slice(e,n),f=0;fi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return O(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function I(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,r,o){return o||D(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,o){return o||D(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||N(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):I(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):I(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):I(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(41))},214:function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=l(t),a=r[0],s=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===s&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},215:function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,c=-7,f=n?i-1:0,d=n?-1:1,p=t[e+f];for(f+=d,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=d,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=d,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=h,s/=256,i-=8);for(a=a<0;t[n+p]=255&a,p+=h,a/=256,l-=8);t[n+p-h]|=128*v}},216:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},217:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(218),i=n(222),o=n(223),a=n(73),s=n(224),u=n(142),l=n(101),c=n(55),f=function(){function t(t,e){this.rawDeltaOps=[],this.callbacks={},this.options=l.assign({paragraphTag:"p",encodeHtml:!0,classPrefix:"ql",multiLineBlockquote:!0,multiLineHeader:!0,multiLineCodeblock:!0,multiLineParagraph:!0,allowBackgroundClasses:!1,linkTarget:"_blank"},e,{orderedListTag:"ol",bulletListTag:"ul",listItemTag:"li"}),this.converterOptions={encodeHtml:this.options.encodeHtml,classPrefix:this.options.classPrefix,listItemTag:this.options.listItemTag,paragraphTag:this.options.paragraphTag,linkRel:this.options.linkRel,linkTarget:this.options.linkTarget,allowBackgroundClasses:this.options.allowBackgroundClasses},this.rawDeltaOps=t}return t.prototype._getListTag=function(t){return t.isOrderedList()?this.options.orderedListTag+"":t.isBulletList()||t.isCheckedList()||t.isUncheckedList()?this.options.bulletListTag+"":""},t.prototype.getGroupedOps=function(){var t=r.InsertOpsConverter.convert(this.rawDeltaOps),e=o.Grouper.pairOpsWithTheirBlock(t),n=o.Grouper.groupConsecutiveSameStyleBlocks(e,{blockquotes:!!this.options.multiLineBlockquote,header:!!this.options.multiLineHeader,codeBlocks:!!this.options.multiLineCodeblock}),i=o.Grouper.reduceConsecutiveSameStyleBlocksToOne(n);return(new s.ListNester).nest(i)},t.prototype.convert=function(){var t=this;return this.getGroupedOps().map((function(e){if(e instanceof a.ListGroup)return t._renderWithCallbacks(c.GroupType.List,e,(function(){return t._renderList(e)}));if(e instanceof a.BlockGroup){var n=e;return t._renderWithCallbacks(c.GroupType.Block,e,(function(){return t._renderBlock(n.op,n.ops)}))}return e instanceof a.BlotBlock?t._renderCustom(e.op,null):e instanceof a.VideoItem?t._renderWithCallbacks(c.GroupType.Video,e,(function(){var n=e;return new i.OpToHtmlConverter(n.op,t.converterOptions).getHtml()})):t._renderWithCallbacks(c.GroupType.InlineGroup,e,(function(){return t._renderInlines(e.ops,!0)}))})).join("")},t.prototype._renderWithCallbacks=function(t,e,n){var r="",i=this.callbacks.beforeRender_cb;(r="function"==typeof i?i.apply(null,[t,e]):"")||(r=n());var o=this.callbacks.afterRender_cb;return r="function"==typeof o?o.apply(null,[t,r]):r},t.prototype._renderList=function(t){var e=this,n=t.items[0];return u.makeStartTag(this._getListTag(n.item.op))+t.items.map((function(t){return e._renderListItem(t)})).join("")+u.makeEndTag(this._getListTag(n.item.op))},t.prototype._renderListItem=function(t){t.item.op.attributes.indent=0;var e=new i.OpToHtmlConverter(t.item.op,this.converterOptions).getHtmlParts(),n=this._renderInlines(t.item.ops,!1);return e.openingTag+n+(t.innerList?this._renderList(t.innerList):"")+e.closingTag},t.prototype._renderBlock=function(t,e){var n=this,r=new i.OpToHtmlConverter(t,this.converterOptions).getHtmlParts();if(t.isCodeBlock())return r.openingTag+u.encodeHtml(e.map((function(e){return e.isCustom()?n._renderCustom(e,t):e.insert.value})).join(""))+r.closingTag;var o=e.map((function(e){return n._renderInline(e,t)})).join("");return r.openingTag+(o||"
")+r.closingTag},t.prototype._renderInlines=function(t,e){var n=this;void 0===e&&(e=!0);var r=t.length-1,i=t.map((function(t,e){return e>0&&e===r&&t.isJustNewline()?"":n._renderInline(t,null)})).join("");if(!e)return i;var o=u.makeStartTag(this.options.paragraphTag),a=u.makeEndTag(this.options.paragraphTag);return"
"===i||this.options.multiLineParagraph?o+i+a:o+i.split("
").map((function(t){return""===t?"
":t})).join(a+o)+a},t.prototype._renderInline=function(t,e){return t.isCustom()?this._renderCustom(t,e):new i.OpToHtmlConverter(t,this.converterOptions).getHtml().replace(/\n/g,"
")},t.prototype._renderCustom=function(t,e){var n=this.callbacks.renderCustomOp_cb;return"function"==typeof n?n.apply(null,[t,e]):""},t.prototype.beforeRender=function(t){"function"==typeof t&&(this.callbacks.beforeRender_cb=t)},t.prototype.afterRender=function(t){"function"==typeof t&&(this.callbacks.afterRender_cb=t)},t.prototype.renderCustomWith=function(t){this.callbacks.renderCustomOp_cb=t},t}();e.QuillDeltaToHtmlConverter=f},218:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(98),i=n(55),o=n(99),a=n(141),s=n(220),u=function(){function t(){}return t.convert=function(e){if(!Array.isArray(e))return[];for(var n,i,o=[],u=0,l=[].concat.apply([],e.map(s.InsertOpDenormalizer.denormalize));u-1},t}();e.MentionSanitizer=i},220:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(55),i=n(221),o=n(101),a=function(){function t(){}return t.denormalize=function(t){if(!t||"object"!=typeof t)return[];if("object"==typeof t.insert||t.insert===r.NewLine)return[t];var e=i.tokenizeWithNewLines(t.insert+"");if(1===e.length)return[t];var n=o.assign({},t,{insert:r.NewLine});return e.map((function(e){return e===r.NewLine?n:o.assign({},t,{insert:e})}))},t}();e.InsertOpDenormalizer=a},221:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.tokenizeWithNewLines=function(t){if("\n"===t)return[t];var e=t.split("\n");if(1===e.length)return e;var n=e.length-1;return e.reduce((function(t,e,r){return r!==n?""!==e?t=t.concat(e,"\n"):t.push("\n"):""!==e&&t.push(e),t}),[])}},222:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(142),i=n(55),o=n(100),a=n(101),s=n(102),u=n(141),l=function(){function t(t,e){this.op=t,this.options=a.assign({},{classPrefix:"ql",encodeHtml:!0,listItemTag:"li",paragraphTag:"p"},e)}return t.prototype.prefixClass=function(t){return this.options.classPrefix?this.options.classPrefix+"-"+t:t+""},t.prototype.getHtml=function(){var t=this.getHtmlParts();return t.openingTag+t.content+t.closingTag},t.prototype.getHtmlParts=function(){if(this.op.isJustNewline()&&!this.op.isContainerBlock())return{openingTag:"",closingTag:"",content:i.NewLine};var t=this.getTags(),e=this.getTagAttributes();!t.length&&e.length&&t.push("span");for(var n=[],o=[],a=0,s=t;a=0;s--){var u=t[s];u.isVideo()?n.push(new o.VideoItem(u)):u.isCustomBlock()?n.push(new o.BlotBlock(u)):u.isContainerBlock()?(e=i.sliceFromReverseWhile(t,s-1,r),n.push(new o.BlockGroup(u,e.elements)),s=e.sliceStartsAt>-1?e.sliceStartsAt:s):(e=i.sliceFromReverseWhile(t,s-1,a),n.push(new o.InlineGroup(e.elements.concat(u))),s=e.sliceStartsAt>-1?e.sliceStartsAt:s)}return n.reverse(),n},t.groupConsecutiveSameStyleBlocks=function(e,n){return void 0===n&&(n={header:!0,codeBlocks:!0,blockquotes:!0}),i.groupConsecutiveElementsWhile(e,(function(e,r){return e instanceof o.BlockGroup&&r instanceof o.BlockGroup&&(n.codeBlocks&&t.areBothCodeblocks(e,r)||n.blockquotes&&t.areBothBlockquotesWithSameAdi(e,r)||n.header&&t.areBothSameHeadersWithSameAdi(e,r))}))},t.reduceConsecutiveSameStyleBlocksToOne=function(t){var e=r.DeltaInsertOp.createNewLineOp();return t.map((function(t){if(!Array.isArray(t))return t instanceof o.BlockGroup&&!t.ops.length&&t.ops.push(e),t;var n=t.length-1;return t[0].ops=i.flatten(t.map((function(t,r){return t.ops.length?t.ops.concat(r=0;n--){var r=e[n];if(t.items[0].item.op.hasHigherIndentThan(r.items[0].item.op)){var i=r.items[r.items.length-1];return i.innerList?i.innerList.items=i.innerList.items.concat(t.items):i.innerList=t,!0}}return!1},t}();e.ListNester=o},225:function(t,e,n){"use strict"; /** @license React v16.6.1 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(80),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.concurrent_mode"):60111,p=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,v=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function g(t,e,n,r,i,o,a,s){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],l=0;(t=Error(e.replace(/%s/g,(function(){return u[l++]})))).name="Invariant Violation"}throw t.framesToPop=1,t}}function b(t){for(var e=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=0;rN.length&&N.push(t)}function D(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+R(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var l=0;lthis.eventPool.length&&this.eventPool.push(t)}function pt(t){t.eventPool=[],t.getPooled=ft,t.release=dt}i(ct.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=ut)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=ut)},persist:function(){this.isPersistent=ut},isPersistent:lt,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=lt,this._dispatchInstances=this._dispatchListeners=null}}),ct.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ct.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,pt(n),n},pt(ct);var ht=ct.extend({data:null}),vt=ct.extend({data:null}),mt=[9,13,27,32],yt=Q&&"CompositionEvent"in window,gt=null;Q&&"documentMode"in document&&(gt=document.documentMode);var bt=Q&&"TextEvent"in window&&!gt,wt=Q&&(!yt||gt&&8=gt),_t=String.fromCharCode(32),Ot={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},kt=!1;function xt(t,e){switch(t){case"keyup":return-1!==mt.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ct(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var Et=!1;var jt={eventTypes:Ot,extractEvents:function(t,e,n,r){var i=void 0,o=void 0;if(yt)t:{switch(t){case"compositionstart":i=Ot.compositionStart;break t;case"compositionend":i=Ot.compositionEnd;break t;case"compositionupdate":i=Ot.compositionUpdate;break t}i=void 0}else Et?xt(t,n)&&(i=Ot.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=Ot.compositionStart);return i?(wt&&"ko"!==n.locale&&(Et||i!==Ot.compositionStart?i===Ot.compositionEnd&&Et&&(o=st()):(ot="value"in(it=r)?it.value:it.textContent,Et=!0)),i=ht.getPooled(i,e,n,r),o?i.data=o:null!==(o=Ct(n))&&(i.data=o),K(i),o=i):o=null,(t=bt?function(t,e){switch(t){case"compositionend":return Ct(e);case"keypress":return 32!==e.which?null:(kt=!0,_t);case"textInput":return(t=e.data)===_t&&kt?null:t;default:return null}}(t,n):function(t,e){if(Et)return"compositionend"===t||!yt&&xt(t,e)?(t=st(),at=ot=it=null,Et=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1
","#"===t.firstChild.getAttribute("href")}))||at("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ot((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||at("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ot((function(t){return null==t.getAttribute("disabled")}))||at(D,(function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null})),nt}(n);h.find=w,h.expr=w.selectors,h.expr[":"]=h.expr.pseudos,h.unique=w.uniqueSort,h.text=w.getText,h.isXMLDoc=w.isXML,h.contains=w.contains;var _=h.expr.match.needsContext,O=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^.[^:#\[\.,]*$/;function x(t,e,n){if(h.isFunction(e))return h.grep(t,(function(t,r){return!!e.call(t,r,t)!==n}));if(e.nodeType)return h.grep(t,(function(t){return t===e!==n}));if("string"==typeof e){if(k.test(e))return h.filter(e,t,n);e=h.filter(e,t)}return h.grep(t,(function(t){return h.inArray(t,e)>=0!==n}))}h.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?h.find.matchesSelector(r,t)?[r]:[]:h.find.matches(t,h.grep(e,(function(t){return 1===t.nodeType})))},h.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(h(t).filter((function(){for(e=0;e1?h.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(x(this,t||[],!1))},not:function(t){return this.pushStack(x(this,t||[],!0))},is:function(t){return!!x(this,"string"==typeof t&&_.test(t)?h(t):t||[],!1).length}});var C,E=n.document,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(h.fn.init=function(t,e){var n,r;if(!t)return this;if("string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:j.exec(t))||!n[1]&&e)return!e||e.jquery?(e||C).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof h?e[0]:e,h.merge(this,h.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:E,!0)),O.test(n[1])&&h.isPlainObject(e))for(n in e)h.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((r=E.getElementById(n[2]))&&r.parentNode){if(r.id!==n[2])return C.find(t);this.length=1,this[0]=r}return this.context=E,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):h.isFunction(t)?void 0!==C.ready?C.ready(t):t(h):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),h.makeArray(t,this))}).prototype=h.fn,C=h(E);var S=/^(?:parents|prev(?:Until|All))/,T={children:!0,contents:!0,next:!0,prev:!0};function A(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}h.extend({dir:function(t,e,n){for(var r=[],i=t[e];i&&9!==i.nodeType&&(void 0===n||1!==i.nodeType||!h(i).is(n));)1===i.nodeType&&r.push(i),i=i[e];return r},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),h.fn.extend({has:function(t){var e,n=h(t,this),r=n.length;return this.filter((function(){for(e=0;e-1:1===n.nodeType&&h.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?h.unique(o):o)},index:function(t){return t?"string"==typeof t?h.inArray(this[0],h(t)):h.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(h.unique(h.merge(this.get(),h(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),h.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return h.dir(t,"parentNode")},parentsUntil:function(t,e,n){return h.dir(t,"parentNode",n)},next:function(t){return A(t,"nextSibling")},prev:function(t){return A(t,"previousSibling")},nextAll:function(t){return h.dir(t,"nextSibling")},prevAll:function(t){return h.dir(t,"previousSibling")},nextUntil:function(t,e,n){return h.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return h.dir(t,"previousSibling",n)},siblings:function(t){return h.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return h.sibling(t.firstChild)},contents:function(t){return h.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:h.merge([],t.childNodes)}},(function(t,e){h.fn[t]=function(n,r){var i=h.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=h.filter(r,i)),this.length>1&&(T[t]||(i=h.unique(i)),S.test(t)&&(i=i.reverse())),this.pushStack(i)}}));var P,N,L=/\S+/g,I={};function D(){E.addEventListener?(E.removeEventListener("DOMContentLoaded",R,!1),n.removeEventListener("load",R,!1)):(E.detachEvent("onreadystatechange",R),n.detachEvent("onload",R))}function R(){(E.addEventListener||"load"===event.type||"complete"===E.readyState)&&(D(),h.ready())}for(N in h.Callbacks=function(t){t="string"==typeof t?I[t]||function(t){var e=I[t]={};return h.each(t.match(L)||[],(function(t,n){e[n]=!0})),e}(t):h.extend({},t);var e,n,r,i,o,a,s=[],u=!t.once&&[],l=function(f){for(n=t.memory&&f,r=!0,o=a||0,a=0,i=s.length,e=!0;s&&o-1;)s.splice(r,1),e&&(r<=i&&i--,r<=o&&o--)})),this},has:function(t){return t?h.inArray(t,s)>-1:!(!s||!s.length)},empty:function(){return s=[],i=0,this},disable:function(){return s=u=n=void 0,this},disabled:function(){return!s},lock:function(){return u=void 0,n||c.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!s||r&&!u||(n=[t,(n=n||[]).slice?n.slice():n],e?u.push(n):l(n)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},h.extend({Deferred:function(t){var e=[["resolve","done",h.Callbacks("once memory"),"resolved"],["reject","fail",h.Callbacks("once memory"),"rejected"],["notify","progress",h.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return h.Deferred((function(n){h.each(e,(function(e,o){var a=h.isFunction(t[e])&&t[e];i[o[1]]((function(){var t=a&&a.apply(this,arguments);t&&h.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===r?n.promise():this,a?[t]:arguments)}))})),t=null})).promise()},promise:function(t){return null!=t?h.extend(t,r):r}},i={};return r.pipe=r.then,h.each(e,(function(t,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add((function(){n=s}),e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith})),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=a.call(arguments),s=o.length,u=1!==s||t&&h.isFunction(t.promise)?s:0,l=1===u?t:h.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?a.call(arguments):i,r===e?l.notifyWith(n,r):--u||l.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);i0||(P.resolveWith(E,[h]),h.fn.triggerHandler&&(h(E).triggerHandler("ready"),h(E).off("ready")))}}}),h.ready.promise=function(t){if(!P)if(P=h.Deferred(),"complete"===E.readyState)setTimeout(h.ready);else if(E.addEventListener)E.addEventListener("DOMContentLoaded",R,!1),n.addEventListener("load",R,!1);else{E.attachEvent("onreadystatechange",R),n.attachEvent("onload",R);var e=!1;try{e=null==n.frameElement&&E.documentElement}catch(t){}e&&e.doScroll&&function t(){if(!h.isReady){try{e.doScroll("left")}catch(e){return setTimeout(t,50)}D(),h.ready()}}()}return P.promise(t)},h(p))break;p.ownLast="0"!==N,p.inlineBlockNeedsLayout=!1,h((function(){var t,e,n,r;(n=E.getElementsByTagName("body")[0])&&n.style&&(e=E.createElement("div"),(r=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(e),void 0!==e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",p.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(r))})),function(){var t=E.createElement("div");if(null==p.deleteExpando){p.deleteExpando=!0;try{delete t.test}catch(t){p.deleteExpando=!1}}t=null}(),h.acceptData=function(t){var e=h.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,B=/([A-Z])/g;function q(t,e,n){if(void 0===n&&1===t.nodeType){var r="data-"+e.replace(B,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:M.test(n)?h.parseJSON(n):n)}catch(t){}h.data(t,e,n)}else n=void 0}return n}function F(t){var e;for(e in t)if(("data"!==e||!h.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function z(t,e,n,r){if(h.acceptData(t)){var i,a,s=h.expando,u=t.nodeType,l=u?h.cache:t,c=u?t[s]:t[s]&&s;if(c&&l[c]&&(r||l[c].data)||void 0!==n||"string"!=typeof e)return c||(c=u?t[s]=o.pop()||h.guid++:s),l[c]||(l[c]=u?{}:{toJSON:h.noop}),"object"!=typeof e&&"function"!=typeof e||(r?l[c]=h.extend(l[c],e):l[c].data=h.extend(l[c].data,e)),a=l[c],r||(a.data||(a.data={}),a=a.data),void 0!==n&&(a[h.camelCase(e)]=n),"string"==typeof e?null==(i=a[e])&&(i=a[h.camelCase(e)]):i=a,i}}function U(t,e,n){if(h.acceptData(t)){var r,i,o=t.nodeType,a=o?h.cache:t,s=o?t[h.expando]:h.expando;if(a[s]){if(e&&(r=n?a[s]:a[s].data)){i=(e=h.isArray(e)?e.concat(h.map(e,h.camelCase)):e in r||(e=h.camelCase(e))in r?[e]:e.split(" ")).length;for(;i--;)delete r[e[i]];if(n?!F(r):!h.isEmptyObject(r))return}(n||(delete a[s].data,F(a[s])))&&(o?h.cleanData([t],!0):p.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}h.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?h.cache[t[h.expando]]:t[h.expando])&&!F(t)},data:function(t,e,n){return z(t,e,n)},removeData:function(t,e){return U(t,e)},_data:function(t,e,n){return z(t,e,n,!0)},_removeData:function(t,e){return U(t,e,!0)}}),h.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=h.data(o),1===o.nodeType&&!h._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&q(o,r=h.camelCase(r.slice(5)),i[r]);h._data(o,"parsedAttrs",!0)}return i}return"object"==typeof t?this.each((function(){h.data(this,t)})):arguments.length>1?this.each((function(){h.data(this,t,e)})):o?q(o,t,h.data(o,t)):void 0},removeData:function(t){return this.each((function(){h.removeData(this,t)}))}}),h.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=h._data(t,e),n&&(!r||h.isArray(n)?r=h._data(t,e,h.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=h.queue(t,e),r=n.length,i=n.shift(),o=h._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){h.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return h._data(t,n)||h._data(t,n,{empty:h.Callbacks("once memory").add((function(){h._removeData(t,e+"queue"),h._removeData(t,n)}))})}}),h.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",p.leadingWhitespace=3===e.firstChild.nodeType,p.tbody=!e.getElementsByTagName("tbody").length,p.htmlSerialize=!!e.getElementsByTagName("link").length,p.html5Clone="<:nav>"!==E.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),p.appendChecked=t.checked,e.innerHTML="",p.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="",p.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,p.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",(function(){p.noCloneEvent=!1})),e.cloneNode(!0).click()),null==p.deleteExpando){p.deleteExpando=!0;try{delete e.test}catch(t){p.deleteExpando=!1}}}(),function(){var t,e,r=E.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})e="on"+t,(p[t+"Bubbles"]=e in n)||(r.setAttribute(e,"t"),p[t+"Bubbles"]=!1===r.attributes[e].expando);r=null}();var $=/^(?:input|select|textarea)$/i,G=/^key/,Y=/^(?:mouse|pointer|contextmenu)|click/,Z=/^(?:focusinfocus|focusoutblur)$/,X=/^([^.]*)(?:\.(.+)|)$/;function J(){return!0}function tt(){return!1}function et(){try{return E.activeElement}catch(t){}}function nt(t){var e=rt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}h.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,v,m,y=h._data(t);if(y){for(n.handler&&(n=(u=n).handler,i=u.selector),n.guid||(n.guid=h.guid++),(a=y.events)||(a=y.events={}),(c=y.handle)||((c=y.handle=function(t){return void 0===h||t&&h.event.triggered===t.type?void 0:h.event.dispatch.apply(c.elem,arguments)}).elem=t),s=(e=(e||"").match(L)||[""]).length;s--;)p=m=(o=X.exec(e[s])||[])[1],v=(o[2]||"").split(".").sort(),p&&(l=h.event.special[p]||{},p=(i?l.delegateType:l.bindType)||p,l=h.event.special[p]||{},f=h.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&h.expr.match.needsContext.test(i),namespace:v.join(".")},u),(d=a[p])||((d=a[p]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(t,r,v,c)||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),l.add&&(l.add.call(t,f),f.handler.guid||(f.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,f):d.push(f),h.event.global[p]=!0);t=null}},remove:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,v,m,y=h.hasData(t)&&h._data(t);if(y&&(c=y.events)){for(l=(e=(e||"").match(L)||[""]).length;l--;)if(p=m=(s=X.exec(e[l])||[])[1],v=(s[2]||"").split(".").sort(),p){for(f=h.event.special[p]||{},d=c[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=d.length;o--;)a=d[o],!i&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,f.remove&&f.remove.call(t,a));u&&!d.length&&(f.teardown&&!1!==f.teardown.call(t,v,y.handle)||h.removeEvent(t,p,y.handle),delete c[p])}else for(p in c)h.event.remove(t,p+e[l],n,r,!0);h.isEmptyObject(c)&&(delete y.handle,h._removeData(t,"events"))}},trigger:function(t,e,r,i){var o,a,s,u,l,c,f,p=[r||E],v=d.call(t,"type")?t.type:t,m=d.call(t,"namespace")?t.namespace.split("."):[];if(s=c=r=r||E,3!==r.nodeType&&8!==r.nodeType&&!Z.test(v+h.event.triggered)&&(v.indexOf(".")>=0&&(m=v.split("."),v=m.shift(),m.sort()),a=v.indexOf(":")<0&&"on"+v,(t=t[h.expando]?t:new h.Event(v,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=m.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:h.makeArray(e,[t]),l=h.event.special[v]||{},i||!l.trigger||!1!==l.trigger.apply(r,e))){if(!i&&!l.noBubble&&!h.isWindow(r)){for(u=l.delegateType||v,Z.test(u+v)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(r.ownerDocument||E)&&p.push(c.defaultView||c.parentWindow||n)}for(f=0;(s=p[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||v,(o=(h._data(s,"events")||{})[t.type]&&h._data(s,"handle"))&&o.apply(s,e),(o=a&&s[a])&&o.apply&&h.acceptData(s)&&(t.result=o.apply(s,e),!1===t.result&&t.preventDefault());if(t.type=v,!i&&!t.isDefaultPrevented()&&(!l._default||!1===l._default.apply(p.pop(),e))&&h.acceptData(r)&&a&&r[v]&&!h.isWindow(r)){(c=r[a])&&(r[a]=null),h.event.triggered=v;try{r[v]()}catch(t){}h.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(t){t=h.event.fix(t);var e,n,r,i,o,s=[],u=a.call(arguments),l=(h._data(this,"events")||{})[t.type]||[],c=h.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(s=h.event.handlers.call(this,t,l),e=0;(i=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=i.elem,o=0;(r=i.handlers[o++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(r.namespace)||(t.handleObj=r,t.data=r.data,void 0!==(n=((h.event.special[r.origType]||{}).handle||r.handler).apply(i.elem,u))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,i,o,a=[],s=e.delegateCount,u=t.target;if(s&&u.nodeType&&(!t.button||"click"!==t.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==t.type)){for(i=[],o=0;o=0:h.find(n,this,null,[u]).length),i[n]&&i.push(r);i.length&&a.push({elem:u,handlers:i})}return s]","i"),at=/^\s+/,st=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ut=/<([\w:]+)/,lt=/\s*$/g,mt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:p.htmlSerialize?[0,"",""]:[1,"X
","
"]},yt=nt(E).appendChild(E.createElement("div"));function gt(t,e){var n,r,i=0,o=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(r=n[i]);i++)!e||h.nodeName(r,e)?o.push(r):h.merge(o,gt(r,e));return void 0===e||e&&h.nodeName(t,e)?h.merge([t],o):o}function bt(t){Q.test(t.type)&&(t.defaultChecked=t.checked)}function wt(t,e){return h.nodeName(t,"table")&&h.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function _t(t){return t.type=(null!==h.find.attr(t,"type"))+"/"+t.type,t}function Ot(t){var e=ht.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function kt(t,e){for(var n,r=0;null!=(n=t[r]);r++)h._data(n,"globalEval",!e||h._data(e[r],"globalEval"))}function xt(t,e){if(1===e.nodeType&&h.hasData(t)){var n,r,i,o=h._data(t),a=h._data(e,o),s=o.events;if(s)for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r")?o=t.cloneNode(!0):(yt.innerHTML=t.outerHTML,yt.removeChild(o=yt.firstChild)),!(p.noCloneEvent&&p.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||h.isXMLDoc(t)))for(r=gt(o),s=gt(t),a=0;null!=(i=s[a]);++a)r[a]&&Ct(i,r[a]);if(e)if(n)for(s=s||gt(t),r=r||gt(o),a=0;null!=(i=s[a]);a++)xt(i,r[a]);else xt(t,o);return(r=gt(o,"script")).length>0&&kt(r,!u&>(t,"script")),r=s=i=null,o},buildFragment:function(t,e,n,r){for(var i,o,a,s,u,l,c,f=t.length,d=nt(e),v=[],m=0;m")+c[2],i=c[0];i--;)s=s.lastChild;if(!p.leadingWhitespace&&at.test(o)&&v.push(e.createTextNode(at.exec(o)[0])),!p.tbody)for(i=(o="table"!==u||lt.test(o)?""!==c[1]||lt.test(o)?0:s:s.firstChild)&&o.childNodes.length;i--;)h.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(h.merge(v,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else v.push(e.createTextNode(o));for(s&&d.removeChild(s),p.appendChecked||h.grep(gt(v,"input"),bt),m=0;o=v[m++];)if((!r||-1===h.inArray(o,r))&&(a=h.contains(o.ownerDocument,o),s=gt(d.appendChild(o),"script"),a&&kt(s),n))for(i=0;o=s[i++];)pt.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(t,e){for(var n,r,i,a,s=0,u=h.expando,l=h.cache,c=p.deleteExpando,f=h.event.special;null!=(n=t[s]);s++)if((e||h.acceptData(n))&&(a=(i=n[u])&&l[i])){if(a.events)for(r in a.events)f[r]?h.event.remove(n,r):h.removeEvent(n,r,a.handle);l[i]&&(delete l[i],c?delete n[u]:void 0!==n.removeAttribute?n.removeAttribute(u):n[u]=null,o.push(i))}}}),h.fn.extend({text:function(t){return K(this,(function(t){return void 0===t?h.text(this):this.empty().append((this[0]&&this[0].ownerDocument||E).createTextNode(t))}),null,t,arguments.length)},append:function(){return this.domManip(arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||wt(this,t).appendChild(t)}))},prepend:function(){return this.domManip(arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=wt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return this.domManip(arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return this.domManip(arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},remove:function(t,e){for(var n,r=t?h.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||h.cleanData(gt(n)),n.parentNode&&(e&&h.contains(n.ownerDocument,n)&&kt(gt(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&h.cleanData(gt(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&h.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return h.clone(this,t,e)}))},html:function(t){return K(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(it,""):void 0;if("string"==typeof t&&!ft.test(t)&&(p.htmlSerialize||!ot.test(t))&&(p.leadingWhitespace||!at.test(t))&&!mt[(ut.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(st,"<$1>");try{for(;n1&&"string"==typeof v&&!p.checkClone&&dt.test(v))return this.each((function(n){var r=f.eq(n);m&&(t[0]=v.call(this,n,r.html())),r.domManip(t,e)}));if(c&&(n=(u=h.buildFragment(t,this[0].ownerDocument,!1,this)).firstChild,1===u.childNodes.length&&(u=n),n)){for(i=(o=h.map(gt(u,"script"),_t)).length;l")).appendTo(e.documentElement))[0].contentWindow||Et[0].contentDocument).document).write(),e.close(),n=Tt(t,e),Et.detach()),St[t]=n),n}p.shrinkWrapBlocks=function(){return null!=jt?jt:(jt=!1,(e=E.getElementsByTagName("body")[0])&&e.style?(t=E.createElement("div"),(n=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(n).appendChild(t),void 0!==t.style.zoom&&(t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",t.appendChild(E.createElement("div")).style.width="5px",jt=3!==t.offsetWidth),e.removeChild(n),jt):void 0);var t,e,n};var Pt,Nt,Lt=/^margin/,It=new RegExp("^("+H+")(?!px)[a-z%]+$","i"),Dt=/^(top|right|bottom|left)$/;function Rt(t,e){return{get:function(){var n=t();if(null!=n){if(!n)return(this.get=e).apply(this,arguments);delete this.get}}}}n.getComputedStyle?(Pt=function(t){return t.ownerDocument.defaultView.getComputedStyle(t,null)},Nt=function(t,e,n){var r,i,o,a,s=t.style;return a=(n=n||Pt(t))?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==a||h.contains(t.ownerDocument,t)||(a=h.style(t,e)),It.test(a)&&Lt.test(e)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0===a?a:a+""}):E.documentElement.currentStyle&&(Pt=function(t){return t.currentStyle},Nt=function(t,e,n){var r,i,o,a,s=t.style;return null==(a=(n=n||Pt(t))?n[e]:void 0)&&s&&s[e]&&(a=s[e]),It.test(a)&&!Dt.test(e)&&(r=s.left,(o=(i=t.runtimeStyle)&&i.left)&&(i.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"}),function(){var t,e,r,i,o,a,s;function u(){var t,e,r,u;(e=E.getElementsByTagName("body")[0])&&e.style&&(t=E.createElement("div"),(r=E.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",e.appendChild(r).appendChild(t),t.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",i=o=!1,s=!0,n.getComputedStyle&&(i="1%"!==(n.getComputedStyle(t,null)||{}).top,o="4px"===(n.getComputedStyle(t,null)||{width:"4px"}).width,(u=t.appendChild(E.createElement("div"))).style.cssText=t.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",u.style.marginRight=u.style.width="0",t.style.width="1px",s=!parseFloat((n.getComputedStyle(u,null)||{}).marginRight)),t.innerHTML="
t
",(u=t.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(a=0===u[0].offsetHeight)&&(u[0].style.display="",u[1].style.display="none",a=0===u[0].offsetHeight),e.removeChild(r))}(t=E.createElement("div")).innerHTML="
a",(e=(r=t.getElementsByTagName("a")[0])&&r.style)&&(e.cssText="float:left;opacity:.5",p.opacity="0.5"===e.opacity,p.cssFloat=!!e.cssFloat,t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===t.style.backgroundClip,p.boxSizing=""===e.boxSizing||""===e.MozBoxSizing||""===e.WebkitBoxSizing,h.extend(p,{reliableHiddenOffsets:function(){return null==a&&u(),a},boxSizingReliable:function(){return null==o&&u(),o},pixelPosition:function(){return null==i&&u(),i},reliableMarginRight:function(){return null==s&&u(),s}}))}(),h.swap=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];for(o in i=n.apply(t,r||[]),e)t.style[o]=a[o];return i};var Mt=/alpha\([^)]*\)/i,Bt=/opacity\s*=\s*([^)]*)/,qt=/^(none|table(?!-c[ea]).+)/,Ft=new RegExp("^("+H+")(.*)$","i"),zt=new RegExp("^([+-])=("+H+")","i"),Ut={position:"absolute",visibility:"hidden",display:"block"},Ht={letterSpacing:"0",fontWeight:"400"},Wt=["Webkit","O","Moz","ms"];function Vt(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Wt.length;i--;)if((e=Wt[i]+n)in t)return e;return r}function Kt(t,e){for(var n,r,i,o=[],a=0,s=t.length;a=1||""===e)&&""===h.trim(o.replace(Mt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||r&&!r.filter)||(n.filter=Mt.test(o)?o.replace(Mt,i):o+" "+i)}}),h.cssHooks.marginRight=Rt(p.reliableMarginRight,(function(t,e){if(e)return h.swap(t,{display:"inline-block"},Nt,[t,"marginRight"])})),h.each({margin:"",padding:"",border:"Width"},(function(t,e){h.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+W[r]+e]=o[r]||o[r-2]||o[0];return i}},Lt.test(t)||(h.cssHooks[t+e].set=Qt)})),h.fn.extend({css:function(t,e){return K(this,(function(t,e,n){var r,i,o={},a=0;if(h.isArray(e)){for(r=Pt(t),i=e.length;a1)},show:function(){return Kt(this,!0)},hide:function(){return Kt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){V(this)?h(this).show():h(this).hide()}))}}),h.Tween=Yt,Yt.prototype={constructor:Yt,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(h.cssNumber[n]?"":"px")},cur:function(){var t=Yt.propHooks[this.prop];return t&&t.get?t.get(this):Yt.propHooks._default.get(this)},run:function(t){var e,n=Yt.propHooks[this.prop];return this.options.duration?this.pos=e=h.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yt.propHooks._default.set(this),this}},Yt.prototype.init.prototype=Yt.prototype,Yt.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=h.css(t.elem,t.prop,""))&&"auto"!==e?e:0:t.elem[t.prop]},set:function(t){h.fx.step[t.prop]?h.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[h.cssProps[t.prop]]||h.cssHooks[t.prop])?h.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},Yt.propHooks.scrollTop=Yt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},h.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},h.fx=Yt.prototype.init,h.fx.step={};var Zt,Xt,Jt,te,ee,ne,re,ie=/^(?:toggle|show|hide)$/,oe=new RegExp("^(?:([+-])=|)("+H+")([a-z%]*)$","i"),ae=/queueHooks$/,se=[function(t,e,n){var r,i,o,a,s,u,l,c=this,f={},d=t.style,v=t.nodeType&&V(t),m=h._data(t,"fxshow");for(r in n.queue||(null==(s=h._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,u=s.empty.fire,s.empty.fire=function(){s.unqueued||u()}),s.unqueued++,c.always((function(){c.always((function(){s.unqueued--,h.queue(t,"fx").length||s.empty.fire()}))}))),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===("none"===(l=h.css(t,"display"))?h._data(t,"olddisplay")||At(t.nodeName):l)&&"none"===h.css(t,"float")&&(p.inlineBlockNeedsLayout&&"inline"!==At(t.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",p.shrinkWrapBlocks()||c.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),e)if(i=e[r],ie.exec(i)){if(delete e[r],o=o||"toggle"===i,i===(v?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;v=!0}f[r]=m&&m[r]||h.style(t,r)}else l=void 0;if(h.isEmptyObject(f))"inline"===("none"===l?At(t.nodeName):l)&&(d.display=l);else for(r in m?"hidden"in m&&(v=m.hidden):m=h._data(t,"fxshow",{}),o&&(m.hidden=!v),v?h(t).show():c.done((function(){h(t).hide()})),c.done((function(){var e;for(e in h._removeData(t,"fxshow"),f)h.style(t,e,f[e])})),f)a=fe(v?m[r]:0,r,c),r in m||(m[r]=a.start,v&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}],ue={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=oe.exec(e),o=i&&i[3]||(h.cssNumber[t]?"":"px"),a=(h.cssNumber[t]||"px"!==o&&+r)&&oe.exec(h.css(n.elem,t)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do{a/=s=s||".5",h.style(n.elem,t,a+o)}while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function le(){return setTimeout((function(){Zt=void 0})),Zt=h.now()}function ce(t,e){var n,r={height:t},i=0;for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=W[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function fe(t,e,n){for(var r,i=(ue[e]||[]).concat(ue["*"]),o=0,a=i.length;o
a",ne=te.getElementsByTagName("a")[0],re=(ee=E.createElement("select")).appendChild(E.createElement("option")),Jt=te.getElementsByTagName("input")[0],ne.style.cssText="top:1px",p.getSetAttribute="t"!==te.className,p.style=/top/.test(ne.getAttribute("style")),p.hrefNormalized="/a"===ne.getAttribute("href"),p.checkOn=!!Jt.value,p.optSelected=re.selected,p.enctype=!!E.createElement("form").enctype,ee.disabled=!0,p.optDisabled=!re.disabled,(Jt=E.createElement("input")).setAttribute("value",""),p.input=""===Jt.getAttribute("value"),Jt.value="t",Jt.setAttribute("type","radio"),p.radioValue="t"===Jt.value;var pe=/\r/g;h.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=h.isFunction(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,h(this).val()):t)?i="":"number"==typeof i?i+="":h.isArray(i)&&(i=h.map(i,(function(t){return null==t?"":t+""}))),(e=h.valHooks[this.type]||h.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=h.valHooks[i.type]||h.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(pe,""):null==n?"":n:void 0}}),h.extend({valHooks:{option:{get:function(t){var e=h.find.attr(t,"value");return null!=e?e:h.trim(h.text(t))}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u=0)try{r.selected=n=!0}catch(t){r.scrollHeight}else r.selected=!1;return n||(t.selectedIndex=-1),i}}}}),h.each(["radio","checkbox"],(function(){h.valHooks[this]={set:function(t,e){if(h.isArray(e))return t.checked=h.inArray(h(t).val(),e)>=0}},p.checkOn||(h.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var he,ve,me=h.expr.attrHandle,ye=/^(?:checked|selected)$/i,ge=p.getSetAttribute,be=p.input;h.fn.extend({attr:function(t,e){return K(this,h.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){h.removeAttr(this,t)}))}}),h.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?h.prop(t,e,n):(1===o&&h.isXMLDoc(t)||(e=e.toLowerCase(),r=h.attrHooks[e]||(h.expr.match.bool.test(e)?ve:he)),void 0===n?r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=h.find.attr(t,e))?void 0:i:null!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):void h.removeAttr(t,e))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(L);if(o&&1===t.nodeType)for(;n=o[i++];)r=h.propFix[n]||n,h.expr.match.bool.test(n)?be&&ge||!ye.test(n)?t[r]=!1:t[h.camelCase("default-"+n)]=t[r]=!1:h.attr(t,n,""),t.removeAttribute(ge?n:r)},attrHooks:{type:{set:function(t,e){if(!p.radioValue&&"radio"===e&&h.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),ve={set:function(t,e,n){return!1===e?h.removeAttr(t,n):be&&ge||!ye.test(n)?t.setAttribute(!ge&&h.propFix[n]||n,n):t[h.camelCase("default-"+n)]=t[n]=!0,n}},h.each(h.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||h.find.attr;me[e]=be&&ge||!ye.test(e)?function(t,e,r){var i,o;return r||(o=me[e],me[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,me[e]=o),i}:function(t,e,n){if(!n)return t[h.camelCase("default-"+e)]?e.toLowerCase():null}})),be&&ge||(h.attrHooks.value={set:function(t,e,n){if(!h.nodeName(t,"input"))return he&&he.set(t,e,n);t.defaultValue=e}}),ge||(he={set:function(t,e,n){var r=t.getAttributeNode(n);if(r||t.setAttributeNode(r=t.ownerDocument.createAttribute(n)),r.value=e+="","value"===n||e===t.getAttribute(n))return e}},me.id=me.name=me.coords=function(t,e,n){var r;if(!n)return(r=t.getAttributeNode(e))&&""!==r.value?r.value:null},h.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:he.set},h.attrHooks.contenteditable={set:function(t,e,n){he.set(t,""!==e&&e,n)}},h.each(["width","height"],(function(t,e){h.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}}))),p.style||(h.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var we=/^(?:input|select|textarea|button|object)$/i,_e=/^(?:a|area)$/i;h.fn.extend({prop:function(t,e){return K(this,h.prop,t,e,arguments.length>1)},removeProp:function(t){return t=h.propFix[t]||t,this.each((function(){try{this[t]=void 0,delete this[t]}catch(t){}}))}}),h.extend({propFix:{for:"htmlFor",class:"className"},prop:function(t,e,n){var r,i,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return(1!==o||!h.isXMLDoc(t))&&(e=h.propFix[e]||e,i=h.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=h.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||_e.test(t.nodeName)&&t.href?0:-1}}}}),p.hrefNormalized||h.each(["href","src"],(function(t,e){h.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}})),p.optSelected||(h.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),h.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){h.propFix[this.toLowerCase()]=this})),p.enctype||(h.propFix.enctype="encoding");var Oe=/[\t\r\n\f]/g;h.fn.extend({addClass:function(t){var e,n,r,i,o,a,s=0,u=this.length,l="string"==typeof t&&t;if(h.isFunction(t))return this.each((function(e){h(this).addClass(t.call(this,e,this.className))}));if(l)for(e=(t||"").match(L)||[];s=0;)r=r.replace(" "+i+" "," ");a=t?h.trim(r):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):h.isFunction(t)?this.each((function(n){h(this).toggleClass(t.call(this,n,this.className,e),e)})):this.each((function(){if("string"===n)for(var e,r=0,i=h(this),o=t.match(L)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else"undefined"!==n&&"boolean"!==n||(this.className&&h._data(this,"__className__",this.className),this.className=this.className||!1===t?"":h._data(this,"__className__")||"")}))},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;n=0)return!0;return!1}}),h.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),(function(t,e){h.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}})),h.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var ke=h.now(),xe=/\?/,Ce=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;h.parseJSON=function(t){if(n.JSON&&n.JSON.parse)return n.JSON.parse(t+"");var e,r=null,i=h.trim(t+"");return i&&!h.trim(i.replace(Ce,(function(t,n,i,o){return e&&n&&(r=0),0===r?t:(e=i||n,r+=!o-!i,"")})))?Function("return "+i)():h.error("Invalid JSON: "+t)},h.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{n.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):((e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||h.error("Invalid XML: "+t),e};var Ee,je,Se=/#.*$/,Te=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Pe=/^(?:GET|HEAD)$/,Ne=/^\/\//,Le=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ie={},De={},Re="*/".concat("*");try{je=location.href}catch(t){(je=E.createElement("a")).href="",je=je.href}function Me(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(L)||[];if(h.isFunction(n))for(;r=o[i++];)"+"===r.charAt(0)?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Be(t,e,n,r){var i={},o=t===De;function a(s){var u;return i[s]=!0,h.each(t[s]||[],(function(t,s){var l=s(e,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(e.dataTypes.unshift(l),a(l),!1)})),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function qe(t,e){var n,r,i=h.ajaxSettings.flatOptions||{};for(r in e)void 0!==e[r]&&((i[r]?t:n||(n={}))[r]=e[r]);return n&&h.extend(!0,t,n),t}Ee=Le.exec(je.toLowerCase())||[],h.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:je,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ee[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":h.parseJSON,"text xml":h.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?qe(qe(t,h.ajaxSettings),e):qe(h.ajaxSettings,t)},ajaxPrefilter:Me(Ie),ajaxTransport:Me(De),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,i,o,a,s,u,l,c=h.ajaxSetup({},e),f=c.context||c,d=c.context&&(f.nodeType||f.jquery)?h(f):h.event,p=h.Deferred(),v=h.Callbacks("once memory"),m=c.statusCode||{},y={},g={},b=0,w="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!l)for(l={};e=Ae.exec(o);)l[e[1].toLowerCase()]=e[2];e=l[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?o:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=g[n]=g[n]||t,y[t]=e),this},overrideMimeType:function(t){return b||(c.mimeType=t),this},statusCode:function(t){var e;if(t)if(b<2)for(e in t)m[e]=[m[e],t[e]];else _.always(t[_.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),O(0,e),this}};if(p.promise(_).complete=v.add,_.success=_.done,_.error=_.fail,c.url=((t||c.url||je)+"").replace(Se,"").replace(Ne,Ee[1]+"//"),c.type=e.method||e.type||c.method||c.type,c.dataTypes=h.trim(c.dataType||"*").toLowerCase().match(L)||[""],null==c.crossDomain&&(n=Le.exec(c.url.toLowerCase()),c.crossDomain=!(!n||n[1]===Ee[1]&&n[2]===Ee[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(Ee[3]||("http:"===Ee[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=h.param(c.data,c.traditional)),Be(Ie,c,e,_),2===b)return _;for(r in(s=c.global)&&0==h.active++&&h.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Pe.test(c.type),i=c.url,c.hasContent||(c.data&&(i=c.url+=(xe.test(i)?"&":"?")+c.data,delete c.data),!1===c.cache&&(c.url=Te.test(i)?i.replace(Te,"$1_="+ke++):i+(xe.test(i)?"&":"?")+"_="+ke++)),c.ifModified&&(h.lastModified[i]&&_.setRequestHeader("If-Modified-Since",h.lastModified[i]),h.etag[i]&&_.setRequestHeader("If-None-Match",h.etag[i])),(c.data&&c.hasContent&&!1!==c.contentType||e.contentType)&&_.setRequestHeader("Content-Type",c.contentType),_.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+Re+"; q=0.01":""):c.accepts["*"]),c.headers)_.setRequestHeader(r,c.headers[r]);if(c.beforeSend&&(!1===c.beforeSend.call(f,_,c)||2===b))return _.abort();for(r in w="abort",{success:1,error:1,complete:1})_[r](c[r]);if(u=Be(De,c,e,_)){_.readyState=1,s&&d.trigger("ajaxSend",[_,c]),c.async&&c.timeout>0&&(a=setTimeout((function(){_.abort("timeout")}),c.timeout));try{b=1,u.send(y,O)}catch(t){if(!(b<2))throw t;O(-1,t)}}else O(-1,"No Transport");function O(t,e,n,r){var l,y,g,w,O,k=e;2!==b&&(b=2,a&&clearTimeout(a),u=void 0,o=r||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,n&&(w=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(a in s)if(s[a]&&s[a].test(i)){u.unshift(a);break}if(u[0]in n)o=u[0];else{for(a in n){if(!u[0]||t.converters[a+" "+u[0]]){o=a;break}r||(r=a)}o=o||r}if(o)return o!==u[0]&&u.unshift(o),n[o]}(c,_,n)),w=function(t,e,n,r){var i,o,a,s,u,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(c,w,_,l),l?(c.ifModified&&((O=_.getResponseHeader("Last-Modified"))&&(h.lastModified[i]=O),(O=_.getResponseHeader("etag"))&&(h.etag[i]=O)),204===t||"HEAD"===c.type?k="nocontent":304===t?k="notmodified":(k=w.state,y=w.data,l=!(g=w.error))):(g=k,!t&&k||(k="error",t<0&&(t=0))),_.status=t,_.statusText=(e||k)+"",l?p.resolveWith(f,[y,k,_]):p.rejectWith(f,[_,k,g]),_.statusCode(m),m=void 0,s&&d.trigger(l?"ajaxSuccess":"ajaxError",[_,c,l?y:g]),v.fireWith(f,[_,k]),s&&(d.trigger("ajaxComplete",[_,c]),--h.active||h.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return h.get(t,e,n,"json")},getScript:function(t,e){return h.get(t,void 0,e,"script")}}),h.each(["get","post"],(function(t,e){h[e]=function(t,n,r,i){return h.isFunction(n)&&(i=i||r,r=n,n=void 0),h.ajax({url:t,type:e,dataType:i,data:n,success:r})}})),h.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){h.fn[e]=function(t){return this.on(e,t)}})),h._evalUrl=function(t){return h.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},h.fn.extend({wrapAll:function(t){if(h.isFunction(t))return this.each((function(e){h(this).wrapAll(t.call(this,e))}));if(this[0]){var e=h(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t})).append(this)}return this},wrapInner:function(t){return h.isFunction(t)?this.each((function(e){h(this).wrapInner(t.call(this,e))})):this.each((function(){var e=h(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=h.isFunction(t);return this.each((function(n){h(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(){return this.parent().each((function(){h.nodeName(this,"body")||h(this).replaceWith(this.childNodes)})).end()}}),h.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!p.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||h.css(t,"display"))},h.expr.filters.visible=function(t){return!h.expr.filters.hidden(t)};var Fe=/%20/g,ze=/\[\]$/,Ue=/\r?\n/g,He=/^(?:submit|button|image|reset|file)$/i,We=/^(?:input|select|textarea|keygen)/i;function Ve(t,e,n,r){var i;if(h.isArray(e))h.each(e,(function(e,i){n||ze.test(t)?r(t,i):Ve(t+"["+("object"==typeof i?e:"")+"]",i,n,r)}));else if(n||"object"!==h.type(e))r(t,e);else for(i in e)Ve(t+"["+i+"]",e[i],n,r)}h.param=function(t,e){var n,r=[],i=function(t,e){e=h.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=h.ajaxSettings&&h.ajaxSettings.traditional),h.isArray(t)||t.jquery&&!h.isPlainObject(t))h.each(t,(function(){i(this.name,this.value)}));else for(n in t)Ve(n,t[n],e,i);return r.join("&").replace(Fe,"+")},h.fn.extend({serialize:function(){return h.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=h.prop(this,"elements");return t?h.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!h(this).is(":disabled")&&We.test(this.nodeName)&&!He.test(t)&&(this.checked||!Q.test(t))})).map((function(t,e){var n=h(this).val();return null==n?null:h.isArray(n)?h.map(n,(function(t){return{name:e.name,value:t.replace(Ue,"\r\n")}})):{name:e.name,value:n.replace(Ue,"\r\n")}})).get()}}),h.ajaxSettings.xhr=void 0!==n.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Ge()||function(){try{return new n.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}()}:Ge;var Ke=0,Qe={},$e=h.ajaxSettings.xhr();function Ge(){try{return new n.XMLHttpRequest}catch(t){}}n.ActiveXObject&&h(n).on("unload",(function(){for(var t in Qe)Qe[t](void 0,!0)})),p.cors=!!$e&&"withCredentials"in $e,($e=p.ajax=!!$e)&&h.ajaxTransport((function(t){var e;if(!t.crossDomain||p.cors)return{send:function(n,r){var i,o=t.xhr(),a=++Ke;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];for(i in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)void 0!==n[i]&&o.setRequestHeader(i,n[i]+"");o.send(t.hasContent&&t.data||null),e=function(n,i){var s,u,l;if(e&&(i||4===o.readyState))if(delete Qe[a],e=void 0,o.onreadystatechange=h.noop,i)4!==o.readyState&&o.abort();else{l={},s=o.status,"string"==typeof o.responseText&&(l.text=o.responseText);try{u=o.statusText}catch(t){u=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=l.text?200:404}l&&r(s,u,l,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Qe[a]=e:e()},abort:function(){e&&e(void 0,!0)}}})),h.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return h.globalEval(t),t}}}),h.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)})),h.ajaxTransport("script",(function(t){if(t.crossDomain){var e,n=E.head||h("head")[0]||E.documentElement;return{send:function(r,i){(e=E.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||i(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}}));var Ye=[],Ze=/(=)\?(?=&|$)|\?\?/;h.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||h.expando+"_"+ke++;return this[t]=!0,t}}),h.ajaxPrefilter("json jsonp",(function(t,e,r){var i,o,a,s=!1!==t.jsonp&&(Ze.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=h.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Ze,"$1"+i):!1!==t.jsonp&&(t.url+=(xe.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||h.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){a=arguments},r.always((function(){n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),a&&h.isFunction(o)&&o(a[0]),a=o=void 0})),"script"})),h.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||E;var r=O.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=h.buildFragment([t],e,i),i&&i.length&&h(i).remove(),h.merge([],r.childNodes))};var Xe=h.fn.load;h.fn.load=function(t,e,n){if("string"!=typeof t&&Xe)return Xe.apply(this,arguments);var r,i,o,a=this,s=t.indexOf(" ");return s>=0&&(r=h.trim(t.slice(s,t.length)),t=t.slice(0,s)),h.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&h.ajax({url:t,type:o,dataType:"html",data:e}).done((function(t){i=arguments,a.html(r?h("
").append(h.parseHTML(t)).find(r):t)})).complete(n&&function(t,e){a.each(n,i||[t.responseText,e,t])}),this},h.expr.filters.animated=function(t){return h.grep(h.timers,(function(e){return t===e.elem})).length};var Je=n.document.documentElement;function tn(t){return h.isWindow(t)?t:9===t.nodeType&&(t.defaultView||t.parentWindow)}h.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,l=h.css(t,"position"),c=h(t),f={};"static"===l&&(t.style.position="relative"),s=c.offset(),o=h.css(t,"top"),u=h.css(t,"left"),("absolute"===l||"fixed"===l)&&h.inArray("auto",[o,u])>-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),h.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):c.css(f)}},h.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){h.offset.setOffset(this,t,e)}));var e,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;return o?(e=o.documentElement,h.contains(e,i)?(void 0!==i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=tn(o),{top:r.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:r.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):r):void 0},position:function(){if(this[0]){var t,e,n={top:0,left:0},r=this[0];return"fixed"===h.css(r,"position")?e=r.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),h.nodeName(t[0],"html")||(n=t.offset()),n.top+=h.css(t[0],"borderTopWidth",!0),n.left+=h.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-h.css(r,"marginTop",!0),left:e.left-n.left-h.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||Je;t&&!h.nodeName(t,"html")&&"static"===h.css(t,"position");)t=t.offsetParent;return t||Je}))}}),h.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n=/Y/.test(e);h.fn[t]=function(r){return K(this,(function(t,r,i){var o=tn(t);if(void 0===i)return o?e in o?o[e]:o.document.documentElement[r]:t[r];o?o.scrollTo(n?h(o).scrollLeft():i,n?i:h(o).scrollTop()):t[r]=i}),t,r,arguments.length,null)}})),h.each(["top","left"],(function(t,e){h.cssHooks[e]=Rt(p.pixelPosition,(function(t,n){if(n)return n=Nt(t,e),It.test(n)?h(t).position()[e]+"px":n}))})),h.each({Height:"height",Width:"width"},(function(t,e){h.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){h.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(!0===r||!0===i?"margin":"border");return K(this,(function(e,n,r){var i;return h.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?h.css(e,n,a):h.style(e,n,r,a)}),e,o?r:void 0,o,null)}}))})),h.fn.size=function(){return this.length},h.fn.andSelf=h.fn.addBack,void 0===(r=function(){return h}.apply(e,[]))||(t.exports=r);var en=n.jQuery,nn=n.$;return h.noConflict=function(t){return n.$===h&&(n.$=nn),t&&n.jQuery===h&&(n.jQuery=en),h},void 0===i&&(n.jQuery=n.$=h),h},"object"==typeof t.exports?t.exports=i.document?o(i,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return o(t)}:o(i)},54:function(t,e){},55:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o,a,s,u;e.NewLine="\n",function(t){t.Ordered="ordered",t.Bullet="bullet",t.Checked="checked",t.Unchecked="unchecked"}(r||(r={})),e.ListType=r,function(t){t.Sub="sub",t.Super="super"}(i||(i={})),e.ScriptType=i,function(t){t.Rtl="rtl"}(o||(o={})),e.DirectionType=o,function(t){t.Center="center",t.Right="right",t.Justify="justify"}(a||(a={})),e.AlignType=a,function(t){t.Image="image",t.Video="video",t.Formula="formula",t.Text="text"}(s||(s={})),e.DataType=s,function(t){t.Block="block",t.InlineGroup="inline-group",t.List="list",t.Video="video"}(u||(u={})),e.GroupType=u},57:function(t,e){},58:function(t,e,n){"use strict";var r=n(185),i=r.stringify,o={},a=r.struct({message:r.Any,actual:r.Any,expected:r.Any,path:r.list(r.union([r.String,r.Number]))},"ValidationError");function s(t,e,n,o){return r.Function.is(e.getValidationErrorMessage)?e.getValidationErrorMessage(t,n,o):function(t,e,n){var o=r.getTypeName(e),a=n.length?"/"+n.join("/")+": "+o:o;return"Invalid value "+i(t)+" supplied to "+a}(t,e,n)}a.of=function(t,e,n,r){return new a({message:s(t,e,n,r),actual:t,expected:e,path:n})};var u=r.struct({errors:r.list(a),value:r.Any},"ValidationResult");function l(t,e,n){n=n||{};var i=r.Array.is(n)?n:n.path||[];return new u(c(t,e,i,n))}function c(t,e,n,i){return r.isType(e)?f[e.meta.kind](t,e,n,i):f.es6classes(t,e,n,i)}u.prototype.isValid=function(){return!this.errors.length},u.prototype.firstError=function(){return this.isValid()?null:this.errors[0]},u.prototype.toString=function(){return this.isValid()?"[ValidationResult, true, "+i(this.value)+"]":"[ValidationResult, false, ("+this.errors.map((function(t){return i(t.message)})).join(", ")+")]"};var f=l.validators={};f.es6classes=function(t,e,n,r){return{value:t,errors:t instanceof e?[]:[a.of(t,e,n,r.context)]}},f.irreducible=f.enums=function(t,e,n,r){return{value:t,errors:e.is(t)?[]:[a.of(t,e,n,r.context)]}},f.list=function(t,e,n,i){if(!r.Array.is(t))return{value:t,errors:[a.of(t,e,n,i.context)]};for(var o={value:[],errors:[]},s=0,u=t.length;ss)return{value:t,errors:[a.of(t,e,n,i.context)]};for(var u={value:[],errors:[]},l=0;l1&&s.errors.push(a.of(t,e,n,r.context)),s},f.interface=function(t,e,n,i){if(!r.Object.is(t))return{value:t,errors:[a.of(t,e,n,i.context)]};var o={value:{},errors:[]},s=e.meta.props;for(var u in s){var l=c(t[u],s[u],n.concat(u),i);o.value[u]=l.value,o.errors=o.errors.concat(l.errors)}if(i.hasOwnProperty("strict")?i.strict:e.meta.strict)for(var f in t)s.hasOwnProperty(f)||r.Nil.is(t[f])||o.errors.push(a.of(t[f],r.Nil,n.concat(f),i.context));return o},r.mixin(r,{ValidationError:a,ValidationResult:u,validate:l}),t.exports=r},59:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(3),o=n(51),a=n(25),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n"}},64:function(t,e,n){var r=n(21),i=n(29);t.exports=function(t,e){r(!(t instanceof e),(function(){return"Cannot use the new operator to instantiate the type "+i(e)}))}},66:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c}));var r=n(109),i=n(32),o=n(24),a=n(0),s=n(10),u=n(3);function l(t,e){return c(Object(u.currentWorkspaceId)(),t,e)}function c(t,e,n){var l=u.BasicObj.getIncludingDeletedInWorkspace(t,e);if(null!==l){var c,f=l.widget(n);if(null!==f)return function(t){var e=Object(s.f)(Object(o.a)(),t),n=t.objClass();return Object(r.a)(n,"titleForContent",e)}(f)||(c=f.objClass(),Object(i.a)(c,"title")||Object(a.N)(c))}}},67:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(12),i=n(3),o=n(59),a=n(25),s=/\bobjid:[a-f0-9]{16}\b[^"']*/g;function u(t){return t.replace(s,(function(t){return function(t){var e,n,s=t.slice(6,22),u=i.BasicObj.get(s);u?(e=r(Object(o.a)(u)),n=a.e(e)):(e=a.b({path:s}),n=!0);if(n){var l=r(t);e.query(l.query()).hash(l.hash())}return e}(t).toString()}))}},69:function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}));var r=n(2),i=n(3),o=n(0),a=n(77),s=n(24),u=n(61),l=n(10),c=n(5),f=n(35);function d(t){if(!(t instanceof i.BasicObj))throw new o.a("Parameter obj needs to be a BasicObj.");if(function(t){var e=Object(c.loadableWithDefault)(null,u.a);if(!e)return!1;return e.id()===t.id()}(t))return"/";var e=t.permalink();if(e){if(!Object(f.f)())return h(t,e);if(Object(f.a)("routing-related API (e.g. Scrivito.navigateTo)"),function(t){var e=Object(f.c)(t),n=Object(f.b)();return!e||e===n}(t))return h(t,e)}var n=function(t){var e=Object(s.a)(),n=Object(l.f)(e,t);if(function(t){var e=t;return e.slug&&"function"==typeof e.slug}(n)){var r=n.slug();if("string"==typeof r)return r}}(t);return n?"/"+n+"-"+t.id():"/"+t.id()}function p(t){var e=t.replace(new RegExp("^/+|/+$","g"),"");if(""===e)return Object(u.a)();var n=function(t){if(t.length<16)return null;if(t.length>16&&"-"!==t.slice(-17,-16))return null;var e=t.slice(-16);if(e.match(/[^0-9a-f]/))return null;return e}(e);return n?i.BasicObj.get(n):function(t){var e=a.a(t);if(e)return i.BasicObj.get(e);if(Object(f.f)())return function(t){Object(f.a)("routing-related API (e.g. Scrivito.currentPage, Scrivito.urlFor)");var e=Object(f.b)(),n=i.BasicObj.getAllByPermalink(t);return Object(r.find)(n,(function(t){var n=Object(f.c)(t);return!n||n===e}))||null}(t);return i.BasicObj.getByPermalink(t)}(e)}function h(t,e){return a.b(t.id(),e),"/"+e}},7:function(t,e,n){"use strict";n.d(e,"d",(function(){return T})),n.d(e,"c",(function(){return y})),n.d(e,"m",(function(){return b})),n.d(e,"o",(function(){return N})),n.d(e,"r",(function(){return A})),n.d(e,"s",(function(){return L})),n.d(e,"g",(function(){return I})),n.d(e,"h",(function(){return D})),n.d(e,"i",(function(){return P})),n.d(e,"p",(function(){return g})),n.d(e,"b",(function(){return m})),n.d(e,"j",(function(){return E})),n.d(e,"n",(function(){return q})),n.d(e,"e",(function(){return R})),n.d(e,"f",(function(){return M})),n.d(e,"a",(function(){return U})),n.d(e,"k",(function(){return H})),n.d(e,"l",(function(){return W})),n.d(e,"q",(function(){return V}));var r=n(0),i=n(2),o=function(){function t(t,e){this.value=t,this.copy=e,this.valueForReading=new r.d}return t.prototype.read=function(t){var e=this.value;return this.valueForReading.runWith(e,(function(){return t(e)}))},t.prototype.write=function(t){this.valueForReading.current()===this.value&&(this.value=this.copy(this.value)),t(this.value)},t}(),a=function(){function t(t){this.notifySubscribers=t,this.subscribersStore=new o([],(function(t){return t.slice()}))}return t.prototype.create=function(t,e){return void 0===e&&(e=0),new s(this.subscribersStore,t,e)},t.prototype.count=function(){return this.subscribersStore.read((function(t){return t.length}))},t.prototype.reset=function(){this.subscribersStore.write((function(t){t.length=0}))},t.prototype.notify=function(){var t=this;this.subscribersStore.read((function(e){return t.notifySubscribers(e)}))},t}(),s=function(){function t(t,e,n){void 0===n&&(n=0),this.subscriberStore=t,this.listener=e,this.rank=n,this.active=!1}return t.prototype.subscribeChanges=function(t){var e=this;this.stateReference=t,this.active||(this.subscriberStore.write((function(t){var n=Object(i.sortedIndex)(t,e,"rank");t.splice(n,0,e)})),this.active=!0),this.hasChanges()&&this.listener()},t.prototype.unsubscribe=function(){var t=this;this.active&&(this.subscriberStore.write((function(e){var n=e.indexOf(t);n>=0&&e.splice(n,1)})),this.active=!1)},t.prototype.notify=function(){this.active&&this.listener()},t.prototype.hasChanges=function(){return!!this.stateReference&&this.stateReference.hasChanges()},t}(),u=new a((function(t){t.forEach((function(t){t.hasChanges()&&t.notify()}))})),l=new a((function(t){t.forEach((function(t){Object(r.G)((function(){t.hasChanges()&&t.notify()}))}))})),c=function(){function t(){this.listenersStore=new o([],(function(t){return t.slice()}))}return t.prototype.subscribe=function(t){var e=this,n=!0,r=function(){n&&t()};return this.listenersStore.write((function(t){return t.push(r)})),function(){n=!1,e.listenersStore.write((function(t){var e=t.indexOf(r);t.splice(e,1)}))}},t.prototype.count=function(){return this.listenersStore.read((function(t){return t.length}))},t.prototype.clear=function(){this.listenersStore.write((function(t){t.length=0}))},t.prototype.notify=function(){this.listenersStore.read((function(t){return t.forEach((function(t){return t()}))}))},t}();function f(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&!function(t){var e=Object.getPrototypeOf(t);if(null===e)return!1;return null!==Object.getPrototypeOf(e)}(t)}function d(t,e){return t===e?e:f(e)?function(t,e){var n={},r=!1;void 0===t&&(r=!0);var i=Object.keys(e),o=new Set;t&&Object.keys(t).forEach((function(t){return o.add(t)}));o.size!==i.length&&(r=!0);return i.forEach((function(i){o.has(i)||(r=!0);var a=t?t[i]:void 0,s=d(a,e[i]);s!==a&&(r=!0),n[i]=s})),r?Object.freeze(n):t}(f(t)?t:void 0,e):Array.isArray(e)?function(t,e){var n=!1;void 0!==t&&t.length===e.length||(n=!0);var r=e.map((function(e,r){var i=t?t[r]:void 0,o=d(i,e);return o!==i&&(n=!0),o}));return n?Object.freeze(r):t}(Array.isArray(t)?t:void 0,e):e}var p,h,v,m,y,g,b,w=(p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),_=function(){function t(){}return t.prototype.get=function(){var t=this,e=this.untrackedGet();return this.recordDetector((function(){return e!==t.untrackedGet()})),e},t.prototype.recordDetector=function(t){this.getTree().recordDetector(t)},t.prototype.set=function(t){var e=this.untrackedGet(),n=d(e,t);n!==e&&this.uncheckedSet(n)},t.prototype.clear=function(){this.set(void 0)},t.prototype.subState=function(t){return new C(this,t)},t.prototype.reader=function(){return this},t.prototype.setSubState=function(t,e){var n,i=this.untrackedGet();if(void 0!==i){if(void 0===e){var o=Object.keys(i);if(1===o.length&&o[0]===t)return void this.uncheckedSet(void 0)}if(null===i)throw new r.g;var a=Object(r.n)({},i),s=a;void 0===e?delete s[t]:s[t]=e,this.uncheckedSet(Object.freeze(a))}else{var u=Object.freeze(((n={})[t]=e,n));this.uncheckedSet(u)}},t.prototype.getSubState=function(t){var e=this.untrackedGet();if(null!=e)return e[t]},t}(),O=function(){function t(t){this.detector=t}return t.prototype.hasChanges=function(){return this.detector()},t}(),k=function(t){function e(){var e=t.call(this)||this;return e.listeners=new c,e.detectorRecording=new r.d,e.batchUpdates=new r.d,e.version=0,e.frozenContextContainer=new r.d,e}return w(e,t),e.prototype.untrackedGet=function(){return this.state},e.prototype.withFrozenState=function(t,e){return this.frozenContextContainer.runWith(t,e)},e.prototype.failIfTracking=function(t){if(this.detectorRecording.current())throw new r.g(t)},e.prototype.failIfFrozen=function(t){var e=this.frozenContextContainer.current();if(e){var n=t+" is not permitted inside '"+e.contextName+"'. "+(e.message||"");throw new x(n)}},e.prototype.uncheckedSet=function(t){this.failIfFrozen("Changing state"),this.state=t,this.version++,this.insideBatchUpdate()||this.notifyListeners()},e.prototype.trackStateAccess=function(t){var e=this.trackChanges(t),n=e.detector;return{result:e.result,accessedState:new O(n)}},e.prototype.recordDetector=function(t){var e=this.detectorRecording.current();void 0!==e&&e.push(t)},e.prototype.getTree=function(){return this},e.prototype.id=function(){return""},e.prototype.subscribe=function(t){return this.listeners.subscribe(t)},e.prototype.withBatchedUpdates=function(t){var e=this.state;try{this.batchUpdates.runWith(!0,t)}finally{this.insideBatchUpdate()||e===this.state||this.notifyListeners()}},e.prototype.listenerCount=function(){return this.listeners.count()},e.prototype.clearListeners=function(){this.listeners.clear()},e.prototype.trackChanges=function(t){var e=this,n=this.version,r=this.recordDetectors(t),o=r.result,a=r.detectors;return{result:o,detector:function(){return e.version!==n&&!!Object(i.find)(a,(function(t){return t()}))}}},e.prototype.recordDetectors=function(t){var e=[],n=this.detectorRecording.runWith(e,t),r=this.detectorRecording.current();return void 0!==r&&r.push.apply(r,e),{result:n,detectors:e}},e.prototype.notifyListeners=function(){var t=this;this.withFrozenState({contextName:"state listeners"},(function(){t.listeners.notify()}))},e.prototype.insideBatchUpdate=function(){return!!this.batchUpdates.current()},e}(_),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e}(r.i),C=function(t){function e(e,n){var r=t.call(this)||this;return r.parentState=e,r.key=n,r.tree=e.getTree(),r}return w(e,t),e.prototype.getTree=function(){return this.tree},e.prototype.untrackedGet=function(){return this.parentState.getSubState(this.key)},e.prototype.uncheckedSet=function(t){this.parentState.setSubState(this.key,t)},e.prototype.id=function(){if(void 0===this.cachedId){var t=this.key.replace(/\\/g,"\\\\").replace(/\//g,"\\/");this.cachedId=this.parentState.id()+"/"+t}return this.cachedId},e}(_);function E(t){t?(h=void 0,v=t.stateController(),m=t.createAppState(),b=t.sharedCmsState(),y=m.subState("localCms")):(h=new k,v=h,m=T(),b=h.subState("sharedCms"),y=h.subState("localCms"),g=h.subState("ui")),B()}var j,S=0;function T(){if(!h)throw new r.g;var t=(S++).toString();return h.subState("apps").subState(t)}function A(t){return v.withBatchedUpdates(t)}function P(){return v}function N(t){return v.trackStateAccess(t)}function L(t,e){return v.withFrozenState(t,e)}function I(t){return v.failIfFrozen(t)}function D(t){return v.failIfTracking(t)}function R(t){return l.create(t)}function M(t,e){return void 0===e&&(e=0),u.create(t,e)}function B(){j=v.subscribe((function(){u.notify(),l.notify()}))}function q(){j&&j(),m.clear()}var F=[],z=function(){return 0!==F.length};function U(t){z()||Object(r.G)((function(){return A((function(){return function t(e){F=[];try{e.forEach((function(t){return t()}))}finally{z()&&t(F)}}(F)}))})),F.push(t)}function H(t,e){var n,i=!0,o=!1,a=R(s);function s(){if(i){var s=N((function(){return L({contextName:"observe",message:"Extract all side-effects into the listener function"},t)}));a.subscribeChanges(s.accessedState);var u=s.result;o&&Object(r.v)(u,n)||(e(u),n=u,o=!0)}}return Object(r.G)(s),{unsubscribe:function(){i=!1,a.unsubscribe()},forceRefresh:function(){Object(r.G)(s)}}}function W(t,e){var n=N((function(){return L({contextName:"observeSync",message:"Use non-sync observe or nextTick"},t)})),i=n.result,o=M((function(){var n=N(t);o.subscribeChanges(n.accessedState);var a=n.result;Object(r.v)(a,i)||(e(a),i=a)}));return o.subscribeChanges(n.accessedState),{initialValue:i,unsubscribe:function(){o.unsubscribe()}}}function V(t){return new r.j((function(e){var n=H(t,(function(t){null!=t&&(n.unsubscribe(),e(t))}))}))}},70:function(t,e){t.exports=function(t){return"string"==typeof t}},71:function(t,e){t.exports=function(t){return!0===t||!1===t}},72:function(t,e,n){var r=n(36),i=n(33);t.exports=r("Function",i)},73:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){this.ops=t};e.InlineGroup=o;var a=function(t){this.op=t},s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);e.VideoItem=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a);e.BlotBlock=u;var l=function(t,e){this.op=t,this.ops=e};e.BlockGroup=l;var c=function(t){this.items=t};e.ListGroup=c;var f=function(t,e){void 0===e&&(e=null),this.item=t,this.innerList=e};e.ListItem=f},744:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"alwaysShowOptionMarkers",(function(){return G.l})),n.d(r,"isFetchingActive",(function(){return O.g})),n.d(r,"enableForceVerification",(function(){return _e})),n.d(r,"currentPublicAuthorizationState",(function(){return Oe}));var i={};n.r(i),n.d(i,"Binary",(function(){return l.Binary})),n.d(i,"FutureBinary",(function(){return l.FutureBinary})),n.d(i,"ObjFacetValue",(function(){return N.a})),n.d(i,"load",(function(){return v.load})),n.d(i,"ArgumentError",(function(){return L.a})),n.d(i,"ScrivitoError",(function(){return L.i})),n.d(i,"configure",(function(){return zt})),n.d(i,"configureContentBrowser",(function(){return J})),n.d(i,"currentPage",(function(){return Qt.a})),n.d(i,"currentPageParams",(function(){return Qt.c})),n.d(i,"extendMenu",(function(){return re})),n.d(i,"updateMenuExtensions",(function(){return oe})),n.d(i,"renderPage",(function(){return fe})),n.d(i,"preload",(function(){return he})),n.d(i,"finishLoading",(function(){return ye.a})),n.d(i,"openDialog",(function(){return ge})),n.d(i,"isInPlaceEditingActive",(function(){return x.c})),n.d(i,"isEditorLoggedIn",(function(){return we})),n.d(i,"navigateTo",(function(){return W.a})),n.d(i,"provideEditingConfig",(function(){return V.b})),n.d(i,"urlFor",(function(){return q})),n.d(i,"useHistory",(function(){return m.f})),n.d(i,"unstable_selectSiteId",(function(){return H.e})),n.d(i,"BackgroundImageTag",(function(){return G.a})),n.d(i,"ChildListTag",(function(){return G.b})),n.d(i,"ContentTag",(function(){return G.c})),n.d(i,"CurrentPage",(function(){return G.d})),n.d(i,"ImageTag",(function(){return G.e})),n.d(i,"InPlaceEditingOff",(function(){return G.f})),n.d(i,"LinkTag",(function(){return G.g})),n.d(i,"NotFoundErrorPage",(function(){return G.h})),n.d(i,"RestoreInPlaceEditing",(function(){return G.j})),n.d(i,"WidgetTag",(function(){return G.k})),n.d(i,"connect",(function(){return G.m})),n.d(i,"provideComponent",(function(){return G.p})),n.d(i,"registerComponent",(function(){return G.q})),n.d(i,"Link",(function(){return xe})),n.d(i,"Obj",(function(){return Ce})),n.d(i,"ObjSearch",(function(){return Ee})),n.d(i,"Widget",(function(){return je})),n.d(i,"createObjClass",(function(){return Se})),n.d(i,"createWidgetClass",(function(){return Te})),n.d(i,"getClass",(function(){return Ae})),n.d(i,"provideObjClass",(function(){return Pe})),n.d(i,"provideWidgetClass",(function(){return Ne})),n.d(i,"_internal",(function(){return r}));var o=n(155),a=n(8),s=n(151),u=n(2),l=n(3);function c(t){if(!t)return t;switch(typeof t){case"string":case"number":case"boolean":return t;case"object":return t._scrivitoPrivateContent instanceof l.BasicObjSearch?c(t._scrivitoPrivateContent.params()):Object(u.isDate)(t)?t:Object(u.isArray)(t)?(e=[],t.forEach((function(t){var n=c(t);void 0!==n&&e.push(n)})),e):function(t){var e={};return Object(u.each)(t,(function(t,n){var r=c(t);void 0!==r&&(e[n]=r)})),e}(t)}var e}var f=n(14);var d=n(108),p=n(7),h=n(12),v=n(5),m=n(31),y=n(25),g=n(44);function b(t){var e;return Object(p.k)((function(){return Object(v.capture)(g.a).result}),(function(n){void 0!==n&&(void 0!==e&&function(t,e){if(Object(g.c)(t))return!!Object(g.c)(e)&&(t.objId===e.objId&&t.location===e.location);if(Object(g.c)(e))return!1;return Object(g.b)(t)===Object(g.b)(e)}(e,n)||(e=n,t(n)))}))}function w(t){if(Object(g.c)(t)){var e=t.location;Object(v.load)((function(){if(m.a()===e){var n=l.BasicObj.get(t.objId),r=y.c({obj:n});return h(e).path(r).toString()}})).then((function(t){if(t){var n=m.a();e===n&&t!==n&&m.e(t)}}))}}function _(t){(Object(g.c)(t)||Object(g.b)(t))&&window.scrollTo(0,0)}var O=n(9),k=n(11),x=n(18),C=n(17),E=n(37);function j(){var t=Object(C.b)();t.addEventListener("dragover",(function(t){return function(t){t.dataTransfer.dropEffect="move",t.preventDefault();var e={x:t.pageX,y:t.pageY};Object(E.a)().dragTo(e)}(t)})),t.addEventListener("drop",(function(){Object(E.a)().drop()}))}var S=n(42);function T(){Object(v.observeAndLoad)(A,(function(t){var e;t.allDataLoaded&&((e=t.result).workspaceId===Object(l.currentWorkspaceId)()&&e.inPlaceEditingActive===Object(x.c)()&&e.comparisonActive===Object(x.b)()||function(t){var e,n,r,i,o,a,s=(e=m.c(),r=(n=t).workspaceId,i=n.inPlaceEditingActive,o=n.comparisonActive,a={_scrivito_workspace_id:r},i?a._scrivito_editing="true":o&&(a._scrivito_comparison="true"),new h(e).removeSearch(["_scrivito_workspace_id","_scrivito_editing","_scrivito_comparison"]).addSearch(a));Object(S.d)(s.toString())}(e))}))}function A(){var t=Object(E.a)();return{workspaceId:t.currentWorkspaceId(),inPlaceEditingActive:t.isInPlaceEditingActive(),comparisonActive:t.isComparisonActive()}}window.scrivito||(window.scrivito={}),scrivito.registerEditor=d.b,scrivito.openContentBrowser=function(t){if(void 0===t&&(t={}),!f.b)throw new Error("Cannot open ContentBrowser without UI present");return f.b.openContentBrowser(c(t))};var P=n(154),N=n(10),L=n(0),I=n(87),D=n(115);function R(t,e){Object(L.D)(t+"/scrivito_editing.css",e),Object(L.E)(t+"/scrivito_editing.js",e)}var M,B=n(59);function q(t,e){for(var n,r,i=[],o=2;o=0||t.indexOf("Trident")>=0}function Tt(t,e){var n=t;if(!n._scrivitoResizeListeners){n._scrivitoResizeListeners=[],t.style.position="relative";var r=function(t){var e=document.createElement("object");return e.observedElement=t,e.type="text/html",e.onload=function(){return function(t){var e=t.contentDocument;if(!e)throw new L.g("Trigger object is missing the content document");var n=e.defaultView;n&&(n._scrivitoObservedElement=t.observedElement,n.addEventListener("resize",At))}(e)},e.style.display="block",e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.height="100%",e.style.width="100%",e.style.overflow="hidden",e.style.pointerEvents="none",e.style.zIndex="-1",e}(n);n._scrivitoResizeTrigger=r,St()&&t.appendChild(r),r.data="about:blank",St()||t.appendChild(r)}return n._scrivitoResizeListeners.push(e),function(){n._scrivitoResizeListeners.splice(n._scrivitoResizeListeners.indexOf(e),1)}}function At(t){var e=t.target||t.srcElement;if(!e)throw new L.g("Resize event is missing a target");if(function(t){return!!t._scrivitoObservedElement}(e)){var n=e._scrivitoObservedElement;n&&n._scrivitoResizeListeners.forEach((function(t){return t()}))}}function Pt(t){return function(t){return new v.LoadableData({state:p.b.subState("customComponentDimensions"),stream:new L.k((function(e){var n=function(){var n=t.getBoundingClientRect(),r=n.width,i=n.height;e.next({width:r,height:i})};return n(),Tt(t,n)}))})}(t).get()||null}function Nt(t){return function(t){return new v.LoadableData({state:p.b.subState("scrollPosition"),stream:new L.k((function(e){var n=function(){e.next({x:t.scrollLeft,y:t.scrollTop})};n();var r=window.setInterval(n,1e3);return function(){return window.clearInterval(r)}}))})}(t).get()||null}function Lt(){return new v.LoadableData({state:p.b.subState("applicationUrl"),stream:new L.k((function(t){var e=function(){return t.next(m.c())};e();var n=b(e);return function(){return n.unsubscribe()}}))}).get()||null}var It=function(){function t(){}return t.prototype.getContentBrowserConfiguration=function(t){return c(function(t){if(Z){var e={};t&&(e._validObjClasses=t);var n=Z(e);if(n)return{filters:n}}else if(Y)return{filters:Y}}(t))},t.prototype.titleForObj=function(t){return Rt("titleForContent",t)},t.prototype.descriptionForObj=function(t){return Rt("descriptionForContent",t)},t.prototype.executeCustomCommand=function(t){var e=function(t){var e=new xt(t);return kt().forEach((function(t){return t.call(null,e)})),e.onClickHandler()}(t);e&&e.call(null)},t.prototype.titleForWidget=function(t,e){return Object(wt.a)(t,e)},t.prototype.initializeContentForObj=function(t){Object(bt.b)(t)},t.prototype.initializeContentForWidget=function(t,e){Object(bt.c)(t,e)},t.prototype.getClasses=function(){var t=Object(Q.a)(),e=[];return Object(u.each)(t.allObjClasses(),(function(t,n){return e.push(function(t,e){var n=N.b.forClass(e);return Object(u.pick)({name:t,type:"Obj",attributes:Dt(n.attributes,Object(V.a)(t,"attributes")),description:Object(V.a)(t,"description"),hideInSelectionDialogs:Object(V.a)(t,"hideInSelectionDialogs"),properties:Object(V.a)(t,"properties"),propertiesGroups:Object(V.a)(t,"propertiesGroups"),thumbnail:Object(V.a)(t,"thumbnail"),title:Object(V.a)(t,"title")},u.identity)}(n,t))})),Object(u.each)(t.allWidgetClasses(),(function(t,n){return e.push(function(t,e){var n=N.b.forClass(e);return Object(u.pick)({name:t,type:"Widget",attributes:Dt(n.attributes,Object(V.a)(t,"attributes")),onlyInside:n.onlyInside,description:Object(V.a)(t,"description"),hideInSelectionDialogs:Object(V.a)(t,"hideInSelectionDialogs"),properties:Object(V.a)(t,"properties"),propertiesGroups:Object(V.a)(t,"propertiesGroups"),thumbnail:Object(V.a)(t,"thumbnail"),title:Object(V.a)(t,"title")},u.identity)}(n,t))})),e},t.prototype.navigateTo=function(t){Object(v.load)((function(){var e=l.BasicObj.get(t);if(e)return Object(N.f)(Object($.a)(),e)})).then((function(t){t&&Object(W.a)(t)}))},t.prototype.showCustomComponent=function(t,e){Object(G.r)(t,e)},t.prototype.urlFor=function(t){return Object(v.load)((function(){var e=l.BasicObj.getIncludingDeleted(t);return e?Object(B.b)(e):null}))},t.prototype.resolveUrl=function(t){return function(t){var e=h(t);return Object(v.load)((function(){return Object(y.g)(e)})).then((function(t){return t&&t.path?Object(u.include)(["/",""],t.path)?null:{obj:t.obj,url:e}:null}))}(t).then((function(t){if(!t||!t.obj)return null;var e=t.obj,n=t.url.fragment(),r=t.url.search(),i={obj_id:e.id()};return n&&(i.fragment=n),r&&(i.query=r),i}))},t.prototype.replaceInternalLinks=function(t){return Object(X.a)(t)},t.prototype.getHomepageId=function(){var t=Object(Ct.a)();return t?t.id():null},t.prototype.getSiteIdForObj=function(t){if(Object(H.f)()){var e=l.BasicObj.get(t);if(e)return Object(H.c)(e)}return null},t.prototype.getElementBoundaries=function(t){return Object(Et.a)(t)},t.prototype.getContentZoneData=function(){return Object(jt.a)()},t.prototype.getCustomComponentDimensions=function(){return Pt(Object(C.b)().querySelector("html"))},t.prototype.getScrollPosition=function(){return Nt(Object(C.b)().querySelector("html"))},t.prototype.getApplicationUrl=function(){return Lt()},t.prototype.getCurrentPageId=function(){return(t=Object(g.a)())&&Object(g.c)(t)?t.objId:null;var t},t}();function Dt(t,e){var n=Object(u.map)(t,(function(t,e){var n={name:e,type:t[0]};if(t.length>1){var r=t[1];"validClasses"in r&&r.validClasses&&(n.validClasses=r.validClasses),"values"in r&&r.values&&(n.values=r.values)}return n}));return e&&Object.keys(e).forEach((function(t){var r=Object(u.findWhere)(n,{name:t});if(r){var i=e[t],o=i.title,a=i.description,s=i.values;s?Object(u.extend)(r,{title:o,description:a,valuesLocalization:s}):Object(u.extend)(r,{title:o,description:a})}})),n}function Rt(t,e){var n=l.BasicObj.getIncludingDeleted(e);if(n){var r=Object(N.f)(Object($.a)(),n);return Object(K.a)(n.objClass(),t,r)}}var Mt=L.O.refinement(L.O.String,(function(t){return h(t).origin()===t})),Bt=L.O.struct({tenant:L.O.String,endpoint:L.O.maybe(L.O.String),homepage:L.O.maybe(L.O.Function),origin:L.O.maybe(Mt),routingBasePath:L.O.maybe(L.O.String),constraintsValidation:L.O.maybe(L.O.Function),unstable:L.O.maybe(L.O.Object)}),qt=Object(L.p)("configure",[["configuration",Bt]],{docPermalink:"js-sdk/configure"}),Ft=!1;function zt(t){for(var e=[],n=1;n0&&e<30?C.k(n,r-25):C.c()>r+C.e()&&e>C.e()-30&&C.k(n,r+25)})),(n=Object(C.b)().body).classList.add("scrivito_editing_active"),Object(x.c)()&&n.setAttribute("data-scrivito-editing",""),Object(x.b)()&&n.setAttribute("data-scrivito-comparison","")}var n;b(w),b(_),window.addEventListener("unload",(function(){Object(p.n)()}))}(Object(o.a)()),Object(P.a)()},76:function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(2),i=n(7),o=n(5),a=n(3),s=n(10),u=n(42),l=n(31),c=n(25),f=n(0),d=n(51),p=0;function h(t,e){for(var n=[],a=2;a0}function k(t,e,n){var r=n.params,i=n.authorization,o=n.forceVerification;return w?l.j.resolve(new XMLHttpRequest):(_+=1,new l.j((function(n,a){var s=function(t,e,n,r){var i=new XMLHttpRequest;function o(t){!function(t,e){_-=1,e(t)}(new m(t),r)}return i.open("POST"===t?"POST":"PUT",e),i.timeout=15e3,i.withCredentials=!0,i.onload=function(){return function(t,e,n){_-=1;var r=t.status;if(!r||!Object(c.isNumber)(r)){var i="Unexpected response status: "+r+"; body: "+(0===r?t.statusText:t.responseText);n(new m(i))}e(t)}(i,n,r)},i.onerror=function(){return o("XMLHttpRequest Error")},i.ontimeout=function(){return o("XMLHttpRequest Timeout")},i.onabort=function(){return o("XMLHttpRequest Aborted")},i}(t,e,n,a);i&&s.setRequestHeader("Authorization",i),s.setRequestHeader("Scrivito-Client","jssdk/"+Object(l.x)()),o&&s.setRequestHeader("Scrivito-Force-Verification","true"),s.setRequestHeader("Content-type","application/json; charset=utf-8"),s.send(JSON.stringify(r))})))}s={},window._scrivitoRegisterVerificator=function(t,e){s[t].resolve(e)};var x,C,E=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),j="client_verification_required";!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}E(e,t)}(y);function S(t){return t(A()).catch((function e(n){if(!function(t){return t instanceof y&&t.backendCode===j}(n))throw n;return function(t){if(!x){var e=t.verificator,n=t.data,r=(i=e.id,o=e.url,a=s[i],a||(a=new l.e,s[i]=a,Object(l.E)(o)),a.promise).then((function(t){return new l.j((function(e){t(n,(function(t){e((C=t).authorization)}))}))}));x={challenge:{verificator:e,data:n},promise:Object(l.J)(r,(function(){x=void 0}))}}var i,o,a;return x.promise}(n.details).then(t).catch(e)}))}function T(){x=void 0,C=void 0}function A(){if(C){if(!(C.expiresAfter19)throw new Error("Maximum number of rate limit retries reached");var i=Number(r.getResponseHeader("Retry-After"))||0,o=Math.max(1e3*i,M(n));return Object(l.T)(o).then((function(){return t(e,n+1)}))}))}((function(){return k(t,i,a)})).then(B)}return"POST"===t?s():function t(e,n){void 0===n&&(n=0);if(L)return new l.j((function(t){return t(e())}));return e().catch((function(r){if(r instanceof m){if(N&&n>5)throw r;var i=M(n);return Object(l.T)(i).then((function(){return t(e,n+1)}))}throw r}))}(s)},t.prototype.handleTask=function(t){var e=this;switch(t.status){case"success":return t.result;case"error":throw p.for(t.message,412,t.code);case"exception":throw new m(t.message);case"open":return Object(l.S)(2).then((function(){return e.get("tasks/"+t.id).then((function(t){return e.handleTask(t)}))}));default:throw new m("Invalid task response (unknown status)")}},t}();function M(t){return 500*Math.pow(2,Math.min(t,16))}function B(t){var e,n=t.status;try{e=JSON.parse(t.responseText)}catch(r){throw new m(t.responseText)}if(n>=200&&n<300)return e;var r=function(t,e,n){if("4"!==t.toString()[0])return 500===t&&q(e.error)?new m(e.error):new m(n);var r=function(t){var e=t.error,n=t.code,r=t.details;if(!q(e))throw F("key error is not a string");if(void 0!==n&&!q(n))throw F("optional key code is not a string");if(void 0!==r&&(i=r,"object"!=typeof i||Array.isArray(i)))throw F("optional key details is not an object");var i;return D({},t,{error:e,code:n,details:r})}(e);if(function(t){if("auth_missing"!==t.code)return!1;var e=t.details;return!!e&&"string"==typeof e.visit}(r)){var i=(o=r.details.visit,a=u.augmentedRedirectUrl(Object(I.f)()),o.replace("retry=RETRY","retry="+u.currentFailureCount()).replace(/\$RETURN_TO/,encodeURIComponent(a)));return new v(i)}var o,a;if(401===t)return new y(r.error,t,r.code,r.details);if(403===t){var s=r.code;return q(s)?new h(r.error,t,s):new m("Authentication failure response no string value for code")}return p.for(r.error,t,r.code)}(n,e,t.responseText);throw r instanceof v&&Object(I.i)(r.target),r}function q(t){return"string"==typeof t}function F(t){return new m("Malformed error response: "+t)}var z=new R;var U=new l.b((function(t){return z.get("blobs/mget",{blobs:t}).then((function(e){return e.results.map((function(e,n){return function(t,e){var n=e.public_access.get;if(!n.url)throw new l.g('Missing public access URL for binary "'+t+'"');var r={public_access:{get:{url:n.url}}},i=e.private_access;if(i){var o=i.get;o.url&&(r.private_access={get:{url:o.url}})}return r}(t[n].id,e)}))}))}));var H={};function W(t,e){return function(t){var e=H[t];e||(e=function(t){return new l.b((function(e){return z.get("workspaces/"+t+"/objs/mget",{ids:e,include_deleted:!0}).then((function(t){return t.results}))}),{batchSize:17})}(t),H[t]=e);return e}(t).retrieve(e).then((function(t){return t||{_deleted:e}}))}var V=function(){return(V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n1)for(var n=1;n(Number(t.attributes.indent)||0)},t.prototype.isInline=function(){return!(this.isContainerBlock()||this.isVideo()||this.isCustomBlock())},t.prototype.isCodeBlock=function(){return!!this.attributes["code-block"]},t.prototype.isJustNewline=function(){return this.insert.value===r.NewLine},t.prototype.isList=function(){return this.isOrderedList()||this.isBulletList()||this.isCheckedList()||this.isUncheckedList()},t.prototype.isOrderedList=function(){return this.attributes.list===r.ListType.Ordered},t.prototype.isBulletList=function(){return this.attributes.list===r.ListType.Bullet},t.prototype.isCheckedList=function(){return this.attributes.list===r.ListType.Checked},t.prototype.isUncheckedList=function(){return this.attributes.list===r.ListType.Unchecked},t.prototype.isACheckList=function(){return this.attributes.list==r.ListType.Unchecked||this.attributes.list===r.ListType.Checked},t.prototype.isSameListAs=function(t){return!!t.attributes.list&&(this.attributes.list===t.attributes.list||t.isACheckList()&&this.isACheckList())},t.prototype.isText=function(){return this.insert.type===r.DataType.Text},t.prototype.isImage=function(){return this.insert.type===r.DataType.Image},t.prototype.isFormula=function(){return this.insert.type===r.DataType.Formula},t.prototype.isVideo=function(){return this.insert.type===r.DataType.Video},t.prototype.isLink=function(){return this.isText()&&!!this.attributes.link},t.prototype.isCustom=function(){return this.insert instanceof i.InsertDataCustom},t.prototype.isCustomBlock=function(){return this.isCustom()&&!!this.attributes.renderAsBlock},t.prototype.isMentions=function(){return this.isText()&&!!this.attributes.mentions},t}();e.DeltaInsertOp=o},99:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){this.type=t,this.value=e};e.InsertDataQuill=r;var i=function(t,e){this.type=t,this.value=e};e.InsertDataCustom=i}});