(()=>{var t={5504(t){"use strict";t.exports=window.lodash.debounce},9404(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return s(t)?t:U(t)}function r(t){return a(t)?t:W(t)}function i(t){return u(t)?t:N(t)}function o(t){return s(t)&&!c(t)?t:H(t)}function s(t){return!(!t||!t[l])}function a(t){return!(!t||!t[h])}function u(t){return!(!t||!t[p])}function c(t){return a(t)||u(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=s,n.isKeyed=a,n.isIndexed=u,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var l="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v="delete",_=32,y=31,g={},m={value:!1},b={value:!1};function w(t){return t.value=!1,t}function S(t){t&&(t.value=!0)}function E(){}function O(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?x(t)+e:e}function z(){return!0}function M(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function D(t,e){return k(t,e,0)}function C(t,e){return k(t,e,e)}function k(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var R="function"==typeof Symbol&&Symbol.iterator,A="@@iterator",q=R||A;function j(t){this.next=t}function P(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function T(t){return!!V(t)}function F(t){return t&&"function"==typeof t.next}function K(t){var e=V(t);return e&&e.call(t)}function V(t){var e=t&&(R&&t[R]||t[A]);if("function"==typeof e)return e}function L(t){return t&&"number"==typeof t.length}function U(t){return null==t?nt():s(t)?t.toSeq():function(t){var e=ot(t)||"object"==typeof t&&new Q(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function W(t){return null==t?nt().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():rt(t)}function N(t){return null==t?nt():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():it(t)}function H(t){return(null==t?nt():s(t)?a(t)?t.entrySeq():t:it(t)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=0,j.VALUES=1,j.ENTRIES=2,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[q]=function(){return this},e(U,n),U.of=function(){return U(arguments)},U.prototype.toSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq {","}")},U.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},U.prototype.__iterate=function(t,e){return st(this,t,e,!0)},U.prototype.__iterator=function(t,e){return at(this,t,e,!0)},e(W,U),W.prototype.toKeyedSeq=function(){return this},e(N,U),N.of=function(){return N(arguments)},N.prototype.toIndexedSeq=function(){return this},N.prototype.toString=function(){return this.__toString("Seq [","]")},N.prototype.__iterate=function(t,e){return st(this,t,e,!1)},N.prototype.__iterator=function(t,e){return at(this,t,e,!1)},e(H,U),H.of=function(){return H(arguments)},H.prototype.toSetSeq=function(){return this},U.isSeq=et,U.Keyed=W,U.Set=H,U.Indexed=N;var J,$,Y,X="@@__IMMUTABLE_SEQ__@@";function G(t){this._array=t,this.size=t.length}function Q(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function Z(t){this._iterable=t,this.size=t.length||t.size}function tt(t){this._iterator=t,this._iteratorCache=[]}function et(t){return!(!t||!t[X])}function nt(){return J||(J=new G([]))}function rt(t){var e=Array.isArray(t)?new G(t).fromEntrySeq():F(t)?new tt(t).fromEntrySeq():T(t)?new Z(t).fromEntrySeq():"object"==typeof t?new Q(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function it(t){var e=ot(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ot(t){return L(t)?new G(t):F(t)?new tt(t):T(t)?new Z(t):void 0}function st(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[n?o-s:s];if(!1===e(a[1],r?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,n)}function at(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new j(function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:P(e,r?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,n)}function ut(t,e){return e?ct(e,t,"",{"":t}):ft(t)}function ct(t,e,n,r){return Array.isArray(e)?t.call(r,n,N(e).map(function(n,r){return ct(t,n,r,e)})):lt(e)?t.call(r,n,W(e).map(function(n,r){return ct(t,n,r,e)})):e}function ft(t){return Array.isArray(t)?N(t).map(ft).toList():lt(t)?W(t).map(ft).toMap():t}function lt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function ht(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function pt(t,e){if(t===e)return!0;if(!s(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&ht(i[1],t)&&(n||ht(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var l=!0,h=e.__iterate(function(e,r){if(n?!t.has(e):i?!ht(e,t.get(r,g)):!ht(t.get(r,g),e))return l=!1,!1});return l&&t.size===h}function dt(t,e){if(!(this instanceof dt))return new dt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if($)return $;$=this}}function vt(t,e){if(!t)throw new Error(e)}function _t(t,e,n){if(!(this instanceof _t))return new _t(t,e,n);if(vt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),er?{value:void 0,done:!0}:P(t,i,n[e?r-i++:i++])})},e(Q,W),Q.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},Q.prototype.has=function(t){return this._object.hasOwnProperty(t)},Q.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var s=r[e?i-o:o];if(!1===t(n[s],s,this))return o+1}return o},Q.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new j(function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:P(t,s,n[s])})},Q.prototype[d]=!0,e(Z,N),Z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=K(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},Z.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=K(this._iterable);if(!F(n))return new j(B);var r=0;return new j(function(){var e=n.next();return e.done?e:P(t,r++,e.value)})},e(tt,N),tt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return P(t,i,r[i++])})},e(dt,N),dt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},dt.prototype.get=function(t,e){return this.has(t)?this._value:e},dt.prototype.includes=function(t){return ht(this._value,t)},dt.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:new dt(this._value,C(e,n)-D(t,n))},dt.prototype.reverse=function(){return this},dt.prototype.indexOf=function(t){return ht(this._value,t)?0:-1},dt.prototype.lastIndexOf=function(t){return ht(this._value,t)?this.size:-1},dt.prototype.__iterate=function(t,e){for(var n=0;n1?" by "+this._step:"")+" ]"},_t.prototype.get=function(t,e){return this.has(t)?this._start+I(this,t)*this._step:e},_t.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e=0&&nn?{value:void 0,done:!0}:P(t,o++,s)})},_t.prototype.equals=function(t){return t instanceof _t?this._start===t._start&&this._end===t._end&&this._step===t._step:pt(this,t)},e(yt,n),e(gt,yt),e(mt,yt),e(bt,yt),yt.Keyed=gt,yt.Indexed=mt,yt.Set=bt;var wt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function St(t){return t>>>1&1073741824|3221225471&t}function Et(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return St(n)}if("string"===e)return t.length>kt?function(t){var e=qt[t];return void 0===e&&(e=Ot(t),At===Rt&&(At=0,qt={}),At++,qt[t]=e),e}(t):Ot(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Mt&&void 0!==(e=zt.get(t)))return e;if(void 0!==(e=t[Ct]))return e;if(!It){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ct]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++Dt,1073741824&Dt&&(Dt=0),Mt)zt.set(t,e);else{if(void 0!==xt&&!1===xt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(It)Object.defineProperty(t,Ct,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ct]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ct]=e}}return e}(t);if("function"==typeof t.toString)return Ot(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ot(t){for(var e=0,n=0;n>>n)&y,a=(0===n?r:r>>>n)&y;return new Lt(e,1<>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function ae(t,e,n,r){var i=r?t:O(t);return i[e]=n,i}Kt[Ft]=!0,Kt[v]=Kt.remove,Kt.removeIn=Kt.deleteIn,Vt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o=ue)return function(t,e,n,r){t||(t=new E);for(var i=new Nt(t,Et(n),[n,r]),o=0;o>>t)&y),o=this.bitmap;return 0===(o&i)?r:this.nodes[se(o&i-1)].get(t+5,e,n,r)},Lt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=Et(r));var a=(0===e?n:n>>>e)&y,u=1<=ce)return function(t,e,n,r,i){for(var o=0,s=new Array(_),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Ut(t,o+1,s)}(t,h,c,a,d);if(f&&!d&&2===h.length&&Zt(h[1^l]))return h[1^l];if(f&&d&&1===h.length&&Zt(d))return d;var v=t&&t===this.ownerID,m=f?d?c:c^u:c|u,b=f?d?ae(h,l,d,v):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,s=0;s>>t)&y,o=this.nodes[i];return o?o.get(t+5,e,n,r):r},Ut.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=Et(r));var a=(0===e?n:n>>>e)&y,u=i===g,c=this.nodes,f=c[a];if(u&&!f)return this;var l=Qt(f,t,e+5,n,r,i,o,s);if(l===f)return this;var h=this.count;if(f){if(!l&&--h0&&r<_?be(0,r,5,null,new ve(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function he(t){return!(!t||!t[pe])}e(le,mt),le.of=function(){return this(arguments)},le.prototype.toString=function(){return this.__toString("List [","]")},le.prototype.get=function(t,e){if((t=I(this,t))>=0&&t=t.size||e<0)return t.withMutations(function(t){e<0?xe(t,e).set(0,n):xe(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=w(b);return e>=ze(t._capacity)?r=Se(r,t.__ownerID,0,e,n,o):i=Se(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):be(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},le.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},le.prototype.insert=function(t,e){return this.splice(t,0,e)},le.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):we()},le.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){xe(n,0,e+t.length);for(var r=0;r>>e&y;if(r>=this.array.length)return new ve([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-5,n))===s&&o)return this}if(o&&!i)return this;var a=Ee(this,t);if(!o)for(var u=0;u>>e&y;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-5,n))===o&&i===this.array.length-1)return this}var s=Ee(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var _e,ye,ge={};function me(t,e){var n=t._origin,r=t._capacity,i=ze(r),o=t._tail;return s(t._root,t._level,0);function s(t,a,u){return 0===a?function(t,s){var a=s===i?o&&o.array:t&&t.array,u=s>n?0:n-s,c=r-s;return c>_&&(c=_),function(){if(u===c)return ge;var t=e?--c:u++;return a&&a[t]}}(t,u):function(t,i,o){var a,u=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);return f>_&&(f=_),function(){for(;;){if(a){var t=a();if(t!==ge)return t;a=null}if(c===f)return ge;var n=e?--f:c++;a=s(u&&u[n],i-5,o+(n<>>n&y,u=t&&a0){var c=t&&t.array[a],f=Se(c,e,n-5,r,i,o);return f===c?t:((s=Ee(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(S(o),s=Ee(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Ee(t,e){return e&&t&&e===t.ownerID?t:new ve(t?t.array.slice():[],e)}function Oe(t,e){if(e>=ze(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&y],r-=5;return n}}function xe(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new E,i=t._origin,o=t._capacity,s=i+e,a=void 0===n?o:n<0?o+n:i+n;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var u=t._level,c=t._root,f=0;s+f<0;)c=new ve(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(s+=f,i+=f,a+=f,o+=f);for(var l=ze(o),h=ze(a);h>=1<l?new ve([],r):p;if(p&&h>l&&s5;_-=5){var g=l>>>_&y;v=v.array[g]=Ee(v.array[g],r)}v.array[l>>>5&y]=p}if(a=h)s-=h,a-=h,u=5,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||h>>u&y;if(m!==h>>>u&y)break;m&&(f+=(1<i&&(c=c.removeBefore(r,u,s-f)),c&&ho&&(o=c.size),s(u)||(c=c.map(function(t){return ut(t)})),r.push(c)}return o>t.size&&(t=t.setSize(o)),ie(t,e,r)}function ze(t){return t<_?0:t-1>>>5<<5}function Me(t){return null==t?ke():De(t)?t:ke().withMutations(function(e){var n=r(t);jt(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function De(t){return Bt(t)&&f(t)}function Ce(t,e,n,r){var i=Object.create(Me.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function ke(){return ye||(ye=Ce(Xt(),we()))}function Re(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===g){if(!u)return t;s.size>=_&&s.size>=2*o.size?(r=(i=s.filter(function(t,e){return void 0!==t&&a!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(u){if(n===s.get(a)[1])return t;r=o,i=s.set(a,[e,n])}else r=o.set(e,s.size),i=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ce(r,i)}function Ae(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function qe(t){this._iter=t,this.size=t.size}function je(t){this._iter=t,this.size=t.size}function Pe(t){this._iter=t,this.size=t.size}function Be(t){var e=Qe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ze,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(2===e){var r=t.__iterator(e,n);return new j(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(1===e?0:1,n)},e}function Te(t,e,n){var r=Qe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,g);return o===g?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,s){return!1!==r(e.call(n,t,i,s),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(2,i);return new j(function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return P(r,a,e.call(n,s[1],a,t),i)})},r}function Fe(t,e){var n=Qe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Be(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Ze,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function Ke(t,e,n,r){var i=Qe(t);return r&&(i.has=function(r){var i=t.get(r,g);return i!==g&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,g);return o!==g&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate(function(t,o,u){if(e.call(n,t,o,u))return a++,i(t,r?o:a-1,s)},o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(2,o),a=0;return new j(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return P(i,r?c:a++,f,o)}})},i}function Ve(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n|=0),M(e,n,i))return t;var o=D(e,i),s=C(n,i);if(o!=o||s!=s)return Ve(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=Qe(t);return c.size=0===a?a:t.size&&a||void 0,!r&&et(t)&&a>=0&&(c.get=function(e,n){return(e=I(this,e))>=0&&ea)return{value:void 0,done:!0};var t=i.next();return r||1===e?t:P(e,u-1,0===e?void 0:t.value[1],t)})},c}function Le(t,e,n,r){var i=Qe(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate(function(t,o,c){if(!a||!(a=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,s)}),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(2,o),u=!0,c=0;return new j(function(){var t,o,f;do{if((t=a.next()).done)return r||1===i?t:P(i,c++,0===i?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],u&&(u=e.call(n,f,o,s))}while(u);return 2===i?t:P(i,o,f,t)})},i}function Ue(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,i){var o=0,a=!1;return function t(u,c){var f=this;u.__iterate(function(i,u){return(!e||c0}function Je(t,e,r){var i=Qe(t);return i.size=new G(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=n(t),K(i?t.reverse():t)}),s=0,a=!1;return new j(function(){var n;return a||(n=o.map(function(t){return t.next()}),a=n.some(function(t){return t.done})),a?{value:void 0,done:!0}:P(t,s++,e.apply(null,n.map(function(t){return t.value})))})},i}function $e(t,e){return et(t)?e:t.constructor(e)}function Ye(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Xe(t){return jt(t.size),x(t)}function Ge(t){return a(t)?r:u(t)?i:o}function Qe(t){return Object.create((a(t)?W:u(t)?N:H).prototype)}function Ze(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function tn(t,e){return t>e?1:t=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Mn(t,e)},En.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;jt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mn(e,n)},En.prototype.pop=function(){return this.slice(1)},En.prototype.unshift=function(){return this.push.apply(this,arguments)},En.prototype.unshiftAll=function(t){return this.pushAll(t)},En.prototype.shift=function(){return this.pop.apply(this,arguments)},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dn()},En.prototype.slice=function(t,e){if(M(t,e,this.size))return this;var n=D(t,this.size);if(C(e,this.size)!==this.size)return mt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Mn(r,i)},En.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Mn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},En.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},En.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new j(function(){if(r){var e=r.value;return r=r.next,P(t,n++,e)}return{value:void 0,done:!0}})},En.isStack=On;var xn,In="@@__IMMUTABLE_STACK__@@",zn=En.prototype;function Mn(t,e,n,r){var i=Object.create(zn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Dn(){return xn||(xn=Mn(0))}function Cn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}zn[In]=!0,zn.withMutations=Kt.withMutations,zn.asMutable=Kt.asMutable,zn.asImmutable=Kt.asImmutable,zn.wasAltered=Kt.wasAltered,n.Iterator=j,Cn(n,{toArray:function(){jt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new qe(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new Ae(this,!0)},toMap:function(){return Pt(this.toKeyedSeq())},toObject:function(){jt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Me(this.toKeyedSeq())},toOrderedSet:function(){return yn(a(this)?this.valueSeq():this)},toSet:function(){return un(a(this)?this.valueSeq():this)},toSetSeq:function(){return new je(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(a(this)?this.valueSeq():this)},toList:function(){return le(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return $e(this,function(t,e){var n=a(t),i=[t].concat(e).map(function(t){return s(t)?n&&(t=r(t)):t=n?rt(t):it(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||n&&a(o)||u(t)&&u(o))return o}var c=new G(i);return n?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}(this,t.call(arguments,0)))},includes:function(t){return this.some(function(e){return ht(e,t)})},entries:function(){return this.__iterator(2)},every:function(t,e){jt(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return $e(this,Ke(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},findEntry:function(t,e){var n;return this.__iterate(function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1}),n},findLastEntry:function(t,e){return this.toSeq().reverse().findEntry(t,e)},forEach:function(t,e){return jt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){jt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!=r?r.toString():""}),e},keys:function(){return this.__iterator(0)},map:function(t,e){return $e(this,Te(this,t,e))},reduce:function(t,e,n){var r,i;return jt(this.size),arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,s){i?(i=!1,r=e):r=t.call(n,r,e,o,s)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return $e(this,Fe(this,!0))},slice:function(t,e){return $e(this,Ve(this,t,e,!0))},some:function(t,e){return!this.every(jn(t),e)},sort:function(t){return $e(this,We(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return x(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Pt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}(this,t,e)},equals:function(t){return pt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new G(t._cache);var e=t.toSeq().map(qn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(jn(t),e)},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},first:function(){return this.find(z)},flatMap:function(t,e){return $e(this,function(t,e,n){var r=Ge(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}(this,t,e))},flatten:function(t){return $e(this,Ue(this,t,!0))},fromEntrySeq:function(){return new Pe(this)},get:function(t,e){return this.find(function(e,n){return ht(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=en(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,g):g)===g)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?Me():Pt()).asMutable();t.__iterate(function(o,s){i.update(e.call(n,o,s,t),function(t){return(t=t||[]).push(r?[s,o]:o),t})});var o=Ge(t);return i.map(function(e){return $e(t,o(e))})}(this,t,e)},has:function(t){return this.get(t,g)!==g},hasIn:function(t){return this.getIn(t,g)!==g},isSubset:function(t){return t="function"==typeof t.includes?t:n(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:n(t)).isSubset(this)},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(t){return Ne(this,t)},maxBy:function(t,e){return Ne(this,e,t)},min:function(t){return Ne(this,t?Pn(t):Fn)},minBy:function(t,e){return Ne(this,e?Pn(e):Fn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return $e(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return $e(this,Le(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(jn(t),e)},sortBy:function(t,e){return $e(this,We(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return $e(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return $e(this,function(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++s&&r(t,i,o)}),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=t.__iterator(2,i),a=!0;return new j(function(){if(!a)return{value:void 0,done:!0};var t=s.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?2===r?t:P(r,u,c,t):(a=!1,{value:void 0,done:!0})})},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(jn(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),n=a(t),r=e?1:0;return function(t,e){return e=wt(e,3432918353),e=wt(e<<15|e>>>-15,461845907),e=wt(e<<13|e>>>-13,5),e=wt((e=(e+3864292196|0)^t)^e>>>16,2246822507),St((e=wt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Kn(Et(t),Et(e))|0}:function(t,e){r=r+Kn(Et(t),Et(e))|0}:e?function(t){r=31*r+Et(t)|0}:function(t){r=r+Et(t)|0}),r)}(this))}});var kn=n.prototype;kn[l]=!0,kn[q]=kn.values,kn.__toJS=kn.toArray,kn.__toStringMapper=Bn,kn.inspect=kn.toSource=function(){return this.toString()},kn.chain=kn.flatMap,kn.contains=kn.includes,function(){try{Object.defineProperty(kn,"length",{get:function(){if(!n.noLengthWarning){var t;try{throw new Error}catch(e){t=e.stack}if(-1===t.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+t),this.size}}})}catch(t){}}(),Cn(r,{flip:function(){return $e(this,Be(this))},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLastKey:function(t,e){return this.toSeq().reverse().findKey(t,e)},keyOf:function(t){return this.findKey(function(e){return ht(e,t)})},lastKeyOf:function(t){return this.findLastKey(function(e){return ht(e,t)})},mapEntries:function(t,e){var n=this,r=0;return $e(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return $e(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var Rn=r.prototype;function An(t,e){return e}function qn(t,e){return[e,t]}function jn(t){return function(){return!t.apply(this,arguments)}}function Pn(t){return function(){return-t.apply(this,arguments)}}function Bn(t){return"string"==typeof t?JSON.stringify(t):t}function Tn(){return O(arguments)}function Fn(t,e){return te?-1:0}function Kn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return Rn[h]=!0,Rn[q]=kn.entries,Rn.__toJS=kn.toObject,Rn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Bn(t)},Cn(i,{toKeyedSeq:function(){return new Ae(this,!1)},filter:function(t,e){return $e(this,Ke(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.toKeyedSeq().keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.toKeyedSeq().reverse().keyOf(t);return void 0===e?-1:e},reverse:function(){return $e(this,Fe(this,!1))},slice:function(t,e){return $e(this,Ve(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=D(t,t<0?this.count():this.size);var r=this.slice(0,t);return $e(this,1===n?r:r.concat(O(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.toKeyedSeq().findLastKey(t,e);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(t){return $e(this,Ue(this,t,!1))},get:function(t,e){return(t=I(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=I(this,t))>=0&&(void 0!==this.size?this.size===1/0||tc});var r=n(20345),i=n(18136),o=/\n/g;function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t.replace(o,e)}function a(t){return t.set("entity",null)}var u={stripEntities:!0};const c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},u,t),{blockRenderMap:(0,r.Map)({unstyled:{element:"div"}}),onChange:function(e){var n=e.getCurrentContent().getBlocksAsArray();if(n.length>1)e=function(t,e,n){e=e||t.getCurrentContent().getBlocksAsArray();var o=(0,r.List)(),u=(0,r.List)();e.forEach(function(t){"atomic"!==t.getType()&&(o=o.push(s(t.getText())),u=u.concat(t.getCharacterList()))}),n.stripEntities&&(u=u.map(a));var c=new i.ContentBlock({key:(0,i.genKey)(),text:o.join(""),type:"unstyled",characterList:u,depth:0}),f=i.ContentState.createFromBlockArray([c]);return t=i.EditorState.push(t,f,"remove-range"),i.EditorState.moveFocusToEnd(t)}(e,n,t);else{var u=n[0],c=u.getText(),f=u.getCharacterList(),l=t.stripEntities&&function(t){var e=!1;return t.forEach(function(t){null!==t.get("entity")&&(e=!0)}),e}(f);if(o.test(c)||l){c=s(c),t.stripEntities&&(f=f.map(a)),u=new i.ContentBlock({key:(0,i.genKey)(),text:c,type:"unstyled",characterList:f,depth:0});var h=i.ContentState.createFromBlockArray([u]);e=i.EditorState.push(e,h,"insert-characters")}}return e},handleReturn:function(t){return"handled"}}}},11918(t,e,n){"use strict";n.r(e),n.d(e,{MentionSuggestions:()=>Gt,Popover:()=>$t,addMention:()=>Tt,default:()=>ie,defaultSuggestionsFilter:()=>oe,defaultTheme:()=>te});var r=n(9404),i=n(51609),o=n.n(i);function s(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(e=0;e0&&S(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&S(r.height)/t.offsetHeight||1);var s=(y(t)?_(t):window).visualViewport,a=!O()&&n,u=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,f=r.width/i,l=r.height/o;return{width:f,height:l,top:c,right:u+f,bottom:c+l,left:u,x:u,y:c}}function I(t){var e=_(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function z(t){return t?(t.nodeName||"").toLowerCase():null}function M(t){return((y(t)?t.ownerDocument:t.document)||window.document).documentElement}function D(t){return x(M(t)).left+I(t).scrollLeft}function C(t){return _(t).getComputedStyle(t)}function k(t){var e=C(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function R(t,e,n){void 0===n&&(n=!1);var r,i,o=g(e),s=g(e)&&function(t){var e=t.getBoundingClientRect(),n=S(e.width)/t.offsetWidth||1,r=S(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),a=M(e),u=x(t,s,n),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(o||!o&&!n)&&(("body"!==z(e)||k(a))&&(c=(r=e)!==_(r)&&g(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:I(r)),g(e)?((f=x(e,!0)).x+=e.clientLeft,f.y+=e.clientTop):a&&(f.x=D(a))),{x:u.left+c.scrollLeft-f.x,y:u.top+c.scrollTop-f.y,width:u.width,height:u.height}}function A(t){var e=x(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function q(t){return"html"===z(t)?t:t.assignedSlot||t.parentNode||(m(t)?t.host:null)||M(t)}function j(t){return["html","body","#document"].indexOf(z(t))>=0?t.ownerDocument.body:g(t)&&k(t)?t:j(q(t))}function P(t,e){var n;void 0===e&&(e=[]);var r=j(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=_(r),s=i?[o].concat(o.visualViewport||[],k(r)?r:[]):r,a=e.concat(s);return i?a:a.concat(P(q(s)))}function B(t){return["table","td","th"].indexOf(z(t))>=0}function T(t){return g(t)&&"fixed"!==C(t).position?t.offsetParent:null}function F(t){for(var e=_(t),n=T(t);n&&B(n)&&"static"===C(n).position;)n=T(n);return n&&("html"===z(n)||"body"===z(n)&&"static"===C(n).position)?e:n||function(t){var e=/firefox/i.test(E());if(/Trident/i.test(E())&&g(t)&&"fixed"===C(t).position)return null;var n=q(t);for(m(n)&&(n=n.host);g(n)&&["html","body"].indexOf(z(n))<0;){var r=C(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var K="top",V="bottom",L="right",U="left",W="auto",N=[K,V,L,U],H="start",J="end",$="viewport",Y="popper",X=N.reduce(function(t,e){return t.concat([e+"-"+H,e+"-"+J])},[]),G=[].concat(N,[W]).reduce(function(t,e){return t.concat([e,e+"-"+H,e+"-"+J])},[]),Q=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Z(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}}),r.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||i(t)}),r}var tt={placement:"bottom",modifiers:[],strategy:"absolute"};function et(){for(var t=arguments.length,e=new Array(t),n=0;n=0?"x":"y"}function at(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?it(i):null,s=i?ot(i):null,a=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case K:e={x:a,y:n.y-r.height};break;case V:e={x:a,y:n.y+n.height};break;case L:e={x:n.x+n.width,y:u};break;case U:e={x:n.x-r.width,y:u};break;default:e={x:n.x,y:n.y}}var c=o?st(o):null;if(null!=c){var f="y"===c?"height":"width";switch(s){case H:e[c]=e[c]-(n[f]/2-r[f]/2);break;case J:e[c]=e[c]+(n[f]/2-r[f]/2)}}return e}var ut={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ct(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,a=t.position,u=t.gpuAcceleration,c=t.adaptive,f=t.roundOffsets,l=t.isFixed,h=s.x,p=void 0===h?0:h,d=s.y,v=void 0===d?0:d,y="function"==typeof f?f({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var g=s.hasOwnProperty("x"),m=s.hasOwnProperty("y"),b=U,w=K,E=window;if(c){var O=F(n),x="clientHeight",I="clientWidth";O===_(n)&&"static"!==C(O=M(n)).position&&"absolute"===a&&(x="scrollHeight",I="scrollWidth"),(i===K||(i===U||i===L)&&o===J)&&(w=V,v-=(l&&O===E&&E.visualViewport?E.visualViewport.height:O[x])-r.height,v*=u?1:-1),i!==U&&(i!==K&&i!==V||o!==J)||(b=L,p-=(l&&O===E&&E.visualViewport?E.visualViewport.width:O[I])-r.width,p*=u?1:-1)}var z,D=Object.assign({position:a},c&&ut),k=!0===f?function(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:S(n*i)/i||0,y:S(r*i)/i||0}}({x:p,y:v},_(n)):{x:p,y:v};return p=k.x,v=k.y,u?Object.assign({},D,((z={})[w]=m?"0":"",z[b]=g?"0":"",z.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",z)):Object.assign({},D,((e={})[w]=m?v+"px":"",e[b]=g?p+"px":"",e.transform="",e))}var ft={left:"right",right:"left",bottom:"top",top:"bottom"};function lt(t){return t.replace(/left|right|bottom|top/g,function(t){return ft[t]})}var ht={start:"end",end:"start"};function pt(t){return t.replace(/start|end/g,function(t){return ht[t]})}function dt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&m(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function vt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function _t(t,e,n){return e===$?vt(function(t,e){var n=_(t),r=M(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,u=0;if(i){o=i.width,s=i.height;var c=O();(c||!c&&"fixed"===e)&&(a=i.offsetLeft,u=i.offsetTop)}return{width:o,height:s,x:a+D(t),y:u}}(t,n)):y(e)?function(t,e){var n=x(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):vt(function(t){var e,n=M(t),r=I(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=b(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=b(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+D(t),u=-r.scrollTop;return"rtl"===C(i||n).direction&&(a+=b(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:u}}(M(t)))}function yt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function gt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function mt(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,u=void 0===a?"clippingParents":a,c=n.rootBoundary,f=void 0===c?$:c,l=n.elementContext,h=void 0===l?Y:l,p=n.altBoundary,d=void 0!==p&&p,v=n.padding,_=void 0===v?0:v,m=yt("number"!=typeof _?_:gt(_,N)),S=h===Y?"reference":Y,E=t.rects.popper,O=t.elements[d?S:h],I=function(t,e,n,r){var i="clippingParents"===e?function(t){var e=P(q(t)),n=["absolute","fixed"].indexOf(C(t).position)>=0&&g(t)?F(t):t;return y(n)?e.filter(function(t){return y(t)&&dt(t,n)&&"body"!==z(t)}):[]}(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(e,n){var i=_t(t,n,r);return e.top=b(i.top,e.top),e.right=w(i.right,e.right),e.bottom=w(i.bottom,e.bottom),e.left=b(i.left,e.left),e},_t(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(y(O)?O:O.contextElement||M(t.elements.popper),u,f,s),D=x(t.elements.reference),k=at({reference:D,element:E,strategy:"absolute",placement:i}),R=vt(Object.assign({},E,k)),A=h===Y?R:D,j={top:I.top-A.top+m.top,bottom:A.bottom-I.bottom+m.bottom,left:I.left-A.left+m.left,right:A.right-I.right+m.right},B=t.modifiersData.offset;if(h===Y&&B){var T=B[i];Object.keys(j).forEach(function(t){var e=[L,V].indexOf(t)>=0?1:-1,n=[K,V].indexOf(t)>=0?"y":"x";j[t]+=T[n]*e})}return j}function bt(t,e,n){return b(t,w(e,n))}function wt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function St(t){return[K,L,V,U].some(function(e){return t[e]>=0})}var Et=nt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,u=_(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",n.update,rt)}),a&&u.addEventListener("resize",n.update,rt),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",n.update,rt)}),a&&u.removeEventListener("resize",n.update,rt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=at({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,u=void 0===a||a,c={placement:it(e.placement),variation:ot(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ct(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:u})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ct(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];g(i)&&z(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});g(r)&&z(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(t){r.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,s=G.reduce(function(t,n){return t[n]=function(t,e,n){var r=it(t),i=[U,K].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[U,L].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,o),t},{}),a=s[e.placement],u=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,u=n.fallbackPlacements,c=n.padding,f=n.boundary,l=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,d=void 0===p||p,v=n.allowedAutoPlacements,_=e.options.placement,y=it(_),g=u||(y!==_&&d?function(t){if(it(t)===W)return[];var e=lt(t);return[pt(t),e,pt(e)]}(_):[lt(_)]),m=[_].concat(g).reduce(function(t,n){return t.concat(it(n)===W?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?G:u,f=ot(r),l=f?a?X:X.filter(function(t){return ot(t)===f}):N,h=l.filter(function(t){return c.indexOf(t)>=0});0===h.length&&(h=l);var p=h.reduce(function(e,n){return e[n]=mt(t,{placement:n,boundary:i,rootBoundary:o,padding:s})[it(n)],e},{});return Object.keys(p).sort(function(t,e){return p[t]-p[e]})}(e,{placement:n,boundary:f,rootBoundary:l,padding:c,flipVariations:d,allowedAutoPlacements:v}):n)},[]),b=e.rects.reference,w=e.rects.popper,S=new Map,E=!0,O=m[0],x=0;x=0,C=D?"width":"height",k=mt(e,{placement:I,boundary:f,rootBoundary:l,altBoundary:h,padding:c}),R=D?M?L:U:M?V:K;b[C]>w[C]&&(R=lt(R));var A=lt(R),q=[];if(o&&q.push(k[z]<=0),a&&q.push(k[R]<=0,k[A]<=0),q.every(function(t){return t})){O=I,E=!1;break}S.set(I,q)}if(E)for(var j=function(t){var e=m.find(function(e){var n=S.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return O=e,"break"},P=d?3:1;P>0&&"break"!==j(P);P--);e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,u=n.boundary,c=n.rootBoundary,f=n.altBoundary,l=n.padding,h=n.tether,p=void 0===h||h,d=n.tetherOffset,v=void 0===d?0:d,_=mt(e,{boundary:u,rootBoundary:c,padding:l,altBoundary:f}),y=it(e.placement),g=ot(e.placement),m=!g,S=st(y),E="x"===S?"y":"x",O=e.modifiersData.popperOffsets,x=e.rects.reference,I=e.rects.popper,z="function"==typeof v?v(Object.assign({},e.rects,{placement:e.placement})):v,M="number"==typeof z?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,C={x:0,y:0};if(O){if(o){var k,R="y"===S?K:U,q="y"===S?V:L,j="y"===S?"height":"width",P=O[S],B=P+_[R],T=P-_[q],W=p?-I[j]/2:0,N=g===H?x[j]:I[j],J=g===H?-I[j]:-x[j],$=e.elements.arrow,Y=p&&$?A($):{width:0,height:0},X=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},G=X[R],Q=X[q],Z=bt(0,x[j],Y[j]),tt=m?x[j]/2-W-Z-G-M.mainAxis:N-Z-G-M.mainAxis,et=m?-x[j]/2+W+Z+Q+M.mainAxis:J+Z+Q+M.mainAxis,nt=e.elements.arrow&&F(e.elements.arrow),rt=nt?"y"===S?nt.clientTop||0:nt.clientLeft||0:0,at=null!=(k=null==D?void 0:D[S])?k:0,ut=P+et-at,ct=bt(p?w(B,P+tt-at-rt):B,P,p?b(T,ut):T);O[S]=ct,C[S]=ct-P}if(a){var ft,lt="x"===S?K:U,ht="x"===S?V:L,pt=O[E],dt="y"===E?"height":"width",vt=pt+_[lt],_t=pt-_[ht],yt=-1!==[K,U].indexOf(y),gt=null!=(ft=null==D?void 0:D[E])?ft:0,wt=yt?vt:pt-x[dt]-I[dt]-gt+M.altAxis,St=yt?pt+x[dt]+I[dt]-gt-M.altAxis:_t,Et=p&&yt?function(t,e,n){var r=bt(t,e,n);return r>n?n:r}(wt,pt,St):bt(p?wt:vt,pt,p?St:_t);O[E]=Et,C[E]=Et-pt}e.modifiersData[r]=C}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=it(n.placement),u=st(a),c=[U,L].indexOf(a)>=0?"height":"width";if(o&&s){var f=function(t,e){return yt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:gt(t,N))}(i.padding,n),l=A(o),h="y"===u?K:U,p="y"===u?V:L,d=n.rects.reference[c]+n.rects.reference[u]-s[u]-n.rects.popper[c],v=s[u]-n.rects.reference[u],_=F(o),y=_?"y"===u?_.clientHeight||0:_.clientWidth||0:0,g=d/2-v/2,m=f[h],b=y-l[c]-f[p],w=y/2-l[c]/2+g,S=bt(m,w,b),E=u;n.modifiersData[r]=((e={})[E]=S,e.centerOffset=S-w,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&dt(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=mt(e,{elementContext:"reference"}),a=mt(e,{altBoundary:!0}),u=wt(s,r),c=wt(a,i,o),f=St(u),l=St(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":l})}}]}),Ot=n(30115),xt=n.n(Ot),It=function(t){return t.reduce(function(t,e){var n=e[0],r=e[1];return t[n]=r,t},{})},zt="undefined"!=typeof window&&window.document&&window.document.createElement?i.useLayoutEffect:i.useEffect,Mt=[];function Dt(){return Dt=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function Rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i.matchAll(s));!(r=c()).done;){var f=r.value,l=f[1].length,p=f[2].length;u=(a=(f.index||0)+l)+p}var d=i.slice(u);return{begin:a,end:i.length,matchingString:d}}(t.getCurrentContent().getBlockForKey(r).getText(),i,n)};function Bt(t){return"@"===t?"mention":t+"mention"}function Tt(t,e,n,r,i){var o=t.getCurrentContent().createEntity(Bt(r),i,{mention:e}).getLastCreatedEntityKey(),s=t.getSelection(),a=Pt(t,s,[r]),c=a.begin,f=a.end,l=s.merge({anchorOffset:c,focusOffset:f}),h=u.Modifier.replaceText(t.getCurrentContent(),l,""+("string"==typeof n?n:n(r))+e.name,t.getCurrentInlineStyle(),o),p=l.getAnchorKey();t.getCurrentContent().getBlockForKey(p).getLength()===f&&(h=u.Modifier.insertText(h,h.getSelectionAfter()," "));var d=u.EditorState.push(t,h,"insert-fragment");return u.EditorState.forceSelection(d,h.getSelectionAfter())}function Ft(t){return void 0!==t}var Kt=function t(e){return e?"static"!==window.getComputedStyle(e).getPropertyValue("position")?e:t(e.parentElement):null};function Vt(t){var e,n=t.decoratorRect,r=t.popover,i=t.props,o=Kt(r.parentElement);if(o){var s=o.getBoundingClientRect();e={scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,left:n.left-s.left,top:n.bottom-s.top}}else e={scrollTop:window.pageYOffset||document.documentElement.scrollTop,scrollLeft:window.pageXOffset||document.documentElement.scrollLeft,top:n.bottom,left:n.left};var a,u,c=e.left+e.scrollLeft,f=e.top+e.scrollTop;return i.open&&(i.suggestions.length>0?(a="scale(1)",u="all 0.25s cubic-bezier(.3,1.2,.2,1)"):(a="scale(0)",u="all 0.35s cubic-bezier(.3,1,.2,1)")),{left:c+"px",top:f+"px",transform:a,transformOrigin:"1em 0%",transition:u}}var Lt=d()(function(t){});function Ut(t){var e=t.mention,n=t.theme,r=void 0===n?{}:n;return e.avatar?o().createElement("img",{src:e.avatar,className:r.mentionSuggestionsEntryAvatar,role:"presentation"}):null}var Wt=["mention","theme","isFocused","searchValue","selectMention"];function Nt(t){var e=t.mention,n=t.theme,r=t.isFocused;t.searchValue,t.selectMention;var i=kt(t,Wt);return o().createElement("div",Dt({},i,{"aria-selected":r}),o().createElement(Ut,{mention:e,theme:n}),o().createElement("span",{className:null==n?void 0:n.mentionSuggestionsEntryText},e.name))}var Ht=function(t){var e=t.onMentionSelect,n=t.mention,r=t.theme,s=t.index,a=t.onMentionFocus,u=t.isFocused,c=t.id,f=t.searchValue,l=t.entryComponent,h=(0,i.useRef)(!1),p=(0,i.useRef)(null);(0,i.useEffect)(function(){u&&requestAnimationFrame(function(){var t;return null==(t=p.current)?void 0:t.scrollIntoView({behavior:"smooth",block:"nearest"})})},[u]),(0,i.useEffect)(function(){h.current=!1});var d=u?r.mentionSuggestionsEntryFocused:r.mentionSuggestionsEntry;return o().createElement("div",{ref:p},o().createElement(l,{className:d,onMouseDown:function(t){t.preventDefault(),h.current=!0},onMouseUp:function(){h.current&&(e(n),h.current=!1)},onMouseEnter:function(){a(s)},role:"option",id:c,"aria-selected":u?"true":void 0,theme:r,mention:n,isFocused:u,searchValue:f,selectMention:e}))};Ht.propTypes={entryComponent:f().any.isRequired,searchValue:f().string,onMentionSelect:f().func};var Jt=Ht;function $t(t){var e=t.store,n=t.children,r=t.theme,s=t.popperOptions,u=void 0===s?{placement:"bottom-start"}:s,c=(0,i.useState)(function(){return a(r.mentionSuggestions,r.mentionSuggestionsPopup)}),f=c[0],l=c[1],h=(0,i.useState)(null),p=h[0],d=h[1],_=function(t,e,n){void 0===n&&(n={});var r=i.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Mt},s=i.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=s[0],u=s[1],c=i.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(t){var e=t.state,n=Object.keys(e.elements);v.flushSync(function(){u({styles:It(n.map(function(t){return[t,e.styles[t]||{}]})),attributes:It(n.map(function(t){return[t,e.attributes[t]]}))})})},requires:["computeStyles"]}},[]),f=i.useMemo(function(){var t={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return xt()(r.current,t)?r.current||t:(r.current=t,t)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),l=i.useRef();return zt(function(){l.current&&l.current.setOptions(f)},[f]),zt(function(){if(null!=t&&null!=e){var r=(n.createPopper||Et)(t,e,f);return l.current=r,function(){r.destroy(),l.current=null}}},[t,e,n.createPopper]),{state:l.current?l.current.state:null,styles:a.styles,attributes:a.attributes,update:l.current?l.current.update:null,forceUpdate:l.current?l.current.forceUpdate:null}}(e.getReferenceElement(),p,u),y=_.styles,g=_.attributes;return(0,i.useEffect)(function(){requestAnimationFrame(function(){return l(a(r.mentionSuggestions,r.mentionSuggestionsPopup,r.mentionSuggestionsPopupVisible))})},[r]),o().createElement("div",Dt({ref:d,style:y.popper},g.popper,{className:f,role:"listbox"}),n)}var Yt=["entryComponent","popoverComponent","popperOptions","popoverContainer","onOpenChange","onAddMention","onSearchChange","suggestions","ariaProps","callbacks","theme","store","entityMutability","positionSuggestions","mentionTriggers","mentionPrefix"],Xt=function(t){var e,n;function r(e){var n;return(n=t.call(this,e)||this).state={focusedOptionIndex:0},n.key=(0,u.genKey)(),n.lastActiveTrigger="",n.onEditorStateChange=function(t){var e=n.props.store.getAllSearches();if(0===e.size)return t;var r=function(t,e,n){var r=t.getSelection(),i=r.getAnchorKey(),o=r.getAnchorOffset();if(!r.isCollapsed()||!r.getHasFocus())return null;var s=e.map(function(t){return function(t){var e=t.split("-"),n=e[0],r=e[1],i=e[2];return{blockKey:n,decoratorKey:parseInt(r,10),leafKey:parseInt(i,10)}}(t)}).filter(function(t){return t.blockKey===i}).map(function(e){return t.getBlockTree(e.blockKey).getIn([e.decoratorKey])});if(s.every(function(t){return void 0===t}))return null;var a=t.getCurrentContent().getBlockForKey(i).getText(),u=s.filter(Ft).map(function(t){var e=t.start,r=t.end;return n.map(function(t){return 0===e&&o>=e+t.length&&a.substr(0,t.length)===t&&o<=r||n.length>1&&o>=e+t.length&&(a.substr(e+1,t.length)===t||a.substr(e,t.length)===t)&&o<=r||1===n.length&&o>=e+t.length&&o<=r?t:void 0}).filter(Ft)[0]}).filter(Ft);if(u.isEmpty())return null;var c=u.entrySeq().first();return{activeOffsetKey:c[0],activeTrigger:c[1]}}(t,e,n.props.mentionTriggers);if(!r)return n.props.store.resetEscapedSearch(),n.closeDropdown(),t;var i=n.activeOffsetKey;return n.activeOffsetKey=r.activeOffsetKey,n.onSearchChange(t,t.getSelection(),n.activeOffsetKey,i,r.activeTrigger),n.props.store.isEscaped(n.activeOffsetKey||"")||n.props.store.resetEscapedSearch(),n.props.open||n.props.store.isEscaped(n.activeOffsetKey||"")||n.openDropdown(),i!==n.activeOffsetKey&&n.setState({focusedOptionIndex:0}),t},n.onSearchChange=function(t,e,r,i,o){var s=Pt(t,e,[o]).matchingString;n.lastActiveTrigger===o&&n.lastSearchValue===s&&r===i||(n.lastActiveTrigger=o,n.lastSearchValue=s,n.props.onSearchChange({trigger:o,value:s}),n.setState({focusedOptionIndex:0}))},n.onDownArrow=function(t){t.preventDefault();var e=n.state.focusedOptionIndex+1;n.onMentionFocus(e>=n.props.suggestions.length?0:e)},n.onTab=function(t){t.preventDefault(),n.commitSelection()},n.onUpArrow=function(t){if(t.preventDefault(),n.props.suggestions.length>0){var e=n.state.focusedOptionIndex-1;n.onMentionFocus(e<0?n.props.suggestions.length-1:e)}},n.onEscape=function(t){t.preventDefault(),n.props.store.escapeSearch(n.activeOffsetKey||""),n.closeDropdown(),n.props.store.setEditorState(n.props.store.getEditorState())},n.onMentionSelect=function(t){if(t){n.props.onAddMention&&n.props.onAddMention(t),n.closeDropdown();var e=Tt(n.props.store.getEditorState(),t,n.props.mentionPrefix,n.lastActiveTrigger||"",n.props.entityMutability);n.props.store.setEditorState(e)}},n.onMentionFocus=function(t){var e="mention-option-"+n.key+"-"+t;n.props.ariaProps.ariaActiveDescendantID=e,n.setState({focusedOptionIndex:t}),n.props.store.setEditorState(n.props.store.getEditorState())},n.commitSelection=function(){var t=n.props.suggestions[n.state.focusedOptionIndex];return n.props.store.getIsOpened()&&t?(n.onMentionSelect(t),"handled"):"not-handled"},n.openDropdown=function(){n.props.callbacks.handleReturn=n.commitSelection,n.props.callbacks.keyBindingFn=function(t){40===t.keyCode&&n.onDownArrow(t),38===t.keyCode&&n.onUpArrow(t),27===t.keyCode&&n.onEscape(t),9===t.keyCode&&n.onTab(t)};var t="mention-option-"+n.key+"-"+n.state.focusedOptionIndex;n.props.ariaProps.ariaActiveDescendantID=t,n.props.ariaProps.ariaOwneeID="mentions-list-"+n.key,n.props.ariaProps.ariaHasPopup="true",n.props.ariaProps.ariaExpanded=!0,n.props.onOpenChange(!0)},n.closeDropdown=function(){n.props.callbacks.handleReturn=void 0,n.props.callbacks.keyBindingFn=void 0,n.props.ariaProps.ariaHasPopup="false",n.props.ariaProps.ariaExpanded=!1,n.props.ariaProps.ariaActiveDescendantID=void 0,n.props.ariaProps.ariaOwneeID=void 0,n.props.onOpenChange(!1)},n.props.callbacks.onChange=n.onEditorStateChange,n}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,Ct(e,n);var i=r.prototype;return i.componentDidUpdate=function(){if(this.popover){var t=this.props.suggestions.length;if(t>0&&this.state.focusedOptionIndex>=t&&this.setState({focusedOptionIndex:t-1}),!this.props.store.getAllSearches().has(this.activeOffsetKey))return;for(var e=this.props.store.getPortalClientRect(this.activeOffsetKey),n=(this.props.positionSuggestions||Vt)({decoratorRect:e,props:this.props,popover:this.popover}),r=0,i=Object.entries(n);r-1}),o=i.length<5?i.length:5;return i.slice(0,o)}},17630(t){"use strict";t.exports=window.lodash.includes},18136(t){"use strict";t.exports=window.yoast.draftJs},18495(t){"use strict";t.exports=window.yoast.styleGuide},19019(t){"use strict";t.exports=window.lodash.uniqueId},20195(t){"use strict";t.exports=window.wp.a11y},20345(t){t.exports=function(){"use strict";var t=Array.prototype.slice;function e(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function n(t){return s(t)?t:U(t)}function r(t){return a(t)?t:W(t)}function i(t){return u(t)?t:N(t)}function o(t){return s(t)&&!c(t)?t:H(t)}function s(t){return!(!t||!t[l])}function a(t){return!(!t||!t[h])}function u(t){return!(!t||!t[p])}function c(t){return a(t)||u(t)}function f(t){return!(!t||!t[d])}e(r,n),e(i,n),e(o,n),n.isIterable=s,n.isKeyed=a,n.isIndexed=u,n.isAssociative=c,n.isOrdered=f,n.Keyed=r,n.Indexed=i,n.Set=o;var l="@@__IMMUTABLE_ITERABLE__@@",h="@@__IMMUTABLE_KEYED__@@",p="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",v="delete",_=32,y=31,g={},m={value:!1},b={value:!1};function w(t){return t.value=!1,t}function S(t){t&&(t.value=!0)}function E(){}function O(t,e){e=e||0;for(var n=Math.max(0,t.length-e),r=new Array(n),i=0;i>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?x(t)+e:e}function z(){return!0}function M(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function D(t,e){return k(t,e,0)}function C(t,e){return k(t,e,e)}function k(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var R="function"==typeof Symbol&&Symbol.iterator,A="@@iterator",q=R||A;function j(t){this.next=t}function P(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function B(){return{value:void 0,done:!0}}function T(t){return!!V(t)}function F(t){return t&&"function"==typeof t.next}function K(t){var e=V(t);return e&&e.call(t)}function V(t){var e=t&&(R&&t[R]||t[A]);if("function"==typeof e)return e}function L(t){return t&&"number"==typeof t.length}function U(t){return null==t?nt():s(t)?t.toSeq():function(t){var e=ot(t)||"object"==typeof t&&new Q(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}(t)}function W(t){return null==t?nt().toKeyedSeq():s(t)?a(t)?t.toSeq():t.fromEntrySeq():rt(t)}function N(t){return null==t?nt():s(t)?a(t)?t.entrySeq():t.toIndexedSeq():it(t)}function H(t){return(null==t?nt():s(t)?a(t)?t.entrySeq():t:it(t)).toSetSeq()}j.prototype.toString=function(){return"[Iterator]"},j.KEYS=0,j.VALUES=1,j.ENTRIES=2,j.prototype.inspect=j.prototype.toSource=function(){return this.toString()},j.prototype[q]=function(){return this},e(U,n),U.of=function(){return U(arguments)},U.prototype.toSeq=function(){return this},U.prototype.toString=function(){return this.__toString("Seq {","}")},U.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},U.prototype.__iterate=function(t,e){return st(this,t,e,!0)},U.prototype.__iterator=function(t,e){return at(this,t,e,!0)},e(W,U),W.prototype.toKeyedSeq=function(){return this},e(N,U),N.of=function(){return N(arguments)},N.prototype.toIndexedSeq=function(){return this},N.prototype.toString=function(){return this.__toString("Seq [","]")},N.prototype.__iterate=function(t,e){return st(this,t,e,!1)},N.prototype.__iterator=function(t,e){return at(this,t,e,!1)},e(H,U),H.of=function(){return H(arguments)},H.prototype.toSetSeq=function(){return this},U.isSeq=et,U.Keyed=W,U.Set=H,U.Indexed=N;var J,$,Y,X="@@__IMMUTABLE_SEQ__@@";function G(t){this._array=t,this.size=t.length}function Q(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function Z(t){this._iterable=t,this.size=t.length||t.size}function tt(t){this._iterator=t,this._iteratorCache=[]}function et(t){return!(!t||!t[X])}function nt(){return J||(J=new G([]))}function rt(t){var e=Array.isArray(t)?new G(t).fromEntrySeq():F(t)?new tt(t).fromEntrySeq():T(t)?new Z(t).fromEntrySeq():"object"==typeof t?new Q(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function it(t){var e=ot(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function ot(t){return L(t)?new G(t):F(t)?new tt(t):T(t)?new Z(t):void 0}function st(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,s=0;s<=o;s++){var a=i[n?o-s:s];if(!1===e(a[1],r?a[0]:s,t))return s+1}return s}return t.__iterateUncached(e,n)}function at(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,s=0;return new j(function(){var t=i[n?o-s:s];return s++>o?{value:void 0,done:!0}:P(e,r?t[0]:s-1,t[1])})}return t.__iteratorUncached(e,n)}function ut(t,e){return e?ct(e,t,"",{"":t}):ft(t)}function ct(t,e,n,r){return Array.isArray(e)?t.call(r,n,N(e).map(function(n,r){return ct(t,n,r,e)})):lt(e)?t.call(r,n,W(e).map(function(n,r){return ct(t,n,r,e)})):e}function ft(t){return Array.isArray(t)?N(t).map(ft).toList():lt(t)?W(t).map(ft).toMap():t}function lt(t){return t&&(t.constructor===Object||void 0===t.constructor)}function ht(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function pt(t,e){if(t===e)return!0;if(!s(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||f(t)!==f(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!c(t);if(f(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&ht(i[1],t)&&(n||ht(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var l=!0,h=e.__iterate(function(e,r){if(n?!t.has(e):i?!ht(e,t.get(r,g)):!ht(t.get(r,g),e))return l=!1,!1});return l&&t.size===h}function dt(t,e){if(!(this instanceof dt))return new dt(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if($)return $;$=this}}function vt(t,e){if(!t)throw new Error(e)}function _t(t,e,n){if(!(this instanceof _t))return new _t(t,e,n);if(vt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),er?{value:void 0,done:!0}:P(t,i,n[e?r-i++:i++])})},e(Q,W),Q.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},Q.prototype.has=function(t){return this._object.hasOwnProperty(t)},Q.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var s=r[e?i-o:o];if(!1===t(n[s],s,this))return o+1}return o},Q.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new j(function(){var s=r[e?i-o:o];return o++>i?{value:void 0,done:!0}:P(t,s,n[s])})},Q.prototype[d]=!0,e(Z,N),Z.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=K(this._iterable),r=0;if(F(n))for(var i;!(i=n.next()).done&&!1!==t(i.value,r++,this););return r},Z.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=K(this._iterable);if(!F(n))return new j(B);var r=0;return new j(function(){var e=n.next();return e.done?e:P(t,r++,e.value)})},e(tt,N),tt.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n,r=this._iterator,i=this._iteratorCache,o=0;o=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return P(t,i,r[i++])})},e(dt,N),dt.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},dt.prototype.get=function(t,e){return this.has(t)?this._value:e},dt.prototype.includes=function(t){return ht(this._value,t)},dt.prototype.slice=function(t,e){var n=this.size;return M(t,e,n)?this:new dt(this._value,C(e,n)-D(t,n))},dt.prototype.reverse=function(){return this},dt.prototype.indexOf=function(t){return ht(this._value,t)?0:-1},dt.prototype.lastIndexOf=function(t){return ht(this._value,t)?this.size:-1},dt.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=0&&nn?{value:void 0,done:!0}:P(t,o++,s)})},_t.prototype.equals=function(t){return t instanceof _t?this._start===t._start&&this._end===t._end&&this._step===t._step:pt(this,t)},e(yt,n),e(gt,yt),e(mt,yt),e(bt,yt),yt.Keyed=gt,yt.Indexed=mt,yt.Set=bt;var wt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var n=65535&(t|=0),r=65535&(e|=0);return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0};function St(t){return t>>>1&1073741824|3221225471&t}function Et(t){if(!1===t||null==t)return 0;if("function"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!=t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)n^=t/=4294967295;return St(n)}if("string"===e)return t.length>kt?function(t){var e=qt[t];return void 0===e&&(e=Ot(t),At===Rt&&(At=0,qt={}),At++,qt[t]=e),e}(t):Ot(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return function(t){var e;if(Mt&&void 0!==(e=zt.get(t)))return e;if(void 0!==(e=t[Ct]))return e;if(!It){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[Ct]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=++Dt,1073741824&Dt&&(Dt=0),Mt)zt.set(t,e);else{if(void 0!==xt&&!1===xt(t))throw new Error("Non-extensible objects are not allowed as keys.");if(It)Object.defineProperty(t,Ct,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[Ct]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[Ct]=e}}return e}(t);if("function"==typeof t.toString)return Ot(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function Ot(t){for(var e=0,n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},Pt.prototype.toString=function(){return this.__toString("Map {","}")},Pt.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Pt.prototype.set=function(t,e){return Gt(this,t,e)},Pt.prototype.setIn=function(t,e){return this.updateIn(t,g,function(){return e})},Pt.prototype.remove=function(t){return Gt(this,t,g)},Pt.prototype.deleteIn=function(t){return this.updateIn(t,function(){return g})},Pt.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},Pt.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=oe(this,en(t),e,n);return r===g?void 0:r},Pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Xt()},Pt.prototype.merge=function(){return ee(this,void 0,arguments)},Pt.prototype.mergeWith=function(e){return ee(this,e,t.call(arguments,1))},Pt.prototype.mergeIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,Xt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,n):n[n.length-1]})},Pt.prototype.mergeDeep=function(){return ee(this,ne,arguments)},Pt.prototype.mergeDeepWith=function(e){var n=t.call(arguments,1);return ee(this,re(e),n)},Pt.prototype.mergeDeepIn=function(e){var n=t.call(arguments,1);return this.updateIn(e,Xt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,n):n[n.length-1]})},Pt.prototype.sort=function(t){return Me(We(this,t))},Pt.prototype.sortBy=function(t,e){return Me(We(this,e,t))},Pt.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Pt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new E)},Pt.prototype.asImmutable=function(){return this.__ensureOwner()},Pt.prototype.wasAltered=function(){return this.__altered},Pt.prototype.__iterator=function(t,e){return new Ht(this,t,e)},Pt.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},Pt.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Yt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Pt.isMap=Bt;var Tt,Ft="@@__IMMUTABLE_MAP__@@",Kt=Pt.prototype;function Vt(t,e){this.ownerID=t,this.entries=e}function Lt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function Ut(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function Wt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function Nt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function Ht(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&$t(t._root)}function Jt(t,e){return P(t,e[0],e[1])}function $t(t,e){return{node:t,index:0,__prev:e}}function Yt(t,e,n,r){var i=Object.create(Kt);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Xt(){return Tt||(Tt=Yt(0))}function Gt(t,e,n){var r,i;if(t._root){var o=w(m),s=w(b);if(r=Qt(t._root,t.__ownerID,0,void 0,e,n,o,s),!s.value)return t;i=t.size+(o.value?n===g?-1:1:0)}else{if(n===g)return t;i=1,r=new Vt(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?Yt(i,r):Xt()}function Qt(t,e,n,r,i,o,s,a){return t?t.update(e,n,r,i,o,s,a):o===g?t:(S(a),S(s),new Nt(e,r,[i,o]))}function Zt(t){return t.constructor===Nt||t.constructor===Wt}function te(t,e,n,r,i){if(t.keyHash===r)return new Wt(e,r,[t.entry,i]);var o,s=(0===n?t.keyHash:t.keyHash>>>n)&y,a=(0===n?r:r>>>n)&y;return new Lt(e,1<>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,127&(t+=t>>8)+(t>>16)}function ae(t,e,n,r){var i=r?t:O(t);return i[e]=n,i}Kt[Ft]=!0,Kt[v]=Kt.remove,Kt.removeIn=Kt.deleteIn,Vt.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,s=i.length;o=ue)return function(t,e,n,r){t||(t=new E);for(var i=new Nt(t,Et(n),[n,r]),o=0;o>>t)&y),o=this.bitmap;return 0===(o&i)?r:this.nodes[se(o&i-1)].get(t+5,e,n,r)},Lt.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=Et(r));var a=(0===e?n:n>>>e)&y,u=1<=ce)return function(t,e,n,r,i){for(var o=0,s=new Array(_),a=0;0!==n;a++,n>>>=1)s[a]=1&n?e[o++]:void 0;return s[r]=i,new Ut(t,o+1,s)}(t,h,c,a,d);if(f&&!d&&2===h.length&&Zt(h[1^l]))return h[1^l];if(f&&d&&1===h.length&&Zt(d))return d;var v=t&&t===this.ownerID,m=f?d?c:c^u:c|u,b=f?d?ae(h,l,d,v):function(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,s=0;s>>t)&y,o=this.nodes[i];return o?o.get(t+5,e,n,r):r},Ut.prototype.update=function(t,e,n,r,i,o,s){void 0===n&&(n=Et(r));var a=(0===e?n:n>>>e)&y,u=i===g,c=this.nodes,f=c[a];if(u&&!f)return this;var l=Qt(f,t,e+5,n,r,i,o,s);if(l===f)return this;var h=this.count;if(f){if(!l&&--h0&&r<_?be(0,r,5,null,new ve(n.toArray())):e.withMutations(function(t){t.setSize(r),n.forEach(function(e,n){return t.set(n,e)})}))}function he(t){return!(!t||!t[pe])}e(le,mt),le.of=function(){return this(arguments)},le.prototype.toString=function(){return this.__toString("List [","]")},le.prototype.get=function(t,e){if((t=I(this,t))>=0&&t=t.size||e<0)return t.withMutations(function(t){e<0?xe(t,e).set(0,n):xe(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=w(b);return e>=ze(t._capacity)?r=Se(r,t.__ownerID,0,e,n,o):i=Se(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):be(t._origin,t._capacity,t._level,i,r):t}(this,t,e)},le.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},le.prototype.insert=function(t,e){return this.splice(t,0,e)},le.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):we()},le.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations(function(n){xe(n,0,e+t.length);for(var r=0;r>>e&y;if(r>=this.array.length)return new ve([],t);var i,o=0===r;if(e>0){var s=this.array[r];if((i=s&&s.removeBefore(t,e-5,n))===s&&o)return this}if(o&&!i)return this;var a=Ee(this,t);if(!o)for(var u=0;u>>e&y;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((r=o&&o.removeAfter(t,e-5,n))===o&&i===this.array.length-1)return this}var s=Ee(this,t);return s.array.splice(i+1),r&&(s.array[i]=r),s};var _e,ye,ge={};function me(t,e){var n=t._origin,r=t._capacity,i=ze(r),o=t._tail;return s(t._root,t._level,0);function s(t,a,u){return 0===a?function(t,s){var a=s===i?o&&o.array:t&&t.array,u=s>n?0:n-s,c=r-s;return c>_&&(c=_),function(){if(u===c)return ge;var t=e?--c:u++;return a&&a[t]}}(t,u):function(t,i,o){var a,u=t&&t.array,c=o>n?0:n-o>>i,f=1+(r-o>>i);return f>_&&(f=_),function(){for(;;){if(a){var t=a();if(t!==ge)return t;a=null}if(c===f)return ge;var n=e?--f:c++;a=s(u&&u[n],i-5,o+(n<>>n&y,u=t&&a0){var c=t&&t.array[a],f=Se(c,e,n-5,r,i,o);return f===c?t:((s=Ee(t,e)).array[a]=f,s)}return u&&t.array[a]===i?t:(S(o),s=Ee(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Ee(t,e){return e&&t&&e===t.ownerID?t:new ve(t?t.array.slice():[],e)}function Oe(t,e){if(e>=ze(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&y],r-=5;return n}}function xe(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new E,i=t._origin,o=t._capacity,s=i+e,a=void 0===n?o:n<0?o+n:i+n;if(s===i&&a===o)return t;if(s>=a)return t.clear();for(var u=t._level,c=t._root,f=0;s+f<0;)c=new ve(c&&c.array.length?[void 0,c]:[],r),f+=1<<(u+=5);f&&(s+=f,i+=f,a+=f,o+=f);for(var l=ze(o),h=ze(a);h>=1<l?new ve([],r):p;if(p&&h>l&&s5;_-=5){var g=l>>>_&y;v=v.array[g]=Ee(v.array[g],r)}v.array[l>>>5&y]=p}if(a=h)s-=h,a-=h,u=5,c=null,d=d&&d.removeBefore(r,0,s);else if(s>i||h>>u&y;if(m!==h>>>u&y)break;m&&(f+=(1<i&&(c=c.removeBefore(r,u,s-f)),c&&ho&&(o=c.size),s(u)||(c=c.map(function(t){return ut(t)})),r.push(c)}return o>t.size&&(t=t.setSize(o)),ie(t,e,r)}function ze(t){return t<_?0:t-1>>>5<<5}function Me(t){return null==t?ke():De(t)?t:ke().withMutations(function(e){var n=r(t);jt(n.size),n.forEach(function(t,n){return e.set(n,t)})})}function De(t){return Bt(t)&&f(t)}function Ce(t,e,n,r){var i=Object.create(Me.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=n,i.__hash=r,i}function ke(){return ye||(ye=Ce(Xt(),we()))}function Re(t,e,n){var r,i,o=t._map,s=t._list,a=o.get(e),u=void 0!==a;if(n===g){if(!u)return t;s.size>=_&&s.size>=2*o.size?(r=(i=s.filter(function(t,e){return void 0!==t&&a!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=a===s.size-1?s.pop():s.set(a,void 0))}else if(u){if(n===s.get(a)[1])return t;r=o,i=s.set(a,[e,n])}else r=o.set(e,s.size),i=s.set(s.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):Ce(r,i)}function Ae(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function qe(t){this._iter=t,this.size=t.size}function je(t){this._iter=t,this.size=t.size}function Pe(t){this._iter=t,this.size=t.size}function Be(t){var e=Qe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ze,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(2===e){var r=t.__iterator(e,n);return new j(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(1===e?0:1,n)},e}function Te(t,e,n){var r=Qe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,g);return o===g?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,s){return!1!==r(e.call(n,t,i,s),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(2,i);return new j(function(){var i=o.next();if(i.done)return i;var s=i.value,a=s[0];return P(r,a,e.call(n,s[1],a,t),i)})},r}function Fe(t,e){var n=Qe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Be(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Ze,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function Ke(t,e,n,r){var i=Qe(t);return r&&(i.has=function(r){var i=t.get(r,g);return i!==g&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,g);return o!==g&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var s=this,a=0;return t.__iterate(function(t,o,u){if(e.call(n,t,o,u))return a++,i(t,r?o:a-1,s)},o),a},i.__iteratorUncached=function(i,o){var s=t.__iterator(2,o),a=0;return new j(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(e.call(n,f,c,t))return P(i,r?c:a++,f,o)}})},i}function Ve(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),M(e,n,i))return t;var o=D(e,i),s=C(n,i);if(o!=o||s!=s)return Ve(t.toSeq().cacheResult(),e,n,r);var a,u=s-o;u==u&&(a=u<0?0:u);var c=Qe(t);return c.size=0===a?a:t.size&&a||void 0,!r&&et(t)&&a>=0&&(c.get=function(e,n){return(e=I(this,e))>=0&&ea)return{value:void 0,done:!0};var t=i.next();return r||1===e?t:P(e,u-1,0===e?void 0:t.value[1],t)})},c}function Le(t,e,n,r){var i=Qe(t);return i.__iterateUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterate(i,o);var a=!0,u=0;return t.__iterate(function(t,o,c){if(!a||!(a=e.call(n,t,o,c)))return u++,i(t,r?o:u-1,s)}),u},i.__iteratorUncached=function(i,o){var s=this;if(o)return this.cacheResult().__iterator(i,o);var a=t.__iterator(2,o),u=!0,c=0;return new j(function(){var t,o,f;do{if((t=a.next()).done)return r||1===i?t:P(i,c++,0===i?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],u&&(u=e.call(n,f,o,s))}while(u);return 2===i?t:P(i,o,f,t)})},i}function Ue(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,i){var o=0,a=!1;return function t(u,c){var f=this;u.__iterate(function(i,u){return(!e||c0}function Je(t,e,r){var i=Qe(t);return i.size=new G(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(1,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=n(t),K(i?t.reverse():t)}),s=0,a=!1;return new j(function(){var n;return a||(n=o.map(function(t){return t.next()}),a=n.some(function(t){return t.done})),a?{value:void 0,done:!0}:P(t,s++,e.apply(null,n.map(function(t){return t.value})))})},i}function $e(t,e){return et(t)?e:t.constructor(e)}function Ye(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Xe(t){return jt(t.size),x(t)}function Ge(t){return a(t)?r:u(t)?i:o}function Qe(t){return Object.create((a(t)?W:u(t)?N:H).prototype)}function Ze(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function tn(t,e){return t>e?1:t=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Mn(t,e)},En.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;jt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mn(e,n)},En.prototype.pop=function(){return this.slice(1)},En.prototype.unshift=function(){return this.push.apply(this,arguments)},En.prototype.unshiftAll=function(t){return this.pushAll(t)},En.prototype.shift=function(){return this.pop.apply(this,arguments)},En.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dn()},En.prototype.slice=function(t,e){if(M(t,e,this.size))return this;var n=D(t,this.size);if(C(e,this.size)!==this.size)return mt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Mn(r,i)},En.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Mn(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},En.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},En.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new j(function(){if(r){var e=r.value;return r=r.next,P(t,n++,e)}return{value:void 0,done:!0}})},En.isStack=On;var xn,In="@@__IMMUTABLE_STACK__@@",zn=En.prototype;function Mn(t,e,n,r){var i=Object.create(zn);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Dn(){return xn||(xn=Mn(0))}function Cn(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}zn[In]=!0,zn.withMutations=Kt.withMutations,zn.asMutable=Kt.asMutable,zn.asImmutable=Kt.asImmutable,zn.wasAltered=Kt.wasAltered,n.Iterator=j,Cn(n,{toArray:function(){jt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new qe(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new Ae(this,!0)},toMap:function(){return Pt(this.toKeyedSeq())},toObject:function(){jt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Me(this.toKeyedSeq())},toOrderedSet:function(){return yn(a(this)?this.valueSeq():this)},toSet:function(){return un(a(this)?this.valueSeq():this)},toSetSeq:function(){return new je(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return En(a(this)?this.valueSeq():this)},toList:function(){return le(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return $e(this,function(t,e){var n=a(t),i=[t].concat(e).map(function(t){return s(t)?n&&(t=r(t)):t=n?rt(t):it(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var o=i[0];if(o===t||n&&a(o)||u(t)&&u(o))return o}var c=new G(i);return n?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}(this,t.call(arguments,0)))},includes:function(t){return this.some(function(e){return ht(e,t)})},entries:function(){return this.__iterator(2)},every:function(t,e){jt(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return $e(this,Ke(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return jt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){jt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!=r?r.toString():""}),e},keys:function(){return this.__iterator(0)},map:function(t,e){return $e(this,Te(this,t,e))},reduce:function(t,e,n){var r,i;return jt(this.size),arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,s){i?(i=!1,r=e):r=t.call(n,r,e,o,s)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return $e(this,Fe(this,!0))},slice:function(t,e){return $e(this,Ve(this,t,e,!0))},some:function(t,e){return!this.every(jn(t),e)},sort:function(t){return $e(this,We(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return x(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,n){var r=Pt().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}(this,t,e)},equals:function(t){return pt(this,t)},entrySeq:function(){var t=this;if(t._cache)return new G(t._cache);var e=t.toSeq().map(qn).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(jn(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(z)},flatMap:function(t,e){return $e(this,function(t,e,n){var r=Ge(t);return t.toSeq().map(function(i,o){return r(e.call(n,i,o,t))}).flatten(!0)}(this,t,e))},flatten:function(t){return $e(this,Ue(this,t,!0))},fromEntrySeq:function(){return new Pe(this)},get:function(t,e){return this.find(function(e,n){return ht(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=en(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,g):g)===g)return e}return r},groupBy:function(t,e){return function(t,e,n){var r=a(t),i=(f(t)?Me():Pt()).asMutable();t.__iterate(function(o,s){i.update(e.call(n,o,s,t),function(t){return(t=t||[]).push(r?[s,o]:o),t})});var o=Ge(t);return i.map(function(e){return $e(t,o(e))})}(this,t,e)},has:function(t){return this.get(t,g)!==g},hasIn:function(t){return this.getIn(t,g)!==g},isSubset:function(t){return t="function"==typeof t.includes?t:n(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:n(t)).isSubset(this)},keyOf:function(t){return this.findKey(function(e){return ht(e,t)})},keySeq:function(){return this.toSeq().map(An).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Ne(this,t)},maxBy:function(t,e){return Ne(this,e,t)},min:function(t){return Ne(this,t?Pn(t):Fn)},minBy:function(t,e){return Ne(this,e?Pn(e):Fn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return $e(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return $e(this,Le(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(jn(t),e)},sortBy:function(t,e){return $e(this,We(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return $e(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return $e(this,function(t,e,n){var r=Qe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var s=0;return t.__iterate(function(t,i,a){return e.call(n,t,i,a)&&++s&&r(t,i,o)}),s},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var s=t.__iterator(2,i),a=!0;return new j(function(){if(!a)return{value:void 0,done:!0};var t=s.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?2===r?t:P(r,u,c,t):(a=!1,{value:void 0,done:!0})})},r}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(jn(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=f(t),n=a(t),r=e?1:0;return function(t,e){return e=wt(e,3432918353),e=wt(e<<15|e>>>-15,461845907),e=wt(e<<13|e>>>-13,5),e=wt((e=(e+3864292196|0)^t)^e>>>16,2246822507),St((e=wt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(n?e?function(t,e){r=31*r+Kn(Et(t),Et(e))|0}:function(t,e){r=r+Kn(Et(t),Et(e))|0}:e?function(t){r=31*r+Et(t)|0}:function(t){r=r+Et(t)|0}),r)}(this))}});var kn=n.prototype;kn[l]=!0,kn[q]=kn.values,kn.__toJS=kn.toArray,kn.__toStringMapper=Bn,kn.inspect=kn.toSource=function(){return this.toString()},kn.chain=kn.flatMap,kn.contains=kn.includes,Cn(r,{flip:function(){return $e(this,Be(this))},mapEntries:function(t,e){var n=this,r=0;return $e(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return $e(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var Rn=r.prototype;function An(t,e){return e}function qn(t,e){return[e,t]}function jn(t){return function(){return!t.apply(this,arguments)}}function Pn(t){return function(){return-t.apply(this,arguments)}}function Bn(t){return"string"==typeof t?JSON.stringify(t):String(t)}function Tn(){return O(arguments)}function Fn(t,e){return te?-1:0}function Kn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}return Rn[h]=!0,Rn[q]=kn.entries,Rn.__toJS=kn.toObject,Rn.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+Bn(t)},Cn(i,{toKeyedSeq:function(){return new Ae(this,!1)},filter:function(t,e){return $e(this,Ke(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return $e(this,Fe(this,!1))},slice:function(t,e){return $e(this,Ve(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=D(t,t<0?this.count():this.size);var r=this.slice(0,t);return $e(this,1===n?r:r.concat(O(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return $e(this,Ue(this,t,!1))},get:function(t,e){return(t=I(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=I(this,t))>=0&&(void 0!==this.size?this.size===1/0||t div { max-height: 450px; overflow-y: auto; } `,x=new RegExp("(?:\\p{RI}\\p{RI}|\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(?:\\u{200D}\\p{Emoji}(?:\\p{Emoji_Modifier}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*)","gu");class I extends r.default.Component{constructor(t){super(t);const{content:e,replacementVariables:n,recommendedReplacementVariables:r}=this.props,i=(0,m.unserializeEditor)(e,n),o=this.determineCurrentReplacementVariables(n,r);this.state={editorState:i,searchValue:"",isSuggestionsOpen:!1,editorKey:this.props.fieldId,suggestions:this.mapReplacementVariablesToSuggestions(o)},this._serializedContent=e,this.initializeBinds(),this.initializeDraftJsPlugins()}initializeBinds(){this.onChange=this.onChange.bind(this),this.handleKeyCommand=this.handleKeyCommand.bind(this),this.onSearchChange=this.onSearchChange.bind(this),this.setEditorRef=this.setEditorRef.bind(this),this.handleCopyCutEvent=this.handleCopyCutEvent.bind(this),this.debouncedA11ySpeak=(0,a.default)(p.speak.bind(this),500),this.onSuggestionsOpenChange=this.onSuggestionsOpenChange.bind(this)}initializeDraftJsPlugins(){const t=(0,o.default)({mentionTrigger:"%",entityMutability:"IMMUTABLE",mentionComponent:g.Mention}),e=(0,s.default)({stripEntities:!1});this.pluginList={mentionsPlugin:t,singleLinePlugin:{...e,handleReturn:()=>{}}},this.pluginList=(0,d.applyFilters)("yoast.replacementVariableEditor.pluginList",this.pluginList)}serializeContent(t){const e=(0,m.serializeEditor)(t.getCurrentContent());this._serializedContent!==e&&(this._serializedContent=e,this.props.onChange(this._serializedContent))}onChange(t){return new Promise(e=>{t=(0,m.replaceReplacementVariables)(t,this.props.replacementVariables),t=(0,w.selectReplacementVariables)(t,this.state.editorState),this.setState({editorState:t},()=>{this.serializeContent(t),e()})})}handleKeyCommand(t){if("backspace"!==t&&"delete"!==t)return"not-handled";let e=(0,b.removeSelectedText)(this.state.editorState);const n=e.getCurrentContent(),r=e.getSelection();if(!r.isCollapsed())return"not-handled";const i=r.getStartOffset();if(i<0)return"not-handled";const o=n.getBlockForKey(r.getStartKey()).getText(),s="backspace"===t?i-1:i+1;if((o.codePointAt(s)||0)<=127)return"not-handled";let a;return a="backspace"===t?this.getBackwardMatch(o,i):this.getForwardMatch(o,i),a?(e=(0,b.removeEmojiCompletely)(e,a,t),this.onChange(e).then(()=>this.focus()),"handled"):"not-handled"}getForwardMatch(t,e){let n=1;return[2,3,4,5,6,7,8,9,10,11,12,13,14].every(r=>{const i=t.slice(e,e+r);return!(null===i.match(x)||i.match(x).length>1||(n=r,0))}),t.slice(e,e+n).match(x)}getBackwardMatch(t,e){return t.slice(0,e).match(x)}mapReplacementVariablesToSuggestions(t){return t.map(t=>({...t,name:t.label,replaceName:t.name}))}suggestionsFilter(t,e){const n=t.toLowerCase();return e.filter(function(t){return!(t.hidden||n&&0!==t.name.toLowerCase().indexOf(n))})}determineCurrentReplacementVariables(t,e,n=""){if(""===n&&!(0,u.default)(e)){const n=(0,c.default)(t,t=>(0,f.default)(e,t.name));if(0!==n.length)return n}return t}onSearchChange({value:t}){this.props.onSearchChange&&this.props.onSearchChange(t);const e=this.determineCurrentReplacementVariables(this.props.replacementVariables,this.props.recommendedReplacementVariables,t),n=this.mapReplacementVariablesToSuggestions(e);this.setState({searchValue:t,suggestions:this.suggestionsFilter(t,n)}),setTimeout(()=>{this.announceSearchResults()})}onSuggestionsOpenChange(t){this.setState({isSuggestionsOpen:t})}announceSearchResults(){const{suggestions:t}=this.state;t.length?this.debouncedA11ySpeak((0,v.sprintf)(/* translators: %d expands to the number of results found. */ /* translators: %d expands to the number of results found. */ (0,v._n)("%d result found, use up and down arrow keys to navigate","%d results found, use up and down arrow keys to navigate",t.length,"wordpress-seo"),t.length),"assertive"):this.debouncedA11ySpeak((0,v.__)("No results","wordpress-seo"),"assertive")}focus(){this.editor.focus()}setEditorRef(t){this.editor=t}setEditorFieldId(){(0,l.default)(this.editor,"editor.editor").id=this.props.fieldId}triggerReplacementVariableSuggestions(){let t=(0,b.removeSelectedText)(this.state.editorState);const e=t.getSelection(),n=t.getCurrentContent(),r=(0,b.getAnchorBlock)(n,e).getText(),i=(0,b.getCaretOffset)(e),o=!(0,b.hasWhitespaceAt)(r,i-1),s=!(0,b.hasWhitespaceAt)(r,i),a=(0,b.getTrigger)(o,s);if(t=(0,b.insertText)(t,a),s){const e=i+a.length-1;t=(0,b.moveCaret)(t,e)}this.onChange(t).then(()=>this.focus())}componentDidUpdate(t,e){const{content:n,replacementVariables:r,recommendedReplacementVariables:i}=t,{searchValue:o}=this.state,s={},a=this.props,u=a.content!==this._serializedContent&&a.content!==n,c=a.replacementVariables!==r,f=a.replacementVariables.map(t=>t.name).filter(t=>!r.map(t=>t.name).includes(t)).some(t=>n.includes("%%"+t+"%%"));if(u&&(this._serializedContent=a.content,s.editorState=(0,m.unserializeEditor)(a.content,a.replacementVariables)),!u&&c&&f&&(this._serializedContent=a.content,s.editorState=(0,m.unserializeEditor)(a.content,a.replacementVariables)),c){const t=this.determineCurrentReplacementVariables(a.replacementVariables,i,o);s.suggestions=this.suggestionsFilter(o,this.mapReplacementVariablesToSuggestions(t))}(c||u)&&this.setState({...e,...s})}handleCopyCutEvent(t){const{editorState:e}=this.state,n=e.getSelection();if(n.getHasFocus())try{const r=t.clipboardData,i=e.getCurrentContent(),o=(0,m.serializeSelection)(i,n);r.setData("text/plain",o),t.preventDefault()}catch(t){console.error("Couldn't copy content of editor to clipboard, defaulting to browser copy behavior."),console.error("Original error: ",t)}}componentDidMount(){document.addEventListener("copy",this.handleCopyCutEvent),document.addEventListener("cut",this.handleCopyCutEvent),this.setEditorFieldId()}componentWillUnmount(){this.debouncedA11ySpeak.cancel(),document.removeEventListener("copy",this.handleCopyCutEvent),document.removeEventListener("cut",this.handleCopyCutEvent)}render(){const{MentionSuggestions:t}=this.pluginList.mentionsPlugin,{onFocus:e,onBlur:n,ariaLabelledBy:o,placeholder:s,theme:a,isDisabled:u,fieldId:c}=this.props,{editorState:f,suggestions:l,isSuggestionsOpen:h}=this.state;return r.default.createElement(r.default.Fragment,null,r.default.createElement(i.default,{key:this.state.editorKey,textDirectionality:a.isRtl?"RTL":"LTR",editorState:f,handleKeyCommand:this.handleKeyCommand,onChange:this.onChange,onFocus:e,onBlur:n,plugins:Object.values(this.pluginList),ref:this.setEditorRef,stripPastedStyles:!0,ariaLabelledBy:o,placeholder:s,spellCheck:!0,readOnly:u}),(0,d.applyFilters)("yoast.replacementVariableEditor.additionalPlugins",r.default.createElement(r.default.Fragment,null),this.pluginList,c),r.default.createElement(O,null,r.default.createElement(t,{onSearchChange:this.onSearchChange,suggestions:l,onOpenChange:this.onSuggestionsOpenChange,open:h})))}}e.ReplacementVariableEditorStandaloneInnerComponent=I,I.propTypes={content:h.default.string.isRequired,replacementVariables:y.replacementVariablesShape.isRequired,recommendedReplacementVariables:y.recommendedReplacementVariablesShape,ariaLabelledBy:h.default.string.isRequired,onSearchChange:h.default.func,onChange:h.default.func.isRequired,onFocus:h.default.func,onBlur:h.default.func,theme:h.default.object,placeholder:h.default.string,fieldId:h.default.string.isRequired,isDisabled:h.default.bool},I.defaultProps={onSearchChange:null,onFocus:()=>{},onBlur:()=>{},placeholder:"",theme:{isRtl:!1},recommendedReplacementVariables:[],isDisabled:!1},e.default=(0,_.withTheme)(I)},44186(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.StyledEditor=void 0;var r=c(n(51609)),i=c(n(71802)),o=n(27723),s=c(n(21679)),a=c(n(61893)),u=n(40385);function c(t){return t&&t.__esModule?t:{default:t}}const f=e.StyledEditor=s.default.section` padding: ${t=>t.padding?t.padding:"0 20px"}; `;class l extends r.default.Component{constructor(t){super(t),this.elements={title:null,description:null},this.setRef=this.setRef.bind(this),this.setTitleRef=this.setTitleRef.bind(this),this.setDescriptionRef=this.setDescriptionRef.bind(this),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this),this.onFocusTitle=this.onFocusTitle.bind(this),this.onChangeTitle=this.onChangeTitle.bind(this),this.onFocusDescription=this.onFocusDescription.bind(this),this.onChangeDescription=this.onChangeDescription.bind(this)}setRef(t,e){this.elements[t]=e}setTitleRef(t){this.setRef("title",t)}setDescriptionRef(t){this.setRef("description",t)}componentDidUpdate(t){this.focusOnActiveFieldChange(t.activeField)}focusOnActiveFieldChange(t){const{activeField:e}=this.props;e&&e!==t&&this.elements[e].focus()}triggerReplacementVariableSuggestions(t){this.elements[t].triggerReplacementVariableSuggestions()}onFocusTitle(){this.props.onFocus("title")}onChangeTitle(t){this.props.onChange("title",t)}onFocusDescription(){this.props.onFocus("description")}onChangeDescription(t){this.props.onChange("description",t)}render(){const{descriptionEditorFieldPlaceholder:t,activeField:e,hoveredField:n,replacementVariables:i,recommendedReplacementVariables:s,onBlur:u,data:{title:c,description:l},containerPadding:h,fieldIds:p,labels:d,hasNewBadge:v,isDisabled:_,hasPremiumBadge:y}=this.props;return r.default.createElement(f,{padding:h},r.default.createElement(a.default,{type:"title",label:d.title||(0,o.__)("SEO title","wordpress-seo"),onFocus:this.onFocusTitle,onBlur:u,isActive:"title"===e,isHovered:"title"===n,editorRef:this.setTitleRef,replacementVariables:i,recommendedReplacementVariables:s,content:c,onChange:this.onChangeTitle,fieldId:p.title,hasNewBadge:v,isDisabled:_,hasPremiumBadge:y}),r.default.createElement(a.default,{type:"description",placeholder:t,label:d.description||(0,o.__)("Meta description","wordpress-seo"),onFocus:this.onFocusDescription,onBlur:u,isActive:"description"===e,isHovered:"description"===n,editorRef:this.setDescriptionRef,replacementVariables:i,recommendedReplacementVariables:s,content:l,onChange:this.onChangeDescription,fieldId:p.description,hasNewBadge:v,isDisabled:_,hasPremiumBadge:y}))}}l.propTypes={replacementVariables:u.replacementVariablesShape,recommendedReplacementVariables:u.recommendedReplacementVariablesShape,onChange:i.default.func.isRequired,onFocus:i.default.func,onBlur:i.default.func,data:i.default.shape({title:i.default.string,description:i.default.string}).isRequired,activeField:i.default.oneOf(["title","description"]),hoveredField:i.default.oneOf(["title","description"]),descriptionEditorFieldPlaceholder:i.default.string,containerPadding:i.default.string,fieldIds:i.default.shape({title:i.default.string.isRequired,description:i.default.string.isRequired}).isRequired,labels:i.default.shape({title:i.default.string,description:i.default.string}),hasNewBadge:i.default.bool,isDisabled:i.default.bool,hasPremiumBadge:i.default.bool},l.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],onFocus:()=>{},onBlur:()=>{},containerPadding:"0 20px",descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1,activeField:"",hoveredField:""},e.default=l},45831(t){"use strict";t.exports=window.yoast.uiLibrary},48082(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mention=void 0;var r=a(n(51609)),i=a(n(21679)),o=a(n(71802)),s=a(n(32485));function a(t){return t&&t.__esModule?t:{default:t}}const u=i.default.span` color: rgb(15 23 42); background-color: rgb(226 232 240); padding: 0.125rem 0.5rem; margin: 0 0.125rem; border-radius: 17px; font-size: .75rem; font-weight: 500; line-height: 1.25; } &:hover { color: rgb(15 23 42); background-color: rgb(226 232 240); cursor: auto; } `,c=({children:t,className:e})=>r.default.createElement(u,{className:(0,s.default)("yst-replacevar__mention",e),spellCheck:!1},t);e.Mention=c,c.propTypes={children:o.default.node.isRequired,className:o.default.string.isRequired}},50491(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=u(n(51609)),i=u(n(71802)),o=n(56554),s=u(n(44186)),a=n(40385);function u(t){return t&&t.__esModule?t:{default:t}}class c extends r.default.Component{constructor(t){super(t),this.state={activeField:null,hoveredField:null},this.setFieldFocus=this.setFieldFocus.bind(this),this.handleChange=this.handleChange.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this)}handleChange(t,e){this.props.onChange(t,e)}setFieldFocus(t){this.setState({activeField:t})}onBlur(){this.setState({activeField:null})}onClick(t){this.setFieldFocus(t)}render(){const{data:t,replacementVariables:e,recommendedReplacementVariables:n,descriptionEditorFieldPlaceholder:i,hasPaperStyle:a,fieldIds:u,labels:c,hasNewBadge:f,isDisabled:l,hasPremiumBadge:h}=this.props,{activeField:p,hoveredField:d}=this.state;return r.default.createElement(o.ErrorBoundary,null,r.default.createElement(s.default,{descriptionEditorFieldPlaceholder:i,data:t,activeField:p,hoveredField:d,onChange:this.handleChange,onFocus:this.setFieldFocus,onBlur:this.onBlur,replacementVariables:e,recommendedReplacementVariables:n,containerPadding:a?"0 20px":"0",fieldIds:u,labels:c,hasNewBadge:f,isDisabled:l,hasPremiumBadge:h}))}}c.propTypes={replacementVariables:a.replacementVariablesShape,recommendedReplacementVariables:a.recommendedReplacementVariablesShape,data:i.default.shape({title:i.default.string.isRequired,description:i.default.string.isRequired}).isRequired,onChange:i.default.func.isRequired,descriptionEditorFieldPlaceholder:i.default.string,hasPaperStyle:i.default.bool,fieldIds:i.default.shape({title:i.default.string.isRequired,description:i.default.string.isRequired}).isRequired,labels:i.default.shape({title:i.default.string,description:i.default.string}),hasNewBadge:i.default.bool,isDisabled:i.default.bool,hasPremiumBadge:i.default.bool},c.defaultProps={replacementVariables:[],recommendedReplacementVariables:[],hasPaperStyle:!0,descriptionEditorFieldPlaceholder:null,labels:{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1},e.default=c},51609(t){"use strict";t.exports=window.React},52619(t){"use strict";t.exports=window.wp.hooks},53335(t){"use strict";t.exports=window.yoast.helpers},56427(t){"use strict";t.exports=window.wp.components},56554(t){"use strict";t.exports=window.yoast.componentsNew},61893(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(52619),i=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var n=_(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,n&&n.set(t,r),r}(n(51609)),o=v(n(71802)),s=v(n(19019)),a=n(27723),u=n(56427),c=n(45831),f=v(n(41210)),l=n(18495),h=n(31223),p=n(40385),d=n(56554);function v(t){return t&&t.__esModule?t:{default:t}}function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}class y extends i.default.Component{constructor(t){super(t),this.uniqueId=(0,s.default)("replacement-variable-editor-field-"),"description"===t.type?this.InputContainer=h.DescriptionInputContainer:this.InputContainer=h.TitleInputContainer,t.withCaret&&(this.InputContainer=(0,l.withCaretStyles)(this.InputContainer)),this.triggerReplacementVariableSuggestions=this.triggerReplacementVariableSuggestions.bind(this)}triggerReplacementVariableSuggestions(){this.ref.triggerReplacementVariableSuggestions()}render(){const{label:t,onChange:e,content:n,onFocus:o,onBlur:s,isActive:l,isHovered:p,onSearchChange:v,replacementVariables:_,recommendedReplacementVariables:y,editorRef:g,placeholder:m,fieldId:b,onMouseEnter:w,onMouseLeave:S,hasNewBadge:E,isDisabled:O,hasPremiumBadge:x,type:I}=this.props,z=this.InputContainer,M=(0,r.applyFilters)("yoast.replacementVariableEditor.additionalButtons",[],{fieldId:b,type:I});return i.default.createElement(h.FormSection,{className:["yst-replacevar yst-justify-between",O&&"yst-replacevar--disabled"].filter(Boolean).join(" "),onMouseEnter:w,onMouseLeave:S},i.default.createElement(d.SimulatedLabel,{className:"yst-replacevar__label",id:this.uniqueId,onClick:o},t),x&&i.default.createElement(d.PremiumBadge,{inLabel:!0}),E&&i.default.createElement(d.NewBadge,{inLabel:!0}),i.default.createElement(c.Root,null,i.default.createElement(h.ButtonsContainer,{className:"yst-replacevar__buttons"},i.default.createElement(u.Slot,{key:`PluginComponent-${b}`,name:`PluginComponent-${b}`}),i.default.createElement(c.Button,{className:"yst-replacevar__button-insert yst-h-7",onClick:this.triggerReplacementVariableSuggestions,disabled:O,variant:"secondary",size:"small"},(0,a.__)("Insert variable","wordpress-seo")),i.default.createElement(u.Slot,{name:`yoast.replacementVariableEditor.additionalButtons.${b}`}),M.map((t,e)=>i.default.createElement(i.Fragment,{key:`additional-button-${e}-${b}`},t)))),i.default.createElement(z,{className:"yst-replacevar__editor",onClick:o,isActive:l&&!O,isHovered:p},i.default.createElement(f.default,{fieldId:b,placeholder:m,content:n,onChange:e,onFocus:o,onBlur:s,onSearchChange:v,replacementVariables:_,recommendedReplacementVariables:y,ref:t=>{this.ref=t,g(t)},ariaLabelledBy:this.uniqueId,isDisabled:O})))}}y.propTypes={editorRef:o.default.func,content:o.default.string.isRequired,onChange:o.default.func.isRequired,onBlur:o.default.func,onSearchChange:o.default.func,replacementVariables:p.replacementVariablesShape,recommendedReplacementVariables:p.recommendedReplacementVariablesShape,isActive:o.default.bool,isHovered:o.default.bool,withCaret:o.default.bool,onFocus:o.default.func,label:o.default.string,placeholder:o.default.string,type:o.default.oneOf(["title","description"]).isRequired,fieldId:o.default.string,onMouseEnter:o.default.func,onMouseLeave:o.default.func,hasNewBadge:o.default.bool,isDisabled:o.default.bool,hasPremiumBadge:o.default.bool},y.defaultProps={onFocus:()=>{},onBlur:()=>{},onSearchChange:null,replacementVariables:[],recommendedReplacementVariables:[],fieldId:"",placeholder:"",label:"",withCaret:!1,isHovered:!1,isActive:!1,editorRef:()=>{},onMouseEnter:()=>{},onMouseLeave:()=>{},hasNewBadge:!1,isDisabled:!1,hasPremiumBadge:!1},e.default=y},67228(t,e,n){"use strict";n.r(e),n.d(e,{composeDecorators:()=>w,createEditorStateWithText:()=>b,default:()=>S});var r=n(18136),i=n(51609),o=n.n(i),s=n(71802),a=n.n(s),u=n(9404),c=n.n(u);function f(){return f=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}function h(t){var e=t.getCurrentContent().getBlockMap(),n=e.last().getKey(),i=e.last().getLength(),o=new r.SelectionState({anchorKey:n,anchorOffset:i,focusKey:n,focusOffset:i});return r.EditorState.acceptSelection(t,o)}var p="-",d=function(){function t(t){this.decorators=void 0,this.decorators=c().List(t)}var e=t.prototype;return e.getDecorations=function(t,e){var n=new Array(t.getText().length).fill(null);return this.decorators.forEach(function(r,i){r.getDecorations(t,e).forEach(function(t,e){t&&(n[e]=i+p+t)})}),c().List(n)},e.getComponentForKey=function(e){return this.getDecoratorForKey(e).getComponentForKey(t.getInnerKey(e))},e.getPropsForKey=function(e){return this.getDecoratorForKey(e).getPropsForKey(t.getInnerKey(e))},e.getDecoratorForKey=function(t){var e=t.split(p),n=Number(e[0]);return this.decorators.get(n)},t.getInnerKey=function(t){return t.split(p).slice(1).join(p)},t}(),v=function(t){return"function"==typeof t.getDecorations&&"function"==typeof t.getComponentForKey&&"function"==typeof t.getPropsForKey};function _(t){return(0,r.getDefaultKeyBinding)(t)}function y(t,e,n,i){var o,s=i.setEditorState;switch(t){case"backspace":case"backspace-word":case"backspace-to-start-of-line":o=r.RichUtils.onBackspace(e);break;case"delete":case"delete-word":case"delete-to-end-of-block":o=r.RichUtils.onDelete(e);break;default:return"not-handled"}return null!=o?(s(o),"handled"):"not-handled"}var g=function(t){var e,n;return null!=(null==t?void 0:t.decorators)?null==(e=t.decorators)?void 0:e.size:null!=(null==t?void 0:t._decorators)?null==(n=t._decorators)?void 0:n.length:void 0},m=function(t){var e,n;function i(e){var n;return(n=t.call(this,e)||this).editor=null,n.state={readOnly:!1},n.onChange=function(t){var e=t;n.resolvePlugins().forEach(function(t){t.onChange&&(e=t.onChange(e,n.getPluginMethods()))}),n.props.onChange&&n.props.onChange(e)},n.getPlugins=function(){return[].concat(n.props.plugins)},n.getProps=function(){return f({},n.props)},n.getReadOnly=function(){return n.props.readOnly||n.state.readOnly},n.setReadOnly=function(t){t!==n.state.readOnly&&n.setState({readOnly:t})},n.getEditorRef=function(){return n.editor},n.getEditorState=function(){return n.props.editorState},n.getPluginMethods=function(){return{getPlugins:n.getPlugins,getProps:n.getProps,setEditorState:n.onChange,getEditorState:n.getEditorState,getReadOnly:n.getReadOnly,setReadOnly:n.setReadOnly,getEditorRef:n.getEditorRef}},n.createPluginHooks=function(){return t=[n.props].concat(n.resolvePlugins()),e=n.getPluginMethods(),r={},i=new Set(["onChange"]),t.forEach(function(n){Object.keys(n).forEach(function(n){i.has(n)||(i.add(n),n.startsWith("on")?r[n]=function(t,e,n){return function(){for(var r=arguments.length,i=new Array(r),o=0;o=0;n-=1)t=(0,e[n])(t);return t}};const S=m},71802(t){"use strict";t.exports=window.yoast.propTypes},74345(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeSelectedText=e.removeEmojiCompletely=e.moveCaret=e.insertText=e.hasWhitespaceAt=e.getTrigger=e.getCaretOffset=e.getAnchorBlock=void 0;var r=n(18136);e.getTrigger=(t,e)=>{let n="%";return t&&(n=" "+n),e&&(n+=" "),n},e.hasWhitespaceAt=(t,e)=>{const n=t.charAt(e);return 0===n.length||/\s/.test(n)},e.getCaretOffset=t=>t.getIsBackward()?t.getEndOffset():t.getStartOffset();const i=(t,e)=>{const n=e.getAnchorKey();return t.getBlockForKey(n)};e.getAnchorBlock=i,e.insertText=(t,e)=>{const n=t.getCurrentContent(),i=t.getSelection();if(!i.isCollapsed())return t;const o=r.Modifier.insertText(n,i,e);return r.EditorState.push(t,o,"insert-characters")},e.removeSelectedText=t=>{const e=t.getCurrentContent(),n=t.getSelection(),i=r.Modifier.removeRange(e,n,"backward");return r.EditorState.push(t,i,"remove-range")},e.moveCaret=(t,e,n="")=>{const o=t.getCurrentContent(),s=t.getSelection();""===n&&(n=i(o,s).getKey());const a=r.SelectionState.createEmpty(n).merge({anchorOffset:e,focusOffset:e});return r.EditorState.acceptSelection(t,a)},e.removeEmojiCompletely=(t,e,n)=>{const i=t.getSelection(),o=t.getCurrentContent(),s=i.getStartOffset(),a=o.getBlockForKey(i.getStartKey()),u=e[e.length-1].length,c="backspace"===n?s-u:s+u,f=new r.SelectionState({anchorOffset:c,anchorKey:a.getKey(),focusOffset:s,focusKey:a.getKey(),isBackward:"delete"===n,hasFocus:i.getHasFocus()});return r.EditorState.push(t,r.Modifier.replaceText(o,f,""),"remove-range")}},78190(t){"use strict";t.exports=window.lodash.get},80286(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addLabel=h,e.addPositionInformation=p,e.createEntityInContent=v,e.findReplacementVariables=l,e.getReplacementVariableLabel=f,e.getSelectedText=y,e.moveSelectionAfterReplacement=d,e.replaceByPosition=a,e.replaceReplacementVariables=g,e.replaceVariableWithEntity=_,e.serializeBlock=c,e.serializeEditor=function(t,e=" "){return t.getBlockMap().map(e=>c(e,e=>t.getEntity(e))).join(e)},e.serializeSelection=function(t,e,n=" "){const r=e.getStartKey(),i=e.getEndKey(),o=t.getBlockMap();let s=!1;return o.skipUntil(function(t){return t.getKey()===r}).takeUntil(function(t){const e=s;return t.getKey()===i&&(s=!0),e}).map(function(n){const o=n.getKey(),s={};return o===r&&(s.start=e.getStartOffset()),o===i&&(s.end=e.getEndOffset()),c(n,e=>t.getEntity(e),s)}).join(n)},e.serializeVariable=s,e.unserializeEditor=function(t,e){return g(r.EditorState.createWithContent(r.ContentState.createFromText(t)),e)};var r=n(18136),i=n(53335);const o=/%%([A-Za-z0-9_]+)%%/g;function s(t){return"%%"+t+"%%"}function a(t,e=[]){return[...e].reverse().forEach(e=>{const{start:n,end:r,replacementText:i}=e,o=t.slice(0,n),s=t.slice(r,t.length);t=o+i+s}),t}function u(t,e,n){return t>=e&&t<=n}function c(t,e,{start:n=0,end:r=t.getText().length}={}){const i=t.getText().slice(n,r),o=[];return t.findEntityRanges(t=>!!t.getEntity(),(i,a)=>{if(u(i,n,r)&&u(a,n,r)){const r=e(t.getEntityAt(i));r.data.mention&&o.push({start:i-n,end:a-n,replacementText:s(r.data.mention.replaceName)})}}),a(i,o)}function f(t,e){let n=e;return t.forEach(t=>{t.name===e&&t.label&&(n=t.label)}),n}function l(t){const e=[];let n;for(;n=o.exec(t);){const[t,r]=n;e.push({name:r,start:n.index,length:t.length})}return e}function h(t,e){return{...t,label:f(e,t.name)}}function p(t){return{...t,start:t.start,end:t.start+t.length,delta:t.label.length-t.length}}function d(t,e,n){const{start:r,end:i,delta:o}=n;if(t.hasEdgeWithin(e,r,i)){const e=i+o;t=t.merge({anchorOffset:e,focusOffset:e})}else t.focusOffset>i&&(t=t.merge({anchorOffset:t.anchorOffset+o,focusOffset:t.focusOffset+o}));return t}function v(t,e){const n={mention:{replaceName:e.name}};return t.createEntity("%mention","IMMUTABLE",n)}function _(t,e,n){let i=t.getCurrentContent();const o=r.SelectionState.createEmpty(n).merge({anchorOffset:e.start,focusOffset:e.end});i=v(i,e);const s=r.Modifier.replaceText(i,o,e.label,null,i.getLastCreatedEntityKey());return r.EditorState.push(t,s,"apply-entity")}function y(t,e){const n=e.getAnchorKey(),r=t.getCurrentContent().getBlockForKey(n),i=e.getStartOffset(),o=e.getEndOffset();return r.getText().slice(i,o)}function g(t,e){const n=t.getCurrentContent().getBlockMap();let o=t;return n.forEach(t=>{const{text:n,key:s}=t;[...l(n)].reverse().forEach(t=>{t=p(t=h(t,e));let n=o.getSelection();n=d(n,s,t);const a=function(t,e,n,o){const s=t.getCurrentContent(),a=y(t,r.SelectionState.createEmpty(n).merge({anchorOffset:o.end,focusOffset:o.end+1}));if(!(0,i.getWordBoundaries)().includes(a)){const i=r.SelectionState.createEmpty(n).merge({anchorOffset:o.end,focusOffset:o.end}),a=r.Modifier.insertText(s,i," ");t=r.EditorState.push(t,a,"insert-characters"),e.getAnchorOffset()>=o.start&&(e=e.merge({anchorOffset:e.getAnchorOffset()+1,focusOffset:e.getFocusOffset()+1}))}return{editorState:t,selection:e}}(o,n,s,t);o=_(a.editorState,t,s),o=r.EditorState.acceptSelection(o,a.selection)})}),o}},84646(t){"use strict";t.exports=window.lodash.isEmpty},89567(t){"use strict";t.exports=window.lodash.filter},99212(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEntityAtPosition=o,e.getEntityRange=i,e.selectReplacementVariables=function(t,e){const n=t.getSelection(),a=e.getSelection(),u=t.getCurrentContent();if(n===a)return t;const c=function(t,e,n){const r=t.getStartOffset(),a=t.getStartKey(),u=t.getEndOffset(),c=t.getEndKey(),{startOffsetProperty:f,endOffsetProperty:l}=function(t){let e="anchorOffset",n="focusOffset";return t&&(e="focusOffset",n="anchorOffset"),{startOffsetProperty:e,endOffsetProperty:n}}(t.getIsBackward()),h=o(n,a,r);if(null!==h){const r=i(n,a,h),{start:o,end:u}=r;t=s(e,r)?t.merge({[f]:u}):t.merge({[f]:o})}const p=o(n,c,u);if(null!==p){const r=i(n,a,p),{start:o,end:u}=r;t=s(e,r)?t.merge({[l]:o}):t.merge({[l]:u})}return t}(n,a,u);return c!==n&&(t=r.EditorState.forceSelection(t,c)),t};var r=n(18136);function i(t,e,n){const r=t.getBlockForKey(e);let i=null;return r.findEntityRanges(t=>t.getEntity()===n,(t,e)=>{i={start:t,end:e}}),i}function o(t,e,n){const r=t.getBlockForKey(e).getEntityAt(n),o=i(t,e,r);return null===o||o.start===n?null:r}function s(t,e){const{start:n,end:r}=e;return t.getStartOffset()<=n&&t.getEndOffset()>=r}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReplacementVariableEditor",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"ReplacementVariableEditorStandalone",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SettingsSnippetEditor",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"StandardButton",{enumerable:!0,get:function(){return a.StandardButton}}),Object.defineProperty(t,"StyledEditor",{enumerable:!0,get:function(){return s.StyledEditor}}),Object.defineProperty(t,"TriggerReplacementVariableSuggestionsButton",{enumerable:!0,get:function(){return a.TriggerReplacementVariableSuggestionsButton}}),Object.defineProperty(t,"recommendedReplacementVariablesShape",{enumerable:!0,get:function(){return u.recommendedReplacementVariablesShape}}),Object.defineProperty(t,"replacementVariablesShape",{enumerable:!0,get:function(){return u.replacementVariablesShape}});var e=c(n(61893)),i=c(n(41210)),o=c(n(50491)),s=n(44186),a=n(31223),u=n(40385);function c(t){return t&&t.__esModule?t:{default:t}}})(),(window.yoast=window.yoast||{}).replacementVariableEditor=r})();